diff options
Diffstat (limited to 'src/kernel/isr.c')
-rw-r--r-- | src/kernel/isr.c | 24 |
1 files changed, 24 insertions, 0 deletions
diff --git a/src/kernel/isr.c b/src/kernel/isr.c new file mode 100644 index 0000000..b715de0 --- /dev/null +++ b/src/kernel/isr.c @@ -0,0 +1,24 @@ +#include <kernel/isr.h> +#include <kernel/panic.h> +#include <kernel/tty.h> +#include <stdbool.h> +#include <stdint.h> + +bool isr_test_interrupt_called = false; + +__attribute__((interrupt)) +void isr_double_fault(struct interrupt_frame *frame) { + tty_const("#DF"); + panic(); +} + +__attribute__((interrupt)) +void isr_general_protection_fault(struct interrupt_frame *frame) { + tty_const("#GP"); + panic(); +} + +__attribute__((interrupt)) +void isr_test_interrupt(struct interrupt_frame *frame) { + isr_test_interrupt_called = true; +} |