Rev 1293 | Rev 1702 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed
Rev 1293 | Rev 1595 | ||
---|---|---|---|
Line 32... | Line 32... | ||
32 | #ifndef __mips32_TYPES_H__ |
32 | #ifndef __mips32_TYPES_H__ |
33 | # include <arch/types.h> |
33 | # include <arch/types.h> |
34 | #endif |
34 | #endif |
35 | 35 | ||
36 | #include <typedefs.h> |
36 | #include <typedefs.h> |
- | 37 | #include <arch/cp0.h> |
|
37 | 38 | ||
38 | #define EXC_Int 0 |
39 | #define EXC_Int 0 |
39 | #define EXC_Mod 1 |
40 | #define EXC_Mod 1 |
40 | #define EXC_TLBL 2 |
41 | #define EXC_TLBL 2 |
41 | #define EXC_TLBS 3 |
42 | #define EXC_TLBS 3 |
Line 96... | Line 97... | ||
96 | static inline void istate_set_retaddr(istate_t *istate, __address retaddr) |
97 | static inline void istate_set_retaddr(istate_t *istate, __address retaddr) |
97 | { |
98 | { |
98 | istate->epc = retaddr; |
99 | istate->epc = retaddr; |
99 | } |
100 | } |
100 | 101 | ||
- | 102 | /** Return true if exception happened while in userspace */ |
|
- | 103 | static inline int istate_from_uspace(istate_t *istate) |
|
- | 104 | { |
|
- | 105 | return istate->status & cp0_status_um_bit; |
|
- | 106 | } |
|
- | 107 | static inline __native istate_get_pc(istate_t *istate) |
|
- | 108 | { |
|
- | 109 | return istate->epc; |
|
- | 110 | } |
|
- | 111 | ||
101 | extern void exception(istate_t *istate); |
112 | extern void exception(istate_t *istate); |
102 | extern void tlb_refill_entry(void); |
113 | extern void tlb_refill_entry(void); |
103 | extern void exception_entry(void); |
114 | extern void exception_entry(void); |
104 | extern void cache_error_entry(void); |
115 | extern void cache_error_entry(void); |
105 | extern void exception_init(void); |
116 | extern void exception_init(void); |