summaryrefslogtreecommitdiff
path: root/src/arch/i386/interrupts/isr.c
blob: 03399ea131ab662a0622a1ebb71992bae65a823e (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 <arch/i386/interrupts/isr.h>
#include <arch/i386/tty.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) {
	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;
}