Commit 983d5dbd authored by Vivek Goyal's avatar Vivek Goyal Committed by Linus Torvalds
Browse files

[PATCH] x86_64: Fix SMP bootup with CONFIG_KDUMP enabled

o This fix was posted for i386 long back. Posting it for x86_64.

  http://marc.theaimsgroup.com/?l=linux-kernel&m=110380103229830&w=2



o This patch fixes the problem of secondary cpus boot up. This situation
  is faced when kernel is built for default locations like 16MB and
  onwards. In this configuration, only primary cpu (BP) comes and
  secondary cpus don't boot.

o Problem occurs because in trampoline code, lgdt is not able to load the
  GDT as it happens to be situated beyond 16MB. This is due to the fact
  that cpu is still in real mode and default operand size is 16bit.

o This patch uses lgdtl instead of lgdt to force operand size to 32
  instead of 16.
Signed-off-by: default avatarVivek Goyal <vgoyal@in.ibm.com>
Signed-off-by: default avatarAndi Kleen <ak@suse.de>
Signed-off-by: default avatarLinus Torvalds <torvalds@osdl.org>
parent 0d9cb75f
...@@ -42,8 +42,15 @@ r_base = . ...@@ -42,8 +42,15 @@ r_base = .
movl $0xA5A5A5A5, trampoline_data - r_base movl $0xA5A5A5A5, trampoline_data - r_base
# write marker for master knows we're running # write marker for master knows we're running
lidt idt_48 - r_base # load idt with 0, 0 /*
lgdt gdt_48 - r_base # load gdt with whatever is appropriate * GDT tables in non default location kernel can be beyond 16MB and
* lgdt will not be able to load the address as in real mode default
* operand size is 16bit. Use lgdtl instead to force operand size
* to 32 bit.
*/
lidtl idt_48 - r_base # load idt with 0, 0
lgdtl gdt_48 - r_base # load gdt with whatever is appropriate
xor %ax, %ax xor %ax, %ax
inc %ax # protected mode (PE) bit inc %ax # protected mode (PE) bit
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment