Go to My Blog
Go to Lin's Blog

System and Device power management.

Advanced Configuration and Power Management Interface(ACPI)是由Intel,Microsoft等厂家订的一套Spec,规范了OS,APP对于电源的管理。
ACPI涉及很广,这里仅涉及一些System Power Management, Device Power Management.

System PM:
S0: working mode
S1: CPU停止工作, CPU,RAM继续供电,cache flush到Ram,Device若无必要则处于Power off状态
S2:, re-fresh ram, cache数据丢失,CPU断电.
S3: Standby(Sleep), CPU power off, ram进入slow refresh mode, power supply in reduced power mode.
S4: hibernate, HW完全进入Power off 状态,数据存入disk.
s5: off, shutdown, 没有数据被保存,需要reboot.

Device PM:
D0: fully on.
D1,D2:一般没太大区别,有Device自行决定在D1,D2状态下的行为
D3: bus不能工作了, Device有继续供电,可以主动发起Power请求,进入D0,D1,D2状态.
D4: off, bus不能工作.Device没有供电,完全power off状态.
Device必须支持D0,如果Device收到OS的请求进入它不support的状态,可以直接跳到下一个Power state.比如,OS请求进入D1,Device可以直接进入D3.

Sx <--> Dx, 对应关系
system(Sx)跟device(Dx)之间不需要有固定的对应关系,S0的时候,device也可以进入D3. Device的state由Driver,Power Manager控制.

Windows下有IRP_MN_QUERY_POWER,IRP_MN_SET_POWER
对于NDIS Miniport driver,有OID_PNP_SET_POWER,OID_PNP_QUERY_POWER,OID_PNP_ADD_WAKE_UP_PATTERN,OID_PNP_ENABLE_WAKE_UP等OID来控制.
在Windows下,在控制面板=>电源管理里,可以对Wireless adapter可以选择:Maximum Performance, Low Power Saving, Medium Power Saving, Maximum Power saving,对应OID_DOT11_POWER_MGMT_REQUEST.

posted @ 2013-07-23 15:34  一ke小小草  阅读(489)  评论(0编辑  收藏  举报