mirror of
https://github.com/Mathewnd/Astral.git
synced 2026-11-01 15:08:21 +00:00
interrupt (x86_64): switch out _cpu()->ipl initialization from apic.c to idt.c
This commit is contained in:
@@ -227,7 +227,6 @@ void arch_apic_initap() {
|
|||||||
writelapic(APIC_LVT_LINT0 + 0x10 * current->lint, (nmiisr->id & 0xff) | LVT_DELIVERY_NMI | (current->flags << 12));
|
writelapic(APIC_LVT_LINT0 + 0x10 * current->lint, (nmiisr->id & 0xff) | LVT_DELIVERY_NMI | (current->flags << 12));
|
||||||
}
|
}
|
||||||
|
|
||||||
_cpu()->ipl = IPL_NORMAL;
|
|
||||||
interrupt_set(true);
|
interrupt_set(true);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -5,6 +5,7 @@
|
|||||||
#include <panic.h>
|
#include <panic.h>
|
||||||
#include <kernel/interrupt.h>
|
#include <kernel/interrupt.h>
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
|
#include <arch/cpu.h>
|
||||||
|
|
||||||
typedef struct {
|
typedef struct {
|
||||||
uint16_t size;
|
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
|
// make sure to reserve the first 32 isrs for exceptions with a dummy panic isr
|
||||||
for (int i = 0; i < 32; ++i)
|
for (int i = 0; i < 32; ++i)
|
||||||
interrupt_register(i, exceptisr, NULL, IPL_MAX);
|
interrupt_register(i, exceptisr, NULL, IPL_MAX);
|
||||||
|
|
||||||
|
_cpu()->ipl = IPL_NORMAL;
|
||||||
}
|
}
|
||||||
|
|
||||||
void arch_interrupt_disable() {
|
void arch_interrupt_disable() {
|
||||||
|
|||||||
Reference in New Issue
Block a user