From 7f6576c9dc34e360b81236c54c25c7827fd6a2df Mon Sep 17 00:00:00 2001 From: Philipp Oppermann Date: Wed, 19 Apr 2017 12:16:43 +0200 Subject: [PATCH] Set the stack index of the double fault IDT entry --- src/interrupts/mod.rs | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/interrupts/mod.rs b/src/interrupts/mod.rs index 10a114e..5a2324d 100644 --- a/src/interrupts/mod.rs +++ b/src/interrupts/mod.rs @@ -10,7 +10,10 @@ lazy_static! { static ref IDT: Idt = { let mut idt = Idt::new(); idt.breakpoint.set_handler_fn(breakpoint_handler); - idt.double_fault.set_handler_fn(double_fault_handler); + unsafe { + idt.double_fault.set_handler_fn(double_fault_handler) + .set_stack_index(DOUBLE_FAULT_IST_INDEX as u16); + } idt }; }