Redesign code

This commit is contained in:
Philipp Oppermann
2018-06-18 19:32:56 +02:00
parent 5499471279
commit 99c0fa5ebf
5 changed files with 134 additions and 16 deletions

View File

@@ -19,6 +19,7 @@ use core::panic::PanicInfo;
pub extern "C" fn _start() -> ! {
println!("Hello World{}", "!");
blog_os::gdt::init();
init_idt();
fn stack_overflow() {
@@ -47,7 +48,11 @@ 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(blog_os::gdt::DOUBLE_FAULT_IST_INDEX);
}
idt
};
}