From 0644053a6f445596459efbafbfcc61869c192fe9 Mon Sep 17 00:00:00 2001 From: Stefan Lankes Date: Mon, 13 Jul 2015 10:31:27 +0200 Subject: [PATCH] now, the page fault handler prints the rflags --- hermit/arch/x86/mm/page.c | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/hermit/arch/x86/mm/page.c b/hermit/arch/x86/mm/page.c index bdd654870..57f118475 100644 --- a/hermit/arch/x86/mm/page.c +++ b/hermit/arch/x86/mm/page.c @@ -39,6 +39,7 @@ #include #include #include +#include #include #include @@ -302,15 +303,19 @@ void page_fault_handler(struct state *s) } default_handler: - kprintf("Page Fault Exception (%d) at cs:ip = %#x:%#lx, task = %u, addr = %#lx, error = %#x [ %s %s %s %s %s ]\n", - s->int_no, s->cs, s->rip, task->id, viraddr, s->error, + kprintf("Page Fault Exception (%d) at cs:ip = %#x:%#lx, rflags 0x%lx, task = %u, addr = %#lx, error = %#x [ %s %s %s %s %s ]\n", + s->int_no, s->cs, s->rip, s->rflags, task->id, viraddr, s->error, (s->error & 0x4) ? "user" : "supervisor", (s->error & 0x10) ? "instruction" : "data", (s->error & 0x2) ? "write" : ((s->error & 0x10) ? "fetch" : "read"), (s->error & 0x1) ? "protection" : "not present", (s->error & 0x8) ? "reserved bit" : "\b"); + if (task->heap) + kprintf("Heap 0x%llx - 0x%llx\n", task->heap->start, task->heap->end); - while(1) HALT; + apic_eoi(s->int_no); + irq_enable(); + abort(); } int page_init(void)