risc-v supervisor mode updates
[akaros.git] / kern / arch / riscv / ros / trapframe.h
1 #ifndef ROS_INCLUDE_ARCH_TRAPFRAME_H
2 #define ROS_INCLUDE_ARCH_TRAPFRAME_H
3
4 #include <ros/common.h>
5 #include <stdint.h>
6
7 typedef struct trapframe
8 {
9   uintptr_t gpr[32];
10   uintptr_t sr;
11   uintptr_t epc;
12   uintptr_t badvaddr;
13   long cause;
14   uintptr_t insn;
15 } trapframe_t;
16
17 /* TODO: consider using a user-space specific trapframe, since they don't need
18  * all of this information.  Will do that eventually, but til then: */
19 #define user_trapframe trapframe
20
21 typedef struct ancillary_state
22 {
23         uint64_t fpr[32];
24         uint32_t fsr;
25 } ancillary_state_t;
26
27 #endif /* !ROS_INCLUDE_ARCH_TRAPFRAME_H */