mirror of
https://github.com/XunilGroup/XunilOS.git
synced 2026-04-25 11:49:03 +02:00
Add interrupts and IDT and react to double, page, general prot faults
and breakpoints, add keyboard support through the keyboar interrupt, add paging memory management and a Frame Allocator, add a generic arch module that initializes arch-specific things, fix framebuffer and serialconsole being accessed from multiple places, move serial to driver since its not actually a serial console.
This commit is contained in:
16
kernel/src/arch/x86_64/init.rs
Normal file
16
kernel/src/arch/x86_64/init.rs
Normal file
@@ -0,0 +1,16 @@
|
||||
use crate::arch::x86_64::gdt::load_gdt_x86_64;
|
||||
use crate::arch::x86_64::interrupts::{PICS, init_idt_x86_64};
|
||||
use x86_64::instructions::interrupts;
|
||||
|
||||
pub fn init_x86_64() {
|
||||
load_gdt_x86_64();
|
||||
init_idt_x86_64();
|
||||
|
||||
unsafe {
|
||||
let mut pics = PICS.lock();
|
||||
pics.initialize();
|
||||
pics.write_masks(0xFC, 0xFF);
|
||||
}
|
||||
|
||||
interrupts::enable();
|
||||
}
|
||||
Reference in New Issue
Block a user