aboutsummaryrefslogtreecommitdiff
path: root/src/int/pic.h
diff options
context:
space:
mode:
authorLoic Guegan <manzerbredes@mailbox.org>2021-04-11 20:53:06 +0200
committerLoic Guegan <manzerbredes@mailbox.org>2021-04-11 20:53:06 +0200
commit6edeba8fe208fb019aec00fdc72b97407a8078d3 (patch)
tree965376727a7519fd20f73a946c01157151098ec6 /src/int/pic.h
parent3212145e94e0c68a5da96306545c116292dfbe85 (diff)
Enable paging
Diffstat (limited to 'src/int/pic.h')
-rw-r--r--src/int/pic.h23
1 files changed, 23 insertions, 0 deletions
diff --git a/src/int/pic.h b/src/int/pic.h
new file mode 100644
index 0000000..db1ccec
--- /dev/null
+++ b/src/int/pic.h
@@ -0,0 +1,23 @@
+#ifndef PIC_H
+#define PIC_H
+
+#include "utils/types.h"
+
+#define IDT_INT_GATE 0x8E00
+#define IDT_TRAP_GATE 0xEF00
+
+typedef struct IDT_ENTRY {
+ u16 segment;
+ u32 offset;
+ u16 type;
+} IDT_ENTRY;
+
+struct IDT_REGISTER {
+ u16 limit;
+ u32 base;
+} __attribute__((packed));
+
+void pic_enable_interrupt();
+void pic_add_idt_entry(IDT_ENTRY entry,int id);
+
+#endif \ No newline at end of file