diff options
author | Raghuram Subramani <raghus2247@gmail.com> | 2025-05-25 21:44:34 +0530 |
---|---|---|
committer | Raghuram Subramani <raghus2247@gmail.com> | 2025-05-25 21:44:34 +0530 |
commit | 285514f87d1b2602a997069ac5c0b8c1742345d0 (patch) | |
tree | a325598584e480c67b6fae45ce5025b5e0293850 /kernel/include | |
parent | 1c71ed2dee37bb3c11e65832ce4577aed50d9c84 (diff) |
interrupts: use constants for IDT_ENTRY attributes
Diffstat (limited to 'kernel/include')
-rw-r--r-- | kernel/include/boot/interrupts.h | 10 |
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 { |