summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/kernel/arch/i386/interrupts/idt.c1
-rw-r--r--src/kernel/arch/i386/interrupts/isr.c6
-rw-r--r--src/kernel/arch/i386/interrupts/isr.h3
3 files changed, 10 insertions, 0 deletions
diff --git a/src/kernel/arch/i386/interrupts/idt.c b/src/kernel/arch/i386/interrupts/idt.c
index 5573928..bbaf610 100644
--- a/src/kernel/arch/i386/interrupts/idt.c
+++ b/src/kernel/arch/i386/interrupts/idt.c
@@ -54,6 +54,7 @@ static void idt_prepare() {
idt_add(0x08, false, isr_double_fault);
idt_add(0x0d, false, isr_general_protection_fault);
+ idt_add(0x0e, false, isr_page_fault);
idt_add(0x34, false, isr_test_interrupt);
}
diff --git a/src/kernel/arch/i386/interrupts/isr.c b/src/kernel/arch/i386/interrupts/isr.c
index 35796fa..9da06fb 100644
--- a/src/kernel/arch/i386/interrupts/isr.c
+++ b/src/kernel/arch/i386/interrupts/isr.c
@@ -21,6 +21,12 @@ void isr_general_protection_fault(UNUSED struct interrupt_frame *frame) {
}
__attribute__((interrupt))
+void isr_page_fault(UNUSED struct interrupt_frame *frame) {
+ log_const("#PF");
+ panic();
+}
+
+__attribute__((interrupt))
void isr_test_interrupt(UNUSED struct interrupt_frame *frame) {
isr_test_interrupt_called = true;
}
diff --git a/src/kernel/arch/i386/interrupts/isr.h b/src/kernel/arch/i386/interrupts/isr.h
index 150fc46..c3585dc 100644
--- a/src/kernel/arch/i386/interrupts/isr.h
+++ b/src/kernel/arch/i386/interrupts/isr.h
@@ -12,4 +12,7 @@ __attribute__((interrupt))
void isr_general_protection_fault(struct interrupt_frame *frame);
__attribute__((interrupt))
+void isr_page_fault(struct interrupt_frame *frame);
+
+__attribute__((interrupt))
void isr_test_interrupt(struct interrupt_frame *frame);