Changes in kernel/arch/abs32le/include/interrupt.h [7a0359b:598f90e] in mainline
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
kernel/arch/abs32le/include/interrupt.h
r7a0359b r598f90e 37 37 38 38 #include <typedefs.h> 39 #include <verify.h> 40 #include <trace.h> 39 #include <arch/istate.h> 41 40 42 41 #define IVT_ITEMS 0 … … 45 44 #define VECTOR_TLB_SHOOTDOWN_IPI 0 46 45 47 /*48 * On real hardware this stores the registers which49 * need to be preserved during interupts.50 */51 typedef struct istate {52 uintptr_t ip;53 uintptr_t fp;54 uint32_t stack[];55 } istate_t;56 57 NO_TRACE static inline int istate_from_uspace(istate_t *istate)58 REQUIRES_EXTENT_MUTABLE(istate)59 {60 /* On real hardware this checks whether the interrupted61 context originated from user space. */62 63 return !(istate->ip & 0x80000000);64 }65 66 NO_TRACE static inline void istate_set_retaddr(istate_t *istate,67 uintptr_t retaddr)68 WRITES(&istate->ip)69 {70 /* On real hardware this sets the instruction pointer. */71 72 istate->ip = retaddr;73 }74 75 NO_TRACE static inline unative_t istate_get_pc(istate_t *istate)76 REQUIRES_EXTENT_MUTABLE(istate)77 {78 /* On real hardware this returns the instruction pointer. */79 80 return istate->ip;81 }82 83 NO_TRACE static inline unative_t istate_get_fp(istate_t *istate)84 REQUIRES_EXTENT_MUTABLE(istate)85 {86 /* On real hardware this returns the frame pointer. */87 88 return istate->fp;89 }90 91 46 #endif 92 47
Note:
See TracChangeset
for help on using the changeset viewer.