summaryrefslogtreecommitdiff
path: root/src/kernel/arch/i386/interrupts/isr.c
blob: d2e3d0f701b158416d40f2faffffd0c5a4ee5fff (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
#include <kernel/arch/i386/interrupts/isr.h>
#include <kernel/arch/log.h>
#include <kernel/panic.h>
#include <stdbool.h>
#include <stdint.h>

bool isr_test_interrupt_called = false;

__attribute__((interrupt))
void isr_double_fault(struct interrupt_frame *frame) {
	log_const("#DF");
	panic();
}

__attribute__((interrupt))
void isr_general_protection_fault(struct interrupt_frame *frame) {
	log_const("#GP");
	panic();
}

__attribute__((interrupt))
void isr_test_interrupt(struct interrupt_frame *frame) {
	isr_test_interrupt_called = true;
}