my exception handler sucked so i redid it
This commit is contained in:
@ -28,7 +28,24 @@
|
||||
#define EXCEPT_VIRT 20
|
||||
#define EXCEPT_CTRL_PROT 21
|
||||
|
||||
void exception_handler(unsigned int i);
|
||||
struct cpu_state {
|
||||
uint32_t eax;
|
||||
uint32_t ebx;
|
||||
uint32_t ecx;
|
||||
uint32_t edx;
|
||||
uint32_t esi;
|
||||
uint32_t edi;
|
||||
uint32_t ebp;
|
||||
} __attribute__((packed));
|
||||
|
||||
struct stack_state {
|
||||
uint32_t error_code;
|
||||
uint32_t eip;
|
||||
uint32_t cs;
|
||||
uint32_t eflags;
|
||||
} __attribute__((packed));
|
||||
|
||||
void exception_handler(struct cpu_state cpu, uint32_t interrupt, struct stack_state stack);
|
||||
|
||||
typedef struct {
|
||||
uint16_t isr_low; // The lower 16 bits of the ISR's address
|
||||
|
Reference in New Issue
Block a user