Changes in kernel/arch/mips32/include/exception.h [598f90e:7a0359b] in mainline
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
kernel/arch/mips32/include/exception.h
r598f90e r7a0359b 37 37 38 38 #include <typedefs.h> 39 #include <arch/istate.h> 39 #include <arch/cp0.h> 40 #include <trace.h> 40 41 41 42 #define EXC_Int 0 … … 58 59 #define EXC_VCED 31 59 60 61 typedef struct istate { 62 uint32_t at; 63 uint32_t v0; 64 uint32_t v1; 65 uint32_t a0; 66 uint32_t a1; 67 uint32_t a2; 68 uint32_t a3; 69 uint32_t t0; 70 uint32_t t1; 71 uint32_t t2; 72 uint32_t t3; 73 uint32_t t4; 74 uint32_t t5; 75 uint32_t t6; 76 uint32_t t7; 77 uint32_t t8; 78 uint32_t t9; 79 uint32_t gp; 80 uint32_t sp; 81 uint32_t ra; 82 83 uint32_t lo; 84 uint32_t hi; 85 86 uint32_t status; /* cp0_status */ 87 uint32_t epc; /* cp0_epc */ 88 uint32_t k1; /* We use it as thread-local pointer */ 89 } istate_t; 90 91 NO_TRACE static inline void istate_set_retaddr(istate_t *istate, 92 uintptr_t retaddr) 93 { 94 istate->epc = retaddr; 95 } 96 97 /** Return true if exception happened while in userspace */ 98 NO_TRACE static inline int istate_from_uspace(istate_t *istate) 99 { 100 return istate->status & cp0_status_um_bit; 101 } 102 103 NO_TRACE static inline unative_t istate_get_pc(istate_t *istate) 104 { 105 return istate->epc; 106 } 107 108 NO_TRACE static inline unative_t istate_get_fp(istate_t *istate) 109 { 110 /* FIXME */ 111 112 return 0; 113 } 114 60 115 extern void exception(istate_t *istate); 61 116 extern void tlb_refill_entry(void);
Note:
See TracChangeset
for help on using the changeset viewer.