Changes in kernel/arch/ppc32/include/exception.h [d99c1d2:7a0359b] in mainline
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
kernel/arch/ppc32/include/exception.h
rd99c1d2 r7a0359b 27 27 */ 28 28 29 /** @addtogroup ppc32 29 /** @addtogroup ppc32 30 30 * @{ 31 31 */ … … 37 37 38 38 #include <typedefs.h> 39 #include <arch/regutils.h> 39 #include <arch/cpu.h> 40 #include <trace.h> 40 41 41 42 typedef struct istate { … … 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 unative_t istate_get_pc(istate_t *istate) 96 101 { 97 102 return istate->pc; 98 103 } 99 104 100 static inline unative_t istate_get_fp(istate_t *istate)105 NO_TRACE static inline unative_t istate_get_fp(istate_t *istate) 101 106 { 102 107 return istate->sp;
Note:
See TracChangeset
for help on using the changeset viewer.