summaryrefslogtreecommitdiffstats
path: root/include/arch/x86_64/idt.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/arch/x86_64/idt.h')
-rw-r--r--include/arch/x86_64/idt.h22
1 files changed, 22 insertions, 0 deletions
diff --git a/include/arch/x86_64/idt.h b/include/arch/x86_64/idt.h
index 4ca820f..fe544cb 100644
--- a/include/arch/x86_64/idt.h
+++ b/include/arch/x86_64/idt.h
@@ -11,6 +11,28 @@ typedef struct jove_IVTState
uint64_t rip, cs, rflags, rsp, ss;
} ivt_state_t;
+enum
+{
+ EXCEPTION_DIVISION = 0,
+ EXCEPTION_DEBUG,
+ EXCEPTION_NMI,
+ EXCEPTION_BREAKPOINT,
+ EXCEPTION_OVERFLOW,
+ EXCEPTION_BRE,
+ EXCEPTION_INVLOP,
+ EXCEPTION_DEVNA,
+ EXCEPTION_DOUBLE,
+ EXCEPTION_CSO,
+ EXCEPTION_INVALID_TSS,
+ EXCEPTION_SEG_MISSING,
+ EXCEPTION_SS,
+ EXCEPTION_GPF,
+ EXCEPTION_PF
+};
+
+typedef void (*kernel_isr_handler_t)(ivt_state_t*);
+extern kernel_isr_handler_t kernel_isr_handles[256];
+
void kpanic_state(ivt_state_t *state, const char *fmt, ...);
void ivt_setup(void);