From 285514f87d1b2602a997069ac5c0b8c1742345d0 Mon Sep 17 00:00:00 2001 From: Raghuram Subramani Date: Sun, 25 May 2025 21:44:34 +0530 Subject: interrupts: use constants for IDT_ENTRY attributes --- kernel/boot/interrupts/idt.cc | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'kernel/boot/interrupts/idt.cc') diff --git a/kernel/boot/interrupts/idt.cc b/kernel/boot/interrupts/idt.cc index fa5786c..7da25e1 100644 --- a/kernel/boot/interrupts/idt.cc +++ b/kernel/boot/interrupts/idt.cc @@ -36,7 +36,9 @@ load_idt(void) /* The first 32 entries are exceptions */ for (uint8_t i = 0; i < 32; i++) - l_entries[i] = (entry_t) IDT_ENTRY((uint32_t) isr_stub_table[i], 0x8E); + l_entries[i] = (entry_t) IDT_ENTRY((uint32_t) isr_stub_table[i], + IDT_PRESENT | IDT_KERNEL_PRIVILEGE_LEVEL + | IDT_32BIT_INTERRUPT_GATE); __asm__ volatile("lidt %0" ::"m"(descriptor)); __asm__ volatile("sti"); -- cgit v1.2.3