apic broken pushing to debug

This commit is contained in:
2025-02-27 16:19:43 +00:00
parent ac0b47a45c
commit 821759ec63
8 changed files with 124 additions and 73 deletions
+6 -6
View File
@@ -1,4 +1,3 @@
use libk::drivers::apic::enable_apic;
use libk::prelude::*;
use pic8259::ChainedPics;
use x86_64::registers::control::Cr2;
@@ -6,6 +5,7 @@ use x86_64::structures::idt::{InterruptDescriptorTable, InterruptStackFrame, Pag
use spin::{Lazy, Mutex};
use super::apic::enable_apic;
use super::gdt;
static IDT: Lazy<InterruptDescriptorTable> = Lazy::new(|| {
@@ -52,12 +52,12 @@ impl InterruptIndex {
pub fn init_idt() {
IDT.load();
// enable_apic();
enable_apic();
// TODO: fix apic
unsafe {
PICS.lock().initialize();
PICS.lock().write_masks(0xfc, 0xff);
}
// unsafe {
// PICS.lock().initialize();
// PICS.lock().write_masks(0xfc, 0xff);
// }
}
extern "x86-interrupt" fn breakpoint_handler(stack_frame: InterruptStackFrame) {