blob: 9da06fbd41b0f461e20833118947601f9b9291e4 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
|
#include <kernel/arch/i386/interrupts/isr.h>
#include <kernel/arch/log.h>
#include <kernel/panic.h>
#include <stdbool.h>
#include <stdint.h>
#define UNUSED __attribute__((unused))
bool isr_test_interrupt_called = false;
__attribute__((interrupt))
void isr_double_fault(UNUSED struct interrupt_frame *frame) {
log_const("#DF");
panic();
}
__attribute__((interrupt))
void isr_general_protection_fault(UNUSED struct interrupt_frame *frame) {
log_const("#GP");
panic();
}
__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;
}
|