23092eb1ef8163fdf3f0373cd37c14ddaf74b3ce
[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 } trapframe_t;
15
16 /* TODO: consider using a user-space specific trapframe, since they don't need
17  * all of this information.  Will do that eventually, but til then: */
18 #define user_trapframe trapframe
19
20 typedef struct ancillary_state
21 {
22         uint64_t fpr[32];
23         uint32_t fsr;
24 } ancillary_state_t;
25
26 #endif /* !ROS_INCLUDE_ARCH_TRAPFRAME_H */