x86/boot/compressed/64: Reload CS in startup_32
[linux-2.6-microblaze.git] / arch / x86 / boot / compressed / head_64.S
index e94874f..c59c80c 100644 (file)
@@ -107,9 +107,16 @@ SYM_FUNC_START(startup_32)
        movl    %eax, %gs
        movl    %eax, %ss
 
-/* setup a stack and make sure cpu supports long mode. */
+       /* Setup a stack and load CS from current GDT */
        leal    rva(boot_stack_end)(%ebp), %esp
 
+       pushl   $__KERNEL32_CS
+       leal    rva(1f)(%ebp), %eax
+       pushl   %eax
+       lretl
+1:
+
+       /* Make sure cpu supports long mode. */
        call    verify_cpu
        testl   %eax, %eax
        jnz     .Lno_longmode