From 8c0c61c099d5b47bacd5cc0b5d4015be4de70177 Mon Sep 17 00:00:00 2001 From: Mathieu Maret Date: Fri, 9 Apr 2021 20:45:40 +0200 Subject: [PATCH] Pagefault handler never come back --- arch/x86/exception_handler.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/arch/x86/exception_handler.c b/arch/x86/exception_handler.c index 7cb9040..f68795c 100644 --- a/arch/x86/exception_handler.c +++ b/arch/x86/exception_handler.c @@ -61,9 +61,11 @@ __attribute__((interrupt)) void pagefault_handler(struct interrupt_frame *frame, asm volatile("mov %%cr2, %0" : "=r"(faulting_address)); struct kthread *current = getCurrentThread(); - printf("page fault while in thread %s\n", current->name); + printf("page fault while in thread %s at 0x%x\n", current->name, faulting_address); VGAPrintf(RED, BLACK, 0, VGA_HEIGHT - 1, "PAGE FAULT %d", error_code); (void)faulting_address; (void)frame; (void)error_code; + for(;;) + continue; }