aboutsummaryrefslogtreecommitdiff
path: root/kernel/include
diff options
context:
space:
mode:
authorRaghuram Subramani <raghus2247@gmail.com>2025-05-25 21:44:34 +0530
committerRaghuram Subramani <raghus2247@gmail.com>2025-05-25 21:44:34 +0530
commit285514f87d1b2602a997069ac5c0b8c1742345d0 (patch)
treea325598584e480c67b6fae45ce5025b5e0293850 /kernel/include
parent1c71ed2dee37bb3c11e65832ce4577aed50d9c84 (diff)
interrupts: use constants for IDT_ENTRY attributes
Diffstat (limited to 'kernel/include')
-rw-r--r--kernel/include/boot/interrupts.h10
1 files changed, 10 insertions, 0 deletions
diff --git a/kernel/include/boot/interrupts.h b/kernel/include/boot/interrupts.h
index 42a0ba9..165b2d6 100644
--- a/kernel/include/boot/interrupts.h
+++ b/kernel/include/boot/interrupts.h
@@ -32,6 +32,16 @@
(isr >> 16) /* isr_high */ \
}
+/* Attributes */
+#define IDT_PRESENT (1 << 7)
+#define IDT_KERNEL_PRIVILEGE_LEVEL (0)
+#define IDT_USER_PRIVILEGE_LEVEL (3 << 5)
+#define IDT_TASK_GATE (0b0101)
+#define IDT_16BIT_INTERRUPT_GATE (0b0110)
+#define IDT_16BIT_TRAP_GATE (0b0111)
+#define IDT_32BIT_INTERRUPT_GATE (0b1110)
+#define IDT_32BIT_TRAP_GATE (0b1111)
+
namespace Interrupts
{