Initialize the PIC

This commit is contained in:
Philipp Oppermann
2019-01-25 14:04:55 +01:00
parent d8edfccca4
commit 6504bed810
4 changed files with 29 additions and 7 deletions

View File

@@ -8,22 +8,19 @@ use core::panic::PanicInfo;
#[cfg(not(test))]
#[no_mangle]
pub extern "C" fn _start() -> ! {
use blog_os::interrupts::PICS;
println!("Hello World{}", "!");
blog_os::gdt::init();
blog_os::interrupts::init_idt();
fn stack_overflow() {
stack_overflow(); // for each recursion, the return address is pushed
}
// trigger a stack overflow
stack_overflow();
unsafe { PICS.lock().initialize() };
println!("It did not crash!");
loop {}
}
/// This function is called on panic.
#[cfg(not(test))]
#[panic_handler]