diff options
| author | Emu <89668582+EmulatedSeasons@users.noreply.github.com> | 2024-05-31 23:38:46 -0400 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2024-05-31 23:38:46 -0400 |
| commit | 27a44e0d79d1c6e01cd832feb8ad958d5999b5e3 (patch) | |
| tree | 3759eb02fcad7a609a064080d81b7c6f9dbec4c8 /kernel/arch/x86_64/idt.h | |
| parent | 639240bbf498195912d8ceb6cb396b89391a5b1b (diff) | |
| parent | fd5a1699592ce0afafc42ebf22401596abcdfc28 (diff) | |
Merge pull request #1 from EmulatedSeasons/limineswitch
Limineswitch
Diffstat (limited to 'kernel/arch/x86_64/idt.h')
| -rw-r--r-- | kernel/arch/x86_64/idt.h | 24 |
1 files changed, 24 insertions, 0 deletions
diff --git a/kernel/arch/x86_64/idt.h b/kernel/arch/x86_64/idt.h new file mode 100644 index 0000000..e6e2494 --- /dev/null +++ b/kernel/arch/x86_64/idt.h @@ -0,0 +1,24 @@ +#ifndef IDT_H
+#define IDT_H
+
+#include <stdint.h>
+
+struct IDTR {
+ uint16_t size;
+ uint64_t offset;
+}__attribute__((packed));
+
+struct IdtEntry {
+ uint16_t offset_low;
+ uint16_t seg_sel;
+ uint8_t ist;
+ uint8_t type_attributes;
+ uint16_t offset_mid;
+ uint32_t offset_high;
+ uint32_t reserved;
+}__attribute__((packed));
+
+void idt_entry(int num, uint64_t* offset, uint16_t sel, uint8_t ist, uint8_t type_attributes);
+void setup_idt();
+
+#endif
\ No newline at end of file |
