aboutsummaryrefslogtreecommitdiff
path: root/include/garmos/arch.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/arch.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/arch.h')
-rw-r--r--include/garmos/arch.h15
1 files changed, 15 insertions, 0 deletions
diff --git a/include/garmos/arch.h b/include/garmos/arch.h
index 6d0f54d..ff1627e 100644
--- a/include/garmos/arch.h
+++ b/include/garmos/arch.h
@@ -44,4 +44,19 @@ struct gdtp {
} __attribute__((packed));
void gdtset(struct gdtp gdtp);
+/* interrupt description table initialization and activation */
+struct idtp {
+ uint16_t limit;
+ void *pointer;
+} __attribute((packed));
+void idtset(struct idtp idtp);
+void idtact(void);
+
+/* interrupt handler for ignores and a list of handlers to register */
+extern uint8_t irqnos[];
+extern uint32_t irqhdls[];
+void irqign(void);
+void irqhdl0x00(void);
+void irqhdl0x01(void);
+
#endif