mirror of
https://github.com/phil-opp/blog_os.git
synced 2025-12-16 14:27:49 +00:00
Set the stack_index for the double fault handler
This commit is contained in:
@@ -3,7 +3,7 @@
|
||||
// for a Windows system.
|
||||
#![cfg(not(windows))]
|
||||
|
||||
use crate::println;
|
||||
use crate::{gdt, println};
|
||||
use lazy_static::lazy_static;
|
||||
use x86_64::structures::idt::{ExceptionStackFrame, InterruptDescriptorTable};
|
||||
|
||||
@@ -12,6 +12,10 @@ lazy_static! {
|
||||
let mut idt = InterruptDescriptorTable::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(gdt::DOUBLE_FAULT_IST_INDEX);
|
||||
}
|
||||
idt
|
||||
};
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user