Explorar o código

fix: execute cli before setting idt

greatbridf %!s(int64=3) %!d(string=hai) anos
pai
achega
8e0fa0e23a
Modificáronse 1 ficheiros con 2 adicións e 0 borrados
  1. 2 0
      src/kernel/interrupt.c

+ 2 - 0
src/kernel/interrupt.c

@@ -11,6 +11,8 @@ static struct IDT_entry IDT[256];
 
 void init_idt()
 {
+    asm_cli();
+
     asm_outb(PORT_PIC1_COMMAND, 0x11); // edge trigger mode
     asm_outb(PORT_PIC1_DATA, 0x20); // start from int 0x20
     asm_outb(PORT_PIC1_DATA, 0x04); // PIC1 is connected to IRQ2 (1 << 2)