Commit 1a13286b authored by H. Peter Anvin's avatar H. Peter Anvin

[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: default avatarH. Peter Anvin <hpa@zytor.com>
parent 1514ab09
...@@ -45,9 +45,10 @@ int query_apm_bios(void) ...@@ -45,9 +45,10 @@ int query_apm_bios(void)
/* Disconnect first, just in case */ /* Disconnect first, just in case */
ax = 0x5304; ax = 0x5304;
bx = 0;
asm volatile("pushl %%ebp ; int $0x15 ; popl %%ebp" asm volatile("pushl %%ebp ; int $0x15 ; popl %%ebp"
: "+a" (ax) : "+a" (ax), "+b" (bx)
: : "ebx", "ecx", "edx", "esi", "edi"); : : "ecx", "edx", "esi", "edi");
/* Paranoia */ /* Paranoia */
ebx = esi = 0; ebx = esi = 0;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment