diff options
author | H. Peter Anvin <hpa@zytor.com> | 2007-11-04 20:50:12 -0500 |
---|---|---|
committer | H. Peter Anvin <hpa@zytor.com> | 2007-11-04 22:47:46 -0500 |
commit | 7ed192906a2144ebc8ca2925a85d27b9c5355668 (patch) | |
tree | 350af59996f750ae2a2d7d7ccf2ffbb596a571e8 /arch | |
parent | b55d1b1814c52463c11707f53dbdc223e09b2924 (diff) |
x86 setup: add a near jump to serialize %cr0 on 386/486
The 386 and 486 needs a jump immediately after setting %cr0 in order
to serialize the pipeline.
Signed-off-by: H. Peter Anvin <hpa@zytor.com>
Diffstat (limited to 'arch')
-rw-r--r-- | arch/x86/boot/pmjump.S | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/arch/x86/boot/pmjump.S b/arch/x86/boot/pmjump.S index 2e559233725a..26baeab3a4d4 100644 --- a/arch/x86/boot/pmjump.S +++ b/arch/x86/boot/pmjump.S | |||
@@ -31,14 +31,14 @@ protected_mode_jump: | |||
31 | xorl %ebx, %ebx # Flag to indicate this is a boot | 31 | xorl %ebx, %ebx # Flag to indicate this is a boot |
32 | movl %edx, %esi # Pointer to boot_params table | 32 | movl %edx, %esi # Pointer to boot_params table |
33 | movl %eax, 2f # Patch ljmpl instruction | 33 | movl %eax, 2f # Patch ljmpl instruction |
34 | jmp 1f # Short jump to flush instruction q. | ||
35 | 34 | ||
36 | 1: | ||
37 | movw $__BOOT_DS, %cx | 35 | movw $__BOOT_DS, %cx |
38 | 36 | ||
39 | movl %cr0, %edx | 37 | movl %cr0, %edx |
40 | orb $1, %dl # Protected mode (PE) bit | 38 | orb $1, %dl # Protected mode (PE) bit |
41 | movl %edx, %cr0 | 39 | movl %edx, %cr0 |
40 | jmp 1f # Short jump to serialize on 386/486 | ||
41 | 1: | ||
42 | 42 | ||
43 | movw %cx, %ds | 43 | movw %cx, %ds |
44 | movw %cx, %es | 44 | movw %cx, %es |