Skip to content

Commit

Permalink
[PATCH] x86_64: clear_bss before set_intr_gate with early_idt_handler
Browse files Browse the repository at this point in the history
idt_table is in the .bss section, so clear_bss need to called at first

Signed-off-by: Yinghai Lu <yinghai.lu@amd.com>
Signed-off-by: Andi Kleen <ak@suse.de>
  • Loading branch information
Yinghai Lu authored and Andi Kleen committed Dec 7, 2006
1 parent 0741f4d commit 3df0af0
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions arch/x86_64/kernel/head64.c
Original file line number Diff line number Diff line change
Expand Up @@ -57,10 +57,12 @@ void __init x86_64_start_kernel(char * real_mode_data)
{
int i;

for (i = 0; i < 256; i++)
/* clear bss before set_intr_gate with early_idt_handler */
clear_bss();

for (i = 0; i < IDT_ENTRIES; i++)
set_intr_gate(i, early_idt_handler);
asm volatile("lidt %0" :: "m" (idt_descr));
clear_bss();

early_printk("Kernel alive\n");

Expand Down

0 comments on commit 3df0af0

Please sign in to comment.