aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorH. Peter Anvin <hpa@zytor.com>2007-07-23 18:37:14 -0400
committerH. Peter Anvin <hpa@zytor.com>2007-07-25 15:02:21 -0400
commit1a13286b104faeeb4f4bc3bfbf4d4fcdcd2569ed (patch)
tree37fef9c9676b5efe90773a8b7ba4832ae492f6ef
parent1514ab09edb071345fe17cd230c97f9e72c9478e (diff)
[x86 setup] APM: BX should be zero when disconnecting
For APM calls, BX contains the device index, which is zero for the system BIOS. Disconnect requres BX = 0. Signed-off-by: H. Peter Anvin <hpa@zytor.com>
-rw-r--r--arch/i386/boot/apm.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/arch/i386/boot/apm.c b/arch/i386/boot/apm.c
index 8be3f5686af6..eab50c55a3a5 100644
--- a/arch/i386/boot/apm.c
+++ b/arch/i386/boot/apm.c
@@ -45,9 +45,10 @@ int query_apm_bios(void)
45 45
46 /* Disconnect first, just in case */ 46 /* Disconnect first, just in case */
47 ax = 0x5304; 47 ax = 0x5304;
48 bx = 0;
48 asm volatile("pushl %%ebp ; int $0x15 ; popl %%ebp" 49 asm volatile("pushl %%ebp ; int $0x15 ; popl %%ebp"
49 : "+a" (ax) 50 : "+a" (ax), "+b" (bx)
50 : : "ebx", "ecx", "edx", "esi", "edi"); 51 : : "ecx", "edx", "esi", "edi");
51 52
52 /* Paranoia */ 53 /* Paranoia */
53 ebx = esi = 0; 54 ebx = esi = 0;