Renames struct trapframe -> hw_trapframe (XCC)
[akaros.git] / kern / arch / riscv / ros / trapframe.h
1 #ifndef ROS_INC_ARCH_TRAPFRAME_H
2 #define ROS_INC_ARCH_TRAPFRAME_H
3
4 #ifndef ROS_INC_TRAPFRAME_H
5 #error "Do not include include ros/arch/trapframe.h directly"
6 #endif
7
8 #include <ros/common.h>
9 #include <stdint.h>
10
11 struct hw_trapframe
12 {
13   uintptr_t gpr[32];
14   uintptr_t sr;
15   uintptr_t epc;
16   uintptr_t badvaddr;
17   long cause;
18 };
19
20 /* Temporary aliasing */
21 #define trapframe hw_trapframe
22
23 struct sw_trapframe {
24         /* TODO */
25 };
26
27 /* TODO: consider using a user-space specific trapframe, since they don't need
28  * all of this information.  Will do that eventually, but til then: */
29 #define user_trapframe trapframe
30
31 typedef struct ancillary_state
32 {
33         uint64_t fpr[32];
34         uint32_t fsr;
35 } ancillary_state_t;
36
37 #endif /* ROS_INC_ARCH_TRAPFRAME_H */