1
0
Fork 0

[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>
hifive-unleashed-5.1
H. Peter Anvin 2007-07-23 15:37:14 -07:00
parent 1514ab09ed
commit 1a13286b10
1 changed files with 3 additions and 2 deletions

View File

@ -45,9 +45,10 @@ int query_apm_bios(void)
/* Disconnect first, just in case */
ax = 0x5304;
bx = 0;
asm volatile("pushl %%ebp ; int $0x15 ; popl %%ebp"
: "+a" (ax)
: : "ebx", "ecx", "edx", "esi", "edi");
: "+a" (ax), "+b" (bx)
: : "ecx", "edx", "esi", "edi");
/* Paranoia */
ebx = esi = 0;