diff options
author | natrixaeria <upezu@student.kit.edu> | 2019-11-15 20:03:47 +0100 |
---|---|---|
committer | natrixaeria <upezu@student.kit.edu> | 2019-11-15 20:03:47 +0100 |
commit | c6e0e13db0ba0442018645a1184be50e1ec968e0 (patch) | |
tree | 5e505f7ed135de40cab2488339fb62c6a279f5d5 /kernel/src/interrupts/idt.rs | |
parent | fe488737784da2196b84dbc22b658bf12a5f58f9 (diff) | |
parent | 4953b122d995696bc0b656b1c70c57ba5e96bcfd (diff) |
Merge branch 'master' of dennis:/var/repos/uff-os
Diffstat (limited to 'kernel/src/interrupts/idt.rs')
-rw-r--r-- | kernel/src/interrupts/idt.rs | 16 |
1 files changed, 9 insertions, 7 deletions
diff --git a/kernel/src/interrupts/idt.rs b/kernel/src/interrupts/idt.rs index e85ef5a..87f16c0 100644 --- a/kernel/src/interrupts/idt.rs +++ b/kernel/src/interrupts/idt.rs @@ -1,3 +1,4 @@ +use super::{exceptions, gdt, interrupts, Interrupts}; use lazy_static::lazy_static; use x86_64::structures::idt::InterruptDescriptorTable; @@ -5,19 +6,20 @@ lazy_static! { static ref IDT: InterruptDescriptorTable = { let mut idt = InterruptDescriptorTable::new(); idt.breakpoint - .set_handler_fn(super::exceptions::breakpoint_handler); + .set_handler_fn(exceptions::breakpoint_handler); idt.segment_not_present - .set_handler_fn(super::exceptions::segment_not_present_handler); + .set_handler_fn(exceptions::segment_not_present_handler); idt.general_protection_fault - .set_handler_fn(super::exceptions::general_protection_fault_handler); + .set_handler_fn(exceptions::general_protection_fault_handler); unsafe { idt.double_fault - .set_handler_fn(super::exceptions::double_fault_handler) - .set_stack_index(super::gdt::DOUBLE_FAULT_IST_INDEX); + .set_handler_fn(exceptions::double_fault_handler) + .set_stack_index(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); + .set_handler_fn(exceptions::page_fault_handler) + .set_stack_index(gdt::PAGE_FAULT_IST_INDEX); } + idt[Interrupts::Timer.as_usize()].set_handler_fn(interrupts::timer_handler); idt }; |