diff options
author | Anton Kling <anton@kling.gg> | 2023-10-25 19:36:25 +0200 |
---|---|---|
committer | Anton Kling <anton@kling.gg> | 2023-10-30 21:49:48 +0100 |
commit | 9ea708da24784d2f4960f0353b7a08c0c2c08145 (patch) | |
tree | 9d4f3ab1fbfb864ef14cd0d45ea014de0556db72 /cpu/idt.c | |
parent | 730e065e0bba1394750b3172bb7e2f1c0fd42c73 (diff) |
RTL8139: Transmission and interrupts seem to magically work now.
This commit is done to preserve the functional code before I make new
changes.
Diffstat (limited to 'cpu/idt.c')
-rw-r--r-- | cpu/idt.c | 13 |
1 files changed, 10 insertions, 3 deletions
@@ -60,6 +60,7 @@ kernel_general_protection_fault(kernel_registers_t *regs) { kprintf(" Error Code: %x\n", regs->error_code); kprintf("Instruction Pointer: %x\n", regs->eip); dump_backtrace(12); + asm("hlt"); for (;;) ; EOI(0xD - 8); @@ -257,9 +258,15 @@ void idt_init(void) { PIC_remap(0x20); // IRQ_set_mask(0xc); - IRQ_set_mask(0xe); - IRQ_clear_mask(2); - IRQ_set_mask(0xB); + IRQ_clear_mask(0x5); + IRQ_clear_mask(0xB); + /* + IRQ_set_mask(0xe); + IRQ_set_mask(2); + IRQ_set_mask(1); + IRQ_set_mask(0); + IRQ_clear_mask(0x5); + IRQ_clear_mask(0xB);*/ idtr.interrupt_table = (struct IDT_Descriptor **)&IDT_Entry; idtr.size = (sizeof(struct IDT_Descriptor) * IDT_MAX_ENTRY) - 1; |