aboutsummaryrefslogtreecommitdiff
path: root/include/garmos/idt.h
diff options
context:
space:
mode:
authorRobin Krahl <robin.krahl@ireas.org>2017-03-06 02:52:05 +0100
committerRobin Krahl <robin.krahl@ireas.org>2017-03-06 02:52:05 +0100
commit05b9ca73793047e795e46a2ae13db02c34b8a7c3 (patch)
tree5ab672db87c57cbe01662547e7733e71aa748743 /include/garmos/idt.h
parent28301499381cb541eec4eb99f61e3d1a193c5a2d (diff)
downloadgarmos-05b9ca73793047e795e46a2ae13db02c34b8a7c3.tar.gz
garmos-05b9ca73793047e795e46a2ae13db02c34b8a7c3.tar.bz2
idt: add interruption handling
The Interruption Descriptor Table (IDT) is implemented in idt.{c,h} as part of the core, but the setup and activation of the IDT and the registration of specific interruption request handlers is part of arch.{c,h}. The request handlers are implemented in idt.s and delegate to kernel_handle_interrupt.
Diffstat (limited to 'include/garmos/idt.h')
-rw-r--r--include/garmos/idt.h25
1 files changed, 25 insertions, 0 deletions
diff --git a/include/garmos/idt.h b/include/garmos/idt.h
new file mode 100644
index 0000000..05fb1bd
--- /dev/null
+++ b/include/garmos/idt.h
@@ -0,0 +1,25 @@
+/*
+ * Copyright (C) 2017 Robin Krahl <robin.krahl@ireas.org>
+ *
+ * This program is free software: you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License as published by the Free
+ * Software Foundation, either version 3 of the License, or (at your option)
+ * any later version.
+ *
+ * This program is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
+ * more details.
+ */
+
+#ifndef GARMOS_IDT_H
+#define GARMOS_IDT_H
+
+#include <garmos/types.h>
+
+void idt_init(void);
+void idt_activate(void);
+
+uint32_t idt_handle_interrupt(uint8_t no, uint32_t esp);
+
+#endif