1
0
Fork 0
forked from AbleOS/ableos
ableOS_v1Change/ableos/src/arch/x86_64/init.rs

18 lines
394 B
Rust
Raw Normal View History

2022-01-22 00:01:16 -06:00
// #![allow(clippy::print_literal)]
2022-01-16 19:42:11 -06:00
use crate::logger;
use super::{gdt, interrupts};
2021-12-24 03:30:27 -06:00
2022-01-22 00:01:16 -06:00
/// x86_64 initialization
2021-11-16 00:09:27 -06:00
pub fn init() {
2022-01-16 19:42:11 -06:00
let result = logger::init();
match result {
Ok(_) => {}
Err(err) => error!("{}", err),
}
2021-11-28 14:50:14 -06:00
gdt::init();
interrupts::init_idt();
unsafe { interrupts::PICS.lock().initialize() };
x86_64::instructions::interrupts::enable();
2021-11-16 00:09:27 -06:00
}