Changes in kernel/arch/mips32/include/exception.h [7a0359b:22a28a69] in mainline
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
kernel/arch/mips32/include/exception.h
r7a0359b r22a28a69 27 27 */ 28 28 29 /** @addtogroup mips32 29 /** @addtogroup mips32 30 30 * @{ 31 31 */ … … 38 38 #include <typedefs.h> 39 39 #include <arch/cp0.h> 40 #include <trace.h>41 40 42 #define EXC_Int 43 #define EXC_Mod 44 #define EXC_TLBL 45 #define EXC_TLBS 46 #define EXC_AdEL 47 #define EXC_AdES 48 #define EXC_IBE 49 #define EXC_DBE 50 #define EXC_Sys 51 #define EXC_Bp 52 #define EXC_RI 53 #define EXC_CpU 54 #define EXC_Ov 55 #define EXC_Tr 56 #define EXC_VCEI 57 #define EXC_FPE 58 #define EXC_WATCH 59 #define EXC_VCED 41 #define EXC_Int 0 42 #define EXC_Mod 1 43 #define EXC_TLBL 2 44 #define EXC_TLBS 3 45 #define EXC_AdEL 4 46 #define EXC_AdES 5 47 #define EXC_IBE 6 48 #define EXC_DBE 7 49 #define EXC_Sys 8 50 #define EXC_Bp 9 51 #define EXC_RI 10 52 #define EXC_CpU 11 53 #define EXC_Ov 12 54 #define EXC_Tr 13 55 #define EXC_VCEI 14 56 #define EXC_FPE 15 57 #define EXC_WATCH 23 58 #define EXC_VCED 31 60 59 61 60 typedef struct istate { … … 83 82 uint32_t lo; 84 83 uint32_t hi; 85 86 uint32_t status; 87 uint32_t epc; 88 uint32_t k1; 84 85 uint32_t status; /* cp0_status */ 86 uint32_t epc; /* cp0_epc */ 87 uint32_t k1; /* We use it as thread-local pointer */ 89 88 } istate_t; 90 89 91 NO_TRACE static inline void istate_set_retaddr(istate_t *istate, 92 uintptr_t retaddr) 90 static inline void istate_set_retaddr(istate_t *istate, uintptr_t retaddr) 93 91 { 94 92 istate->epc = retaddr; … … 96 94 97 95 /** Return true if exception happened while in userspace */ 98 NO_TRACEstatic inline int istate_from_uspace(istate_t *istate)96 static inline int istate_from_uspace(istate_t *istate) 99 97 { 100 98 return istate->status & cp0_status_um_bit; 101 99 } 102 103 NO_TRACE static inline unative_t istate_get_pc(istate_t *istate) 100 static inline unative_t istate_get_pc(istate_t *istate) 104 101 { 105 102 return istate->epc; 106 103 } 107 108 NO_TRACE static inline unative_t istate_get_fp(istate_t *istate) 104 static inline unative_t istate_get_fp(istate_t *istate) 109 105 { 110 /* FIXME */ 111 112 return 0; 106 return 0; /* FIXME */ 113 107 } 114 108
Note:
See TracChangeset
for help on using the changeset viewer.