cvs commit: src/usr.sbin/powerd powerd.c
Nate Lawson
nate at root.org
Thu Sep 8 18:04:09 PDT 2005
Kevin Oberman wrote:
>>Date: Tue, 30 Aug 2005 11:11:26 -0700
>>From: Nate Lawson <nate at root.org>
>>We do use C3+ if supported, and I agree it gives more power savings when
>>active. But even an idle system gets periodic timer interrupts, battery
>>polling, and other events that require it to exit C3. So running at a
>>low CPU rate via throttling may conserve power when not in C3.
>
>
> And, of course, if you have USB devices, you can never make it to
> C3. :-(
>
> I admit I don't understand the issues with USB that cause this, but
> fixing that would likely do more to increase battery life than anything
> else, save the ability to drop the CPU actual clock speed (which we now
> have for most recent mobile platforms).
To go into C3, there are a number of conditions that need to be
satisfied. One is that there cannot be any bus masters active since the
CPU's cache does no snooping while in C3. However, our current USB hci
drivers always leave the port in RUN mode which means it is always bus
mastering. Hence C3 can't be used when uchi/ohci/ehci are loaded. They
do this to get an interrupt when a device is inserted/removed from a USB
port.
The right fix is to change the hci drivers to suspend the port most of
the time and only enable it periodically to check for device events.
This would allow C3 to be used.
In the UHCI 1.1d spec, section 2.1.1 "USBCMD register" describes the
bits needed to make this happen. The Run/Stop bit needs to be set to 0
and then Enter Global Suspend should be set. I think this is the right
sequence. Similar work would need to be done for ohci and ehci.
--
Nate
More information about the freebsd-acpi
mailing list