Commit 56a16b9e authored by Mathieu Maret's avatar Mathieu Maret

Add empty pagefault handler

parent 32f1a8ba
...@@ -10,3 +10,10 @@ __attribute__((interrupt)) void print_handler(struct interrupt_frame *frame, ulo ...@@ -10,3 +10,10 @@ __attribute__((interrupt)) void print_handler(struct interrupt_frame *frame, ulo
(void)frame; (void)frame;
(void)error_code; (void)error_code;
} }
__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);
(void)frame;
(void)error_code;
}
...@@ -5,6 +5,7 @@ struct interrupt_frame; ...@@ -5,6 +5,7 @@ struct interrupt_frame;
//Exception //Exception
void print_handler(struct interrupt_frame *frame, ulong error_code); void print_handler(struct interrupt_frame *frame, ulong error_code);
void pagefault_handler(struct interrupt_frame *frame, ulong error_code);
//IRQ //IRQ
void keyboard_handler(struct interrupt_frame *frame); void keyboard_handler(struct interrupt_frame *frame);
......
...@@ -73,6 +73,7 @@ void kmain(unsigned long magic, unsigned long addr) ...@@ -73,6 +73,7 @@ void kmain(unsigned long magic, unsigned long addr)
printf("Enabling HW interrupts\n"); printf("Enabling HW interrupts\n");
exceptionSetRoutine(EXCEPTION_DOUBLE_FAULT, print_handler); exceptionSetRoutine(EXCEPTION_DOUBLE_FAULT, print_handler);
exceptionSetRoutine(EXCEPTION_PAGE_FAULT, pagefault_handler);
// Enabling the HW interrupts // Enabling the HW interrupts
asm volatile("sti\n"); asm volatile("sti\n");
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment