feat(idt): specify idt_entries_descriptors length for compile safety

Signed-off-by: Julien CLEMENT <julien.clement@epita.fr>
This commit is contained in:
Julien CLEMENT 2021-07-16 03:07:46 +02:00
parent 4492b7e9d6
commit 457dfdd7a4

@ -3,7 +3,7 @@
static struct idt idt = { 0 };
static struct idt_entry_descriptor idt_entries_descriptors[] = {
static struct idt_entry_descriptor idt_entries_descriptors[IDT_NB_ENTRIES] = {
{(uint32_t)&isr_divide, KERNEL_CS_SEGMENT_SELECTOR, INTERRUPT_TYPE}, // 0
{(uint32_t)&isr_debug, KERNEL_CS_SEGMENT_SELECTOR, INTERRUPT_TYPE}, // 1
{(uint32_t)&isr_nmi, KERNEL_CS_SEGMENT_SELECTOR, INTERRUPT_TYPE}, // 2