Changes in kernel/arch/ppc32/include/exception.h [826c203:96b02eb9] in mainline
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
kernel/arch/ppc32/include/exception.h
r826c203 r96b02eb9 27 27 */ 28 28 29 /** @addtogroup ppc32 29 /** @addtogroup ppc32 30 30 * @{ 31 31 */ … … 36 36 #define KERN_ppc32_EXCEPTION_H_ 37 37 38 #include <arch/types.h> 39 #include <arch/regutils.h> 38 #include <typedefs.h> 39 #include <arch/cpu.h> 40 #include <trace.h> 40 41 41 typedef struct {42 typedef struct istate { 42 43 uint32_t r0; 43 44 uint32_t r2; … … 81 82 } istate_t; 82 83 83 static inline void istate_set_retaddr(istate_t *istate, uintptr_t retaddr) 84 NO_TRACE static inline void istate_set_retaddr(istate_t *istate, 85 uintptr_t retaddr) 84 86 { 85 87 istate->pc = retaddr; 86 88 } 87 89 88 /** Return true if exception happened while in userspace */ 89 static inline int istate_from_uspace(istate_t *istate) 90 /** Return true if exception happened while in userspace 91 * 92 * The contexts of MSR register was stored in SRR1. 93 * 94 */ 95 NO_TRACE static inline int istate_from_uspace(istate_t *istate) 90 96 { 91 /* true if privilege level PR (copied from MSR) == 1 */92 97 return (istate->srr1 & MSR_PR) != 0; 93 98 } 94 99 95 static inline unative_t istate_get_pc(istate_t *istate)100 NO_TRACE static inline sysarg_t istate_get_pc(istate_t *istate) 96 101 { 97 102 return istate->pc; 103 } 104 105 NO_TRACE static inline sysarg_t istate_get_fp(istate_t *istate) 106 { 107 return istate->sp; 98 108 } 99 109
Note:
See TracChangeset
for help on using the changeset viewer.