diff options
author | Marvin Borner | 2020-01-20 23:12:54 +0100 |
---|---|---|
committer | Marvin Borner | 2020-01-20 23:12:54 +0100 |
commit | 391ed256d21a6ae2e2456d1809f357e6e96e15d1 (patch) | |
tree | 0fe9ffb3c59bbfeb3d8a04ab7fc6efba60d81e79 /src/kernel/interrupts | |
parent | d5d1749257ff8b9aa6b5ace4b4720b484a2860f3 (diff) |
Added pure awesomeness
Actually quite some days of work but ok
Diffstat (limited to 'src/kernel/interrupts')
-rw-r--r-- | src/kernel/interrupts/idt.c | 6 | ||||
-rw-r--r-- | src/kernel/interrupts/isr.c | 2 |
2 files changed, 3 insertions, 5 deletions
diff --git a/src/kernel/interrupts/idt.c b/src/kernel/interrupts/idt.c index 25a9504..026b23c 100644 --- a/src/kernel/interrupts/idt.c +++ b/src/kernel/interrupts/idt.c @@ -24,13 +24,13 @@ extern void idt_load(); void idt_set_gate(unsigned char num, unsigned long base, unsigned short sel, unsigned char flags) { // Specify the interrupt routine's base address - idt[num].base_low = (base & 0xFFFF); - idt[num].base_high = (base >> 16) & 0xFFFF; + idt[num].base_low = (uint16_t) (base & 0xFFFF); + idt[num].base_high = (uint16_t) ((base >> 16) & 0xFFFF); // Set selector/segment of IDT entry idt[num].sel = sel; idt[num].always0 = 0; - idt[num].flags = flags | 0x60; + idt[num].flags = (uint8_t) (flags | 0x60); } // Install IDT diff --git a/src/kernel/interrupts/isr.c b/src/kernel/interrupts/isr.c index 8b2a9e5..eb932b2 100644 --- a/src/kernel/interrupts/isr.c +++ b/src/kernel/interrupts/isr.c @@ -3,7 +3,6 @@ #include <kernel/system.h> #include <kernel/lib/string.h> #include <kernel/lib/stdio.h> -#include <kernel/paging/paging.h> // Install ISRs in IDT void isrs_install() @@ -117,7 +116,6 @@ void fault_handler(struct regs *r) r->eip, r->eax, r->ebx, r->ecx, r->edx, r->esp, faulting_address, r->eflags, r->err_code, r->int_no, exception_messages[r->int_no] ); - serial_printf("%d", paging_get_flags(faulting_address)); // halt_loop(); // Idk loop? char *message = (char *) exception_messages[r->int_no]; strcat(message, " Exception"); |