summaryrefslogtreecommitdiff
path: root/cpu/idt.c
diff options
context:
space:
mode:
authorAnton Kling <anton@kling.gg>2023-10-24 19:22:27 +0200
committerAnton Kling <anton@kling.gg>2023-10-30 21:49:48 +0100
commit730e065e0bba1394750b3172bb7e2f1c0fd42c73 (patch)
treea37d4745fccb530948eb795a3eca7200c24d63b9 /cpu/idt.c
parentba1952bf4c08b7783854d501ba30815a2aa2574c (diff)
Kernel: Add basic PCI and very basic rtl8139 support
Diffstat (limited to 'cpu/idt.c')
-rw-r--r--cpu/idt.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/cpu/idt.c b/cpu/idt.c
index 832162c..60ab441 100644
--- a/cpu/idt.c
+++ b/cpu/idt.c
@@ -108,6 +108,7 @@ __attribute__((interrupt)) void general_protection_fault(registers_t *regs) {
__attribute__((interrupt)) void double_fault(registers_t *regs) {
(void)regs;
klog("DOUBLE FAULT, THIS IS REALLY BAD", LOG_ERROR);
+ asm("cli");
asm("hlt");
for (;;)
;
@@ -258,6 +259,7 @@ void idt_init(void) {
// IRQ_set_mask(0xc);
IRQ_set_mask(0xe);
IRQ_clear_mask(2);
+ IRQ_set_mask(0xB);
idtr.interrupt_table = (struct IDT_Descriptor **)&IDT_Entry;
idtr.size = (sizeof(struct IDT_Descriptor) * IDT_MAX_ENTRY) - 1;