ACPI!ACPIDevicePowerProcessGenericPhase函数分析--第三次确认设备节点是否存在
1: kd> kc
00 ACPI!ACPIInternalUpdateDeviceStatus
01 ACPI!ACPIGetConvertToDevicePresence
02 ACPI!ACPIGetWorkerForInteger
03 ACPI!ACPIGet
04 ACPI!ACPIDevicePowerProcessPhase0DeviceSubPhase1
05 ACPI!ACPIDevicePowerProcessGenericPhase
06 ACPI!ACPIDevicePowerDpc
07 nt!KiRetireDpcList
08 nt!KiDispatchInterrupt
WARNING: Frame IP not in any known module. Following frames may be wrong.
09 0x0
1: kd> dv
DeviceExtension = 0x89982008
DeviceStatus = 0xf
oldIrql = 0x00 ''
1: kd> kv
ChildEBP RetAddr Args to Child
00 f78aee70 f7406da5 89982008 0000000f 89461fc0 ACPI!ACPIInternalUpdateDeviceStatus (FPO: [Non-Fpo]) (CONV: stdcall) [d:\srv03rtm\base\busdrv\acpi\driver\nt\internal.c @ 1060]
01 f78aee94 f74073d9 89982008 c0000034 89461fec ACPI!ACPIGetConvertToDevicePresence+0xcf (FPO: [Non-Fpo]) (CONV: stdcall) [d:\srv03rtm\base\busdrv\acpi\driver\nt\get.c @ 1923]
02 f78aeec4 f7407935 00000000 c0000034 89461fec ACPI!ACPIGetWorkerForInteger+0x75 (FPO: [Non-Fpo]) (CONV: cdecl) [d:\srv03rtm\base\busdrv\acpi\driver\nt\get.c @ 4759]
03 f78aef18 f7400cb4 00000000 4154535f 40041802 ACPI!ACPIGet+0x27d (FPO: [Non-Fpo]) (CONV: stdcall) [d:\srv03rtm\base\busdrv\acpi\driver\nt\get.c @ 328]
04 f78aef50 f74022da 89982008 f743b5d8 f743b5d0 ACPI!ACPIDevicePowerProcessPhase0DeviceSubPhase1+0x44 (FPO: [Non-Fpo]) (CONV: stdcall) [d:\srv03rtm\base\busdrv\acpi\driver\nt
\devpower.c @ 3552]
05 f78aef74 f7402837 f743b5e0 f74388b0 00000000 ACPI!ACPIDevicePowerProcessGenericPhase+0x48 (FPO: [Non-Fpo]) (CONV: stdcall) [d:\srv03rtm\base\busdrv\acpi\driver\nt\devpower.c @
3409]
06 f78aef9c 80a41432 f743b580 00000000 00000000 ACPI!ACPIDevicePowerDpc+0x85 (FPO: [Non-Fpo]) (CONV: stdcall) [d:\srv03rtm\base\busdrv\acpi\driver\nt\devpower.c @ 2996]
07 f78aeff4 80b00756 f791abfc 00000000 00000000 nt!KiRetireDpcList+0xd6 (FPO: [Non-Fpo]) (CONV: fastcall) [d:\srv03rtm\base\ntos\ke\dpcsup.c @ 1076]
08 f78aeff8 f791abfc 00000000 00000000 00000000 nt!KiDispatchInterrupt+0x36 (FPO: [Uses EBP] [0,0,1]) [d:\srv03rtm\base\ntos\ke\i386\ctxswap.asm @ 226]
WARNING: Frame IP not in any known module. Following frames may be wrong.
09 80b00756 00000000 00000009 bb837775 00000128 0xf791abfc
NTSTATUS
ACPIDevicePowerProcessPhase0DeviceSubPhase1(
IN PACPI_POWER_REQUEST PowerRequest
)
{
NTSTATUS status = STATUS_SUCCESS;
PDEVICE_EXTENSION deviceExtension = PowerRequest->DeviceExtension;
POBJDATA resultData = &(PowerRequest->ResultData);
//
// The next step is STEP_1
//
PowerRequest->NextWorkDone = WORK_DONE_STEP_1;
//
// Initialize the result data
//
RtlZeroMemory( resultData, sizeof(OBJDATA) );
//
// Get the device presence
//
status = ACPIGetDeviceHardwarePresenceAsync(
deviceExtension,
ACPIDeviceCompleteGenericPhase,
PowerRequest,
&(resultData->uipDataValue),
&(resultData->dwDataLen)
);
1: kd> dx -r1 ((ACPI!_DEVICE_EXTENSION *)0x89982008)
((ACPI!_DEVICE_EXTENSION *)0x89982008) : 0x89982008 [Type: _DEVICE_EXTENSION *]
+0x000\] Flags : 0x40200000000008 \[Type: unsigned __int64
+0x000\] UFlags \[Type: __unnamed
+0x008\] Signature : 0x5f534750 \[Type: unsigned long
+0x00c\] DebugFlags : 0x0 \[Type: unsigned long
+0x010\] DispatchTable : 0x0 \[Type: IRP_DISPATCH_TABLE \*
+0x014\] WorkContext \[Type: WORK_QUEUE_CONTEXT
+0x014\] Fdo \[Type: _FDO_DEVICE_EXTENSION
+0x014\] Filter \[Type: _FILTER_DEVICE_EXTENSION
+0x014\] Pdo \[Type: _PDO_DEVICE_EXTENSION
+0x058\] WorkQueue \[Type: EXTENSION_WORKER
+0x058\] Button \[Type: BUTTON_EXTENSION
+0x058\] Thermal \[Type: THERMAL_EXTENSION
+0x058\] LinkNode \[Type: LINK_NODE_EXTENSION
+0x058\] Dock \[Type: DOCK_EXTENSION
+0x058\] Processor \[Type: _PROCESSOR_DEVICE_EXTENSION
+0x088\] DeviceState : Stopped (0) \[Type: _ACPI_DEVICE_STATE
+0x08c\] PreviousState : Stopped (0) \[Type: _ACPI_DEVICE_STATE
+0x090\] PowerInfo \[Type: _ACPI_POWER_INFO
+0x10c\] DeviceID : 0x898f7358 : 0x41 \[Type: unsigned char \*
+0x10c\] Address : 0x898f7358 \[Type: unsigned long
+0x110\] InstanceID : 0x0 \[Type: unsigned char \*
+0x114\] ResourceList : 0x0 \[Type: _CM_RESOURCE_LIST \*
+0x118\] PnpResourceList : 0x0 \[Type: _ObjData \*
+0x11c\] OutstandingIrpCount : 1 \[Type: long
+0x120\] ReferenceCount : 3 \[Type: long
+0x124\] HibernatePathCount : 0 \[Type: long
+0x128\] RemoveEvent : 0x0 \[Type: _KEVENT \*
+0x12c\] AcpiObject : 0x899b2a64 \[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 0x899b2a64
899b2a64 80 29 9b 89 54 2b 9b 89-78 22 9b 89 a8 2a 9b 89 .)..T+..x"...*..
899b2a74 4b 42 43 5f 30 f3 9a 89-20 2a 9b 89 00 00 06 00 KBC_0... *......
899b2a84 00 00 00 00 00 00 00 00-00 00 00 00 00 00 00 00 ................
1: kd> gu
eax=00000000 ebx=c0000034 ecx=00402000 edx=00000000 esi=89982008 edi=0000000f
eip=f7406da5 esp=f78aee80 ebp=f78aee94 iopl=0 nv up ei pl nz na po nc
cs=0008 ss=0010 ds=0023 es=0023 fs=0030 gs=0000 efl=00000202
ACPI!ACPIGetConvertToDevicePresence+0xcf:
f7406da5 5e pop esi
1: kd> dx -r1 ((ACPI!_DEVICE_EXTENSION *)0x89982008)
((ACPI!_DEVICE_EXTENSION *)0x89982008) : 0x89982008 [Type: _DEVICE_EXTENSION *]
+0x000\] Flags : 0x40200000000008 \[Type: unsigned __int64
+0x000\] UFlags \[Type: __unnamed
+0x008\] Signature : 0x5f534750 \[Type: unsigned long
+0x00c\] DebugFlags : 0x0 \[Type: unsigned long
+0x010\] DispatchTable : 0x0 \[Type: IRP_DISPATCH_TABLE \*
+0x014\] WorkContext \[Type: WORK_QUEUE_CONTEXT
+0x014\] Fdo \[Type: _FDO_DEVICE_EXTENSION
+0x014\] Filter \[Type: _FILTER_DEVICE_EXTENSION
+0x014\] Pdo \[Type: _PDO_DEVICE_EXTENSION
+0x058\] WorkQueue \[Type: EXTENSION_WORKER