From 9ea708da24784d2f4960f0353b7a08c0c2c08145 Mon Sep 17 00:00:00 2001 From: Anton Kling Date: Wed, 25 Oct 2023 19:36:25 +0200 Subject: RTL8139: Transmission and interrupts seem to magically work now. This commit is done to preserve the functional code before I make new changes. --- cpu/idt.c | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) (limited to 'cpu/idt.c') diff --git a/cpu/idt.c b/cpu/idt.c index 60ab441..90bd56e 100644 --- a/cpu/idt.c +++ b/cpu/idt.c @@ -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; -- cgit v1.2.3