summaryrefslogtreecommitdiff
path: root/src/kernel/arch/i386/interrupts/isr.h
diff options
context:
space:
mode:
authordzwdz2021-07-21 18:02:53 +0200
committerdzwdz2021-07-21 18:02:53 +0200
commit04b4c029420b010a906d0af3fb7b52108471c4bd (patch)
tree48154dfd8de19f140c242fc1c21b89f780730adb /src/kernel/arch/i386/interrupts/isr.h
parent1b9c86d59753e2ecaf9529386483aebbe25ba265 (diff)
create ISR stubs, which call a single main isr handler
quick explaination of how this even works: The `call` in each stub pushes its own address onto the stack before calling stage2. We can substract the address of the 0th ISR to get the offset, which we then divide by the size of each stub to get the index.
Diffstat (limited to 'src/kernel/arch/i386/interrupts/isr.h')
-rw-r--r--src/kernel/arch/i386/interrupts/isr.h15
1 files changed, 1 insertions, 14 deletions
diff --git a/src/kernel/arch/i386/interrupts/isr.h b/src/kernel/arch/i386/interrupts/isr.h
index c3585dc..09d4328 100644
--- a/src/kernel/arch/i386/interrupts/isr.h
+++ b/src/kernel/arch/i386/interrupts/isr.h
@@ -1,18 +1,5 @@
#pragma once
#include <stdbool.h>
-struct interrupt_frame;
-
extern bool isr_test_interrupt_called; // used in the self-test in idt.c
-
-__attribute__((interrupt))
-void isr_double_fault(struct interrupt_frame *frame);
-
-__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);
+extern const char _isr_stubs;