fedora core 6 1.2949 + vserver 2.2.0
[linux-2.6.git] / arch / i386 / kernel / trampoline.S
index 72f7b91..2f1814c 100644 (file)
 
 .data
 
+/* We can free up trampoline after bootup if cpu hotplug is not supported. */
+#ifndef CONFIG_HOTPLUG_CPU
+.section ".init.data","aw",@progbits
+#endif
+
 .code16
 
 ENTRY(trampoline_data)
@@ -51,8 +56,14 @@ r_base = .
        movl    $0xA5A5A5A5, trampoline_data - r_base
                                # write marker for master knows we're running
 
-       lidt    boot_idt - r_base       # load idt with 0, 0
-       lgdt    boot_gdt - 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   boot_idt - r_base       # load idt with 0, 0
+       lgdtl   boot_gdt - r_base       # load gdt with whatever is appropriate
 
        xor     %ax, %ax
        inc     %ax             # protected mode (PE) bit