summaryrefslogtreecommitdiff
path: root/include/idt.h
diff options
context:
space:
mode:
authorAnna (navi) Figueiredo Gomes <navi@vlhl.dev>2023-12-13 13:24:48 +0100
committerAnna (navi) Figueiredo Gomes <navi@vlhl.dev>2023-12-25 18:37:20 +0100
commit30d6e8f850d2fe26fffdeef0c38fc627ef8bab9a (patch)
treecd786b6a79d6a58590b2d35308746761c1e3d977 /include/idt.h
initial commit
currently with: booted via multiboot 1 protected mode to long mode boostrap code vga used for outputting gdt and idt set up identity paging for the whole memory reported by multiboot pic and ps/2 set up acpi code exists but is broken
Diffstat (limited to 'include/idt.h')
-rw-r--r--include/idt.h17
1 files changed, 17 insertions, 0 deletions
diff --git a/include/idt.h b/include/idt.h
new file mode 100644
index 0000000..587419b
--- /dev/null
+++ b/include/idt.h
@@ -0,0 +1,17 @@
+#ifndef _IDT_H_
+#define _IDT_H_
+
+#include <stdint.h>
+#include <stddef.h>
+#include <stdbool.h>
+
+void idt_set_isr(uint8_t num, uint64_t offset, uint16_t sel, uint8_t flags);
+void idt_init();
+
+extern uint64_t isr_table[32];
+
+
+bool idt_register_isr(size_t num, void (*func)(uint64_t, uint64_t));
+bool idt_remove_isr(size_t num, void (*func)(uint64_t, uint64_t));
+
+#endif