No APM yet for AMD?

Peter Wemm peter at
Thu Dec 29 14:12:49 PST 2005

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 (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 at; peter at; peter at
"All of this is for nothing if we don't go to the stars" - JMS/B5

More information about the freebsd-amd64 mailing list