Subversion Repositories HelenOS

Rev

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

Rev 2071 Rev 2089
Line 67... Line 67...
67
#define VECTOR_SYSCALL              IVT_FREEBASE
67
#define VECTOR_SYSCALL              IVT_FREEBASE
68
#define VECTOR_TLB_SHOOTDOWN_IPI    (IVT_FREEBASE + 1)
68
#define VECTOR_TLB_SHOOTDOWN_IPI    (IVT_FREEBASE + 1)
69
#define VECTOR_DEBUG_IPI            (IVT_FREEBASE + 2)
69
#define VECTOR_DEBUG_IPI            (IVT_FREEBASE + 2)
70
 
70
 
71
/** This is passed to interrupt handlers */
71
/** This is passed to interrupt handlers */
72
struct istate {
72
typedef struct {
73
    uint64_t rax;
73
    uint64_t rax;
74
    uint64_t rbx;
74
    uint64_t rbx;
75
    uint64_t rcx;
75
    uint64_t rcx;
76
    uint64_t rdx;
76
    uint64_t rdx;
77
    uint64_t rsi;
77
    uint64_t rsi;
Line 88... Line 88...
88
    uint64_t error_word;
88
    uint64_t error_word;
89
    uint64_t rip;
89
    uint64_t rip;
90
    uint64_t cs;
90
    uint64_t cs;
91
    uint64_t rflags;
91
    uint64_t rflags;
92
    uint64_t stack[]; /* Additional data on stack */
92
    uint64_t stack[]; /* Additional data on stack */
93
};
93
} istate_t;
94
 
94
 
95
/** Return true if exception happened while in userspace */
95
/** Return true if exception happened while in userspace */
96
static inline int istate_from_uspace(istate_t *istate)
96
static inline int istate_from_uspace(istate_t *istate)
97
{
97
{
98
    return !(istate->rip & 0x8000000000000000);
98
    return !(istate->rip & 0x8000000000000000);