ACPI!ACPIDispatchAddDevice函数中的ACPI!ACPIDetectPdoDevices函数分析和ACPI!ACPIGet的作用
NTSTATUS
ACPIDetectPdoDevices(
IN PDEVICE_OBJECT DeviceObject,
IN PDEVICE_RELATIONS *DeviceRelations
)
{
//
// Update the current device status
//
status = ACPIGetDevicePresenceSync(
deviceExtension,
(PVOID *) &deviceStatus,
NULL
);
//
// If the device exists
//
if ( NT_SUCCESS(status) &&
!(deviceExtension->Flags & DEV_MASK_NOT_PRESENT) ) {
//
// Is there a match between the device relations and the current
// device extension?
//
matchFound = ACPIDetectPdoMatch(
deviceExtension,
currentRelations
);
if (matchFound == FALSE) {
//
// NOTE: we use this here to prevent having to typecase later
// on
//
matchFound =
(parentExtension->Flags & DEV_TYPE_FDO) ? FALSE : TRUE;
//
// Build a new PDO
//
status = ACPIBuildPdo(
DeviceObject->DriverObject,
deviceExtension,
parentExtension->PhysicalDeviceObject,
matchFound
Breakpoint 4 hit
eax=f789a480 ebx=00000000 ecx=f77422b0 edx=00000002 esi=00000000 edi=899c53f3
eip=80c63538 esp=f789a448 ebp=f789a484 iopl=0 nv up ei pl zr na pe nc
cs=0008 ss=0010 ds=0023 es=0023 fs=0030 gs=0000 efl=00000246
nt!IoCreateDevice:
80c63538 55 push ebp
1: kd> kc
00 nt!IoCreateDevice
01 ACPI!ACPIDispatchAddDevice
02 nt!PpvUtilCallAddDevice
03 nt!PipCallDriverAddDevice
04 nt!PiProcessAddBootDevices
05 nt!PipDeviceActionWorker
06 nt!PipRequestDeviceAction
07 nt!PipAddDevicesToBootDriverWorker
08 nt!PipApplyFunctionToServiceInstances
09 nt!PipAddDevicesToBootDriver
0a nt!IopInitializeBootDrivers
0b nt!IoInitSystem
0c nt!Phase1Initialization
0d nt!PspSystemThreadStartup
0e nt!KiThreadStartup
1: kd> kv
ChildEBP RetAddr Args to Child
00 f789a444 f7403c9c 89981f38 00000000 00000000 nt!IoCreateDevice (FPO: [Non-Fpo]) (CONV: stdcall) [d:\srv03rtm\base\ntos\io\iomgr\iosubs.c @ 4282]
01 f789a484 80a2f6c9 89981f38 899c1de0 e12852e0 ACPI!ACPIDispatchAddDevice+0xca (FPO: [Non-Fpo]) (CONV: stdcall) [d:\srv03rtm\base\busdrv\acpi\driver\nt\dispatch.c @ 142]
02 f789a49c 80c91f5c f7403bd2 00000004 00000000 nt!PpvUtilCallAddDevice+0x17 (FPO: [Non-Fpo]) (CONV: fastcall) [d:\srv03rtm\base\ntos\io\pnpmgr\ppvutil.c @ 74]
03 f789a560 80c9292c 00000000 02000000 899c1de0 nt!PipCallDriverAddDevice+0x64a (FPO: [Non-Fpo]) (CONV: stdcall) [d:\srv03rtm\base\ntos\io\pnpmgr\pnpenum.c @ 2579]
04 f789a580 80a2de4e 89987358 80b1f6f8 00000000 nt!PiProcessAddBootDevices+0x98 (FPO: [Non-Fpo]) (CONV: stdcall) [d:\srv03rtm\base\ntos\io\pnpmgr\pnpenum.c @ 5849]
05 f789a5a8 80a2e161 00000000 00000000 00000000 nt!PipDeviceActionWorker+0x132 (FPO: [Non-Fpo]) (CONV: stdcall) [d:\srv03rtm\base\ntos\io\pnpmgr\pnpenum.c @ 739]
06 f789a5c0 80e671d7 899c1de0 00000000 00000000 nt!PipRequestDeviceAction+0x139 (FPO: [Non-Fpo]) (CONV: stdcall) [d:\srv03rtm\base\ntos\io\pnpmgr\pnpenum.c @ 598]
07 f789a5e4 80c8af7b 8000056c f789a604 89981f38 nt!PipAddDevicesToBootDriverWorker+0x1f (FPO: [Non-Fpo]) (CONV: stdcall) [d:\srv03rtm\base\ntos\io\pnpmgr\pnpinit.c @ 1758]
08 f789a620 80e68789 e1286550 00000000 000f003f nt!PipApplyFunctionToServiceInstances+0x18f (FPO: [Non-Fpo]) (CONV: stdcall) [d:\srv03rtm\base\ntos\io\pnpmgr\pnpsubs.c @ 2378]
09 f789a644 80e6934a 89981f38 00000000 80077000 nt!PipAddDevicesToBootDriver+0x23 (FPO: [Non-Fpo]) (CONV: stdcall) [d:\srv03rtm\base\ntos\io\pnpmgr\pnpinit.c @ 1700]
0a f789a694 80e655c7 80077000 f789a7dc 00034000 nt!IopInitializeBootDrivers+0x384 (FPO: [Non-Fpo]) (CONV: stdcall) [d:\srv03rtm\base\ntos\io\pnpmgr\pnpinit.c @ 1440]
0b f789a838 80e632fd 80077000 00000000 899a1020 nt!IoInitSystem+0x70b (FPO: [Non-Fpo]) (CONV: stdcall) [d:\srv03rtm\base\ntos\io\iomgr\ioinit.c @ 665]
0c f789adac 80d391f0 80077000 00000000 00000000 nt!Phase1Initialization+0x9b3 (FPO: [Non-Fpo]) (CONV: stdcall) [d:\srv03rtm\base\ntos\init\init.c @ 2221]
0d f789addc 80b00d52 80e6294a 80077000 00000000 nt!PspSystemThreadStartup+0x2e (FPO: [Non-Fpo]) (CONV: stdcall) [d:\srv03rtm\base\ntos\ps\create.c @ 2213]
0e 00000000 00000000 00000000 00000000 00000000 nt!KiThreadStartup+0x16 [d:\srv03rtm\base\ntos\ke\i386\threadbg.asm @ 81]
1: kd> !object \driver
Object: e127b3d0 Type: (899a2e70) Directory
ObjectHeader: e127b3b8 (old version)
HandleCount: 0 PointerCount: 5
Directory Object: e10007c0 Name: Driver
Hash Address Type Name
18 89983180 Driver WMIxWDM
899833a8 Driver ACPI_HAL
32 89981f38 Driver ACPI
33 899873b0 Driver PnpManager
1: kd> !object 89981f38
Object: 89981f38 Type: (89987ac0) Driver
ObjectHeader: 89981f20 (old version)
HandleCount: 0 PointerCount: 4
Directory Object: e127b3d0 Name: ACPI
1: kd> !drvobj 89981f38
Driver object (89981f38) is for:
\Driver\ACPI
Driver Extension List: (id , addr)
Device Object list:
0: kd> g
Breakpoint 4 hit
eax=f789a204 ebx=00000000 ecx=89981a18 edx=00000000 esi=899c0d58 edi=899c0e78
eip=80c63538 esp=f789a1d8 ebp=f789a208 iopl=0 nv up ei pl zr na pe nc
cs=0008 ss=0010 ds=0023 es=0023 fs=0030 gs=0000 efl=00000246
nt!IoCreateDevice:
80c63538 55 push ebp
0: kd> kc
00 nt!IoCreateDevice
01 ACPI!ACPIBuildPdo
02 ACPI!ACPIDetectPdoDevices
03 ACPI!ACPIRootIrpQueryBusRelations
04 ACPI!ACPIRootIrpQueryDeviceRelations
05 ACPI!ACPIDispatchIrp
06 nt!IofCallDriver
07 nt!IopSynchronousCall
08 nt!IopQueryDeviceRelations
09 nt!PipEnumerateDevice
0a nt!PipProcessDevNodeTree
0b nt!PipDeviceActionWorker
0c nt!PipRequestDeviceAction
0d nt!IopInitializeBootDrivers
0e nt!IoInitSystem
0f nt!Phase1Initialization
10 nt!PspSystemThreadStartup
11 nt!KiThreadStartup
0: kd> gu
eax=00000000 ebx=00000000 ecx=899ae8b8 edx=899ae894 esi=899c0d58 edi=899c0e78
eip=f73faa60 esp=f789a1f8 ebp=f789a208 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!ACPIBuildPdo+0x26:
f73faa60 3bc3 cmp eax,ebx
0: kd> g
Breakpoint 4 hit
eax=f789a204 ebx=00000000 ecx=89981a18 edx=00000000 esi=899c0d58 edi=899c0e78
eip=80c63538 esp=f789a1d8 ebp=f789a208 iopl=0 nv up ei pl zr na pe nc
cs=0008 ss=0010 ds=0023 es=0023 fs=0030 gs=0000 efl=00000246
nt!IoCreateDevice:
80c63538 55 push ebp
0: kd> kc
00 nt!IoCreateDevice
01 ACPI!ACPIBuildPdo
02 ACPI!ACPIDetectPdoDevices
03 ACPI!ACPIRootIrpQueryBusRelations
04 ACPI!ACPIRootIrpQueryDeviceRelations
05 ACPI!ACPIDispatchIrp
06 nt!IofCallDriver
07 nt!IopSynchronousCall
08 nt!IopQueryDeviceRelations
09 nt!PipEnumerateDevice
0a nt!PipProcessDevNodeTree
0b nt!PipDeviceActionWorker
0c nt!PipRequestDeviceAction
0d nt!IopInitializeBootDrivers
0e nt!IoInitSystem
0f nt!Phase1Initialization
10 nt!PspSystemThreadStartup
11 nt!KiThreadStartup
0: kd> dv
DeviceObject = 0x89981b98 Device for "\Driver\ACPI"
DeviceRelations = 0xf789a2a4
currentRelations = 0x00000000
status = 0n0
parentExtension = 0x89981a18
deviceStatus = 0xf
oldIrql = 0x00 ''
newRelationSize = 0
newRelations = 0x89981b98
index = 0x89981a18
matchFound = 0x00 ''
0: kd> dx -r1 -nv (*((ACPI!_DEVICE_OBJECT *)0x89981b98))
(*((ACPI!_DEVICE_OBJECT *)0x89981b98)) : Device for "\Driver\ACPI" [Type: _DEVICE_OBJECT]
+0x000\] Type : 3 \[Type: short
+0x002\] Size : 0xb8 \[Type: unsigned short
+0x004\] ReferenceCount : 0 \[Type: long
+0x008\] DriverObject : 0x89981f38 : Driver "\\Driver\\ACPI" \[Type: _DRIVER_OBJECT \*
+0x00c\] NextDevice : 0x0 \[Type: _DEVICE_OBJECT \*
+0x010\] AttachedDevice : 0x0 \[Type: _DEVICE_OBJECT \*
+0x014\] CurrentIrp : 0x0 \[Type: _IRP \*
+0x018\] Timer : 0x0 \[Type: _IO_TIMER \*
+0x01c\] Flags : 0x0 \[Type: unsigned long
+0x020\] Characteristics : 0x0 \[Type: unsigned long
+0x024\] Vpb : 0x0 \[Type: _VPB \*
+0x028\] DeviceExtension : 0x89981a18 \[Type: void \*
+0x02c\] DeviceType : 0x32 \[Type: unsigned long
+0x030\] StackSize : 2 \[Type: char
+0x034\] Queue \[Type: __unnamed
+0x05c\] AlignmentRequirement : 0x0 \[Type: unsigned long
+0x060\] DeviceQueue \[Type: _KDEVICE_QUEUE
+0x074\] Dpc \[Type: _KDPC
+0x094\] ActiveThreadCount : 0x0 \[Type: unsigned long
+0x098\] SecurityDescriptor : 0x0 \[Type: void \*
+0x09c\] DeviceLock \[Type: _KEVENT
+0x0ac\] SectorSize : 0x0 \[Type: unsigned short
+0x0ae\] Spare1 : 0x0 \[Type: unsigned short
+0x0b0\] DeviceObjectExtension : 0x89981c50 \[Type: _DEVOBJ_EXTENSION \*
+0x0b4\] Reserved : 0x0 \[Type: void \*
0: kd> dt acpi!_Device_Extension 0x89981a18
+0x000 Flags : 0x4461e000`00200010
+0x000 UFlags : __unnamed
+0x008 Signature : 0x5f534750
+0x00c DebugFlags : 0
+0x010 DispatchTable : 0xf743826c IRP_DISPATCH_TABLE
+0x014 WorkContext : WORK_QUEUE_CONTEXT
+0x014 Fdo : _FDO_DEVICE_EXTENSION
+0x014 Filter : _FILTER_DEVICE_EXTENSION
+0x014 Pdo : _PDO_DEVICE_EXTENSION
+0x058 WorkQueue : EXTENSION_WORKER
+0x058 Button : BUTTON_EXTENSION
+0x058 Thermal : THERMAL_EXTENSION
+0x058 LinkNode : LINK_NODE_EXTENSION
+0x058 Dock : DOCK_EXTENSION
+0x058 Processor : _PROCESSOR_DEVICE_EXTENSION
+0x088 DeviceState : 2 ( Started )
+0x08c PreviousState : 0 ( Stopped )
+0x090 PowerInfo : _ACPI_POWER_INFO
+0x10c DeviceID : 0x899bfea0 "ACPI\PNP0C08"
+0x10c Address : 0x899bfea0
+0x110 InstanceID : 0x899c53e8 "0x5F534750"
+0x114 ResourceList : 0x899bfeb8 _CM_RESOURCE_LIST
+0x118 PnpResourceList : (null)
+0x11c OutstandingIrpCount : 0n2
+0x120 ReferenceCount : 0n12
+0x124 HibernatePathCount : 0n0
+0x128 RemoveEvent : (null)
+0x12c AcpiObject : 0x899af0f0 _NSObj
+0x130 DeviceObject : 0x89981b98 _DEVICE_OBJECT
+0x134 TargetDeviceObject : 0x899c1de0 _DEVICE_OBJECT
+0x138 PhysicalDeviceObject : 0x899c1de0 _DEVICE_OBJECT
+0x13c ParentExtension : (null)
+0x140 ChildDeviceList : _LIST_ENTRY [ 0x899c0ea0 - 0x89906fe8 ]
+0x148 SiblingDeviceList : _LIST_ENTRY [ 0x89981b60 - 0x89981b60 ]
+0x150 EjectDeviceHead : _LIST_ENTRY [ 0x89981b68 - 0x89981b68 ]
+0x158 EjectDeviceList : _LIST_ENTRY [ 0x89981b70 - 0x89981b70 ]
0: kd> dx -id 0,0,899a2278 -r1 (*((ACPI!_LIST_ENTRY *)0x89981b58))
(*((ACPI!_LIST_ENTRY *)0x89981b58)) [Type: _LIST_ENTRY]
+0x000\] Flink : 0x899c0ea0 \[Type: _LIST_ENTRY \*
+0x004\] Blink : 0x89906fe8 \[Type: _LIST_ENTRY \*
0: kd> dx -id 0,0,899a2278 -r1 ((ACPI!_LIST_ENTRY *)0x899c0ea0)
((ACPI!_LIST_ENTRY *)0x899c0ea0) : 0x899c0ea0 [Type: _LIST_ENTRY *]
+0x000\] Flink : 0x899ae150 \[Type: _LIST_ENTRY \*
+0x004\] Blink : 0x89981b58 \[Type: _LIST_ENTRY \*
0: kd> dt acpi!_DEVICE_EXTENSION 0x899c0ea0-148
+0x000 Flags : 0x00402000`02010020
+0x000 UFlags : __unnamed
+0x008 Signature : 0x5f534750
+0x00c DebugFlags : 0
+0x010 DispatchTable : 0xf743830c IRP_DISPATCH_TABLE
+0x014 WorkContext : WORK_QUEUE_CONTEXT
+0x014 Fdo : _FDO_DEVICE_EXTENSION
+0x014 Filter : _FILTER_DEVICE_EXTENSION
+0x014 Pdo : _PDO_DEVICE_EXTENSION
+0x058 WorkQueue : EXTENSION_WORKER
+0x058 Button : BUTTON_EXTENSION
+0x058 Thermal : THERMAL_EXTENSION
+0x058 LinkNode : LINK_NODE_EXTENSION
+0x058 Dock : DOCK_EXTENSION
+0x058 Processor : _PROCESSOR_DEVICE_EXTENSION
+0x088 DeviceState : 0 ( Stopped )
+0x08c PreviousState : 0 ( Stopped )
+0x090 PowerInfo : _ACPI_POWER_INFO
+0x10c DeviceID : 0x899c1210 "ACPI\PNP0A03"
+0x10c Address : 0x899c1210
+0x110 InstanceID : (null)
+0x114 ResourceList : (null)
+0x118 PnpResourceList : (null)
+0x11c OutstandingIrpCount : 0n1
+0x120 ReferenceCount : 0n84
+0x124 HibernatePathCount : 0n0
+0x128 RemoveEvent : (null)
+0x12c AcpiObject : 0x899affac _NSObj
+0x130 DeviceObject : 0x899ae8b8 _DEVICE_OBJECT
+0x134 TargetDeviceObject : (null)
+0x138 PhysicalDeviceObject : 0x899ae8b8 _DEVICE_OBJECT
+0x13c ParentExtension : 0x89981a18 _DEVICE_EXTENSION
+0x140 ChildDeviceList : _LIST_ENTRY [ 0x899c0d38 - 0x8990efe8 ]
+0x148 SiblingDeviceList : _LIST_ENTRY [ 0x899ae150 - 0x89981b58 ]
+0x150 EjectDeviceHead : _LIST_ENTRY [ 0x899c0ea8 - 0x899c0ea8 ]
+0x158 EjectDeviceList : _LIST_ENTRY [ 0x899c0eb0 - 0x899c0eb0 ]
0: kd> dx -id 0,0,899a2278 -r1 (*((ACPI!_LIST_ENTRY *)0x899c0ea0))
(*((ACPI!_LIST_ENTRY *)0x899c0ea0)) [Type: _LIST_ENTRY]
+0x000\] Flink : 0x899ae150 \[Type: _LIST_ENTRY \*
+0x004\] Blink : 0x89981b58 \[Type: _LIST_ENTRY \*
0: kd> dx -id 0,0,899a2278 -r1 ((ACPI!_LIST_ENTRY *)0x899ae150)
((ACPI!_LIST_ENTRY *)0x899ae150) : 0x899ae150 [Type: _LIST_ENTRY *]
+0x000\] Flink : 0x899aefd0 \[Type: _LIST_ENTRY \*
+0x004\] Blink : 0x899c0ea0 \[Type: _LIST_ENTRY \*
0: kd> dx -id 0,0,899a2278 -r1 ((ACPI!_LIST_ENTRY *)0x899aefd0)
((ACPI!_LIST_ENTRY *)0x899aefd0) : 0x899aefd0 [Type: _LIST_ENTRY *]
+0x000\] Flink : 0x899aedd0 \[Type: _LIST_ENTRY \*
+0x004\] Blink : 0x899ae150 \[Type: _LIST_ENTRY \*
0: kd> dx -id 0,0,899a2278 -r1 ((ACPI!_LIST_ENTRY *)0x899aedd0)
((ACPI!_LIST_ENTRY *)0x899aedd0) : 0x899aedd0 [Type: _LIST_ENTRY *]
+0x000\] Flink : 0x899aebb8 \[Type: _LIST_ENTRY \*
+0x004\] Blink : 0x899aefd0 \[Type: _LIST_ENTRY \*
0: kd> dx -id 0,0,899a2278 -r1 ((ACPI!_LIST_ENTRY *)0x899aebb8)
((ACPI!_LIST_ENTRY *)0x899aebb8) : 0x899aebb8 [Type: _LIST_ENTRY *]
+0x000\] Flink : 0x899ab7c0 \[Type: _LIST_ENTRY \*
+0x004\] Blink : 0x899aedd0 \[Type: _LIST_ENTRY \*
0: kd> dx -id 0,0,899a2278 -r1 ((ACPI!_LIST_ENTRY *)0x899ab7c0)
((ACPI!_LIST_ENTRY *)0x899ab7c0) : 0x899ab7c0 [Type: _LIST_ENTRY *]
+0x000\] Flink : 0x8990ec50 \[Type: _LIST_ENTRY \*
+0x004\] Blink : 0x899aebb8 \[Type: _LIST_ENTRY \*
0: kd> dx -id 0,0,899a2278 -r1 ((ACPI!_LIST_ENTRY *)0x8990ec50)
((ACPI!_LIST_ENTRY *)0x8990ec50) : 0x8990ec50 [Type: _LIST_ENTRY *]
+0x000\] Flink : 0x8990ea38 \[Type: _LIST_ENTRY \*
+0x004\] Blink : 0x899ab7c0 \[Type: _LIST_ENTRY \*
0: kd> dx -id 0,0,899a2278 -r1 ((ACPI!_LIST_ENTRY *)0x8990ea38)
((ACPI!_LIST_ENTRY *)0x8990ea38) : 0x8990ea38 [Type: _LIST_ENTRY *]
+0x000\] Flink : 0x89906150 \[Type: _LIST_ENTRY \*
+0x004\] Blink : 0x8990ec50 \[Type: _LIST_ENTRY \*
0: kd> dx -id 0,0,899a2278 -r1 ((ACPI!_LIST_ENTRY *)0x89906150)
((ACPI!_LIST_ENTRY *)0x89906150) : 0x89906150 [Type: _LIST_ENTRY *]
+0x000\] Flink : 0x89906fe8 \[Type: _LIST_ENTRY \*
+0x004\] Blink : 0x8990ea38 \[Type: _LIST_ENTRY \*
0: kd> dx -id 0,0,899a2278 -r1 ((ACPI!_LIST_ENTRY *)0x89906fe8)
((ACPI!_LIST_ENTRY *)0x89906fe8) : 0x89906fe8 [Type: _LIST_ENTRY *]
+0x000\] Flink : 0x89981b58 \[Type: _LIST_ENTRY \*
+0x004\] Blink : 0x89906150 \[Type: _LIST_ENTRY \*
0: kd> dx -id 0,0,899a2278 -r1 ((ACPI!_LIST_ENTRY *)0x89981b58)
((ACPI!_LIST_ENTRY *)0x89981b58) : 0x89981b58 [Type: _LIST_ENTRY *]
+0x000\] Flink : 0x899c0ea0 \[Type: _LIST_ENTRY \*
+0x004\] Blink : 0x89906fe8 \[Type: _LIST_ENTRY \*
0: kd> dx -id 0,0,899a2278 -r1 ((ACPI!_LIST_ENTRY *)0x899c0ea0)
((ACPI!_LIST_ENTRY *)0x899c0ea0) : 0x899c0ea0 [Type: _LIST_ENTRY *]
+0x000\] Flink : 0x899ae150 \[Type: _LIST_ENTRY \*
+0x004\] Blink : 0x89981b58 \[Type: _LIST_ENTRY \*
0: kd> dt acpi!_device_Extension 0x899ae150-148
+0x000 Flags : 0x00806000`2000000a
+0x000 UFlags : __unnamed
+0x008 Signature : 0x5f534750
+0x00c DebugFlags : 0
+0x010 DispatchTable : (null)
+0x014 WorkContext : WORK_QUEUE_CONTEXT
+0x014 Fdo : _FDO_DEVICE_EXTENSION
+0x014 Filter : _FILTER_DEVICE_EXTENSION
+0x014 Pdo : _PDO_DEVICE_EXTENSION
+0x058 WorkQueue : EXTENSION_WORKER
+0x058 Button : BUTTON_EXTENSION
+0x058 Thermal : THERMAL_EXTENSION
+0x058 LinkNode : LINK_NODE_EXTENSION
+0x058 Dock : DOCK_EXTENSION
+0x058 Processor : _PROCESSOR_DEVICE_EXTENSION
+0x088 DeviceState : 0 ( Stopped )
+0x08c PreviousState : 0 ( Stopped )
+0x090 PowerInfo : _ACPI_POWER_INFO
+0x10c DeviceID : 0x89986138 "ACPI\PNP0C0A"
+0x10c Address : 0x89986138
+0x110 InstanceID : 0x899c5118 "1"
+0x114 ResourceList : (null)
+0x118 PnpResourceList : (null)
+0x11c OutstandingIrpCount : 0n1
+0x120 ReferenceCount : 0n3
+0x124 HibernatePathCount : 0n0
+0x128 RemoveEvent : (null)
+0x12c AcpiObject : 0x899b4518 _NSObj
+0x130 DeviceObject : (null)
+0x134 TargetDeviceObject : (null)
+0x138 PhysicalDeviceObject : (null)
+0x13c ParentExtension : 0x89981a18 _DEVICE_EXTENSION
+0x140 ChildDeviceList : _LIST_ENTRY [ 0x899ae148 - 0x899ae148 ]
+0x148 SiblingDeviceList : _LIST_ENTRY [ 0x899aefd0 - 0x899c0ea0 ]
+0x150 EjectDeviceHead : _LIST_ENTRY [ 0x899ae158 - 0x899ae158 ]
+0x158 EjectDeviceList : _LIST_ENTRY [ 0x899ae160 - 0x899ae160 ]
0: kd> dt acpi!_device_Extension 0x899aefd0-148
+0x000 Flags : 0x00806000`2000000a
+0x000 UFlags : __unnamed
+0x008 Signature : 0x5f534750
+0x00c DebugFlags : 0
+0x010 DispatchTable : (null)
+0x014 WorkContext : WORK_QUEUE_CONTEXT
+0x014 Fdo : _FDO_DEVICE_EXTENSION
+0x014 Filter : _FILTER_DEVICE_EXTENSION
+0x014 Pdo : _PDO_DEVICE_EXTENSION
+0x058 WorkQueue : EXTENSION_WORKER
+0x058 Button : BUTTON_EXTENSION
+0x058 Thermal : THERMAL_EXTENSION
+0x058 LinkNode : LINK_NODE_EXTENSION
+0x058 Dock : DOCK_EXTENSION
+0x058 Processor : _PROCESSOR_DEVICE_EXTENSION
+0x088 DeviceState : 0 ( Stopped )
+0x08c PreviousState : 0 ( Stopped )
+0x090 PowerInfo : _ACPI_POWER_INFO
+0x10c DeviceID : 0x899c01a8 "ACPI\PNP0C0A"
+0x10c Address : 0x899c01a8
+0x110 InstanceID : 0x899c5460 "2"
+0x114 ResourceList : (null)
+0x118 PnpResourceList : (null)
+0x11c OutstandingIrpCount : 0n1
+0x120 ReferenceCount : 0n3
+0x124 HibernatePathCount : 0n0
+0x128 RemoveEvent : (null)
+0x12c AcpiObject : 0x899b4804 _NSObj
+0x130 DeviceObject : (null)
+0x134 TargetDeviceObject : (null)
+0x138 PhysicalDeviceObject : (null)
+0x13c ParentExtension : 0x89981a18 _DEVICE_EXTENSION
+0x140 ChildDeviceList : _LIST_ENTRY [ 0x899aefc8 - 0x899aefc8 ]
+0x148 SiblingDeviceList : _LIST_ENTRY [ 0x899aedd0 - 0x899ae150 ]
+0x150 EjectDeviceHead : _LIST_ENTRY [ 0x899aefd8 - 0x899aefd8 ]
+0x158 EjectDeviceList : _LIST_ENTRY [ 0x899aefe0 - 0x899aefe0 ]
0: kd> dt acpi!_device_Extension 0x899aedd0-148
+0x000 Flags : 0x00406000`00000008
+0x000 UFlags : __unnamed
+0x008 Signature : 0x5f534750
+0x00c DebugFlags : 0
+0x010 DispatchTable : (null)
+0x014 WorkContext : WORK_QUEUE_CONTEXT
+0x014 Fdo : _FDO_DEVICE_EXTENSION
+0x014 Filter : _FILTER_DEVICE_EXTENSION
+0x014 Pdo : _PDO_DEVICE_EXTENSION
+0x058 WorkQueue : EXTENSION_WORKER
+0x058 Button : BUTTON_EXTENSION
+0x058 Thermal : THERMAL_EXTENSION
+0x058 LinkNode : LINK_NODE_EXTENSION
+0x058 Dock : DOCK_EXTENSION
+0x058 Processor : _PROCESSOR_DEVICE_EXTENSION
+0x088 DeviceState : 0 ( Stopped )
+0x08c PreviousState : 0 ( Stopped )
+0x090 PowerInfo : _ACPI_POWER_INFO
+0x10c DeviceID : 0x899c0190 "ACPI\ACPI0003"
+0x10c Address : 0x899c0190
+0x110 InstanceID : 0x899c1368 "1"
+0x114 ResourceList : (null)
+0x118 PnpResourceList : (null)
+0x11c OutstandingIrpCount : 0n1
+0x120 ReferenceCount : 0n3
+0x124 HibernatePathCount : 0n0
+0x128 RemoveEvent : (null)
+0x12c AcpiObject : 0x899b4a70 _NSObj
+0x130 DeviceObject : (null)
+0x134 TargetDeviceObject : (null)
+0x138 PhysicalDeviceObject : (null)
+0x13c ParentExtension : 0x89981a18 _DEVICE_EXTENSION
+0x140 ChildDeviceList : _LIST_ENTRY [ 0x899aedc8 - 0x899aedc8 ]
+0x148 SiblingDeviceList : _LIST_ENTRY [ 0x899aebb8 - 0x899aefd0 ]
+0x150 EjectDeviceHead : _LIST_ENTRY [ 0x899aedd8 - 0x899aedd8 ]
+0x158 EjectDeviceList : _LIST_ENTRY [ 0x899aede0 - 0x899aede0 ]
0: kd> dt acpi!_device_Extension 0x899aebb8-148
+0x000 Flags : 0x00902008`2037000a
+0x000 UFlags : __unnamed
+0x008 Signature : 0x5f534750
+0x00c DebugFlags : 0
+0x010 DispatchTable : (null)
+0x014 WorkContext : WORK_QUEUE_CONTEXT
+0x014 Fdo : _FDO_DEVICE_EXTENSION
+0x014 Filter : _FILTER_DEVICE_EXTENSION
+0x014 Pdo : _PDO_DEVICE_EXTENSION
+0x058 WorkQueue : EXTENSION_WORKER
+0x058 Button : BUTTON_EXTENSION
+0x058 Thermal : THERMAL_EXTENSION
+0x058 LinkNode : LINK_NODE_EXTENSION
+0x058 Dock : DOCK_EXTENSION
+0x058 Processor : _PROCESSOR_DEVICE_EXTENSION
+0x088 DeviceState : 0 ( Stopped )
+0x08c PreviousState : 0 ( Stopped )
+0x090 PowerInfo : _ACPI_POWER_INFO
+0x10c DeviceID : 0x89905060 "ACPI\PNP0C0E"
+0x10c Address : 0x89905060
+0x110 InstanceID : (null)
+0x114 ResourceList : (null)
+0x118 PnpResourceList : (null)
+0x11c OutstandingIrpCount : 0n1
+0x120 ReferenceCount : 0n3
+0x124 HibernatePathCount : 0n0
+0x128 RemoveEvent : (null)
+0x12c AcpiObject : 0x899b4d34 _NSObj
+0x130 DeviceObject : (null)
+0x134 TargetDeviceObject : (null)
+0x138 PhysicalDeviceObject : (null)
+0x13c ParentExtension : 0x89981a18 _DEVICE_EXTENSION
+0x140 ChildDeviceList : _LIST_ENTRY [ 0x899aebb0 - 0x899aebb0 ]
+0x148 SiblingDeviceList : _LIST_ENTRY [ 0x899ab7c0 - 0x899aedd0 ]
+0x150 EjectDeviceHead : _LIST_ENTRY [ 0x899aebc0 - 0x899aebc0 ]
+0x158 EjectDeviceList : _LIST_ENTRY [ 0x899aebc8 - 0x899aebc8 ]
0: kd> dt acpi!_device_Extension 899ab7c0-148
+0x000 Flags : 0x8051e010`00300008
+0x000 UFlags : __unnamed
+0x008 Signature : 0x5f534750
+0x00c DebugFlags : 0
+0x010 DispatchTable : (null)
+0x014 WorkContext : WORK_QUEUE_CONTEXT
+0x014 Fdo : _FDO_DEVICE_EXTENSION
+0x014 Filter : _FILTER_DEVICE_EXTENSION
+0x014 Pdo : _PDO_DEVICE_EXTENSION
+0x058 WorkQueue : EXTENSION_WORKER
+0x058 Button : BUTTON_EXTENSION
+0x058 Thermal : THERMAL_EXTENSION
+0x058 LinkNode : LINK_NODE_EXTENSION
+0x058 Dock : DOCK_EXTENSION
+0x058 Processor : _PROCESSOR_DEVICE_EXTENSION
+0x088 DeviceState : 0 ( Stopped )
+0x08c PreviousState : 0 ( Stopped )
+0x090 PowerInfo : _ACPI_POWER_INFO
+0x10c DeviceID : 0x899ab648 "GenuineIntel - x86 Family 6 Model 5"
+0x10c Address : 0x899ab648
+0x110 InstanceID : 0x899940b0 " 0"
+0x114 ResourceList : (null)
+0x118 PnpResourceList : (null)
+0x11c OutstandingIrpCount : 0n1
+0x120 ReferenceCount : 0n2
+0x124 HibernatePathCount : 0n0
+0x128 RemoveEvent : (null)
+0x12c AcpiObject : 0x8996aed4 _NSObj
+0x130 DeviceObject : (null)
+0x134 TargetDeviceObject : (null)
+0x138 PhysicalDeviceObject : (null)
+0x13c ParentExtension : 0x89981a18 _DEVICE_EXTENSION
+0x140 ChildDeviceList : _LIST_ENTRY [ 0x899ab7b8 - 0x899ab7b8 ]
+0x148 SiblingDeviceList : _LIST_ENTRY [ 0x8990ec50 - 0x899aebb8 ]
+0x150 EjectDeviceHead : _LIST_ENTRY [ 0x899ab7c8 - 0x899ab7c8 ]
+0x158 EjectDeviceList : _LIST_ENTRY [ 0x899ab7d0 - 0x899ab7d0 ]
0: kd> dt acpi!_device_Extension 0x8990ec50-148
+0x000 Flags : 0x00902008`2037000a
+0x000 UFlags : __unnamed
+0x008 Signature : 0x5f534750
+0x00c DebugFlags : 0
+0x010 DispatchTable : (null)
+0x014 WorkContext : WORK_QUEUE_CONTEXT
+0x014 Fdo : _FDO_DEVICE_EXTENSION
+0x014 Filter : _FILTER_DEVICE_EXTENSION
+0x014 Pdo : _PDO_DEVICE_EXTENSION
+0x058 WorkQueue : EXTENSION_WORKER
+0x058 Button : BUTTON_EXTENSION
+0x058 Thermal : THERMAL_EXTENSION
+0x058 LinkNode : LINK_NODE_EXTENSION
+0x058 Dock : DOCK_EXTENSION
+0x058 Processor : _PROCESSOR_DEVICE_EXTENSION
+0x088 DeviceState : 0 ( Stopped )
+0x08c PreviousState : 0 ( Stopped )
+0x090 PowerInfo : _ACPI_POWER_INFO
+0x10c DeviceID : 0x898baa78 "ACPI\PNP0C0D"
+0x10c Address : 0x898baa78
+0x110 InstanceID : (null)
+0x114 ResourceList : (null)
+0x118 PnpResourceList : (null)
+0x11c OutstandingIrpCount : 0n1
+0x120 ReferenceCount : 0n3
+0x124 HibernatePathCount : 0n0
+0x128 RemoveEvent : (null)
+0x12c AcpiObject : 0x8991a9a0 _NSObj
+0x130 DeviceObject : (null)
+0x134 TargetDeviceObject : (null)
+0x138 PhysicalDeviceObject : (null)
+0x13c ParentExtension : 0x89981a18 _DEVICE_EXTENSION
+0x140 ChildDeviceList : _LIST_ENTRY [ 0x8990ec48 - 0x8990ec48 ]
+0x148 SiblingDeviceList : _LIST_ENTRY [ 0x8990ea38 - 0x899ab7c0 ]
+0x150 EjectDeviceHead : _LIST_ENTRY [ 0x8990ec58 - 0x8990ec58 ]
+0x158 EjectDeviceList : _LIST_ENTRY [ 0x8990ec60 - 0x8990ec60 ]
0: kd> dt acpi!_device_Extension 0x8990ea38-148
+0x000 Flags : 0x00906000`6030000a
+0x000 UFlags : __unnamed
+0x008 Signature : 0x5f534750
+0x00c DebugFlags : 0
+0x010 DispatchTable : (null)
+0x014 WorkContext : WORK_QUEUE_CONTEXT
+0x014 Fdo : _FDO_DEVICE_EXTENSION
+0x014 Filter : _FILTER_DEVICE_EXTENSION
+0x014 Pdo : _PDO_DEVICE_EXTENSION
+0x058 WorkQueue : EXTENSION_WORKER
+0x058 Button : BUTTON_EXTENSION
+0x058 Thermal : THERMAL_EXTENSION
+0x058 LinkNode : LINK_NODE_EXTENSION
+0x058 Dock : DOCK_EXTENSION
+0x058 Processor : _PROCESSOR_DEVICE_EXTENSION
+0x088 DeviceState : 0 ( Stopped )
+0x08c PreviousState : 0 ( Stopped )
+0x090 PowerInfo : _ACPI_POWER_INFO
+0x10c DeviceID : 0x8986b8a0 "ACPI\VMW0002"
+0x10c Address : 0x8986b8a0
+0x110 InstanceID : 0x898baa60 "0"
+0x114 ResourceList : (null)
+0x118 PnpResourceList : (null)
+0x11c OutstandingIrpCount : 0n1
+0x120 ReferenceCount : 0n67
+0x124 HibernatePathCount : 0n0
+0x128 RemoveEvent : (null)
+0x12c AcpiObject : 0x8991acd8 _NSObj
+0x130 DeviceObject : (null)
+0x134 TargetDeviceObject : (null)
+0x138 PhysicalDeviceObject : (null)
+0x13c ParentExtension : 0x89981a18 _DEVICE_EXTENSION
+0x140 ChildDeviceList : _LIST_ENTRY [ 0x8990e7d8 - 0x89907508 ]
+0x148 SiblingDeviceList : _LIST_ENTRY [ 0x89906150 - 0x8990ec50 ]
+0x150 EjectDeviceHead : _LIST_ENTRY [ 0x8990ea40 - 0x8990ea40 ]
+0x158 EjectDeviceList : _LIST_ENTRY [ 0x8990ea48 - 0x8990ea48 ]
0: kd> dt acpi!_device_Extension 0x89906150-148
+0x000 Flags : 0x8051e010`00300008
+0x000 UFlags : __unnamed
+0x008 Signature : 0x5f534750
+0x00c DebugFlags : 0
+0x010 DispatchTable : (null)
+0x014 WorkContext : WORK_QUEUE_CONTEXT
+0x014 Fdo : _FDO_DEVICE_EXTENSION
+0x014 Filter : _FILTER_DEVICE_EXTENSION
+0x014 Pdo : _PDO_DEVICE_EXTENSION
+0x058 WorkQueue : EXTENSION_WORKER
+0x058 Button : BUTTON_EXTENSION
+0x058 Thermal : THERMAL_EXTENSION
+0x058 LinkNode : LINK_NODE_EXTENSION
+0x058 Dock : DOCK_EXTENSION
+0x058 Processor : _PROCESSOR_DEVICE_EXTENSION
+0x088 DeviceState : 0 ( Stopped )
+0x08c PreviousState : 0 ( Stopped )
+0x090 PowerInfo : _ACPI_POWER_INFO
+0x10c DeviceID : 0x89907238 "GenuineIntel - x86 Family 6 Model 5"
+0x10c Address : 0x89907238
+0x110 InstanceID : 0x899a21e8 " 1"
+0x114 ResourceList : (null)
+0x118 PnpResourceList : (null)
+0x11c OutstandingIrpCount : 0n1
+0x120 ReferenceCount : 0n2
+0x124 HibernatePathCount : 0n0
+0x128 RemoveEvent : (null)
+0x12c AcpiObject : 0x8991f8f8 _NSObj
+0x130 DeviceObject : (null)
+0x134 TargetDeviceObject : (null)
+0x138 PhysicalDeviceObject : (null)
+0x13c ParentExtension : 0x89981a18 _DEVICE_EXTENSION
+0x140 ChildDeviceList : _LIST_ENTRY [ 0x89906148 - 0x89906148 ]
+0x148 SiblingDeviceList : _LIST_ENTRY [ 0x89906fe8 - 0x8990ea38 ]
+0x150 EjectDeviceHead : _LIST_ENTRY [ 0x89906158 - 0x89906158 ]
+0x158 EjectDeviceList : _LIST_ENTRY [ 0x89906160 - 0x89906160 ]
0: kd> dt acpi!_device_Extension 0x89906fe8-148
+0x000 Flags : 0x0018a000`0036000a
+0x000 UFlags : __unnamed
+0x008 Signature : 0x5f534750
+0x00c DebugFlags : 0
+0x010 DispatchTable : (null)
+0x014 WorkContext : WORK_QUEUE_CONTEXT
+0x014 Fdo : _FDO_DEVICE_EXTENSION
+0x014 Filter : _FILTER_DEVICE_EXTENSION
+0x014 Pdo : _PDO_DEVICE_EXTENSION
+0x058 WorkQueue : EXTENSION_WORKER
+0x058 Button : BUTTON_EXTENSION
+0x058 Thermal : THERMAL_EXTENSION
+0x058 LinkNode : LINK_NODE_EXTENSION
+0x058 Dock : DOCK_EXTENSION
+0x058 Processor : _PROCESSOR_DEVICE_EXTENSION
+0x088 DeviceState : 0 ( Stopped )
+0x08c PreviousState : 0 ( Stopped )
+0x090 PowerInfo : _ACPI_POWER_INFO
+0x10c DeviceID : 0x89907188 "ACPI\FixedButton"
+0x10c Address : 0x89907188
+0x110 InstanceID : (null)
+0x114 ResourceList : (null)
+0x118 PnpResourceList : (null)
+0x11c OutstandingIrpCount : 0n1
+0x120 ReferenceCount : 0n2
+0x124 HibernatePathCount : 0n0
+0x128 RemoveEvent : (null)
+0x12c AcpiObject : (null)
+0x130 DeviceObject : (null)
+0x134 TargetDeviceObject : (null)
+0x138 PhysicalDeviceObject : (null)
+0x13c ParentExtension : 0x89981a18 _DEVICE_EXTENSION
+0x140 ChildDeviceList : _LIST_ENTRY [ 0x89906fe0 - 0x89906fe0 ]
+0x148 SiblingDeviceList : _LIST_ENTRY [ 0x89981b58 - 0x89906150 ]
+0x150 EjectDeviceHead : _LIST_ENTRY [ 0x89906ff0 - 0x89906ff0 ]
+0x158 EjectDeviceList : _LIST_ENTRY [ 0x89906ff8 - 0x89906ff8 ]
0: kd> !drvobj 0x89981f38
Driver object (89981f38) is for:
\Driver\ACPI
Driver Extension List: (id , addr)
Device Object list:
899ae8b8 89981b98
0: kd> dt acpi!_device_Extension 0x899aefd0-148
+0x000 Flags : 0x00806000`2000000a
+0x000 UFlags : __unnamed
+0x008 Signature : 0x5f534750
+0x00c DebugFlags : 0
+0x010 DispatchTable : (null)
+0x014 WorkContext : WORK_QUEUE_CONTEXT
+0x014 Fdo : _FDO_DEVICE_EXTENSION
+0x014 Filter : _FILTER_DEVICE_EXTENSION
+0x014 Pdo : _PDO_DEVICE_EXTENSION
+0x058 WorkQueue : EXTENSION_WORKER
+0x058 Button : BUTTON_EXTENSION
+0x058 Thermal : THERMAL_EXTENSION
+0x058 LinkNode : LINK_NODE_EXTENSION
+0x058 Dock : DOCK_EXTENSION
+0x058 Processor : _PROCESSOR_DEVICE_EXTENSION
+0x088 DeviceState : 0 ( Stopped )
+0x08c PreviousState : 0 ( Stopped )
+0x090 PowerInfo : _ACPI_POWER_INFO
+0x10c DeviceID : 0x899c01a8 "ACPI\PNP0C0A"
+0x10c Address : 0x899c01a8
+0x110 InstanceID : 0x899c5460 "2"
+0x114 ResourceList : (null)
+0x118 PnpResourceList : (null)
+0x11c OutstandingIrpCount : 0n1
+0x120 ReferenceCount : 0n3
+0x124 HibernatePathCount : 0n0
+0x128 RemoveEvent : (null)
+0x12c AcpiObject : 0x899b4804 _NSObj
+0x130 DeviceObject : (null)
+0x134 TargetDeviceObject : (null)
+0x138 PhysicalDeviceObject : (null)
+0x13c ParentExtension : 0x89981a18 _DEVICE_EXTENSION
+0x140 ChildDeviceList : _LIST_ENTRY [ 0x899aefc8 - 0x899aefc8 ]
+0x148 SiblingDeviceList : _LIST_ENTRY [ 0x899aedd0 - 0x899ae150 ]
+0x150 EjectDeviceHead : _LIST_ENTRY [ 0x899aefd8 - 0x899aefd8 ]
+0x158 EjectDeviceList : _LIST_ENTRY [ 0x899aefe0 - 0x899aefe0 ]
BOOLEAN
ACPIDetectPdoMatch(
IN PDEVICE_EXTENSION DeviceExtension,
IN PDEVICE_RELATIONS DeviceRelations
)
{
NTSTATUS status;
PDEVICE_OBJECT devicePdoObject = NULL ;
PAGED_CODE();
//
// For this to work, we must set the DEV_TYPE_NOT_FOUND flag when we
// first create the device and at any time when there is no device object
// associated with the extension
//
if (!(DeviceExtension->Flags & DEV_TYPE_NOT_FOUND) ||
(DeviceExtension->Flags & DEV_PROP_DOCK) ||
DeviceExtension->DeviceObject != NULL) {
return TRUE;
}
//
// deviceObject will be filled in if the extension in question is
// already in the relation. The status will not be successful if the
// extension could not be in the relation.
//
status = ACPIDetectCouldExtensionBeInRelation(
DeviceExtension,
DeviceRelations,
FALSE,
TRUE,
&devicePdoObject
) ;
return (devicePdoObject||(!NT_SUCCESS(status))) ? TRUE : FALSE ;
}
bp ACPI!ACPIDetectPdoMatch
bp ACPI!ACPIBuildPdo
//
// Is there a match between the device relations and the current
// device extension?
//
matchFound = ACPIDetectPdoMatch(
deviceExtension,
currentRelations
);
0: kd> t
Breakpoint 43 hit
eax=00000000 ebx=f743b620 ecx=00000000 edx=04bc0000 esi=899aec88 edi=899aeda8
eip=f7440588 esp=f789a214 ebp=f789a250 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!ACPIDetectPdoMatch:
f7440588 55 push ebp
0: kd> kc
00 ACPI!ACPIDetectPdoMatch
01 ACPI!ACPIDetectPdoDevices
02 ACPI!ACPIRootIrpQueryBusRelations
03 ACPI!ACPIRootIrpQueryDeviceRelations
04 ACPI!ACPIDispatchIrp
05 nt!IofCallDriver
06 nt!IopSynchronousCall
07 nt!IopQueryDeviceRelations
08 nt!PipEnumerateDevice
09 nt!PipProcessDevNodeTree
0a nt!PipDeviceActionWorker
0b nt!PipRequestDeviceAction
0c nt!IopInitializeBootDrivers
0d nt!IoInitSystem
0e nt!Phase1Initialization
0f nt!PspSystemThreadStartup
10 nt!KiThreadStartup
0: kd> dv
DeviceExtension = 0x899aec88
DeviceRelations = 0x00000000
devicePdoObject = 0x00000008
0: kd> dt acpi!_device_Extension 0x899aec88
+0x000 Flags : 0x00406000`00000108
+0x000 UFlags : __unnamed
+0x008 Signature : 0x5f534750
+0x00c DebugFlags : 0
+0x010 DispatchTable : (null)
+0x014 WorkContext : WORK_QUEUE_CONTEXT
+0x014 Fdo : _FDO_DEVICE_EXTENSION
+0x014 Filter : _FILTER_DEVICE_EXTENSION
+0x014 Pdo : _PDO_DEVICE_EXTENSION
+0x058 WorkQueue : EXTENSION_WORKER
+0x058 Button : BUTTON_EXTENSION
+0x058 Thermal : THERMAL_EXTENSION
+0x058 LinkNode : LINK_NODE_EXTENSION
+0x058 Dock : DOCK_EXTENSION
+0x058 Processor : _PROCESSOR_DEVICE_EXTENSION
+0x088 DeviceState : 0 ( Stopped )
+0x08c PreviousState : 0 ( Stopped )
+0x090 PowerInfo : _ACPI_POWER_INFO
+0x10c DeviceID : 0x899c0190 "ACPI\ACPI0003"
+0x10c Address : 0x899c0190
+0x110 InstanceID : 0x899c1368 "1"
+0x114 ResourceList : (null)
+0x118 PnpResourceList : (null)
+0x11c OutstandingIrpCount : 0n1
+0x120 ReferenceCount : 0n4
+0x124 HibernatePathCount : 0n0
+0x128 RemoveEvent : (null)
+0x12c AcpiObject : 0x899b4a70 _NSObj
+0x130 DeviceObject : (null)
+0x134 TargetDeviceObject : (null)
+0x138 PhysicalDeviceObject : (null)
+0x13c ParentExtension : 0x89981a18 _DEVICE_EXTENSION
+0x140 ChildDeviceList : _LIST_ENTRY [ 0x899aedc8 - 0x899aedc8 ]
+0x148 SiblingDeviceList : _LIST_ENTRY [ 0x899aebb8 - 0x899aefd0 ]
+0x150 EjectDeviceHead : _LIST_ENTRY [ 0x899aedd8 - 0x899aedd8 ]
+0x158 EjectDeviceList : _LIST_ENTRY [ 0x899aede0 - 0x899aede0 ]
0: kd> kc
00 ACPI!ACPIDetectCouldExtensionBeInRelation
01 ACPI!ACPIDetectPdoMatch
02 ACPI!ACPIDetectPdoDevices
03 ACPI!ACPIRootIrpQueryBusRelations
04 ACPI!ACPIRootIrpQueryDeviceRelations
05 ACPI!ACPIDispatchIrp
06 nt!IofCallDriver
07 nt!IopSynchronousCall
08 nt!IopQueryDeviceRelations
09 nt!PipEnumerateDevice
0a nt!PipProcessDevNodeTree
0b nt!PipDeviceActionWorker
0c nt!PipRequestDeviceAction
0d nt!IopInitializeBootDrivers
0e nt!IoInitSystem
0f nt!Phase1Initialization
10 nt!PspSystemThreadStartup
11 nt!KiThreadStartup
0: kd> dv
DeviceExtension = 0x899aec88
DeviceRelations = 0x00000000
RequireADR = 0x00 ''
RequireHID = 0x01 ''
PdoObject = 0xf789a20c
//
// Check to see if the relation is non-empty. If it isn't, there isn't
// any work to do. This device obviously could be a Pdo child (as opposed
// to a filter) but it sure isn't at the moment.
//
if (DeviceRelations == NULL || DeviceRelations->Count == 0) {
//
// No match
//
return STATUS_SUCCESS;
}
return (devicePdoObject||(!NT_SUCCESS(status))) ? TRUE : FALSE ;
}
if (matchFound == FALSE) {
0: kd> dv matchFound
matchFound = 0x00 ''
//
// Build a new PDO
//
status = ACPIBuildPdo(
DeviceObject->DriverObject,
deviceExtension,
parentExtension->PhysicalDeviceObject,
matchFound
);
0: kd> kc
00 ACPI!ACPIBuildPdo
01 ACPI!ACPIDetectPdoDevices
02 ACPI!ACPIRootIrpQueryBusRelations
03 ACPI!ACPIRootIrpQueryDeviceRelations
04 ACPI!ACPIDispatchIrp
05 nt!IofCallDriver
06 nt!IopSynchronousCall
07 nt!IopQueryDeviceRelations
08 nt!PipEnumerateDevice
09 nt!PipProcessDevNodeTree
0a nt!PipDeviceActionWorker
0b nt!PipRequestDeviceAction
0c nt!IopInitializeBootDrivers
0d nt!IoInitSystem
0e nt!Phase1Initialization
0f nt!PspSystemThreadStartup
10 nt!KiThreadStartup
0: kd> dv
DriverObject = 0x89981f38 Driver "\Driver\ACPI"
DeviceExtension = 0x899aec88
ParentPdoObject = 0x899c1de0 Device for "\Driver\ACPI_HAL"
CreateAsFilter = 0x00 ''
//
// Now, update the links and the reference counts
//
newDeviceObject->DeviceExtension = DeviceExtension;
DeviceExtension->DeviceObject = newDeviceObject;
DeviceExtension->PhysicalDeviceObject = newDeviceObject;
0: kd> !drvobj 0x89981f38
Driver object (89981f38) is for:
\Driver\ACPI
Driver Extension List: (id , addr)
Device Object list:
899ae8b8 89981b98
0: kd> !devobj 899ae8b8
Device object (899ae8b8) is for:
00000030 \Driver\ACPI DriverObject 89981f38
Current Irp 00000000 RefCount 0 Type 00000032 Flags 00000040
SecurityDescriptor e1297680 DevExt 899c0d58 DevObjExt 899ae970
ExtensionFlags (0000000000)
Characteristics (0x00000080) FILE_AUTOGENERATED_DEVICE_NAME
Device queue is not busy.
0: kd> dt device_object 899ae8b8
nt!DEVICE_OBJECT
+0x000 Type : 0n3
+0x002 Size : 0xb8
+0x004 ReferenceCount : 0n0
+0x008 DriverObject : 0x89981f38 _DRIVER_OBJECT
+0x00c NextDevice : 0x89981b98 _DEVICE_OBJECT
+0x010 AttachedDevice : (null)
+0x014 CurrentIrp : (null)
+0x018 Timer : (null)
+0x01c Flags : 0x40
+0x020 Characteristics : 0x80
+0x024 Vpb : (null)
+0x028 DeviceExtension : 0x899c0d58 Void
+0x02c DeviceType : 0x32
+0x030 StackSize : 1 ''
+0x034 Queue : __unnamed
+0x05c AlignmentRequirement : 0
+0x060 DeviceQueue : _KDEVICE_QUEUE
+0x074 Dpc : _KDPC
+0x094 ActiveThreadCount : 0
+0x098 SecurityDescriptor : 0xe1297680 Void
+0x09c DeviceLock : _KEVENT
+0x0ac SectorSize : 0
+0x0ae Spare1 : 0
+0x0b0 DeviceObjectExtension : 0x899ae970 _DEVOBJ_EXTENSION
+0x0b4 Reserved : (null)
0: kd> dt acpi!_device_Extension 0x899c0d58
+0x000 Flags : 0x00402000`02010020
+0x000 UFlags : __unnamed
+0x008 Signature : 0x5f534750
+0x00c DebugFlags : 0
+0x010 DispatchTable : 0xf743830c IRP_DISPATCH_TABLE
+0x014 WorkContext : WORK_QUEUE_CONTEXT
+0x014 Fdo : _FDO_DEVICE_EXTENSION
+0x014 Filter : _FILTER_DEVICE_EXTENSION
+0x014 Pdo : _PDO_DEVICE_EXTENSION
+0x058 WorkQueue : EXTENSION_WORKER
+0x058 Button : BUTTON_EXTENSION
+0x058 Thermal : THERMAL_EXTENSION
+0x058 LinkNode : LINK_NODE_EXTENSION
+0x058 Dock : DOCK_EXTENSION
+0x058 Processor : _PROCESSOR_DEVICE_EXTENSION
+0x088 DeviceState : 0 ( Stopped )
+0x08c PreviousState : 0 ( Stopped )
+0x090 PowerInfo : _ACPI_POWER_INFO
+0x10c DeviceID : 0x899c1210 "ACPI\PNP0A03"
+0x10c Address : 0x899c1210
+0x110 InstanceID : (null)
+0x114 ResourceList : (null)
+0x118 PnpResourceList : (null)
+0x11c OutstandingIrpCount : 0n1
+0x120 ReferenceCount : 0n83
+0x124 HibernatePathCount : 0n0
+0x128 RemoveEvent : (null)
+0x12c AcpiObject : 0x899affac _NSObj
+0x130 DeviceObject : 0x899ae8b8 _DEVICE_OBJECT
+0x134 TargetDeviceObject : (null)
+0x138 PhysicalDeviceObject : 0x899ae8b8 _DEVICE_OBJECT
+0x13c ParentExtension : 0x89981a18 _DEVICE_EXTENSION
+0x140 ChildDeviceList : _LIST_ENTRY [ 0x899c0d38 - 0x8990efe8 ]
+0x148 SiblingDeviceList : _LIST_ENTRY [ 0x899ae150 - 0x89981b58 ]
+0x150 EjectDeviceHead : _LIST_ENTRY [ 0x899c0ea8 - 0x899c0ea8 ]
+0x158 EjectDeviceList : _LIST_ENTRY [ 0x899c0eb0 - 0x899c0eb0 ]
0: kd> !devobj 89981b98
Device object (89981b98) is for:
\Driver\ACPI DriverObject 89981f38
Current Irp 00000000 RefCount 0 Type 00000032 Flags 00000000
DevExt 89981a18 DevObjExt 89981c50
ExtensionFlags (0000000000)
Characteristics (0000000000)
AttachedTo (Lower) 899c1de0 \Driver\ACPI_HAL
Device queue is not busy.
0: kd> dt _device_object 89981b98
hal!_DEVICE_OBJECT
+0x000 Type : 0n3
+0x002 Size : 0xb8
+0x004 ReferenceCount : 0n0
+0x008 DriverObject : 0x89981f38 _DRIVER_OBJECT
+0x00c NextDevice : (null)
+0x010 AttachedDevice : (null)
+0x014 CurrentIrp : (null)
+0x018 Timer : (null)
+0x01c Flags : 0
+0x020 Characteristics : 0
+0x024 Vpb : (null)
+0x028 DeviceExtension : 0x89981a18 Void
+0x02c DeviceType : 0x32
+0x030 StackSize : 2 ''
+0x034 Queue : __unnamed
+0x05c AlignmentRequirement : 0
+0x060 DeviceQueue : _KDEVICE_QUEUE
+0x074 Dpc : _KDPC
+0x094 ActiveThreadCount : 0
+0x098 SecurityDescriptor : (null)
+0x09c DeviceLock : _KEVENT
+0x0ac SectorSize : 0
+0x0ae Spare1 : 0
+0x0b0 DeviceObjectExtension : 0x89981c50 _DEVOBJ_EXTENSION
+0x0b4 Reserved : (null)
0: kd> dt acpi!_device_Extension 0x89981a18
+0x000 Flags : 0x4461e000`00200010
+0x000 UFlags : __unnamed
+0x008 Signature : 0x5f534750
+0x00c DebugFlags : 0
+0x010 DispatchTable : 0xf743826c IRP_DISPATCH_TABLE
+0x014 WorkContext : WORK_QUEUE_CONTEXT
+0x014 Fdo : _FDO_DEVICE_EXTENSION
+0x014 Filter : _FILTER_DEVICE_EXTENSION
+0x014 Pdo : _PDO_DEVICE_EXTENSION
+0x058 WorkQueue : EXTENSION_WORKER
+0x058 Button : BUTTON_EXTENSION
+0x058 Thermal : THERMAL_EXTENSION
+0x058 LinkNode : LINK_NODE_EXTENSION
+0x058 Dock : DOCK_EXTENSION
+0x058 Processor : _PROCESSOR_DEVICE_EXTENSION
+0x088 DeviceState : 2 ( Started )
+0x08c PreviousState : 0 ( Stopped )
+0x090 PowerInfo : _ACPI_POWER_INFO
+0x10c DeviceID : 0x899bfea0 "ACPI\PNP0C08"
+0x10c Address : 0x899bfea0
+0x110 InstanceID : 0x899c53e8 "0x5F534750"
+0x114 ResourceList : 0x899bfeb8 _CM_RESOURCE_LIST
+0x118 PnpResourceList : (null)
+0x11c OutstandingIrpCount : 0n2
+0x120 ReferenceCount : 0n12
+0x124 HibernatePathCount : 0n0
+0x128 RemoveEvent : (null)
+0x12c AcpiObject : 0x899af0f0 _NSObj
+0x130 DeviceObject : 0x89981b98 _DEVICE_OBJECT
+0x134 TargetDeviceObject : 0x899c1de0 _DEVICE_OBJECT
+0x138 PhysicalDeviceObject : 0x899c1de0 _DEVICE_OBJECT
+0x13c ParentExtension : (null)
+0x140 ChildDeviceList : _LIST_ENTRY [ 0x899c0ea0 - 0x89906fe8 ]
+0x148 SiblingDeviceList : _LIST_ENTRY [ 0x89981b60 - 0x89981b60 ]
+0x150 EjectDeviceHead : _LIST_ENTRY [ 0x89981b68 - 0x89981b68 ]
+0x158 EjectDeviceList : _LIST_ENTRY [ 0x89981b70 - 0x89981b70 ]
0: kd> dx -id 0,0,899a2278 -r1 -nv (*((ACPI!_CM_RESOURCE_LIST *)0x899bfeb8))
(*((ACPI!_CM_RESOURCE_LIST *)0x899bfeb8)) [Type: _CM_RESOURCE_LIST]
+0x000\] Count : 0x1 \[Type: unsigned long
+0x004\] List \[Type: _CM_FULL_RESOURCE_DESCRIPTOR \[1\]
0: kd> dx -id 0,0,899a2278 -r1 (*((ACPI!_CM_FULL_RESOURCE_DESCRIPTOR (*)[1])0x899bfebc))
(*((ACPI!_CM_FULL_RESOURCE_DESCRIPTOR (*)[1])0x899bfebc)) [Type: _CM_FULL_RESOURCE_DESCRIPTOR [1]]
0\] \[Type: _CM_FULL_RESOURCE_DESCRIPTOR
0: kd> dx -id 0,0,899a2278 -r1 -nv (*((ACPI!_CM_FULL_RESOURCE_DESCRIPTOR *)0x899bfebc))
(*((ACPI!_CM_FULL_RESOURCE_DESCRIPTOR *)0x899bfebc)) [Type: _CM_FULL_RESOURCE_DESCRIPTOR]
+0x000\] InterfaceType : PNPBus (15) \[Type: _INTERFACE_TYPE
+0x004\] BusNumber : 0xffffffff \[Type: unsigned long
+0x008\] PartialResourceList \[Type: _CM_PARTIAL_RESOURCE_LIST
status = IoCreateDevice(
DriverObject,
0,
NULL,
FILE_DEVICE_ACPI,
FILE_AUTOGENERATED_DEVICE_NAME,
FALSE,
&newDeviceObject
);
0: kd> dv newDeviceObject
newDeviceObject = 0x899c5f18 Device for "\Driver\ACPI"
0: kd> !drvobj 0x89981f38
Driver object (89981f38) is for:
\Driver\ACPI
Driver Extension List: (id , addr)
Device Object list:
899c5f18 899ae8b8 89981b98
0: kd> dt device_object 899c5f18
nt!DEVICE_OBJECT
+0x000 Type : 0n3
+0x002 Size : 0xb8
+0x004 ReferenceCount : 0n0
+0x008 DriverObject : 0x89981f38 _DRIVER_OBJECT
+0x00c NextDevice : 0x899ae8b8 _DEVICE_OBJECT
+0x010 AttachedDevice : (null)
+0x014 CurrentIrp : (null)
+0x018 Timer : (null)
+0x01c Flags : 0xc0
+0x020 Characteristics : 0x80
+0x024 Vpb : (null)
+0x028 DeviceExtension : (null) //还没有赋值
+0x02c DeviceType : 0x32
+0x030 StackSize : 1 ''
+0x034 Queue : __unnamed
+0x05c AlignmentRequirement : 0
+0x060 DeviceQueue : _KDEVICE_QUEUE
+0x074 Dpc : _KDPC
+0x094 ActiveThreadCount : 0
+0x098 SecurityDescriptor : 0xe1297680 Void
+0x09c DeviceLock : _KEVENT
+0x0ac SectorSize : 0
+0x0ae Spare1 : 0
+0x0b0 DeviceObjectExtension : 0x899c5fd0 _DEVOBJ_EXTENSION
+0x0b4 Reserved : (null)
DeviceExtension->DeviceObject = newDeviceObject;
DeviceExtension->PhysicalDeviceObject = newDeviceObject;
0: kd> dt acpi!_device_Extension 0x899aec88
+0x000 Flags : 0x00406000`00000108
+0x000 UFlags : __unnamed
+0x008 Signature : 0x5f534750
+0x00c DebugFlags : 0
+0x010 DispatchTable : (null)
+0x014 WorkContext : WORK_QUEUE_CONTEXT
+0x014 Fdo : _FDO_DEVICE_EXTENSION
+0x014 Filter : _FILTER_DEVICE_EXTENSION
+0x014 Pdo : _PDO_DEVICE_EXTENSION
+0x058 WorkQueue : EXTENSION_WORKER
+0x058 Button : BUTTON_EXTENSION
+0x058 Thermal : THERMAL_EXTENSION
+0x058 LinkNode : LINK_NODE_EXTENSION
+0x058 Dock : DOCK_EXTENSION
+0x058 Processor : _PROCESSOR_DEVICE_EXTENSION
+0x088 DeviceState : 0 ( Stopped )
+0x08c PreviousState : 0 ( Stopped )
+0x090 PowerInfo : _ACPI_POWER_INFO
+0x10c DeviceID : 0x899c0190 "ACPI\ACPI0003"
+0x10c Address : 0x899c0190
+0x110 InstanceID : 0x899c1368 "1"
+0x114 ResourceList : (null)
+0x118 PnpResourceList : (null)
+0x11c OutstandingIrpCount : 0n1
+0x120 ReferenceCount : 0n5
+0x124 HibernatePathCount : 0n0
+0x128 RemoveEvent : (null)
+0x12c AcpiObject : 0x899b4a70 _NSObj
+0x130 DeviceObject : 0x899c5f18 _DEVICE_OBJECT 赋值了!!!
+0x134 TargetDeviceObject : (null)
+0x138 PhysicalDeviceObject : 0x899c5f18 _DEVICE_OBJECT
+0x13c ParentExtension : 0x89981a18 _DEVICE_EXTENSION 赋值了!!!
+0x140 ChildDeviceList : _LIST_ENTRY [ 0x899aedc8 - 0x899aedc8 ]
+0x148 SiblingDeviceList : _LIST_ENTRY [ 0x899aebb8 - 0x899aefd0 ]
+0x150 EjectDeviceHead : _LIST_ENTRY [ 0x899aedd8 - 0x899aedd8 ]
+0x158 EjectDeviceList : _LIST_ENTRY [ 0x899aede0 - 0x899aede0 ]
//
// Update the Irp Dispatch point
//
DeviceExtension->DispatchTable = &AcpiBusFilterIrpDispatch;
0: kd> dt acpi!_device_Extension 0x899aec88
+0x000 Flags : 0x00406000`00000020
+0x000 UFlags : __unnamed
+0x008 Signature : 0x5f534750
+0x00c DebugFlags : 0
+0x010 DispatchTable : 0xf743830c IRP_DISPATCH_TABLE
+0x014 WorkContext : WORK_QUEUE_CONTEXT
+0x014 Fdo : _FDO_DEVICE_EXTENSION
+0x014 Filter : _FILTER_DEVICE_EXTENSION
+0x014 Pdo : _PDO_DEVICE_EXTENSION
+0x058 WorkQueue : EXTENSION_WORKER
+0x058 Button : BUTTON_EXTENSION
+0x058 Thermal : THERMAL_EXTENSION
+0x058 LinkNode : LINK_NODE_EXTENSION
+0x058 Dock : DOCK_EXTENSION
+0x058 Processor : _PROCESSOR_DEVICE_EXTENSION
+0x088 DeviceState : 0 ( Stopped )
+0x08c PreviousState : 0 ( Stopped )
+0x090 PowerInfo : _ACPI_POWER_INFO
+0x10c DeviceID : 0x899c0190 "ACPI\ACPI0003" "ACPI\ACPI0003"
+0x10c Address : 0x899c0190
+0x110 InstanceID : 0x899c1368 "1"
+0x114 ResourceList : (null)
+0x118 PnpResourceList : (null)
+0x11c OutstandingIrpCount : 0n1
+0x120 ReferenceCount : 0n5
+0x124 HibernatePathCount : 0n0
+0x128 RemoveEvent : (null)
+0x12c AcpiObject : 0x899b4a70 _NSObj
+0x130 DeviceObject : 0x899c5f18 _DEVICE_OBJECT
+0x134 TargetDeviceObject : (null)
+0x138 PhysicalDeviceObject : 0x899c5f18 _DEVICE_OBJECT
+0x13c ParentExtension : 0x89981a18 _DEVICE_EXTENSION
+0x140 ChildDeviceList : _LIST_ENTRY [ 0x899aedc8 - 0x899aedc8 ]
+0x148 SiblingDeviceList : _LIST_ENTRY [ 0x899aebb8 - 0x899aefd0 ]
+0x150 EjectDeviceHead : _LIST_ENTRY [ 0x899aedd8 - 0x899aedd8 ]
+0x158 EjectDeviceList : _LIST_ENTRY [ 0x899aede0 - 0x899aede0 ]
0: kd> dx -id 0,0,899a2278 -r1 ((ACPI!IRP_DISPATCH_TABLE *)0xf743830c)
((ACPI!IRP_DISPATCH_TABLE *)0xf743830c) : 0xf743830c [Type: IRP_DISPATCH_TABLE *]
+0x000\] CreateClose : 0xf7403530 \[Type: long (\*)(_DEVICE_OBJECT \*,_IRP \*)
+0x004\] DeviceControl : 0xf7429a84 \[Type: long (\*)(_DEVICE_OBJECT \*,_IRP \*)
+0x008\] PnpStartDevice : 0xf743f2b0 \[Type: long (\*)(_DEVICE_OBJECT \*,_IRP \*)
+0x00c\] Pnp : 0xf745b068 \[Type: long (\*\*)(_DEVICE_OBJECT \*,_IRP \*)
+0x010\] Power : 0xf7438118 \[Type: long (\*\*)(_DEVICE_OBJECT \*,_IRP \*)
+0x014\] SystemControl : 0xf73fe214 \[Type: long (\*)(_DEVICE_OBJECT \*,_IRP \*)
+0x018\] Other : 0xf7403530 \[Type: long (\*)(_DEVICE_OBJECT \*,_IRP \*)
+0x01c\] Worker : 0x0 \[Type: void (\*)(_DEVICE_EXTENSION \*,unsigned long)
} else if (DeviceExtension->Flags & DEV_PROP_HID) {
ULONG i;
PUCHAR ptr;
ASSERT( DeviceExtension->DeviceID );
for (i = 0; AcpiInternalDeviceTable[i].PnPId; i++) {
ptr = strstr(
DeviceExtension->DeviceID,
AcpiInternalDeviceTable[i].PnPId
);
if (ptr) {
DeviceExtension->DispatchTable =
AcpiInternalDeviceTable[i].DispatchTable;
break;
}
}
0: kd> x ACPI!AcpiInternalDeviceTable
f7438430 ACPI!AcpiInternalDeviceTable = struct INTERNAL_DEVICE_TABLE []
f7438430 ACPI!AcpiInternalDeviceTable = struct INTERNAL_DEVICE_TABLE [32]
0: kd> dx -r1 (*((ACPI!INTERNAL_DEVICE_TABLE (*)[32])0xf7438430))
(*((ACPI!INTERNAL_DEVICE_TABLE (*)[32])0xf7438430)) [Type: INTERNAL_DEVICE_TABLE [32]]
0\] \[Type: INTERNAL_DEVICE_TABLE
1\] \[Type: INTERNAL_DEVICE_TABLE
2\] \[Type: INTERNAL_DEVICE_TABLE
3\] \[Type: INTERNAL_DEVICE_TABLE
4\] \[Type: INTERNAL_DEVICE_TABLE
5\] \[Type: INTERNAL_DEVICE_TABLE
6\] \[Type: INTERNAL_DEVICE_TABLE
7\] \[Type: INTERNAL_DEVICE_TABLE
8\] \[Type: INTERNAL_DEVICE_TABLE
9\] \[Type: INTERNAL_DEVICE_TABLE
10\] \[Type: INTERNAL_DEVICE_TABLE
11\] \[Type: INTERNAL_DEVICE_TABLE
12\] \[Type: INTERNAL_DEVICE_TABLE
13\] \[Type: INTERNAL_DEVICE_TABLE
14\] \[Type: INTERNAL_DEVICE_TABLE
15\] \[Type: INTERNAL_DEVICE_TABLE
16\] \[Type: INTERNAL_DEVICE_TABLE
17\] \[Type: INTERNAL_DEVICE_TABLE
18\] \[Type: INTERNAL_DEVICE_TABLE
19\] \[Type: INTERNAL_DEVICE_TABLE
20\] \[Type: INTERNAL_DEVICE_TABLE
21\] \[Type: INTERNAL_DEVICE_TABLE
22\] \[Type: INTERNAL_DEVICE_TABLE
23\] \[Type: INTERNAL_DEVICE_TABLE
24\] \[Type: INTERNAL_DEVICE_TABLE
25\] \[Type: INTERNAL_DEVICE_TABLE
26\] \[Type: INTERNAL_DEVICE_TABLE
27\] \[Type: INTERNAL_DEVICE_TABLE
28\] \[Type: INTERNAL_DEVICE_TABLE
29\] \[Type: INTERNAL_DEVICE_TABLE
30\] \[Type: INTERNAL_DEVICE_TABLE
31\] \[Type: INTERNAL_DEVICE_TABLE
0: kd> dx -r1 (*((ACPI!INTERNAL_DEVICE_TABLE *)0xf7438430))
(*((ACPI!INTERNAL_DEVICE_TABLE *)0xf7438430)) [Type: INTERNAL_DEVICE_TABLE]
+0x000\] PnPId : 0xf742b3fc : 0x41 \[Type: unsigned char \*
+0x004\] DispatchTable : 0xf74382cc \[Type: IRP_DISPATCH_TABLE \*
0: kd> dx -r1 ((ACPI!unsigned char *)0xf742b3fc)
((ACPI!unsigned char *)0xf742b3fc) : 0xf742b3fc : 0x41 [Type: unsigned char *]
0x41 [Type: unsigned char]
0: kd> db 0xf742b3fc
f742b3fc 41 43 50 49 30 30 30 36-00 00 00 00 f5 6f 95 a9 ACPI0006.....o..
f742b40c da 13 d3 11 97 db 00 a0-c9 40 52 2e c0 18 bc a1 .........@R.....
f742b41c c8 a7 d1 11 bf 3c 00 a0-c9 06 29 10 54 f8 76 e6 .....<....).T.v.
f742b42c 7d d8 d0 11 92 b2 00 a0-c9 05 5f c5 9b 60 4f f1 }........._..`O.
f742b43c bd cb 57 49 a6 74 bc 00-21 3f 1c 97 66 19 14 06 ..WI.t..!?..f...
f742b44c 45 72 69 63 46 2e 4e 65-6c 73 6f 6e f4 1b 94 70 EricF.Nelson...p
f742b45c 73 00 d1 11 a0 9e 00 c0-4f c3 40 b1 8a a0 91 b0 s.......O.@.....
f742b46c 97 ba d0 11 bd 14 00 aa-00 b7 b3 2a 92 4a 15 6c ...........*.J.l
0: kd> dx -r1 (*((ACPI!INTERNAL_DEVICE_TABLE *)0xf7438438))
(*((ACPI!INTERNAL_DEVICE_TABLE *)0xf7438438)) [Type: INTERNAL_DEVICE_TABLE]
+0x000\] PnPId : 0xf742b3f0 : 0x46 \[Type: unsigned char \*
+0x004\] DispatchTable : 0xf74382ac \[Type: IRP_DISPATCH_TABLE \*
0: kd> db 0xf742b3f0
f742b3f0 46 69 78 65 64 42 75 74-74 6f 6e 00 41 43 50 49 FixedButton.ACPI
f742b400 30 30 30 36 00 00 00 00-f5 6f 95 a9 da 13 d3 11 0006.....o......
f742b410 97 db 00 a0 c9 40 52 2e-c0 18 bc a1 c8 a7 d1 11 .....@R.........
f742b420 bf 3c 00 a0 c9 06 29 10-54 f8 76 e6 7d d8 d0 11 .<....).T.v.}...
f742b430 92 b2 00 a0 c9 05 5f c5-9b 60 4f f1 bd cb 57 49 ......_..`O...WI
f742b440 a6 74 bc 00 21 3f 1c 97-66 19 14 06 45 72 69 63 .t..!?..f...Eric
f742b450 46 2e 4e 65 6c 73 6f 6e-f4 1b 94 70 73 00 d1 11 F.Nelson...ps...
f742b460 a0 9e 00 c0 4f c3 40 b1-8a a0 91 b0 97 ba d0 11 ....O.@.........
0: kd> dx -r1 (*((ACPI!INTERNAL_DEVICE_TABLE *)0xf7438440))
(*((ACPI!INTERNAL_DEVICE_TABLE *)0xf7438440)) [Type: INTERNAL_DEVICE_TABLE]
+0x000\] PnPId : 0xf742b3e8 : 0x50 \[Type: unsigned char \*
+0x004\] DispatchTable : 0xf743836c \[Type: IRP_DISPATCH_TABLE \*
0: kd> db 0xf742b3e8
f742b3e8 50 4e 50 30 30 30 30 00-46 69 78 65 64 42 75 74 PNP0000.FixedBut
f742b3f8 74 6f 6e 00 41 43 50 49-30 30 30 36 00 00 00 00 ton.ACPI0006....
f742b408 f5 6f 95 a9 da 13 d3 11-97 db 00 a0 c9 40 52 2e .o...........@R.
f742b418 c0 18 bc a1 c8 a7 d1 11-bf 3c 00 a0 c9 06 29 10 .........<....).
f742b428 54 f8 76 e6 7d d8 d0 11-92 b2 00 a0 c9 05 5f c5 T.v.}........._.
f742b438 9b 60 4f f1 bd cb 57 49-a6 74 bc 00 21 3f 1c 97 .`O...WI.t..!?..
f742b448 66 19 14 06 45 72 69 63-46 2e 4e 65 6c 73 6f 6e f...EricF.Nelson
f742b458 f4 1b 94 70 73 00 d1 11-a0 9e 00 c0 4f c3 40 b1 ...ps.......O.@.
0: kd> dx -r1 (*((ACPI!INTERNAL_DEVICE_TABLE *)0xf7438448))
(*((ACPI!INTERNAL_DEVICE_TABLE *)0xf7438448)) [Type: INTERNAL_DEVICE_TABLE]
+0x000\] PnPId : 0xf742b3e0 : 0x50 \[Type: unsigned char \*
+0x004\] DispatchTable : 0xf743836c \[Type: IRP_DISPATCH_TABLE \*
0: kd> db 0xf742b3e0
f742b3e0 50 4e 50 30 30 30 31 00-50 4e 50 30 30 30 30 00 PNP0001.PNP0000.
f742b3f0 46 69 78 65 64 42 75 74-74 6f 6e 00 41 43 50 49 FixedButton.ACPI
f742b400 30 30 30 36 00 00 00 00-f5 6f 95 a9 da 13 d3 11 0006.....o......
f742b410 97 db 00 a0 c9 40 52 2e-c0 18 bc a1 c8 a7 d1 11 .....@R.........
f742b420 bf 3c 00 a0 c9 06 29 10-54 f8 76 e6 7d d8 d0 11 .<....).T.v.}...
f742b430 92 b2 00 a0 c9 05 5f c5-9b 60 4f f1 bd cb 57 49 ......_..`O...WI
f742b440 a6 74 bc 00 21 3f 1c 97-66 19 14 06 45 72 69 63 .t..!?..f...Eric
f742b450 46 2e 4e 65 6c 73 6f 6e-f4 1b 94 70 73 00 d1 11 F.Nelson...ps...
0: kd> db 0xf742b3e0-80
f742b360 50 4e 50 30 43 30 32 00-50 4e 50 30 43 30 31 00 PNP0C02.PNP0C01.
f742b370 50 4e 50 30 43 30 30 00-50 4e 50 30 42 30 30 00 PNP0C00.PNP0B00.
f742b380 50 4e 50 30 41 30 36 00-50 4e 50 30 41 30 35 00 PNP0A06.PNP0A05.
f742b390 50 4e 50 30 38 30 30 00-50 4e 50 30 32 30 32 00 PNP0800.PNP0202.
f742b3a0 50 4e 50 30 32 30 31 00-50 4e 50 30 32 30 30 00 PNP0201.PNP0200.
f742b3b0 50 4e 50 30 31 30 32 00-50 4e 50 30 31 30 31 00 PNP0102.PNP0101.
f742b3c0 50 4e 50 30 31 30 30 00-50 4e 50 30 30 30 34 00 PNP0100.PNP0004.
f742b3d0 50 4e 50 30 30 30 33 00-50 4e 50 30 30 30 32 00 PNP0003.PNP0002.
0: kd> db 0xf742b3e0-80*2
f742b2e0 35 30 31 00 50 4e 50 30-35 30 30 00 49 42 4d 33 501.PNP0500.IBM3
f742b2f0 37 36 30 00 43 50 51 42-30 31 44 00 50 72 6f 63 760.CPQB01D.Proc
f742b300 65 73 73 6f 72 00 00 00-54 68 65 72 6d 61 6c 5a essor...ThermalZ
f742b310 6f 6e 65 00 44 6f 63 6b-44 65 76 69 63 65 00 00 one.DockDevice..
f742b320 49 42 4d 30 30 36 32 00-53 4e 59 35 30 30 31 00 IBM0062.SNY5001.
f742b330 50 4e 50 30 43 30 45 00-50 4e 50 30 43 30 44 00 PNP0C0E.PNP0C0D.
f742b340 50 4e 50 30 43 30 43 00-50 4e 50 30 43 30 42 00 PNP0C0C.PNP0C0B.
f742b350 50 4e 50 30 43 30 35 00-50 4e 50 30 43 30 34 00 PNP0C05.PNP0C04.
0: kd> dx -r1 (*((ACPI!INTERNAL_DEVICE_TABLE *)0xf7438528))
(*((ACPI!INTERNAL_DEVICE_TABLE *)0xf7438528)) [Type: INTERNAL_DEVICE_TABLE]
+0x000\] PnPId : 0x0 \[Type: unsigned char \*
+0x004\] DispatchTable : 0x0 \[Type: IRP_DISPATCH_TABLE \*
0: kd> dx -r1 (*((ACPI!INTERNAL_DEVICE_TABLE *)0xf7438520))
(*((ACPI!INTERNAL_DEVICE_TABLE *)0xf7438520)) [Type: INTERNAL_DEVICE_TABLE]
+0x000\] PnPId : 0xf742b2fc : 0x50 \[Type: unsigned char \*
+0x004\] DispatchTable : 0xf743834c \[Type: IRP_DISPATCH_TABLE \*
0: kd> db 0xf742b2fc
f742b2fc 50 72 6f 63 65 73 73 6f-72 00 00 00 54 68 65 72 Processor...Ther
f742b30c 6d 61 6c 5a 6f 6e 65 00-44 6f 63 6b 44 65 76 69 malZone.DockDevi
f742b31c 63 65 00 00 49 42 4d 30-30 36 32 00 53 4e 59 35 ce..IBM0062.SNY5
f742b32c 30 30 31 00 50 4e 50 30-43 30 45 00 50 4e 50 30 001.PNP0C0E.PNP0
f742b33c 43 30 44 00 50 4e 50 30-43 30 43 00 50 4e 50 30 C0D.PNP0C0C.PNP0
f742b34c 43 30 42 00 50 4e 50 30-43 30 35 00 50 4e 50 30 C0B.PNP0C05.PNP0
f742b35c 43 30 34 00 50 4e 50 30-43 30 32 00 50 4e 50 30 C04.PNP0C02.PNP0
f742b36c 43 30 31 00 50 4e 50 30-43 30 30 00 50 4e 50 30 C01.PNP0C00.PNP0
0: kd> dx -r1 (*((ACPI!INTERNAL_DEVICE_TABLE *)0xf7438518))
(*((ACPI!INTERNAL_DEVICE_TABLE *)0xf7438518)) [Type: INTERNAL_DEVICE_TABLE]
+0x000\] PnPId : 0xf742b308 : 0x54 \[Type: unsigned char \*
+0x004\] DispatchTable : 0xf743840c \[Type: IRP_DISPATCH_TABLE \*
0: kd> db 0xf742b308
f742b308 54 68 65 72 6d 61 6c 5a-6f 6e 65 00 44 6f 63 6b ThermalZone.Dock
f742b318 44 65 76 69 63 65 00 00-49 42 4d 30 30 36 32 00 Device..IBM0062.
f742b328 53 4e 59 35 30 30 31 00-50 4e 50 30 43 30 45 00 SNY5001.PNP0C0E.
f742b338 50 4e 50 30 43 30 44 00-50 4e 50 30 43 30 43 00 PNP0C0D.PNP0C0C.
f742b348 50 4e 50 30 43 30 42 00-50 4e 50 30 43 30 35 00 PNP0C0B.PNP0C05.
f742b358 50 4e 50 30 43 30 34 00-50 4e 50 30 43 30 32 00 PNP0C04.PNP0C02.
f742b368 50 4e 50 30 43 30 31 00-50 4e 50 30 43 30 30 00 PNP0C01.PNP0C00.
f742b378 50 4e 50 30 42 30 30 00-50 4e 50 30 41 30 36 00 PNP0B00.PNP0A06.
0: kd> db 0xf742b2fc+80
f742b37c 42 30 30 00 50 4e 50 30-41 30 36 00 50 4e 50 30 B00.PNP0A06.PNP0
f742b38c 41 30 35 00 50 4e 50 30-38 30 30 00 50 4e 50 30 A05.PNP0800.PNP0
f742b39c 32 30 32 00 50 4e 50 30-32 30 31 00 50 4e 50 30 202.PNP0201.PNP0
f742b3ac 32 30 30 00 50 4e 50 30-31 30 32 00 50 4e 50 30 200.PNP0102.PNP0
f742b3bc 31 30 31 00 50 4e 50 30-31 30 30 00 50 4e 50 30 101.PNP0100.PNP0
f742b3cc 30 30 34 00 50 4e 50 30-30 30 33 00 50 4e 50 30 004.PNP0003.PNP0
f742b3dc 30 30 32 00 50 4e 50 30-30 30 31 00 50 4e 50 30 002.PNP0001.PNP0
f742b3ec 30 30 30 00 46 69 78 65-64 42 75 74 74 6f 6e 00 000.FixedButton.
0: kd> db 0xf742b2fc+80*2
f742b3fc 41 43 50 49 30 30 30 36-00 00 00 00 f5 6f 95 a9 ACPI0006.....o..
f742b40c da 13 d3 11 97 db 00 a0-c9 40 52 2e c0 18 bc a1 .........@R.....
f742b41c c8 a7 d1 11 bf 3c 00 a0-c9 06 29 10 54 f8 76 e6 .....<....).T.v.
f742b42c 7d d8 d0 11 92 b2 00 a0-c9 05 5f c5 9b 60 4f f1 }........._..`O.
f742b43c bd cb 57 49 a6 74 bc 00-21 3f 1c 97 66 19 14 06 ..WI.t..!?..f...
f742b44c 45 72 69 63 46 2e 4e 65-6c 73 6f 6e f4 1b 94 70 EricF.Nelson...p
f742b45c 73 00 d1 11 a0 9e 00 c0-4f c3 40 b1 8a a0 91 b0 s.......O.@.....
f742b46c 97 ba d0 11 bd 14 00 aa-00 b7 b3 2a 92 4a 15 6c ...........*.J.l
//
// Update the current device status
//
status = ACPIGetDevicePresenceSync(
deviceExtension,
(PVOID *) &deviceStatus,
NULL
);
//
// This macro is used to get the device status synchronously
//
#define ACPIGetDevicePresenceSync( \
DeviceExtension, \
Buffer, \
BufferSize \
) \
ACPIGetDevicePresence( \
DeviceExtension, \
GET_PROP_SKIP_CALLBACK, \
NULL, \
NULL, \
Buffer, \
BufferSize \
)
//
// This macro is used to get the device presence
//
#define ACPIGetDevicePresence( \
DeviceExtension, \
Flags, \
CallBack, \
Context, \
Buffer, \
BufferSize \
) \
ACPIGet( \
DeviceExtension, \
PACKED_STA, \
(GET_REQUEST_INTEGER | \
GET_TYPE_INTEGER | \
GET_CONVERT_TO_DEVICE_PRESENCE | \
Flags ), \
NULL, \
0, \
CallBack, \
Context, \
(PVOID *) Buffer, \
(PULONG) BufferSize \
)
0: kd> t
Breakpoint 44 hit
eax=00000000 ebx=f743b620 ecx=f789a22c edx=00902008 esi=899aea70 edi=899aeb90
eip=f74076b8 esp=f789a1f8 ebp=f789a250 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!ACPIGet:
f74076b8 55 push ebp
0: kd> kc
00 ACPI!ACPIGet
01 ACPI!ACPIDetectPdoDevices
02 ACPI!ACPIRootIrpQueryBusRelations
03 ACPI!ACPIRootIrpQueryDeviceRelations
04 ACPI!ACPIDispatchIrp
05 nt!IofCallDriver
06 nt!IopSynchronousCall
07 nt!IopQueryDeviceRelations
08 nt!PipEnumerateDevice
09 nt!PipProcessDevNodeTree
0a nt!PipDeviceActionWorker
0b nt!PipRequestDeviceAction
0c nt!IopInitializeBootDrivers
0d nt!IoInitSystem
0e nt!Phase1Initialization
0f nt!PspSystemThreadStartup
10 nt!KiThreadStartup
0: kd> kv
ChildEBP RetAddr Args to Child
00 f789a1f4 f7400300 899aea70 4154535f 20040802 ACPI!ACPIGet (FPO: [Non-Fpo]) (CONV: stdcall) [d:\srv03rtm\base\busdrv\acpi\driver\nt\get.c @ 76]
01 f789a250 f744e9d7 89981b98 f789a2a4 804edc6c ACPI!ACPIDetectPdoDevices+0x122 (FPO: [Non-Fpo]) (CONV: stdcall) [d:\srv03rtm\base\busdrv\acpi\driver\nt\detect.c @ 2006]
02 f789a270 f744ee67 89981b98 899bf5b0 f789a2a4 ACPI!ACPIRootIrpQueryBusRelations+0xa1 (FPO: [Non-Fpo]) (CONV: stdcall) [d:\srv03rtm\base\busdrv\acpi\driver\nt\root.c @ 238]
03 f789a2ac f740410e 89981b98 899bf507 89981b98 ACPI!ACPIRootIrpQueryDeviceRelations+0x9d (FPO: [Non-Fpo]) (CONV: stdcall) [d:\srv03rtm\base\busdrv\acpi\driver\nt\root.c @ 513]
04 f789a2e0 80a2675c 89981b98 899bf5b0 899bf668 ACPI!ACPIDispatchIrp+0x19e (FPO: [Non-Fpo]) (CONV: stdcall) [d:\srv03rtm\base\busdrv\acpi\driver\nt\dispatch.c @ 690]
05 f789a2fc 80c95e00 00000000 899c1008 899c1008 nt!IofCallDriver+0x62 (FPO: [Non-Fpo]) (CONV: fastcall) [d:\srv03rtm\base\ntos\io\iomgr\iosubs.c @ 2237]
06 f789a32c 80a2e3f3 00000000 f789a348 899c10e8 nt!IopSynchronousCall+0x1aa (FPO: [Non-Fpo]) (CONV: stdcall) [d:\srv03rtm\base\ntos\io\pnpmgr\pnpirp.c @ 258]
07 f789a36c 80c8d810 00000000 899c1de0 00000000 nt!IopQueryDeviceRelations+0x39 (FPO: [Non-Fpo]) (CONV: stdcall) [d:\srv03rtm\base\ntos\io\pnpmgr\pnpirp.c @ 1131]
08 f789a388 80c94e01 899c1008 00000000 00000000 nt!PipEnumerateDevice+0x56 (FPO: [Non-Fpo]) (CONV: stdcall) [d:\srv03rtm\base\ntos\io\pnpmgr\pnpenum.c @ 980]
09 f789a5d4 80a2dde9 899c5bc8 00000000 80a2dd00 nt!PipProcessDevNodeTree+0x273 (FPO: [Non-Fpo]) (CONV: stdcall) [d:\srv03rtm\base\ntos\io\pnpmgr\pnpenum.c @ 4699]
0a f789a618 80a2e161 00000000 00000000 800836b0 nt!PipDeviceActionWorker+0xcd (FPO: [Non-Fpo]) (CONV: stdcall) [d:\srv03rtm\base\ntos\io\pnpmgr\pnpenum.c @ 710]
0b f789a630 80e69358 00000000 00000005 00000000 nt!PipRequestDeviceAction+0x139 (FPO: [Non-Fpo]) (CONV: stdcall) [d:\srv03rtm\base\ntos\io\pnpmgr\pnpenum.c @ 598]
0c f789a694 80e655c7 80077000 f789a7dc 00034000 nt!IopInitializeBootDrivers+0x392 (FPO: [Non-Fpo]) (CONV: stdcall) [d:\srv03rtm\base\ntos\io\pnpmgr\pnpinit.c @ 1440]
0d f789a838 80e632fd 80077000 00000000 899a1020 nt!IoInitSystem+0x70b (FPO: [Non-Fpo]) (CONV: stdcall) [d:\srv03rtm\base\ntos\io\iomgr\ioinit.c @ 665]
0e f789adac 80d391f0 80077000 00000000 00000000 nt!Phase1Initialization+0x9b3 (FPO: [Non-Fpo]) (CONV: stdcall) [d:\srv03rtm\base\ntos\init\init.c @ 2221]
0f f789addc 80b00d52 80e6294a 80077000 00000000 nt!PspSystemThreadStartup+0x2e (FPO: [Non-Fpo]) (CONV: stdcall) [d:\srv03rtm\base\ntos\ps\create.c @ 2213]
10 00000000 00000000 00000000 00000000 00000000 nt!KiThreadStartup+0x16 [d:\srv03rtm\base\ntos\ke\i386\threadbg.asm @ 81]
0: kd> dv
Target = 0x899aea70
ObjectID = 0x4154535f
Flags = 0x20040802
SimpleArgument = 0x00000000
SimpleArgumentSize = 0
CallBackRoutine = 0x00000000
CallBackContext = 0x00000000
Buffer = 0xf789a22c
BufferSize = 0x00000000
0: kd> dt acpi!_DEVICE_EXTENSION 0x899aea70
+0x000 Flags : 0x00902008`2037010a
+0x000 UFlags : __unnamed
+0x008 Signature : 0x5f534750
+0x00c DebugFlags : 0
+0x010 DispatchTable : (null)
+0x014 WorkContext : WORK_QUEUE_CONTEXT
+0x014 Fdo : _FDO_DEVICE_EXTENSION
+0x014 Filter : _FILTER_DEVICE_EXTENSION
+0x014 Pdo : _PDO_DEVICE_EXTENSION
+0x058 WorkQueue : EXTENSION_WORKER
+0x058 Button : BUTTON_EXTENSION
+0x058 Thermal : THERMAL_EXTENSION
+0x058 LinkNode : LINK_NODE_EXTENSION
+0x058 Dock : DOCK_EXTENSION
+0x058 Processor : _PROCESSOR_DEVICE_EXTENSION
+0x088 DeviceState : 0 ( Stopped )
+0x08c PreviousState : 0 ( Stopped )
+0x090 PowerInfo : _ACPI_POWER_INFO
+0x10c DeviceID : 0x89905060 "ACPI\PNP0C0E"
+0x10c Address : 0x89905060
+0x110 InstanceID : (null)
+0x114 ResourceList : (null)
+0x118 PnpResourceList : (null)
+0x11c OutstandingIrpCount : 0n1
+0x120 ReferenceCount : 0n4
+0x124 HibernatePathCount : 0n0
+0x128 RemoveEvent : (null)
+0x12c AcpiObject : 0x899b4d34 _NSObj
+0x130 DeviceObject : (null)
+0x134 TargetDeviceObject : (null)
+0x138 PhysicalDeviceObject : (null)
+0x13c ParentExtension : 0x89981a18 _DEVICE_EXTENSION
+0x140 ChildDeviceList : _LIST_ENTRY [ 0x899aebb0 - 0x899aebb0 ]
+0x148 SiblingDeviceList : _LIST_ENTRY [ 0x899ab7c0 - 0x899aedd0 ]
+0x150 EjectDeviceHead : _LIST_ENTRY [ 0x899aebc0 - 0x899aebc0 ]
+0x158 EjectDeviceList : _LIST_ENTRY [ 0x899aebc8 - 0x899aebc8 ]
if ( (Flags & GET_PROP_NSOBJ_INTERFACE) ) {
acpiObject = (PNSOBJ) Target;
} else {
deviceExtension = (PDEVICE_EXTENSION) Target;
acpiObject = deviceExtension->AcpiObject;
}
0: kd> dv
Target = 0x899aea70
ObjectID = 0x4154535f
Flags = 0x20040802
#define GET_TYPE_INTEGER 0x00000002
#define GET_CONVERT_TO_DEVICE_PRESENCE 0x00000800
#define GET_REQUEST_INTEGER 0x00040000
#define GET_PROP_SKIP_CALLBACK 0x20000000
//
// The various flag defines
//
#define GET_TYPE_PACKAGE 0x00000001
#define GET_TYPE_INTEGER 0x00000002
#define GET_TYPE_STRING 0x00000004
#define GET_TYPE_BUFFER 0x00000008
#define GET_CONVERT_TO_WIDESTRING 0x00000010
#define GET_CONVERT_TO_DEVICEID 0x00000020
#define GET_CONVERT_TO_HARDWAREID 0x00000040
#define GET_CONVERT_TO_INSTANCEID 0x00000080
#define GET_CONVERT_TO_COMPATIBLEID 0x00000100
#define GET_CONVERT_TO_PNPID 0x00000200
#define GET_CONVERT_TO_ADDRESS 0x00000400
#define GET_CONVERT_TO_DEVICE_PRESENCE 0x00000800
#define GET_CONVERT_IGNORE_OVERRIDES 0x00001000
#define GET_CONVERT_TO_SERIAL_ID 0x00002000
#define GET_CONVERT_VALIDATE_INTEGER 0x00004000
#define GET_REQUEST_BUFFER 0x00010000
#define GET_REQUEST_DATA 0x00020000
#define GET_REQUEST_INTEGER 0x00040000
#define GET_REQUEST_STRING 0x00080000
#define GET_REQUEST_NOTHING 0x00100000
#define GET_EVAL_SIMPLE_INTEGER 0x01000000
#define GET_EVAL_SIMPLE_STRING 0x02000000
#define GET_EVAL_SIMPLE_BUFFER 0x04000000
#define GET_PROP_NSOBJ_INTERFACE 0x08000000
#define GET_PROP_ALLOCATE_NON_PAGED 0x10000000
#define GET_PROP_SKIP_CALLBACK 0x20000000
#define GET_PROP_ASYNCHRONOUS 0x40000000
#define GET_PROP_NO_ERRORS 0x80000000
} else {
deviceExtension = (PDEVICE_EXTENSION) Target; eax=899aea70
acpiObject = deviceExtension->AcpiObject; 899b4d34
}
0: kd> p
eax=899aea70 ebx=00000000 ecx=f789a22c edx=00902008 esi=20040802 edi=00000000
eip=f74076f3 esp=f789a1b8 ebp=f789a1f4 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!ACPIGet+0x3b:
f74076f3 8b802c010000 mov eax,dword ptr [eax+12Ch] ds:0023:899aeb9c=899b4d34
0: kd> dx -id 0,0,899a2278 -r1 ((ACPI!_NSObj *)0x899b4d34)
((ACPI!_NSObj *)0x899b4d34) : 0x899b4d34 [Type: _NSObj *]
+0x000\] list \[Type: _List
+0x008\] pnsParent : 0x899af0f0 \[Type: _NSObj \*
+0x00c\] pnsFirstChild : 0x899b4dac \[Type: _NSObj \*
+0x010\] dwNameSeg : 0x42504c53 \[Type: unsigned long
+0x014\] hOwner : 0x899af330 \[Type: void \*
+0x018\] pnsOwnedNext : 0x899b4ca8 \[Type: _NSObj \*
+0x01c\] ObjData \[Type: _ObjData
+0x030\] Context : 0x899aea70 \[Type: void \*
+0x034\] dwRefCount : 0x0 \[Type: unsigned long
//
// Determine the completion routine that we should use
//
switch( (Flags & GET_REQUEST_MASK) ) {
case GET_REQUEST_BUFFER:
completionRoutine = ACPIGetWorkerForBuffer;
break;
case GET_REQUEST_DATA:
completionRoutine = ACPIGetWorkerForData;
break;
case GET_REQUEST_INTEGER:
completionRoutine = ACPIGetWorkerForInteger;
//
// We need to allocate the request to hold the context information
// We have no choice but to allocate this from NonPagedPool --- the
// interpreter will be calling us at DPC level
//
request = ExAllocatePoolWithTag(
NonPagedPool,
sizeof(ACPI_GET_REQUEST),
ACPI_MISC_POOLTAG
);
0: kd> x acpi!AcpiGetListEntry
f743b940 ACPI!AcpiGetListEntry = struct _LIST_ENTRY [ 0xf743b940 - 0xf743b940 ]
0: kd> dx -r1 (*((ACPI!_LIST_ENTRY *)0xf743b940))
(*((ACPI!_LIST_ENTRY *)0xf743b940)) [Type: _LIST_ENTRY]
+0x000\] Flink : 0xf743b940 \[Type: _LIST_ENTRY \*
+0x004\] Blink : 0xf743b940 \[Type: _LIST_ENTRY \*
0: kd> dt ACPI_GET_REQUEST 0x8997b808-8
+0x000 Flags : 0x20040802
+0x000 UFlags : __unnamed
+0x004 ObjectID : 0x4154535f
+0x008 ListEntry : _LIST_ENTRY [ 0xf743b940 - 0xf743b940 ]
+0x010 DeviceExtension : 0x899aea70 _DEVICE_EXTENSION
+0x014 AcpiObject : 0x899b4d34 _NSObj
+0x018 CallBackRoutine : (null)
+0x01c CallBackContext : (null)
+0x020 Buffer : 0xf789a22c -> 0x0000000f Void
+0x024 BufferSize : (null)
+0x028 Status : 0n0
+0x02c ResultData : _ObjData
//
// Go out and see if the requested object is present
//
acpiObject = ACPIAmliGetNamedChild(
acpiObject,
ObjectID
);
if (!acpiObject) {
status = STATUS_OBJECT_NAME_NOT_FOUND;
goto ACPIGetExit;
}
0: kd> p
eax=899b4ed0 ebx=f743b938 ecx=4154535f edx=00000000 esi=8997b800 edi=8997b808
eip=f74078dd esp=f789a1b8 ebp=f789a1f4 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!ACPIGet+0x225:
f74078dd 85c0 test eax,eax
//
// What we do now depends on wether or not the user wants us to
// behave async or sync
//
if (async) {
//
// Evaluate the request
//
status = AMLIAsyncEvalObject(
acpiObject,
&(request->ResultData),
argumentCount,
argumentPtr,
completionRoutine,
request
);
0: kd> p
Breakpoint 44 hit
eax=00000000 ebx=00000000 ecx=89643a30 edx=89643a18 esi=89643a18 edi=00000103
eip=f74076b8 esp=f7899f04 ebp=f7899f7c 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!ACPIGet:
f74076b8 55 push ebp
0: kd> kc
00 ACPI!ACPIGet
01 ACPI!GetPciAddressWorker
02 ACPI!GetPciAddress
03 ACPI!PciConfigSpaceHandlerWorker
04 ACPI!PciConfigSpaceHandler
05 ACPI!InternalOpRegionHandler
06 ACPI!WriteCookAccess
07 ACPI!RunContext
08 ACPI!InsertReadyQueue
09 ACPI!RestartContext
0a ACPI!AsyncEvalObject
0b ACPI!SyncEvalObject
0c ACPI!AMLIEvalNameSpaceObject
0d ACPI!ACPIGet
0e ACPI!ACPIDetectPdoDevices
0f ACPI!ACPIRootIrpQueryBusRelations
10 ACPI!ACPIRootIrpQueryDeviceRelations
11 ACPI!ACPIDispatchIrp
12 nt!IofCallDriver
13 nt!IopSynchronousCall
14 nt!IopQueryDeviceRelations
15 nt!PipEnumerateDevice
16 nt!PipProcessDevNodeTree
17 nt!PipDeviceActionWorker
18 nt!PipRequestDeviceAction
19 nt!IopInitializeBootDrivers
1a nt!IoInitSystem
1b nt!Phase1Initialization
1c nt!PspSystemThreadStartup
1d nt!KiThreadStartup
0: kd> kv
ChildEBP RetAddr Args to Child
00 f7899f00 f740cf5e 899affac 5244415f 48040402 ACPI!ACPIGet (FPO: [Non-Fpo]) (CONV: stdcall) [d:\srv03rtm\base\busdrv\acpi\driver\nt\get.c @ 76]
01 f7899f7c f740d3a8 899affac 00000000 00000000 ACPI!GetPciAddressWorker+0x74 (FPO: [Non-Fpo]) (CONV: cdecl) [d:\srv03rtm\base\busdrv\acpi\driver\nt\pciopregion.c @ 1030]
02 f7899f9c f740d700 899affac f740d62c 8993d1e0 ACPI!GetPciAddress+0x70 (FPO: [Non-Fpo]) (CONV: stdcall) [d:\srv03rtm\base\busdrv\acpi\driver\nt\pciopregion.c @ 974]
03 f789a008 f740d9dd 899affac 00000000 00000000 ACPI!PciConfigSpaceHandlerWorker+0xd4 (FPO: [Non-Fpo]) (CONV: cdecl) [d:\srv03rtm\base\busdrv\acpi\driver\nt\pciopregion.c @ 654]
04 f789a024 f742813d 00000001 899b0b50 000000d8 ACPI!PciConfigSpaceHandler+0x6d (FPO: [Non-Fpo]) (CONV: cdecl) [d:\srv03rtm\base\busdrv\acpi\driver\nt\pciopregion.c @ 424]
05 f789a054 f7417e5f 00000001 899b0b50 000000d8 ACPI!InternalOpRegionHandler+0x67 (FPO: [Non-Fpo]) (CONV: cdecl) [d:\srv03rtm\base\busdrv\acpi\driver\shared\acpioprg.c @ 160]
06 f789a08c f741d832 898b6000 898b7bd4 00000000 ACPI!WriteCookAccess+0x242 (FPO: [Non-Fpo]) (CONV: cdecl) [d:\srv03rtm\base\busdrv\acpi\driver\amlinew\object.c @ 1437]
07 f789a0b4 f7420671 00000000 4556414c 898b6000 ACPI!RunContext+0x122 (FPO: [Non-Fpo]) (CONV: cdecl) [d:\srv03rtm\base\busdrv\acpi\driver\amlinew\ctxt.c @ 588]
08 f789a0dc f7420887 898b6000 00000000 f743a948 ACPI!InsertReadyQueue+0x155 (FPO: [Non-Fpo]) (CONV: cdecl) [d:\srv03rtm\base\busdrv\acpi\driver\amlinew\sched.c @ 275]
09 f789a0fc f741fb55 898b6000 00000000 8997b840 ACPI!RestartContext+0xb3 (FPO: [Non-Fpo]) (CONV: cdecl) [d:\srv03rtm\base\busdrv\acpi\driver\amlinew\sched.c @ 346]
0a f789a120 f741ff1d 899b4ed0 8997b82c 00000000 ACPI!AsyncEvalObject+0x28c (FPO: [Non-Fpo]) (CONV: cdecl) [d:\srv03rtm\base\busdrv\acpi\driver\amlinew\sync.c @ 343]
0b f789a178 f74151ee 899b4ed0 8997b82c 00000000 ACPI!SyncEvalObject+0x107 (FPO: [Non-Fpo]) (CONV: cdecl) [d:\srv03rtm\base\busdrv\acpi\driver\amlinew\sync.c @ 165]
0c f789a1a0 f7407922 899b4ed0 8997b82c 00000000 ACPI!AMLIEvalNameSpaceObject+0x14d (FPO: [Non-Fpo]) (CONV: cdecl) [d:\srv03rtm\base\busdrv\acpi\driver\amlinew\amliapi.c @ 762]
0d f789a1f4 f7400300 899b4ed0 4154535f 20040802 ACPI!ACPIGet+0x26a (FPO: [Non-Fpo]) (CONV: stdcall) [d:\srv03rtm\base\busdrv\acpi\driver\nt\get.c @ 295]
0e f789a250 f744e9d7 89981b98 f789a2a4 804edc6c ACPI!ACPIDetectPdoDevices+0x122 (FPO: [Non-Fpo]) (CONV: stdcall) [d:\srv03rtm\base\busdrv\acpi\driver\nt\detect.c @ 2006]
0f f789a270 f744ee67 89981b98 899bf5b0 f789a2a4 ACPI!ACPIRootIrpQueryBusRelations+0xa1 (FPO: [Non-Fpo]) (CONV: stdcall) [d:\srv03rtm\base\busdrv\acpi\driver\nt\root.c @ 238]
10 f789a2ac f740410e 89981b98 899bf507 89981b98 ACPI!ACPIRootIrpQueryDeviceRelations+0x9d (FPO: [Non-Fpo]) (CONV: stdcall) [d:\srv03rtm\base\busdrv\acpi\driver\nt\root.c @ 513]
11 f789a2e0 80a2675c 89981b98 899bf5b0 899bf668 ACPI!ACPIDispatchIrp+0x19e (FPO: [Non-Fpo]) (CONV: stdcall) [d:\srv03rtm\base\busdrv\acpi\driver\nt\dispatch.c @ 690]
12 f789a2fc 80c95e00 00000000 899c1008 899c1008 nt!IofCallDriver+0x62 (FPO: [Non-Fpo]) (CONV: fastcall) [d:\srv03rtm\base\ntos\io\iomgr\iosubs.c @ 2237]
13 f789a32c 80a2e3f3 00000000 f789a348 899c10e8 nt!IopSynchronousCall+0x1aa (FPO: [Non-Fpo]) (CONV: stdcall) [d:\srv03rtm\base\ntos\io\pnpmgr\pnpirp.c @ 258]
14 f789a36c 80c8d810 00000000 899c1de0 00000000 nt!IopQueryDeviceRelations+0x39 (FPO: [Non-Fpo]) (CONV: stdcall) [d:\srv03rtm\base\ntos\io\pnpmgr\pnpirp.c @ 1131]
15 f789a388 80c94e01 899c1008 00000000 00000000 nt!PipEnumerateDevice+0x56 (FPO: [Non-Fpo]) (CONV: stdcall) [d:\srv03rtm\base\ntos\io\pnpmgr\pnpenum.c @ 980]
16 f789a5d4 80a2dde9 899c5bc8 00000000 80a2dd00 nt!PipProcessDevNodeTree+0x273 (FPO: [Non-Fpo]) (CONV: stdcall) [d:\srv03rtm\base\ntos\io\pnpmgr\pnpenum.c @ 4699]
17 f789a618 80a2e161 00000000 00000000 800836b0 nt!PipDeviceActionWorker+0xcd (FPO: [Non-Fpo]) (CONV: stdcall) [d:\srv03rtm\base\ntos\io\pnpmgr\pnpenum.c @ 710]
18 f789a630 80e69358 00000000 00000005 00000000 nt!PipRequestDeviceAction+0x139 (FPO: [Non-Fpo]) (CONV: stdcall) [d:\srv03rtm\base\ntos\io\pnpmgr\pnpenum.c @ 598]
19 f789a694 80e655c7 80077000 f789a7dc 00034000 nt!IopInitializeBootDrivers+0x392 (FPO: [Non-Fpo]) (CONV: stdcall) [d:\srv03rtm\base\ntos\io\pnpmgr\pnpinit.c @ 1440]
1a f789a838 80e632fd 80077000 00000000 899a1020 nt!IoInitSystem+0x70b (FPO: [Non-Fpo]) (CONV: stdcall) [d:\srv03rtm\base\ntos\io\iomgr\ioinit.c @ 665]
1b f789adac 80d391f0 80077000 00000000 00000000 nt!Phase1Initialization+0x9b3 (FPO: [Non-Fpo]) (CONV: stdcall) [d:\srv03rtm\base\ntos\init\init.c @ 2221]
1c f789addc 80b00d52 80e6294a 80077000 00000000 nt!PspSystemThreadStartup+0x2e (FPO: [Non-Fpo]) (CONV: stdcall) [d:\srv03rtm\base\ntos\ps\create.c @ 2213]
1d 00000000 00000000 00000000 00000000 00000000 nt!KiThreadStartup+0x16 [d:\srv03rtm\base\ntos\ke\i386\threadbg.asm @ 81]
0: kd> bp f7407922
0: kd> g
Breakpoint 45 hit
eax=000000a5 ebx=899b00f0 ecx=8997e000 edx=00002707 esi=8960e000 edi=8993ae10
eip=f7407364 esp=f791acdc ebp=f791ad10 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!ACPIGetWorkerForInteger:
f7407364 55 push ebp
1: kd> kc
00 ACPI!ACPIGetWorkerForInteger
01 ACPI!AsyncCallBack
02 ACPI!RunContext
03 ACPI!DispatchCtxtQueue
04 ACPI!StartTimeSlicePassive
05 ACPI!ACPIWorker
06 nt!PspSystemThreadStartup
07 nt!KiThreadStartup
1: kd> dv
AcpiObject = 0x899b00f0
Status = 0n0
Result = 0x8993ae3c
Context = 0x8993ae10
freeData = 0x00 ''
1: kd> dx -r1 ((ACPI!_ObjData *)0x8993ae3c)
((ACPI!_ObjData *)0x8993ae3c) : 0x8993ae3c [Type: _ObjData *]
+0x000\] dwfData : 0x0 \[Type: unsigned short
+0x002\] dwDataType : 0x1 \[Type: unsigned short
+0x004\] dwRefCount : 0x0 \[Type: unsigned long
+0x004\] pdataBase : 0x0 \[Type: _ObjData \*
+0x008\] dwDataValue : 0x0 \[Type: unsigned long
+0x008\] uipDataValue : 0x0 \[Type: unsigned long
+0x008\] pnsAlias : 0x0 \[Type: _NSObj \*
+0x008\] pdataAlias : 0x0 \[Type: _ObjData \*
+0x008\] powner : 0x0 \[Type: void \*
+0x00c\] dwDataLen : 0x0 \[Type: unsigned long
+0x010\] pbDataBuff : 0x0 \[Type: unsigned char \*
} else {
//
// Evaluate the request
//
status = AMLIEvalNameSpaceObject(
acpiObject,
&(request->ResultData),
argumentCount,
argumentPtr
);
}
1: kd> g
Breakpoint 46 hit
eax=00000000 ebx=f743b938 ecx=00000000 edx=00002700 esi=8997b800 edi=8997b808
eip=f7407922 esp=f789a1a8 ebp=f789a1f4 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!ACPIGet+0x26a:
f7407922 83c410 add esp,10h
0: kd> dv
Target = 0x899b4ed0
ObjectID = 0x4154535f
Flags = 0x20040802
SimpleArgument = 0x00000000
SimpleArgumentSize = 0
CallBackRoutine = 0x00000000
CallBackContext = 0x00000000
Buffer = 0xf789a22c
BufferSize = 0x00000000
completionRoutine = 0xf7407364
status = 0n537135106
argument = struct _ObjData
argumentPtr = 0x00000000
acpiObject = 0x899b4ed0
deviceExtension = 0x899aea70
async = 0x00 ''
argumentCount = 0
0: kd> dt ACPI_GET_REQUEST 0x8997b808-8
+0x000 Flags : 0x20040802
+0x000 UFlags : __unnamed
+0x004 ObjectID : 0x4154535f
+0x008 ListEntry : _LIST_ENTRY [ 0xf743b940 - 0xf743b940 ]
+0x010 DeviceExtension : 0x899aea70 _DEVICE_EXTENSION
+0x014 AcpiObject : 0x899b4d34 _NSObj
+0x018 CallBackRoutine : (null)
+0x01c CallBackContext : (null)
+0x020 Buffer : 0xf789a22c -> 0x0000000f Void
+0x024 BufferSize : (null)
+0x028 Status : 0n0
+0x02c ResultData : _ObjData
0: kd> dx -id 0,0,899a2278 -r1 (*((ACPI!_ObjData *)0x8997b82c))
(*((ACPI!_ObjData *)0x8997b82c)) [Type: _ObjData]
+0x000\] dwfData : 0x0 \[Type: unsigned short
+0x002\] dwDataType : 0x1 \[Type: unsigned short
+0x004\] dwRefCount : 0x0 \[Type: unsigned long
+0x004\] pdataBase : 0x0 \[Type: _ObjData \*
+0x008\] dwDataValue : 0x0 \[Type: unsigned long
+0x008\] uipDataValue : 0x0 \[Type: unsigned long
+0x008\] pnsAlias : 0x0 \[Type: _NSObj \*
+0x008\] pdataAlias : 0x0 \[Type: _ObjData \*
+0x008\] powner : 0x0 \[Type: void \*
+0x00c\] dwDataLen : 0x0 \[Type: unsigned long
+0x010\] pbDataBuff : 0x0 \[Type: unsigned char \*
0: kd> t
eax=00000000 ebx=f743b938 ecx=8997b82c edx=00002700 esi=8997b800 edi=8997b808
eip=f7407364 esp=f789a1a4 ebp=f789a1f4 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!ACPIGetWorkerForInteger:
f7407364 55 push ebp
0: kd> kc
00 ACPI!ACPIGetWorkerForInteger
01 ACPI!ACPIGet
02 ACPI!ACPIDetectPdoDevices
03 ACPI!ACPIRootIrpQueryBusRelations
04 ACPI!ACPIRootIrpQueryDeviceRelations
05 ACPI!ACPIDispatchIrp
06 nt!IofCallDriver
07 nt!IopSynchronousCall
08 nt!IopQueryDeviceRelations
09 nt!PipEnumerateDevice
0a nt!PipProcessDevNodeTree
0b nt!PipDeviceActionWorker
0c nt!PipRequestDeviceAction
0d nt!IopInitializeBootDrivers
0e nt!IoInitSystem
0f nt!Phase1Initialization
10 nt!PspSystemThreadStartup
11 nt!KiThreadStartup
0: kd> dv
AcpiObject = 0x899b4ed0
Status = 0n0
Result = 0x8997b82c
Context = 0x8997b800
freeData = 0x00 ''
0: kd> dx -r1 ((ACPI!_ObjData *)0x8997b82c)
((ACPI!_ObjData *)0x8997b82c) : 0x8997b82c [Type: _ObjData *]
+0x000\] dwfData : 0x0 \[Type: unsigned short
+0x002\] dwDataType : 0x1 \[Type: unsigned short
+0x004\] dwRefCount : 0x0 \[Type: unsigned long
+0x004\] pdataBase : 0x0 \[Type: _ObjData \*
+0x008\] dwDataValue : 0x0 \[Type: unsigned long
+0x008\] uipDataValue : 0x0 \[Type: unsigned long
+0x008\] pnsAlias : 0x0 \[Type: _NSObj \*
+0x008\] pdataAlias : 0x0 \[Type: _ObjData \*
+0x008\] powner : 0x0 \[Type: void \*
+0x00c\] dwDataLen : 0x0 \[Type: unsigned long
+0x010\] pbDataBuff : 0x0 \[Type: unsigned char \*
#define GET_CONVERT_TO_ADDRESS 0x00000400
status = ACPIGetConvertToDevicePresence(
request->DeviceExtension,
Status,
Result,
request->Flags,
request->Buffer,
request->BufferSize
);
//
// If the device exists
//
if ( NT_SUCCESS(status) &&
!(deviceExtension->Flags & DEV_MASK_NOT_PRESENT) ) {
//
// These are the properties of the device
//
#define DEV_PROP_REBUILD_CHILDREN 0x0000020000000000
#define DEV_PROP_INVALID_RELATIONS 0x0000040000000000
#define DEV_PROP_UNLOADING 0x0000080000000000
#define DEV_PROP_ADDRESS 0x0000100000000000
#define DEV_PROP_HID 0x0000200000000000
#define DEV_PROP_UID 0x0000400000000000
#define DEV_PROP_FIXED_HID 0x0000800000000000
#define DEV_PROP_FIXED_UID 0x0001000000000000
#define DEV_PROP_FAILED_INIT 0x0002000000000000
#define DEV_PROP_SRS_PRESENT 0x0004000000000000
#define DEV_PROP_NO_OBJECT 0x0008000000000000
#define DEV_PROP_EXCLUSIVE 0x0010000000000000
#define DEV_PROP_RAN_INI 0x0020000000000000
#define DEV_PROP_DEVICE_ENABLED 0x0040000000000000
#define DEV_PROP_DEVICE_FAILED 0x0080000000000000
#define DEV_PROP_ACPI_POWER 0x0100000000000000
#define DEV_PROP_DOCK 0x0200000000000000
#define DEV_PROP_BUILT_POWER_TABLE 0x0400000000000000
#define DEV_PROP_HAS_PME 0x0800000000000000
#define DEV_PROP_NO_LID_ACTION 0x1000000000000000
#define DEV_PROP_FIXED_ADDRESS 0x2000000000000000
#define DEV_PROP_CALLBACK 0x4000000000000000
#define DEV_PROP_FIXED_CID 0x8000000000000000
//
// This mask should be used to obtain just unique type bytes
//
#define DEV_MASK_TYPE 0x00000000000001FF
#define DEV_MASK_CAP 0xFFFFFFFFFFFF0000
#define DEV_MASK_UID (DEV_PROP_UID | DEV_PROP_FIXED_UID)
#define DEV_MASK_HID (DEV_PROP_HID | DEV_PROP_FIXED_HID)
#define DEV_MASK_ADDRESS (DEV_PROP_ADDRESS | DEV_PROP_FIXED_ADDRESS)
#define DEV_MASK_NOT_PRESENT (DEV_TYPE_NOT_PRESENT | DEV_PROP_FAILED_INIT)
#define DEV_TYPE_NOT_PRESENT 0x0000000000000002
#define DEV_PROP_FAILED_INIT 0x0002000000000000
0: kd> dt acpi!_device_Extension 899ab678
+0x000 Flags : 0x8051e010`00300108
+0x000 UFlags : __unnamed
+0x008 Signature : 0x5f534750
+0x00c DebugFlags : 0
+0x010 DispatchTable : (null)
+0x014 WorkContext : WORK_QUEUE_CONTEXT
+0x014 Fdo : _FDO_DEVICE_EXTENSION
+0x014 Filter : _FILTER_DEVICE_EXTENSION
+0x014 Pdo : _PDO_DEVICE_EXTENSION
+0x058 WorkQueue : EXTENSION_WORKER
+0x058 Button : BUTTON_EXTENSION
+0x058 Thermal : THERMAL_EXTENSION
+0x058 LinkNode : LINK_NODE_EXTENSION
+0x058 Dock : DOCK_EXTENSION
+0x058 Processor : _PROCESSOR_DEVICE_EXTENSION
+0x088 DeviceState : 0 ( Stopped )
+0x08c PreviousState : 0 ( Stopped )
+0x090 PowerInfo : _ACPI_POWER_INFO
+0x10c DeviceID : 0x899ab648 "GenuineIntel - x86 Family 6 Model 5"
+0x10c Address : 0x899ab648
+0x110 InstanceID : 0x899940b0 " 0"
+0x114 ResourceList : (null)
+0x118 PnpResourceList : (null)
+0x11c OutstandingIrpCount : 0n1
+0x120 ReferenceCount : 0n3
+0x124 HibernatePathCount : 0n0
+0x128 RemoveEvent : (null)
+0x12c AcpiObject : 0x8996aed4 _NSObj
+0x130 DeviceObject : (null)
+0x134 TargetDeviceObject : (null)
+0x138 PhysicalDeviceObject : (null)
+0x13c ParentExtension : 0x89981a18 _DEVICE_EXTENSION
+0x140 ChildDeviceList : _LIST_ENTRY [ 0x899ab7b8 - 0x899ab7b8 ]
+0x148 SiblingDeviceList : _LIST_ENTRY [ 0x8990ec50 - 0x899aebb8 ]
+0x150 EjectDeviceHead : _LIST_ENTRY [ 0x899ab7c8 - 0x899ab7c8 ]
+0x158 EjectDeviceList : _LIST_ENTRY [ 0x899ab7d0 - 0x899ab7d0 ]
0: kd> dt acpi!_DEVICE_EXTENSION 0x899aea70
+0x000 Flags : 0x00902008`2037010a
参考上一个:没有建立设备对象的Flags
#define DEV_MASK_NOT_PRESENT (DEV_TYPE_NOT_PRESENT | DEV_PROP_FAILED_INIT)
#define DEV_TYPE_NOT_PRESENT 0x0000000000000002
#define DEV_PROP_FAILED_INIT 0x0002000000000000
2037010a
0010 0000 0011 0111 0000 0001 0000 1010
0: kd> dt acpi!_DEVICE_EXTENSION 0x899aea70
+0x000 Flags : 0x00902008`2037010a
+0x000 UFlags : __unnamed
+0x008 Signature : 0x5f534750
+0x00c DebugFlags : 0
+0x010 DispatchTable : (null)
+0x014 WorkContext : WORK_QUEUE_CONTEXT
+0x014 Fdo : _FDO_DEVICE_EXTENSION
+0x014 Filter : _FILTER_DEVICE_EXTENSION
+0x014 Pdo : _PDO_DEVICE_EXTENSION
+0x058 WorkQueue : EXTENSION_WORKER
+0x058 Button : BUTTON_EXTENSION
+0x058 Thermal : THERMAL_EXTENSION
+0x058 LinkNode : LINK_NODE_EXTENSION
+0x058 Dock : DOCK_EXTENSION
+0x058 Processor : _PROCESSOR_DEVICE_EXTENSION
+0x088 DeviceState : 0 ( Stopped )
+0x08c PreviousState : 0 ( Stopped )
+0x090 PowerInfo : _ACPI_POWER_INFO
+0x10c DeviceID : 0x89905060 "ACPI\PNP0C0E"
+0x10c Address : 0x89905060
+0x110 InstanceID : (null)
+0x114 ResourceList : (null)
+0x118 PnpResourceList : (null)
+0x11c OutstandingIrpCount : 0n1
+0x120 ReferenceCount : 0n3
+0x124 HibernatePathCount : 0n0
+0x128 RemoveEvent : (null)
+0x12c AcpiObject : 0x899b4d34 _NSObj
+0x130 DeviceObject : (null)
+0x134 TargetDeviceObject : (null)
+0x138 PhysicalDeviceObject : (null)
+0x13c ParentExtension : 0x89981a18 _DEVICE_EXTENSION
+0x140 ChildDeviceList : _LIST_ENTRY [ 0x899aebb0 - 0x899aebb0 ]
+0x148 SiblingDeviceList : _LIST_ENTRY [ 0x899ab7c0 - 0x899aedd0 ]
+0x150 EjectDeviceHead : _LIST_ENTRY [ 0x899aebc0 - 0x899aebc0 ]
+0x158 EjectDeviceList : _LIST_ENTRY [ 0x899aebc8 - 0x899aebc8 ]
参考上一个:没有建立设备对象的Flags
0: kd> p
Breakpoint 43 hit
eax=00000000 ebx=f743b620 ecx=00000000 edx=04be0000 esi=899ab678 edi=899ab798
eip=f7440588 esp=f789a214 ebp=f789a250 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!ACPIDetectPdoMatch:
f7440588 55 push ebp
0: kd> kc
00 ACPI!ACPIDetectPdoMatch
01 ACPI!ACPIDetectPdoDevices
02 ACPI!ACPIRootIrpQueryBusRelations
03 ACPI!ACPIRootIrpQueryDeviceRelations
04 ACPI!ACPIDispatchIrp
05 nt!IofCallDriver
06 nt!IopSynchronousCall
07 nt!IopQueryDeviceRelations
08 nt!PipEnumerateDevice
09 nt!PipProcessDevNodeTree
0a nt!PipDeviceActionWorker
0b nt!PipRequestDeviceAction
0c nt!IopInitializeBootDrivers
0d nt!IoInitSystem
0e nt!Phase1Initialization
0f nt!PspSystemThreadStartup
10 nt!KiThreadStartup
0: kd> dv
DeviceExtension = 0x899ab678
DeviceRelations = 0x00000000
devicePdoObject = 0x00000008
0: kd> gu
eax=00000000 ebx=f743b620 ecx=00002000 edx=899ab678 esi=899ab678 edi=899ab798
eip=f7400327 esp=f789a220 ebp=f789a250 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!ACPIDetectPdoDevices+0x149:
f7400327 84c0 test al,al
//
// Is there a match between the device relations and the current
// device extension?
//
matchFound = ACPIDetectPdoMatch(
deviceExtension,
currentRelations
);
if (matchFound == FALSE) { 没有匹配上,说明原来的没有这个设备。
0: kd> p
Breakpoint 4 hit
eax=f789a204 ebx=00000000 ecx=89981a18 edx=00000000 esi=899ab678 edi=899ab798
eip=80c63538 esp=f789a1d8 ebp=f789a208 iopl=0 nv up ei pl zr na pe nc
cs=0008 ss=0010 ds=0023 es=0023 fs=0030 gs=0000 efl=00000246
nt!IoCreateDevice:
80c63538 55 push ebp
0: kd> kc
00 nt!IoCreateDevice
01 ACPI!ACPIBuildPdo
02 ACPI!ACPIDetectPdoDevices
03 ACPI!ACPIRootIrpQueryBusRelations
04 ACPI!ACPIRootIrpQueryDeviceRelations
05 ACPI!ACPIDispatchIrp
06 nt!IofCallDriver
07 nt!IopSynchronousCall
08 nt!IopQueryDeviceRelations
09 nt!PipEnumerateDevice
0a nt!PipProcessDevNodeTree
0b nt!PipDeviceActionWorker
0c nt!PipRequestDeviceAction
0d nt!IopInitializeBootDrivers
0e nt!IoInitSystem
0f nt!Phase1Initialization
10 nt!PspSystemThreadStartup
11 nt!KiThreadStartup
0: kd> dv
DriverObject = 0x89981f38 Driver "\Driver\ACPI"
DeviceExtensionSize = 0
DeviceName = 0x00000000
0: kd> gu
eax=00000000 ebx=00000000 ecx=899c1cc0 edx=899c1c9c esi=899ab678 edi=899ab798
eip=f73faa60 esp=f789a1f8 ebp=f789a208 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!ACPIBuildPdo+0x26:
f73faa60 3bc3 cmp eax,ebx
0: kd> !drvobj 0x89981f38
Driver object (89981f38) is for:
\Driver\ACPI
Driver Extension List: (id , addr)
Device Object list:
899c1cc0 899c5f18 899ae8b8 89981b98
0: kd> g
Breakpoint 44 hit
eax=00000000 ebx=f743b620 ecx=f789a22c edx=00902008 esi=8990eb08 edi=8990ec28
eip=f74076b8 esp=f789a1f8 ebp=f789a250 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!ACPIGet:
f74076b8 55 push ebp
0: kd> bd 41
0: kd> g
Breakpoint 44 hit
eax=00000000 ebx=00000000 ecx=89643a30 edx=89643a18 esi=89643a18 edi=00000103
eip=f74076b8 esp=f7899f04 ebp=f7899f7c 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!ACPIGet:
f74076b8 55 push ebp
0: kd> g
Breakpoint 44 hit
eax=00000000 ebx=899affac ecx=89643a34 edx=00000000 esi=89643a18 edi=00000103
eip=f74076b8 esp=f791ac38 ebp=f791acb0 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!ACPIGet:
f74076b8 55 push ebp
1: kd> g
Breakpoint 44 hit
eax=00000000 ebx=00000000 ecx=89643a30 edx=89643a18 esi=89643a18 edi=00000103
eip=f74076b8 esp=f7899eec ebp=f7899f64 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!ACPIGet:
f74076b8 55 push ebp
0: kd> g
Breakpoint 44 hit
eax=00000000 ebx=899affac ecx=89643a34 edx=00000000 esi=89643a18 edi=00000103
eip=f74076b8 esp=f791ac38 ebp=f791acb0 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!ACPIGet:
f74076b8 55 push ebp
//
// If the device exists
//
if ( NT_SUCCESS(status) &&
!(deviceExtension->Flags & DEV_MASK_NOT_PRESENT) ) { //下断点的地方:
1: kd> g
Breakpoint 47 hit
eax=00000000 ebx=f743b620 ecx=04c00001 edx=04bf0000 esi=8990eb08 edi=8990ec28
eip=f7400300 esp=f789a220 ebp=f789a250 iopl=0 nv up ei pl zr ac pe cy
cs=0008 ss=0010 ds=0023 es=0023 fs=0030 gs=0000 efl=00000257
ACPI!ACPIDetectPdoDevices+0x122:
f7400300 85c0 test eax,eax
1: kd> g
Breakpoint 47 hit
eax=00000000 ebx=f743b620 ecx=04c00001 edx=04bf0000 esi=8990eb08 edi=8990ec28
eip=f7400300 esp=f789a220 ebp=f789a250 iopl=0 nv up ei pl zr ac pe cy
cs=0008 ss=0010 ds=0023 es=0023 fs=0030 gs=0000 efl=00000257
ACPI!ACPIDetectPdoDevices+0x122:
f7400300 85c0 test eax,eax
0: kd> dt acpi!_device_Extension 8990eb08
+0x000 Flags : 0x00902008`2037010a 不存在这个设备!!
+0x000 UFlags : __unnamed
+0x008 Signature : 0x5f534750
+0x00c DebugFlags : 0
0: kd> g
Breakpoint 44 hit
eax=00000000 ebx=f743b620 ecx=f789a22c edx=00906000 esi=8990e8f0 edi=8990ea10
eip=f74076b8 esp=f789a1f8 ebp=f789a250 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!ACPIGet:
f74076b8 55 push ebp
0: kd> dv
Target = 0x8990e8f0
ObjectID = 0x4154535f
Flags = 0x20040802
SimpleArgument = 0x00000000
SimpleArgumentSize = 0
CallBackRoutine = 0x00000000
CallBackContext = 0x00000000
Buffer = 0xf789a22c
BufferSize = 0x00000000
completionRoutine = 0xf74076b9
status = 0n537135106
argument = struct _ObjData
argumentPtr = 0x8990e8f0
acpiObject = 0x8990e8f0
deviceExtension = 0xf789a250
async = 0x00 ''
argumentCount = 0x8990ea10
0: kd> dt acpi!_device_Extension 0x8990e8f0
+0x000 Flags : 0x00906000`6030010a
+0x000 UFlags : __unnamed
+0x008 Signature : 0x5f534750
+0x00c DebugFlags : 0
+0x010 DispatchTable : (null)
+0x014 WorkContext : WORK_QUEUE_CONTEXT
+0x014 Fdo : _FDO_DEVICE_EXTENSION
+0x014 Filter : _FILTER_DEVICE_EXTENSION
+0x014 Pdo : _PDO_DEVICE_EXTENSION
+0x058 WorkQueue : EXTENSION_WORKER
+0x058 Button : BUTTON_EXTENSION
+0x058 Thermal : THERMAL_EXTENSION
+0x058 LinkNode : LINK_NODE_EXTENSION
+0x058 Dock : DOCK_EXTENSION
+0x058 Processor : _PROCESSOR_DEVICE_EXTENSION
+0x088 DeviceState : 0 ( Stopped )
+0x08c PreviousState : 0 ( Stopped )
+0x090 PowerInfo : _ACPI_POWER_INFO
+0x10c DeviceID : 0x8986b8a0 "ACPI\VMW0002"
+0x10c Address : 0x8986b8a0
+0x110 InstanceID : 0x898baa60 "0"
+0x114 ResourceList : (null)
+0x118 PnpResourceList : (null)
+0x11c OutstandingIrpCount : 0n1
+0x120 ReferenceCount : 0n68
+0x124 HibernatePathCount : 0n0
+0x128 RemoveEvent : (null)
0: kd> g
Breakpoint 47 hit
eax=00000000 ebx=f743b620 ecx=04c10001 edx=04c00000 esi=8990e8f0 edi=8990ea10
eip=f7400300 esp=f789a220 ebp=f789a250 iopl=0 nv up ei pl zr na po cy
cs=0008 ss=0010 ds=0023 es=0023 fs=0030 gs=0000 efl=00000243
ACPI!ACPIDetectPdoDevices+0x122:
f7400300 85c0 test eax,eax
0: kd> dt acpi!_device_Extension 0x8990e8f0
+0x000 Flags : 0x00906000`6030010a
0: kd> g
Breakpoint 44 hit
eax=00000000 ebx=f743b620 ecx=f789a22c edx=8051e010 esi=89906008 edi=89906128
eip=f74076b8 esp=f789a1f8 ebp=f789a250 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!ACPIGet:
f74076b8 55 push ebp
0: kd> dv
Target = 0x89906008
ObjectID = 0x4154535f
Flags = 0x20040802
SimpleArgument = 0x00000000
SimpleArgumentSize = 0
CallBackRoutine = 0x00000000
CallBackContext = 0x00000000
Buffer = 0xf789a22c
BufferSize = 0x00000000
completionRoutine = 0xf74076b9
status = 0n537135106
argument = struct _ObjData
argumentPtr = 0x89906008
acpiObject = 0x89906008
deviceExtension = 0xf789a250
async = 0x00 ''
argumentCount = 0x89906128
0: kd> dt acpi!_device_Extension 0x89906008
+0x000 Flags : 0x8051e010`00300108
+0x000 UFlags : __unnamed
+0x008 Signature : 0x5f534750
+0x00c DebugFlags : 0
+0x010 DispatchTable : (null)
+0x014 WorkContext : WORK_QUEUE_CONTEXT
+0x014 Fdo : _FDO_DEVICE_EXTENSION
+0x014 Filter : _FILTER_DEVICE_EXTENSION
+0x014 Pdo : _PDO_DEVICE_EXTENSION
+0x058 WorkQueue : EXTENSION_WORKER
+0x058 Button : BUTTON_EXTENSION
+0x058 Thermal : THERMAL_EXTENSION
+0x058 LinkNode : LINK_NODE_EXTENSION
+0x058 Dock : DOCK_EXTENSION
+0x058 Processor : _PROCESSOR_DEVICE_EXTENSION
+0x088 DeviceState : 0 ( Stopped )
+0x08c PreviousState : 0 ( Stopped )
+0x090 PowerInfo : _ACPI_POWER_INFO
+0x10c DeviceID : 0x89907238 "GenuineIntel - x86 Family 6 Model 5"
+0x10c Address : 0x89907238
+0x110 InstanceID : 0x899a21e8 " 1"
+0x114 ResourceList : (null)
+0x118 PnpResourceList : (null)
+0x11c OutstandingIrpCount : 0n1
+0x120 ReferenceCount : 0n3
0: kd> g
Breakpoint 47 hit
eax=00000000 ebx=f743b620 ecx=04c20001 edx=04c10000 esi=89906008 edi=89906128
eip=f7400300 esp=f789a220 ebp=f789a250 iopl=0 nv up ei pl zr na po cy
cs=0008 ss=0010 ds=0023 es=0023 fs=0030 gs=0000 efl=00000243
ACPI!ACPIDetectPdoDevices+0x122:
f7400300 85c0 test eax,eax
0: kd> dt acpi!_device_Extension 0x89906008
+0x000 Flags : 0x8051e010`00300108
+0x000 UFlags : __unnamed
+0x008 Signature : 0x5f534750
0: kd> g
Breakpoint 4 hit
eax=f789a204 ebx=00000000 ecx=89981a18 edx=00000000 esi=89906008 edi=89906128
eip=80c63538 esp=f789a1d8 ebp=f789a208 iopl=0 nv up ei pl zr na pe nc
cs=0008 ss=0010 ds=0023 es=0023 fs=0030 gs=0000 efl=00000246
nt!IoCreateDevice:
80c63538 55 push ebp
0: kd> gu
eax=00000000 ebx=00000000 ecx=899875e0 edx=899875bc esi=89906008 edi=89906128
eip=f73faa60 esp=f789a1f8 ebp=f789a208 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!ACPIBuildPdo+0x26:
f73faa60 3bc3 cmp eax,ebx
0: kd> dv
DriverObject = 0x89981f38 Driver "\Driver\ACPI"
DeviceExtension = 0x89906008
ParentPdoObject = 0x899c1de0 Device for "\Driver\ACPI_HAL"
CreateAsFilter = 0x00 ''
filterDeviceObject = 0x00000000
newDeviceObject = 0x899875e0 Device for "\Driver\ACPI"
oldIrql = 0x89 ''
i = 0
0: kd> !drvobj 0x89981f38
Driver object (89981f38) is for:
\Driver\ACPI
Driver Extension List: (id , addr)
Device Object list:
899875e0 899c1cc0 899c5f18 899ae8b8
89981b98