Date: Thu, 29 Dec 2005 14:12:18 -0800 From: Peter Wemm <peter@wemm.org> To: freebsd-amd64@freebsd.org Subject: Re: No APM yet for AMD? Message-ID: <200512291412.19476.peter@wemm.org> In-Reply-To: <cone.1135784510.758843.3324.1000@zoraida.natserv.net> References: <cone.1135611096.296999.80599.1000@zoraida.natserv.net> <63675.24.71.129.36.1135718125.squirrel@imap.sd73.bc.ca> <cone.1135784510.758843.3324.1000@zoraida.natserv.net>
next in thread | previous in thread | raw e-mail | index | archive | help
On Wednesday 28 December 2005 07:41 am, Francisco Reyes wrote: > Freddie Cash writes: > >> That's ACPI... notice I typed "APCI". That was not a typo. > > It was a typo. :-( > I should have said... not ACPI.. > > > I think you mean APIC > > Correct. > > > (Advance Programmable Interrupt Controller), not > > APCI. There are options for APIC and ACPI, but I've never seen > > APCI anywhere in FreeBSD. > > No wonder I could not find it in any computer dictionary. :-) > > Back to the original question... How do I do power management on > AMD64? Even if it is just a function to see the battery status so I > don't end up loosing power in the middle of some work. sysctl hw.acpi.battery.life (percentage) sysctl hw.acpi.battery.time (time remaining) If you don't have acpi enabled, then you're sunk. On i386, acpi emulates the apm kernel API, so if you've got acpi enabled there, then all apm(8) access actually is implemented via acpi anyway. amd64 doesn't have the apm api wrapper for some reason that I don't remember now. (I suspect it was that it was binary incompatible with i386 binaries who would be the main users of it, so there'd need to be compat32 shims or something). i386 has real APM available as an option. amd64 cannot do that because it requires bios calls. We cannot do bios calls in 64 bit long mode, just like we can't do vm86 calls and can't do the VESA bios stuff. It just isn't possible in 64 bit mode. You have to leave 64 bit mode to do it, which means your own page tables, your own mini 32 bit kernel to handle interrupts, etc. It just isn't worth it. The effort to make this work would be far better spent on making acpi work, and/or finding and fixing the bugs in the machine's aml code. (FWIW we can load and use custom aml for a machine to replace a buggy version in the bios) -- Peter Wemm - peter@wemm.org; peter@FreeBSD.org; peter@yahoo-inc.com "All of this is for nothing if we don't go to the stars" - JMS/B5
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200512291412.19476.peter>