36,6 → 36,7 |
#define KERN_ppc32_EXCEPTION_H_ |
|
#include <arch/types.h> |
#include <arch/regutils.h> |
|
typedef struct { |
uint32_t r0; |
82,13 → 83,14 |
{ |
istate->pc = retaddr; |
} |
|
/** Return true if exception happened while in userspace */ |
#include <panic.h> |
static inline int istate_from_uspace(istate_t *istate) |
{ |
panic("istate_from_uspace not yet implemented"); |
return 0; |
/* true if privilege level PR (copied from MSR) == 1 */ |
return (istate->srr1 & MSR_PR) != 0; |
} |
|
static inline unative_t istate_get_pc(istate_t *istate) |
{ |
return istate->pc; |