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 66... Line 66...
66
#define VECTOR_PIC_SPUR             (IVT_IRQBASE + IRQ_PIC_SPUR)
66
#define VECTOR_PIC_SPUR             (IVT_IRQBASE + IRQ_PIC_SPUR)
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
struct istate {
71
typedef struct {
72
    uint32_t eax;
72
    uint32_t eax;
73
    uint32_t ecx;
73
    uint32_t ecx;
74
    uint32_t edx;
74
    uint32_t edx;
75
    uint32_t esi;
75
    uint32_t esi;
76
    uint32_t edi;
76
    uint32_t edi;
Line 85... Line 85...
85
    uint32_t error_word;
85
    uint32_t error_word;
86
    uint32_t eip;
86
    uint32_t eip;
87
    uint32_t cs;
87
    uint32_t cs;
88
    uint32_t eflags;
88
    uint32_t eflags;
89
    uint32_t stack[];
89
    uint32_t stack[];
90
};
90
} istate_t;
91
 
91
 
92
/** Return true if exception happened while in userspace */
92
/** Return true if exception happened while in userspace */
93
static inline int istate_from_uspace(istate_t *istate)
93
static inline int istate_from_uspace(istate_t *istate)
94
{
94
{
95
    return !(istate->eip & 0x80000000);
95
    return !(istate->eip & 0x80000000);