ACPI!ACPIDevicePowerProcessPhase1DeviceSubPhase1函数的作用处理DMAC节点ACPI!ACPIDevicePowerProcessPhase1DeviceSubPhase4函数赋值deviceExtension->PowerInfo.DesiredPowerState
**Desired:**期望得到的
1: kd> g
Breakpoint 84 hit
eax=00000000 ebx=80b019f4 ecx=899c4200 edx=00000001 esi=899c41d0 edi=f74388c4
eip=f7400dd6 esp=f78aef54 ebp=f78aef74 iopl=0 nv up ei pl zr na pe nc
cs=0008 ss=0010 ds=0023 es=0023 fs=0030 gs=0000 efl=00000246
ACPI!ACPIDevicePowerProcessPhase1DeviceSubPhase1:
f7400dd6 55 push ebp
1: kd> kc
00 ACPI!ACPIDevicePowerProcessPhase1DeviceSubPhase1
01 ACPI!ACPIDevicePowerProcessGenericPhase
02 ACPI!ACPIDevicePowerDpc
03 nt!KiRetireDpcList
04 nt!KiDispatchInterrupt
WARNING: Frame IP not in any known module. Following frames may be wrong.
05 0x0
1: kd> dv
PowerRequest = 0x895e8d20
status = 0n8
disObject = 0x895e8d20
//
// Get some data from the request
//
deviceState = PowerRequest->u.DevicePowerRequest.DevicePowerState;
flags = PowerRequest->u.DevicePowerRequest.Flags;
1: kd> dx -r1 ((ACPI!_ACPI_POWER_REQUEST *)0x895e8d20)
((ACPI!_ACPI_POWER_REQUEST *)0x895e8d20) : 0x895e8d20 [Type: _ACPI_POWER_REQUEST *]
+0x000\] ListEntry \[Type: _LIST_ENTRY
+0x008\] SerialListEntry \[Type: _LIST_ENTRY
+0x010\] Signature : 0x5f534750 \[Type: unsigned long
+0x014\] DeviceExtension : 0x899c07b8 \[Type: _DEVICE_EXTENSION \*
+0x018\] RequestType : AcpiPowerRequestDevice (0) \[Type: ACPI_POWER_REQUEST_TYPE
+0x01c\] FailedOnce : 0x0 \[Type: unsigned char
+0x020\] u \[Type: __unnamed
+0x028\] CallBack : 0x0 \[Type: void (\*)()
+0x02c\] Context : 0x0 \[Type: void \*
+0x030\] WorkDone : 0x1 \[Type: unsigned long
+0x034\] NextWorkDone : 0x0 \[Type: unsigned long
+0x038\] ResultData \[Type: _ObjData
+0x04c\] Status : 0 \[Type: long
1: kd> dx -r1 ((ACPI!_DEVICE_EXTENSION *)0x899c07b8)
((ACPI!_DEVICE_EXTENSION *)0x899c07b8) : 0x899c07b8 [Type: _DEVICE_EXTENSION *]
+0x000\] Flags : 0x50200000300008 \[Type: unsigned __int64
+0x000\] UFlags \[Type: __unnamed
+0x12c\] AcpiObject : 0x899b25c0 \[Type: _NSObj \*
+0x130\] DeviceObject : 0x0 \[Type: _DEVICE_OBJECT \*
+0x134\] TargetDeviceObject : 0x0 \[Type: _DEVICE_OBJECT \*
+0x138\] PhysicalDeviceObject : 0x0 \[Type: _DEVICE_OBJECT \*
+0x13c\] ParentExtension : 0x899c0a88 \[Type: _DEVICE_EXTENSION \*
+0x140\] ChildDeviceList \[Type: _LIST_ENTRY
+0x148\] SiblingDeviceList \[Type: _LIST_ENTRY
+0x150\] EjectDeviceHead \[Type: _LIST_ENTRY
+0x158\] EjectDeviceList \[Type: _LIST_ENTRY
1: kd> db 0x899b25c0
899b25c0 00 23 9b 89 b8 26 9b 89-78 22 9b 89 04 26 9b 89 .#...&..x"...&..
899b25d0 44 4d 41 43 30 f3 9a 89-f0 24 9b 89 00 00 06 00 DMAC0....$......
+0x020 u : __unnamed
+0x000 DevicePowerRequest : __unnamed
+0x000 Flags : 9
+0x004 DevicePowerState : 1 ( PowerDeviceD0 )
if (deviceState == PowerDeviceD0 ||
(flags & DEVICE_REQUEST_LOCK_HIBER) ) {
PowerRequest->NextWorkDone = WORK_DONE_STEP_3;
goto ACPIDevicePowerProcessPhase1DeviceSubPhase1Exit;
}
//
// Do we have a table associated with this level of workdone?
//
powerTable = DispatchTable[ workDone ];
1: kd> p
eax=00000006 ebx=80b019f4 ecx=f7438924 edx=00000001 esi=895e8d20 edi=f743890c
eip=f74022c6 esp=f78aef5c ebp=f78aef74 iopl=0 nv up ei ng nz ac po cy
cs=0008 ss=0010 ds=0023 es=0023 fs=0030 gs=0000 efl=00000293
ACPI!ACPIDevicePowerProcessGenericPhase+0x34:
f74022c6 85ff test edi,edi
1: kd> u f743890c
ACPI!AcpiDevicePowerProcessPhase1Table4:
f743890c a810 test al,10h
f743890e 40 inc eax
f743890f f720 mul eax,dword ptr [eax]
f7438911 2340f7 and eax,dword ptr [eax-9]
f7438914 2023 and byte ptr [ebx],ah
f7438916 40 inc eax
f7438917 f720 mul eax,dword ptr [eax]
f7438919 2340f7 and eax,dword ptr [eax-9]
1: kd> dds f743890c
f743890c f74010a8 ACPI!ACPIDevicePowerProcessPhase1DeviceSubPhase4 [d:\srv03rtm\base\busdrv\acpi\driver\nt\devpower.c @ 4062]
f7438910 f7402320 ACPI!ACPIDevicePowerProcessInvalid [d:\srv03rtm\base\busdrv\acpi\driver\nt\devpower.c @ 3483]
f7438914 f7402320 ACPI!ACPIDevicePowerProcessInvalid [d:\srv03rtm\base\busdrv\acpi\driver\nt\devpower.c @ 3483]
f7438918 f7402320 ACPI!ACPIDevicePowerProcessInvalid [d:\srv03rtm\base\busdrv\acpi\driver\nt\devpower.c @ 3483]
f743891c f7402320 ACPI!ACPIDevicePowerProcessInvalid [d:\srv03rtm\base\busdrv\acpi\driver\nt\devpower.c @ 3483]
f7438920 f7402320 ACPI!ACPIDevicePowerProcessInvalid [d:\srv03rtm\base\busdrv\acpi\driver\nt\devpower.c @ 3483]
f7438924 00000000
1: kd> t
eax=00000000 ebx=80b019f4 ecx=895e8d50 edx=00000001 esi=895e8d20 edi=f743890c
eip=f74010a8 esp=f78aef54 ebp=f78aef74 iopl=0 nv up ei pl zr na pe nc
cs=0008 ss=0010 ds=0023 es=0023 fs=0030 gs=0000 efl=00000246
ACPI!ACPIDevicePowerProcessPhase1DeviceSubPhase4:
f74010a8 55 push ebp
1: kd> dv
PowerRequest = 0x895e8d20
deviceState = PowerDeviceUnspecified (0n0)
oldIrql = 0x00 ''
1: kd> dx -r1 (*((ACPI!_ACPI_POWER_INFO *)0x899c0848))
(*((ACPI!_ACPI_POWER_INFO *)0x899c0848)) [Type: _ACPI_POWER_INFO]
+0x000\] Context : 0x0 \[Type: void \*
+0x004\] PowerState : PowerDeviceUnspecified (0) \[Type: _DEVICE_POWER_STATE
+0x008\] DeviceNotifyHandler : 0x0 \[Type: void (\*)(void \*,unsigned long)
+0x00c\] HandlerContext : 0x0 \[Type: void \*
+0x010\] PowerNode \[Type: _ACPI_DEVICE_POWER_NODE \* \[4\]
+0x020\] PowerObject \[Type: _NSObj \* \[5\]
+0x034\] WakeBit : 0x0 \[Type: unsigned long
+0x038\] DevicePowerMatrix \[Type: _DEVICE_POWER_STATE \[7\]
+0x054\] SystemWakeLevel : PowerSystemUnspecified (0) \[Type: _SYSTEM_POWER_STATE
+0x058\] DeviceWakeLevel : PowerDeviceUnspecified (0) \[Type: _DEVICE_POWER_STATE
+0x05c\] DesiredPowerState : PowerDeviceUnspecified (0) \[Type: _DEVICE_POWER_STATE
+0x060\] WakeSupportCount : 0x0 \[Type: unsigned long
+0x064\] WakeSupportList \[Type: _LIST_ENTRY
+0x06c\] CurrentPowerRequest : 0x0 \[Type: _ACPI_POWER_REQUEST \*
+0x070\] PowerRequestListEntry \[Type: _LIST_ENTRY
+0x078 ( 0: 0)\] SupportDeviceD1 : 0x0 \[Type: unsigned long
+0x078 ( 1: 1)\] SupportDeviceD2 : 0x0 \[Type: unsigned long
+0x078 ( 2: 2)\] SupportWakeFromD0 : 0x0 \[Type: unsigned long
+0x078 ( 3: 3)\] SupportWakeFromD1 : 0x0 \[Type: unsigned long
+0x078 ( 4: 4)\] SupportWakeFromD2 : 0x0 \[Type: unsigned long
+0x078 ( 5: 5)\] SupportWakeFromD3 : 0x0 \[Type: unsigned long
+0x078 (31: 6)\] Reserved : 0x0 \[Type: unsigned long
//
// Remember the desired state
//
deviceExtension->PowerInfo.DesiredPowerState = deviceState;
//
// Also, consider that the device is now in an unknown state ---
// if we fail something, the is the power state that we will be left
// at
//
deviceExtension->PowerInfo.PowerState = PowerDeviceUnspecified;
1: kd> dx -r1 (*((ACPI!_ACPI_POWER_INFO *)0x899c0848))
(*((ACPI!_ACPI_POWER_INFO *)0x899c0848)) [Type: _ACPI_POWER_INFO]
+0x000\] Context : 0x0 \[Type: void \*
+0x004\] PowerState : PowerDeviceUnspecified (0) \[Type: _DEVICE_POWER_STATE
+0x008\] DeviceNotifyHandler : 0x0 \[Type: void (\*)(void \*,unsigned long)
+0x00c\] HandlerContext : 0x0 \[Type: void \*
+0x010\] PowerNode \[Type: _ACPI_DEVICE_POWER_NODE \* \[4\]
+0x020\] PowerObject \[Type: _NSObj \* \[5\]
+0x034\] WakeBit : 0x0 \[Type: unsigned long
+0x038\] DevicePowerMatrix \[Type: _DEVICE_POWER_STATE \[7\]
+0x054\] SystemWakeLevel : PowerSystemUnspecified (0) \[Type: _SYSTEM_POWER_STATE
+0x058\] DeviceWakeLevel : PowerDeviceUnspecified (0) \[Type: _DEVICE_POWER_STATE
+0x05c\] DesiredPowerState : PowerDeviceD0 (1) \[Type: _DEVICE_POWER_STATE\] 发生变化。 \[+0x060\] WakeSupportCount : 0x0 \[Type: unsigned long
+0x064\] WakeSupportList \[Type: _LIST_ENTRY
+0x06c\] CurrentPowerRequest : 0x0 \[Type: _ACPI_POWER_REQUEST \*
+0x070\] PowerRequestListEntry \[Type: _LIST_ENTRY
+0x078 ( 0: 0)\] SupportDeviceD1 : 0x0 \[Type: unsigned long
+0x078 ( 1: 1)\] SupportDeviceD2 : 0x0 \[Type: unsigned long
+0x078 ( 2: 2)\] SupportWakeFromD0 : 0x0 \[Type: unsigned long
+0x078 ( 3: 3)\] SupportWakeFromD1 : 0x0 \[Type: unsigned long
+0x078 ( 4: 4)\] SupportWakeFromD2 : 0x0 \[Type: unsigned long
+0x078 ( 5: 5)\] SupportWakeFromD3 : 0x0 \[Type: unsigned long
+0x078 (31: 6)\] Reserved : 0x0 \[Type: unsigned long