Changes in kernel/arch/ppc32/include/exception.h [7a0359b:d99c1d2] in mainline
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
kernel/arch/ppc32/include/exception.h
r7a0359b rd99c1d2 27 27 */ 28 28 29 /** @addtogroup ppc32 29 /** @addtogroup ppc32 30 30 * @{ 31 31 */ … … 37 37 38 38 #include <typedefs.h> 39 #include <arch/cpu.h> 40 #include <trace.h> 39 #include <arch/regutils.h> 41 40 42 41 typedef struct istate { … … 82 81 } istate_t; 83 82 84 NO_TRACE static inline void istate_set_retaddr(istate_t *istate, 85 uintptr_t retaddr) 83 static inline void istate_set_retaddr(istate_t *istate, uintptr_t retaddr) 86 84 { 87 85 istate->pc = retaddr; 88 86 } 89 87 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) 88 /** Return true if exception happened while in userspace */ 89 static inline int istate_from_uspace(istate_t *istate) 96 90 { 91 /* true if privilege level PR (copied from MSR) == 1 */ 97 92 return (istate->srr1 & MSR_PR) != 0; 98 93 } 99 94 100 NO_TRACEstatic inline unative_t istate_get_pc(istate_t *istate)95 static inline unative_t istate_get_pc(istate_t *istate) 101 96 { 102 97 return istate->pc; 103 98 } 104 99 105 NO_TRACEstatic inline unative_t istate_get_fp(istate_t *istate)100 static inline unative_t istate_get_fp(istate_t *istate) 106 101 { 107 102 return istate->sp;
Note:
See TracChangeset
for help on using the changeset viewer.