diff options
author | Dennis Kobert <dennis@kobert.dev> | 2019-11-11 18:42:59 +0100 |
---|---|---|
committer | Dennis Kobert <dennis@kobert.dev> | 2019-11-11 18:42:59 +0100 |
commit | ec22f3464c87b3d1b1688898053a569bc4839404 (patch) | |
tree | 7332136eb3c3cb08dea32cbd89ee3254b55466bb /kernel/src/interrupts/table.rs | |
parent | 26a7561196674b39f9adadcb374f36c503361adb (diff) |
Add expect fault handling
Diffstat (limited to 'kernel/src/interrupts/table.rs')
-rw-r--r-- | kernel/src/interrupts/table.rs | 26 |
1 files changed, 0 insertions, 26 deletions
diff --git a/kernel/src/interrupts/table.rs b/kernel/src/interrupts/table.rs deleted file mode 100644 index 9541f22..0000000 --- a/kernel/src/interrupts/table.rs +++ /dev/null @@ -1,26 +0,0 @@ -use lazy_static::lazy_static; -use x86_64::structures::idt::InterruptDescriptorTable; - -lazy_static! { - static ref IDT: InterruptDescriptorTable = { - let mut idt = InterruptDescriptorTable::new(); - idt.breakpoint - .set_handler_fn(super::exceptions::breakpoint_handler); - idt.segment_not_present - .set_handler_fn(super::exceptions::segment_not_present_handler); - unsafe { - idt.double_fault - .set_handler_fn(super::exceptions::double_fault_handler) - .set_stack_index(super::gdt::DOUBLE_FAULT_IST_INDEX); - idt.page_fault - .set_handler_fn(super::exceptions::page_fault_handler) - .set_stack_index(super::gdt::PAGE_FAULT_IST_INDEX); - } - - idt - }; -} - -pub fn init() { - IDT.load() -} |