Subversion Repositories HelenOS

Rev

Rev 3343 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 3343 Rev 3492
Line 34... Line 34...
34
 
34
 
35
#ifndef KERN_ppc32_EXCEPTION_H_
35
#ifndef KERN_ppc32_EXCEPTION_H_
36
#define KERN_ppc32_EXCEPTION_H_
36
#define KERN_ppc32_EXCEPTION_H_
37
 
37
 
38
#include <arch/types.h>
38
#include <arch/types.h>
-
 
39
#include <arch/regutils.h>
39
 
40
 
40
typedef struct {
41
typedef struct {
41
    uint32_t r0;
42
    uint32_t r0;
42
    uint32_t r2;
43
    uint32_t r2;
43
    uint32_t r3;
44
    uint32_t r3;
Line 82... Line 83...
82
{
83
{
83
    istate->pc = retaddr;
84
    istate->pc = retaddr;
84
}
85
}
85
 
86
 
86
/** Return true if exception happened while in userspace */
87
/** Return true if exception happened while in userspace */
87
#include <panic.h>
-
 
88
static inline int istate_from_uspace(istate_t *istate)
88
static inline int istate_from_uspace(istate_t *istate)
89
{
89
{
90
    panic("istate_from_uspace not yet implemented");
90
    /* true if privilege level PR (copied from MSR) == 1 */
91
    return 0;
91
    return (istate->srr1 & MSR_PR) != 0;
92
}
92
}
93
 
93
 
94
static inline unative_t istate_get_pc(istate_t *istate)
94
static inline unative_t istate_get_pc(istate_t *istate)
95
{
95
{
96
    return istate->pc;
96
    return istate->pc;