Ver Fonte

fix: execute cli before setting idt

greatbridf há 3 anos atrás
pai
commit
8e0fa0e23a
1 ficheiros alterados com 2 adições e 0 exclusões
  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)