summaryrefslogtreecommitdiff
path: root/cpu/idt.c
diff options
context:
space:
mode:
authorAnton Kling <anton@kling.gg>2023-10-25 19:36:25 +0200
committerAnton Kling <anton@kling.gg>2023-10-30 21:49:48 +0100
commit9ea708da24784d2f4960f0353b7a08c0c2c08145 (patch)
tree9d4f3ab1fbfb864ef14cd0d45ea014de0556db72 /cpu/idt.c
parent730e065e0bba1394750b3172bb7e2f1c0fd42c73 (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.c13
1 files changed, 10 insertions, 3 deletions
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;