aboutsummaryrefslogtreecommitdiff
path: root/src/isr.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/isr.c')
-rw-r--r--src/isr.c35
1 files changed, 35 insertions, 0 deletions
diff --git a/src/isr.c b/src/isr.c
new file mode 100644
index 0000000..c94d37e
--- /dev/null
+++ b/src/isr.c
@@ -0,0 +1,35 @@
+/*
+ * Interrupt Service Routines
+ */
+
+#include <idt.h>
+#include <stdio.h>
+#include <sys/control.h>
+
+__attribute__((interrupt)) void
+abort_handler(struct interrupt_frame *frame)
+{
+ printf("abort\n");
+ abort();
+}
+
+__attribute__((interrupt)) void
+interrupt_handler(struct interrupt_frame *frame)
+{
+ printf("interrupt\n");
+ abort();
+}
+
+__attribute__((interrupt)) void
+interrupt_handler_e(struct interrupt_frame *frame, uint32_t error)
+{
+ printf("interrupt\n");
+ abort();
+}
+
+__attribute__((interrupt)) void
+syscall_handler(struct interrupt_frame *frame)
+{
+ printf("interrupt\n");
+ abort();
+}