diff --git a/arch/x86/kernel/gdt.c b/arch/x86/kernel/gdt.c index a9dc1b99..26457b71 100644 --- a/arch/x86/kernel/gdt.c +++ b/arch/x86/kernel/gdt.c @@ -58,7 +58,7 @@ typedef struct { gdt_ptr_t gp; static tss_t task_state_segments[MAX_TASKS]; -static gdt_entry_t gdt[GDT_ENTRIES] = {[0 ... GDT_ENTRIES-1] = {0, 0, 0, 0, 0, 0,}}; +static gdt_entry_t gdt[GDT_ENTRIES] = {[0 ... GDT_ENTRIES-1] = {0, 0, 0, 0, 0, 0}}; static unsigned char kstacks[MAX_TASKS][KERNEL_STACK_SIZE]; /* diff --git a/arch/x86/kernel/idt.c b/arch/x86/kernel/idt.c index 4b7033ba..c94e26bc 100644 --- a/arch/x86/kernel/idt.c +++ b/arch/x86/kernel/idt.c @@ -42,7 +42,7 @@ typedef struct { * for which the 'presence' bit is cleared (0) will generate an * "Unhandled Interrupt" exception */ -static idt_entry_t idt[256]; +static idt_entry_t idt[256] = {[0 ... 255] = 0x00}; idt_ptr_t idtp; /* This exists in 'start.asm', and is used to load our IDT */ @@ -76,9 +76,6 @@ void idt_install(void) idtp.limit = (sizeof(idt_entry_t) * 256) - 1; idtp.base = (unsigned int)&idt; - /* Clear out the entire IDT, initializing it to zeros */ - memset(&idt, 0x00, sizeof(idt_entry_t) * 256); - /* Add any new ISRs to the IDT here using idt_set_gate */ idt_set_gate(INT_SYSCALL, (unsigned int)isrsyscall, KERNEL_CODE_SELECTOR, IDT_FLAG_PRESENT|IDT_FLAG_RING3|IDT_FLAG_32BIT|IDT_FLAG_TRAPGATE);