From 138424b31d9c2af158e8ae619248b035b5a280d9 Mon Sep 17 00:00:00 2001 From: Nic Gaffney Date: Thu, 21 Dec 2023 03:32:06 -0600 Subject: set up bochs for debugging and started working on interrupts. --- src/include/idt.h | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) create mode 100644 src/include/idt.h (limited to 'src/include/idt.h') diff --git a/src/include/idt.h b/src/include/idt.h new file mode 100644 index 0000000..b8413b8 --- /dev/null +++ b/src/include/idt.h @@ -0,0 +1,17 @@ +#pragma once +#include + +typedef struct Gate_Descriptor { + uint16_t offset_low; + uint16_t segment_selector; + uint8_t reserved; + uint8_t attrs; + uint16_t offset_high; +} __attribute__((packed)) Gate_Descriptor_t; + +typedef Gate_Descriptor_t *IDT_t; + +Gate_Descriptor_t make_gate(uint32_t offset, uint8_t segment_selector, + uint8_t attrs); + +void get_idtr(); -- cgit v1.2.3