diff options
author | H. Peter Anvin <hpa@linux.intel.com> | 2011-02-18 18:47:42 -0500 |
---|---|---|
committer | H. Peter Anvin <hpa@linux.intel.com> | 2011-02-18 18:47:42 -0500 |
commit | ee1b06ea6aed979da3b4e6b6ffea98ad55a3c5c1 (patch) | |
tree | 06b0420b33bdba387d89faba3ed1271492fad9f1 /arch/x86 | |
parent | 3d35ac346e981162eeba391e496faceed4753e7b (diff) |
x86, reboot: Fix the use of passed arguments in 32-bit BIOS reboot
The initial version of this patch had %eax being a segment and %ecx
being the mode. I had changed the interfaces, but not the actual
implementation!
Reported-by: Brian Gerst <brgerst@gmail.com>
LKML-Reference: <AANLkTikxqk=HEw9R-Du=v-1ti1HDGAY9vaNUep2XARaz@mail.gmail.com>
Cc: Stephen Rothwell <sfr@canb.auug.org.au>
Cc: Rafael J. Wysocki <rjw@sisk.pl>
Cc: Matthieu Castet <castet.matthieu@free.fr>
Diffstat (limited to 'arch/x86')
-rw-r--r-- | arch/x86/kernel/reboot_32.S | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/arch/x86/kernel/reboot_32.S b/arch/x86/kernel/reboot_32.S index f242356a096e..29092b38d816 100644 --- a/arch/x86/kernel/reboot_32.S +++ b/arch/x86/kernel/reboot_32.S | |||
@@ -23,10 +23,14 @@ r_base = . | |||
23 | 1: popl %ebx | 23 | 1: popl %ebx |
24 | subl $1b, %ebx | 24 | subl $1b, %ebx |
25 | 25 | ||
26 | /* Compute the equivalent real-mode segment */ | ||
27 | movl %ebx, %ecx | ||
28 | shrl $4, %ecx | ||
29 | |||
26 | /* Patch post-real-mode segment jump */ | 30 | /* Patch post-real-mode segment jump */ |
27 | movw dispatch_table(%ebx,%ecx,2),%cx | 31 | movw dispatch_table(%ebx,%eax,2),%ax |
28 | movw %cx, 101f(%ebx) | 32 | movw %ax, 101f(%ebx) |
29 | movw %ax, 102f(%ebx) | 33 | movw %cx, 102f(%ebx) |
30 | 34 | ||
31 | /* Set up the IDT for real mode. */ | 35 | /* Set up the IDT for real mode. */ |
32 | lidtl machine_real_restart_idt(%ebx) | 36 | lidtl machine_real_restart_idt(%ebx) |