Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 16 Jun 2004 17:14:08 +0100
From:      Liam Foy <liamfoy@sepulcrum.org>
To:        acpi@freebsd.org
Subject:   apm problem
Message-ID:  <20040616171408.0f88c928.liamfoy@sepulcrum.org>

next in thread | raw e-mail | index | archive | help
>---
>Fix drivers and the apm compat interface -- Currently, the apm compat
>interface expects byte values but the ABI used is a set of u_ints and an
>int. Either the apm or acpi battery drivers (or both) are setting the
>value to -1, which results in 0xffffffff being passed back as the current
>state. Really, only 255 should be returned in this case. The apm userland
>utility marks values >= 255 as "unknown" to work around this. But really
>the underlying drivers should be fixed.
>---
>
>Note that we can't change the ABI but fixing the sign-extension issue when
>the kernel drivers fill out the structures would be helpful.
>
>-Nate

Hey guys,
	
	I have been looking into this problem, and removing possibilites. I am
although stuck at one point. I think I have narrowed this problem down to what
bioscall() is returning to apm_get_pwstatus() in /usr/src/sys/i386/bios/apm.c. 
If -1 is returned as it should then apm_get_pwstatus() and apm_get_info() will
work fine, thus filling the struct correctly. I although cannot understand 
what is possibly being returned in order for apm_get_pwstatus() to fill the 
stucture with a -1 when infact it should be 255. Either am looking at the
wrong thing or this bug doesnt like us. Anyone been looking into this bug much
themselves, or have an ideas I can look into ?

- Liam J. Foy <liamfoy@sepulcrum.org>



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20040616171408.0f88c928.liamfoy>