From 27293c805c35b7497b5e23e747b56d39aae9703d Mon Sep 17 00:00:00 2001 From: Mathieu Maret Date: Fri, 16 Nov 2018 15:00:31 +0100 Subject: [PATCH] Add more info about segfault --- core/exception_handler.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/core/exception_handler.c b/core/exception_handler.c index 64aeca0..a948fba 100644 --- a/core/exception_handler.c +++ b/core/exception_handler.c @@ -11,6 +11,11 @@ __attribute__((interrupt)) void print_handler(struct interrupt_frame *frame, ulo (void)error_code; } + +// c.f. https://wiki.osdev.org/Paging#Handling +// error_code bit0: Present ? +// bit1: Trying to write ? +// bit2: User page try to access? __attribute__((interrupt)) void pagefault_handler(struct interrupt_frame *frame, ulong error_code){ printStringDetails("PAGE FAULT", RED, BLACK, 0, VGA_HEIGHT - 1); printIntDetails(error_code, RED, BLACK, 11, VGA_HEIGHT - 1);