Changes in kernel/arch/abs32le/include/interrupt.h [598f90e:7a0359b] in mainline
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
kernel/arch/abs32le/include/interrupt.h
r598f90e r7a0359b 37 37 38 38 #include <typedefs.h> 39 #include <arch/istate.h> 39 #include <verify.h> 40 #include <trace.h> 40 41 41 42 #define IVT_ITEMS 0 … … 44 45 #define VECTOR_TLB_SHOOTDOWN_IPI 0 45 46 47 /* 48 * On real hardware this stores the registers which 49 * 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 interrupted 61 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 46 91 #endif 47 92
Note:
See TracChangeset
for help on using the changeset viewer.