mirror of
https://github.com/phil-opp/blog_os.git
synced 2025-12-18 07:17:49 +00:00
Use new x86::segmentation::cs function and merge set_handler and options
We avoid inline assembly and increase safety (it is no longer possible to set the non-present initilization entries to present).
This commit is contained in:
@@ -9,12 +9,10 @@ lazy_static! {
|
||||
let mut idt = idt::Idt::new();
|
||||
|
||||
idt.set_handler(0, divide_by_zero_handler);
|
||||
idt.set_handler(8, double_fault_handler);
|
||||
idt.set_handler(8, double_fault_handler).set_stack_index(1);
|
||||
idt.set_handler(13, general_protection_fault_handler);
|
||||
idt.set_handler(14, page_fault_handler);
|
||||
|
||||
idt.options(8).set_stack_index(1);
|
||||
|
||||
idt
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user