diff options
author | H. Peter Anvin <hpa@linux.intel.com> | 2012-05-08 14:22:36 -0400 |
---|---|---|
committer | H. Peter Anvin <hpa@linux.intel.com> | 2012-05-08 14:48:03 -0400 |
commit | 968ff9ee56f1e3ed4ff4a6d10185865dc77d8f7e (patch) | |
tree | 203601668b2e0ee01b9acdc19ef4732c46c0fe72 /arch/x86/realmode/rm/wakeup/wakeup_asm.S | |
parent | 056a43a6d3ab903a798d8ee4435ad67d6fccc3e6 (diff) |
x86, realmode: Remove indirect jumps in trampoline_32 and wakeup_asm
Remove indirect jumps in trampoline_32.S and the 32-bit part of
wakeup_asm.S. There exist systems which are known to do weird
things if an SMI comes in right after a mode switch, and the
safest way to deal with it is to always follow with a simple
absolute far jump. In the 64-bit code we then to a register
indirect near jump; follow that pattern for the 32-bit code.
Signed-off-by: H. Peter Anvin <hpa@linux.intel.com>
Link: http://lkml.kernel.org/r/1336501366-28617-14-git-send-email-jarkko.sakkinen@intel.com
Diffstat (limited to 'arch/x86/realmode/rm/wakeup/wakeup_asm.S')
-rw-r--r-- | arch/x86/realmode/rm/wakeup/wakeup_asm.S | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/arch/x86/realmode/rm/wakeup/wakeup_asm.S b/arch/x86/realmode/rm/wakeup/wakeup_asm.S index b61126cb599..4c5c5f2bfbe 100644 --- a/arch/x86/realmode/rm/wakeup/wakeup_asm.S +++ b/arch/x86/realmode/rm/wakeup/wakeup_asm.S | |||
@@ -124,9 +124,11 @@ wakeup_start: | |||
124 | lgdtl pmode_gdt | 124 | lgdtl pmode_gdt |
125 | 125 | ||
126 | /* This really couldn't... */ | 126 | /* This really couldn't... */ |
127 | movl pmode_cr0, %eax | 127 | movl pmode_entry, %eax |
128 | movl %eax, %cr0 | 128 | movl pmode_cr0, %ecx |
129 | ljmpl *pmode_entry | 129 | movl %ecx, %cr0 |
130 | ljmpl $__KERNEL_CS, $pa_startup_32 | ||
131 | /* -> jmp *%eax in trampoline_32.S */ | ||
130 | #else | 132 | #else |
131 | jmp trampoline_data | 133 | jmp trampoline_data |
132 | #endif | 134 | #endif |