Skip to content

Commit

Permalink
x86: fix regression: boot failure on AMD Elan TS-5500
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
H. Peter Anvin authored and Ingo Molnar committed Jul 1, 2008
1 parent 908ec7a commit 2ee2394
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions arch/x86/boot/pmjump.S
Original file line number Diff line number Diff line change
Expand Up @@ -33,15 +33,15 @@ 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

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
Expand Down

0 comments on commit 2ee2394

Please sign in to comment.