diff --git a/kernel/src/interrupts/Entry.cpp b/kernel/src/interrupts/Entry.cpp index 9e7e48f8..5914b20d 100644 --- a/kernel/src/interrupts/Entry.cpp +++ b/kernel/src/interrupts/Entry.cpp @@ -9,13 +9,13 @@ extern "C" void common_handler(SavedContext* context) if (context->number < 0x20) { Debug::DebugStatus::the()->ThrowException(context->number); } if (context->number == 13) { - printf("General protection fault at %zx, %d, %d, %zx, %d, %zx\n", context->rip, context->cs, context->ss, + printf("General protection fault at %zx, %ld, %ld, %zx, %ld, %zx\n", context->rip, context->cs, context->ss, context->rsp, context->error_code, context->cr2); while (1) halt(); } if (context->number == 14) { - printf("Page fault at 0x%zx\n"); + printf("Page fault at 0x%zx\n", context->rip); hang(); } if (context->number >= 0x20 && context->number < 0x30) { IRQ::interrupt_handler(context); } diff --git a/kernel/src/interrupts/IRQ.cpp b/kernel/src/interrupts/IRQ.cpp index f0fb2729..7afd3e76 100644 --- a/kernel/src/interrupts/IRQ.cpp +++ b/kernel/src/interrupts/IRQ.cpp @@ -16,10 +16,10 @@ void IRQ::interrupt_handler(SavedContext* context) case 1: { volatile unsigned char scancode = IO::inb(0x60); Debug::DebugStatus::the()->DebugKey(scancode); - printf("Keyboard key pressed, seconds since boot: %d\n", PIT::ms_since_boot / 1000); + printf("Keyboard key pressed, seconds since boot: %ld\n", PIT::ms_since_boot / 1000); break; } - default: printf("Unhandled IRQ: %d", context->irq_number); break; + default: printf("Unhandled IRQ: %ld", context->irq_number); break; } PIC::send_eoi(context->irq_number); return;