]> www.pilppa.org Git - linux-2.6-omap-h63xx.git/commitdiff
x86: fix regression: boot failure on AMD Elan TS-5500
authorH. Peter Anvin <hpa@zytor.com>
Mon, 30 Jun 2008 22:42:47 +0000 (15:42 -0700)
committerIngo Molnar <mingo@elte.hu>
Tue, 1 Jul 2008 08:53:29 +0000 (10:53 +0200)
Jeremy Fitzhardinge wrote:
>
> Maybe it really does require the far jump immediately after setting PE
> in cr0...
>
> Hm, I don't remember this paragraph being in vol 3a, section 8.9.1
> before.  Is it a recent addition?
>
>    Random failures can occur if other instructions exist between steps
>    3 and 4 above.  Failures will be readily seen in some situations,
>    such as when instructions that reference memory are inserted between
>    steps 3 and 4 while in system management mode.
>

I don't remember that, either.

Signed-off-by: Ingo Molnar <mingo@elte.hu>
arch/x86/boot/pmjump.S

index ab049d40a884d7ef44d32fb63e30c44ed6aedabf..141b6e20ed3124dc102104991367de8b4779be68 100644 (file)
@@ -33,6 +33,8 @@ protected_mode_jump:
        movw    %cs, %bx
        shll    $4, %ebx
        addl    %ebx, 2f
+       jmp     1f                      # Short jump to serialize on 386/486
+1:
 
        movw    $__BOOT_DS, %cx
        movw    $__BOOT_TSS, %di
@@ -40,8 +42,6 @@ protected_mode_jump:
        movl    %cr0, %edx
        orb     $X86_CR0_PE, %dl        # Protected mode
        movl    %edx, %cr0
-       jmp     1f                      # Short jump to serialize on 386/486
-1:
 
        # Transition to 32-bit mode
        .byte   0x66, 0xea              # ljmpl opcode