interrupt (x86_64): switch out _cpu()->ipl initialization from apic.c to idt.c

This commit is contained in:
Matheus
2023-06-25 15:40:42 -03:00
parent fef149ca55
commit 2ae3846b17
2 changed files with 3 additions and 1 deletions
-1
View File
@@ -227,7 +227,6 @@ void arch_apic_initap() {
writelapic(APIC_LVT_LINT0 + 0x10 * current->lint, (nmiisr->id & 0xff) | LVT_DELIVERY_NMI | (current->flags << 12));
}
_cpu()->ipl = IPL_NORMAL;
interrupt_set(true);
}
+3
View File
@@ -5,6 +5,7 @@
#include <panic.h>
#include <kernel/interrupt.h>
#include <string.h>
#include <arch/cpu.h>
typedef struct {
uint16_t size;
@@ -79,6 +80,8 @@ void arch_idt_reload() {
// make sure to reserve the first 32 isrs for exceptions with a dummy panic isr
for (int i = 0; i < 32; ++i)
interrupt_register(i, exceptisr, NULL, IPL_MAX);
_cpu()->ipl = IPL_NORMAL;
}
void arch_interrupt_disable() {