diff options
author | dzwdz | 2021-07-21 18:02:53 +0200 |
---|---|---|
committer | dzwdz | 2021-07-21 18:02:53 +0200 |
commit | 04b4c029420b010a906d0af3fb7b52108471c4bd (patch) | |
tree | 48154dfd8de19f140c242fc1c21b89f780730adb /src/kernel/arch/i386/interrupts/isr.h | |
parent | 1b9c86d59753e2ecaf9529386483aebbe25ba265 (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.h | 15 |
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; |