Move PIC initialization and interrupt::enable to blog_os::init

This commit is contained in:
Philipp Oppermann
2019-04-25 18:38:16 +02:00
parent 3e6f242b52
commit acfdf929ad
2 changed files with 2 additions and 4 deletions

View File

@@ -15,6 +15,8 @@ pub mod vga_buffer;
pub fn init() { pub fn init() {
gdt::init(); gdt::init();
interrupts::init_idt(); interrupts::init_idt();
unsafe { interrupts::PICS.lock().initialize() };
x86_64::instructions::interrupts::enable();
} }
pub fn test_runner(tests: &[&dyn Fn()]) { pub fn test_runner(tests: &[&dyn Fn()]) {

View File

@@ -9,13 +9,9 @@ use core::panic::PanicInfo;
#[no_mangle] #[no_mangle]
pub extern "C" fn _start() -> ! { pub extern "C" fn _start() -> ! {
use blog_os::interrupts::PICS;
println!("Hello World{}", "!"); println!("Hello World{}", "!");
blog_os::init(); blog_os::init();
unsafe { PICS.lock().initialize() };
x86_64::instructions::interrupts::enable();
#[cfg(test)] #[cfg(test)]
test_main(); test_main();