news 2026/4/23 8:21:42

ACPI!ACPIDispatchAddDevice函数第一次调用时还没有一个/Driver/ACPI对应的设备

作者头像

张小明

前端开发工程师

1.2k 24
文章封面图
ACPI!ACPIDispatchAddDevice函数第一次调用时还没有一个/Driver/ACPI对应的设备

ACPI!ACPIDispatchAddDevice函数第一次调用时还没有一个/Driver/ACPI对应的设备acpi!RootDeviceExtension

Breakpoint 31 hit
eax=f7403bd2 ebx=00000000 ecx=89db5cb8 edx=89db5530 esi=89db5530 edi=89db5cb8
eip=f7403bd2 esp=f789a488 ebp=f789a49c 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!ACPIDispatchAddDevice:
f7403bd2 55 push ebp
1: kd> kc
#
00 ACPI!ACPIDispatchAddDevice
01 nt!PpvUtilCallAddDevice
02 nt!PipCallDriverAddDevice
03 nt!PiProcessAddBootDevices
04 nt!PipDeviceActionWorker
05 nt!PipRequestDeviceAction
06 nt!PipAddDevicesToBootDriverWorker
07 nt!PipApplyFunctionToServiceInstances
08 nt!PipAddDevicesToBootDriver
09 nt!IopInitializeBootDrivers
0a nt!IoInitSystem
0b nt!Phase1Initialization
0c nt!PspSystemThreadStartup
0d nt!KiThreadStartup
1: kd> kv
# ChildEBP RetAddr Args to Child
00 f789a484 80a2f6c9 89db5530 89db5cb8 e12863e8 ACPI!ACPIDispatchAddDevice (FPO: [Non-Fpo]) (CONV: stdcall) [d:\srv03rtm\base\busdrv\acpi\driver\nt\dispatch.c @ 75]
01 f789a49c 80c91f5c f7403bd2 00000004 00000000 nt!PpvUtilCallAddDevice+0x17 (FPO: [Non-Fpo]) (CONV: fastcall) [d:\srv03rtm\base\ntos\io\pnpmgr\ppvutil.c @ 74]
02 f789a560 80c9292c 00000000 02000000 89db5cb8 nt!PipCallDriverAddDevice+0x64a (FPO: [Non-Fpo]) (CONV: stdcall) [d:\srv03rtm\base\ntos\io\pnpmgr\pnpenum.c @ 2579]
03 f789a580 80a2de4e 89df9368 80b1f6f8 00000000 nt!PiProcessAddBootDevices+0x98 (FPO: [Non-Fpo]) (CONV: stdcall) [d:\srv03rtm\base\ntos\io\pnpmgr\pnpenum.c @ 5849]
04 f789a5a8 80a2e161 00000000 00000000 00000000 nt!PipDeviceActionWorker+0x132 (FPO: [Non-Fpo]) (CONV: stdcall) [d:\srv03rtm\base\ntos\io\pnpmgr\pnpenum.c @ 739]
05 f789a5c0 80e671d7 89db5cb8 00000000 00000000 nt!PipRequestDeviceAction+0x139 (FPO: [Non-Fpo]) (CONV: stdcall) [d:\srv03rtm\base\ntos\io\pnpmgr\pnpenum.c @ 598]
06 f789a5e4 80c8af7b 800001c8 f789a604 89db5530 nt!PipAddDevicesToBootDriverWorker+0x1f (FPO: [Non-Fpo]) (CONV: stdcall) [d:\srv03rtm\base\ntos\io\pnpmgr\pnpinit.c @ 1758]
07 f789a620 80e68789 e12a9b40 00000000 000f003f nt!PipApplyFunctionToServiceInstances+0x18f (FPO: [Non-Fpo]) (CONV: stdcall) [d:\srv03rtm\base\ntos\io\pnpmgr\pnpsubs.c @ 2378]
08 f789a644 80e6934a 89db5530 00000000 80077000 nt!PipAddDevicesToBootDriver+0x23 (FPO: [Non-Fpo]) (CONV: stdcall) [d:\srv03rtm\base\ntos\io\pnpmgr\pnpinit.c @ 1700]
09 f789a694 80e655c7 80077000 f789a7dc 00034000 nt!IopInitializeBootDrivers+0x384 (FPO: [Non-Fpo]) (CONV: stdcall) [d:\srv03rtm\base\ntos\io\pnpmgr\pnpinit.c @ 1440]
0a f789a838 80e632fd 80077000 00000000 89dd4020 nt!IoInitSystem+0x70b (FPO: [Non-Fpo]) (CONV: stdcall) [d:\srv03rtm\base\ntos\io\iomgr\ioinit.c @ 665]
0b f789adac 80d391f0 80077000 00000000 00000000 nt!Phase1Initialization+0x9b3 (FPO: [Non-Fpo]) (CONV: stdcall) [d:\srv03rtm\base\ntos\init\init.c @ 2221]
0c f789addc 80b00d52 80e6294a 80077000 00000000 nt!PspSystemThreadStartup+0x2e (FPO: [Non-Fpo]) (CONV: stdcall) [d:\srv03rtm\base\ntos\ps\create.c @ 2213]
0d 00000000 00000000 00000000 00000000 00000000 nt!KiThreadStartup+0x16 [d:\srv03rtm\base\ntos\ke\i386\threadbg.asm @ 81]
1: kd> !object \driver
Object: e1284930 Type: (89dd5e70) Directory
ObjectHeader: e1284918 (old version)
HandleCount: 0 PointerCount: 5
Directory Object: e1002aa0 Name: Driver

Hash Address Type Name
---- ------- ---- ----
18 89df5180 Driver WMIxWDM
89df5280 Driver ACPI_HAL
32 89db5530 Driver ACPI
33 89db9d28 Driver PnpManager
1: kd> !object 89db5530
Object: 89db5530 Type: (89df9ac0) Driver
ObjectHeader: 89db5518 (old version)
HandleCount: 0 PointerCount: 4
Directory Object: e1284930 Name: ACPI
1: kd> !drvobj 89db5530
Driver object (89db5530) is for:
\Driver\ACPI
Driver Extension List: (id , addr)

Device Object list:


0x5F534750


_SGP

1: kd> dv
DriverObject = 0x89db5530 Driver "\Driver\ACPI"
PhysicalDeviceObject = 0x89db5cb8 Device for "\Driver\ACPI_HAL"

1: kd> dx -id 0,0,ffffffff89dd5240 -r1 -n (*((ACPI!_DEVICE_OBJECT *)0x89db5cb8))
(*((ACPI!_DEVICE_OBJECT *)0x89db5cb8)) : Device for "\Driver\ACPI_HAL" [Type: _DEVICE_OBJECT]
[+0x000] Type : 3 [Type: short]
[+0x002] Size : 0xd0 [Type: unsigned short]
[+0x004] ReferenceCount : 0 [Type: long]
[+0x008] DriverObject : 0x89df5280 : Driver "\Driver\ACPI_HAL" [Type: _DRIVER_OBJECT *]
[+0x00c] NextDevice : 0x89db5dd8 : Device for "\Driver\ACPI_HAL" [Type: _DEVICE_OBJECT *]
[+0x010] AttachedDevice : 0x0 [Type: _DEVICE_OBJECT *]
[+0x014] CurrentIrp : 0x0 [Type: _IRP *]
[+0x018] Timer : 0x0 [Type: _IO_TIMER *]
[+0x01c] Flags : 0x1040 [Type: unsigned long]
[+0x020] Characteristics : 0x80 [Type: unsigned long]
[+0x024] Vpb : 0x0 [Type: _VPB *]
[+0x028] DeviceExtension : 0x89db5d70 [Type: void *]
[+0x02c] DeviceType : 0x2a [Type: unsigned long]
[+0x030] StackSize : 1 [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 : 0xe12a48e8 [Type: void *]
[+0x09c] DeviceLock [Type: _KEVENT]
[+0x0ac] SectorSize : 0x0 [Type: unsigned short]
[+0x0ae] Spare1 : 0x0 [Type: unsigned short]
[+0x0b0] DeviceObjectExtension : 0x89db5d88 [Type: _DEVOBJ_EXTENSION *]
[+0x0b4] Reserved : 0x0 [Type: void *]

1: kd> dx -id 0,0,ffffffff89dd5240 -r1 -n (*((ACPI!_DEVICE_OBJECT *)0x89db5dd8))
(*((ACPI!_DEVICE_OBJECT *)0x89db5dd8)) : Device for "\Driver\ACPI_HAL" [Type: _DEVICE_OBJECT]
[+0x000] Type : 3 [Type: short]
[+0x002] Size : 0xcc [Type: unsigned short]
[+0x004] ReferenceCount : 0 [Type: long]
[+0x008] DriverObject : 0x89df5280 : Driver "\Driver\ACPI_HAL" [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 : 0x89db5e90 [Type: void *]
[+0x02c] DeviceType : 0x2a [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 : 0x89db5ea8 [Type: _DEVOBJ_EXTENSION *]
[+0x0b4] Reserved : 0x0 [Type: void *]


bp ACPI!ACPIDispatchIrp


参考:

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

参考:


//
// Generate a Device ID (fake)
//
deviceID = ExAllocatePoolWithTag( NonPagedPool, 14, ACPI_STRING_POOLTAG);
if (deviceID == NULL) {

ACPIPrint( (
ACPI_PRINT_FAILURE,
"ACPIDispatchAddDevice: Could not allocate %#08lx bytes\n",
14
) );
status = STATUS_INSUFFICIENT_RESOURCES;
goto ACPIDispatchAddDeviceExit;

}
strcpy( deviceID, "ACPI\\PNP0C08" );


1: kd> dv deviceID
deviceID = 0x89db9460 "ACPI\PNPr"


//
// Generate an Instance ID (Fake)
//
instanceID = ExAllocatePoolWithTag( NonPagedPool, 11, ACPI_STRING_POOLTAG);
if (instanceID == NULL) {

ACPIPrint( (
ACPI_PRINT_FAILURE,
"ACPIDispatchAddDevice: Could not allocate %#08lx bytes\n",
11
) );
status = STATUS_INSUFFICIENT_RESOURCES;
goto ACPIDispatchAddDeviceExit;

}
strcpy( instanceID, "0x5F534750" );

1: kd> dv instanceID
instanceID = 0x89df9488 "0x5F534750"

1: kd> t
Breakpoint 12 hit
eax=f789a480 ebx=00000000 ecx=f77422b0 edx=00000002 esi=00000000 edi=89df9493
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> dv
DriverObject = 0x89db5530 Driver "\Driver\ACPI"
DeviceExtensionSize = 0
DeviceName = 0x00000000
DeviceType = 0x32

1: kd> gu
eax=00000000 ebx=00000000 ecx=89db4020 edx=00000000 esi=00000000 edi=89df9493
eip=f7403c9c esp=f789a468 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
ACPI!ACPIDispatchAddDevice+0xca:
f7403c9c 3bc6 cmp eax,esi
1: kd> !drvobj 0x89db5530
Driver object (89db5530) is for:
\Driver\ACPI
Driver Extension List: (id , addr)

Device Object list:
89db4020


1: kd> dv newDeviceObject
newDeviceObject = 0x89db4020 Device for "\Driver\ACPI"

//
// Attempt to attach to the PDO
//
tempDeviceObject = IoAttachDeviceToDeviceStack(
newDeviceObject,
PhysicalDeviceObject
);


1: kd> dt _device_object 89db4020
hal!_DEVICE_OBJECT
+0x000 Type : 0n3
+0x002 Size : 0xb8
+0x004 ReferenceCount : 0n0
+0x008 DriverObject : 0x89db5530 _DRIVER_OBJECT
+0x00c NextDevice : (null)
+0x010 AttachedDevice : (null)
+0x014 CurrentIrp : (null)
+0x018 Timer : (null)
+0x01c Flags : 0x80
+0x020 Characteristics : 0
+0x024 Vpb : (null)
+0x028 DeviceExtension : (null)
+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 : 0x89db40d8 _DEVOBJ_EXTENSION
+0x0b4 Reserved : (null)

1: kd> dt nt!_DEVOBJ_EXTENSION 0x89db40d8
+0x000 Type : 0n13
+0x002 Size : 0
+0x004 DeviceObject : 0x89db4020 _DEVICE_OBJECT
+0x008 PowerFlags : 0
+0x00c Dope : (null)
+0x010 ExtensionFlags : 0x10
+0x014 DeviceNode : (null)
+0x018 AttachedTo : 0x89db5cb8 _DEVICE_OBJECT 这里:
+0x01c StartIoCount : 0n0
+0x020 StartIoKey : 0n0
+0x024 StartIoFlags : 0
+0x028 Vpb : (null)
1: kd> dx -id 0,0,ffffffff89dd5240 -r1 ((ntkrnlmp!_DEVICE_OBJECT *)0x89db5cb8)
((ntkrnlmp!_DEVICE_OBJECT *)0x89db5cb8) : 0x89db5cb8 : Device for "\Driver\ACPI_HAL" [Type: _DEVICE_OBJECT *]
[<Raw View>] [Type: _DEVICE_OBJECT]
Flags : 0x1040
UpperDevices : Immediately above is Device for "\Driver\ACPI" [at 0x89db4020]
LowerDevices : None
Driver : 0x89df5280 : Driver "\Driver\ACPI_HAL" [Type: _DRIVER_OBJECT *]
1: kd> dx -id 0,0,ffffffff89dd5240 -r1 -n (*((ntkrnlmp!_DEVICE_OBJECT *)0x89db5cb8))
(*((ntkrnlmp!_DEVICE_OBJECT *)0x89db5cb8)) : Device for "\Driver\ACPI_HAL" [Type: _DEVICE_OBJECT]
[+0x000] Type : 3 [Type: short]
[+0x002] Size : 0xd0 [Type: unsigned short]
[+0x004] ReferenceCount : 0 [Type: long]
[+0x008] DriverObject : 0x89df5280 : Driver "\Driver\ACPI_HAL" [Type: _DRIVER_OBJECT *]
[+0x00c] NextDevice : 0x89db5dd8 : Device for "\Driver\ACPI_HAL" [Type: _DEVICE_OBJECT *]
[+0x010] AttachedDevice : 0x89db4020 : Device for "\Driver\ACPI" [Type: _DEVICE_OBJECT *] 这里:
[+0x014] CurrentIrp : 0x0 [Type: _IRP *]
[+0x018] Timer : 0x0 [Type: _IO_TIMER *]
[+0x01c] Flags : 0x1040 [Type: unsigned long]
[+0x020] Characteristics : 0x80 [Type: unsigned long]
[+0x024] Vpb : 0x0 [Type: _VPB *]
[+0x028] DeviceExtension : 0x89db5d70 [Type: void *]
[+0x02c] DeviceType : 0x2a [Type: unsigned long]
[+0x030] StackSize : 1 [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 : 0xe12a48e8 [Type: void *]
[+0x09c] DeviceLock [Type: _KEVENT]
[+0x0ac] SectorSize : 0x0 [Type: unsigned short]
[+0x0ae] Spare1 : 0x1 [Type: unsigned short]
[+0x0b0] DeviceObjectExtension : 0x89db5d88 [Type: _DEVOBJ_EXTENSION *]
[+0x0b4] Reserved : 0x0 [Type: void *]

//
// Initialize the link fields
//
newDeviceObject->DeviceExtension = deviceExtension;
deviceExtension->DeviceObject = newDeviceObject;
deviceExtension->PhysicalDeviceObject = PhysicalDeviceObject;
deviceExtension->TargetDeviceObject = tempDeviceObject;


1: kd> dt acpi!_Device_Extension 0x89db4ea0
+0x000 Flags : 0
+0x000 UFlags : __unnamed
+0x008 Signature : 0
+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 : (null)
+0x10c Address : 0
+0x110 InstanceID : (null)
+0x114 ResourceList : (null)
+0x118 PnpResourceList : (null)
+0x11c OutstandingIrpCount : 0n1
+0x120 ReferenceCount : 0n1
+0x124 HibernatePathCount : 0n0
+0x128 RemoveEvent : (null)
+0x12c AcpiObject : (null)
+0x130 DeviceObject : 0x89db4020 _DEVICE_OBJECT
+0x134 TargetDeviceObject : (null)
+0x138 PhysicalDeviceObject : 0x89db5cb8 _DEVICE_OBJECT
+0x13c ParentExtension : (null)
+0x140 ChildDeviceList : _LIST_ENTRY [ 0x0 - 0x0 ]
+0x148 SiblingDeviceList : _LIST_ENTRY [ 0x0 - 0x0 ]
+0x150 EjectDeviceHead : _LIST_ENTRY [ 0x0 - 0x0 ]
+0x158 EjectDeviceList : _LIST_ENTRY [ 0x0 - 0x0 ]


//
// Initialize the data fields
//
deviceExtension->Signature = ACPI_SIGNATURE;
deviceExtension->DispatchTable = &AcpiFdoIrpDispatch;
deviceExtension->DeviceID = deviceID;
deviceExtension->InstanceID = instanceID;


1: kd> dt acpi!_Device_Extension 0x89db4ea0
+0x000 Flags : 0
+0x000 UFlags : __unnamed
+0x008 Signature : 0
+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 : 0x89db9460 "ACPI\PNP0C08"
+0x10c Address : 0x89db9460
+0x110 InstanceID : 0x89df9488 "0x5F534750"
+0x114 ResourceList : (null)
+0x118 PnpResourceList : (null)
+0x11c OutstandingIrpCount : 0n1
+0x120 ReferenceCount : 0n1
+0x124 HibernatePathCount : 0n0
+0x128 RemoveEvent : (null)
+0x12c AcpiObject : (null)
+0x130 DeviceObject : 0x89db4020 _DEVICE_OBJECT
+0x134 TargetDeviceObject : 0x89db5cb8 _DEVICE_OBJECT
+0x138 PhysicalDeviceObject : 0x89db5cb8 _DEVICE_OBJECT
+0x13c ParentExtension : (null)
+0x140 ChildDeviceList : _LIST_ENTRY [ 0x0 - 0x0 ]
+0x148 SiblingDeviceList : _LIST_ENTRY [ 0x0 - 0x0 ]
+0x150 EjectDeviceHead : _LIST_ENTRY [ 0x0 - 0x0 ]
+0x158 EjectDeviceList : _LIST_ENTRY [ 0x0 - 0x0 ]
1: kd> db 0x89db9460
89db9460 41 43 50 49 5c 50 4e 50-30 43 30 38 00 00 53 00 ACPI\PNP0C08..S.
89db9470 03 00 28 02 49 6f 20 20-b8 95 db 89 03 00 00 00 ..(.Io ........
89db9480 30 00 00 00 04 01 00 00-1a 00 00 00 53 00 43 00 0...........S.C.
89db9490 53 00 49 00 20 00 4d 00-69 00 6e 00 69 00 70 00 S.I. .M.i.n.i.p.
89db94a0 6f 00 72 00 74 00 20 00-40 00 00 00 00 01 00 00 o.r.t. .@.......
89db94b0 01 01 00 00 19 00 00 00-01 00 00 00 02 00 00 00 ................
89db94c0 03 00 00 00 04 00 00 00-05 00 00 00 06 00 00 00 ................
89db94d0 07 00 00 00 08 00 00 00-09 00 00 00 0a 00 00 00 ................


RootDeviceExtension = deviceExtension;


1: kd> x acpi!RootDeviceExtension
f743b710 ACPI!RootDeviceExtension = 0x89db4ea0

1: kd> dx -id 0,0,ffffffff89dd5240 -r1 ((ACPI!_DEVICE_EXTENSION *)0x89db4ea0)
((ACPI!_DEVICE_EXTENSION *)0x89db4ea0) : 0x89db4ea0 [Type: _DEVICE_EXTENSION *]
[+0x000] Flags : 0x1e00000200010 [Type: unsigned __int64]
[+0x000] UFlags [Type: __unnamed]
[+0x008] Signature : 0x5f534750 [Type: unsigned long]
[+0x00c] DebugFlags : 0x0 [Type: unsigned long]
[+0x010] DispatchTable : 0xf743826c [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 : 0x89db9460 : 0x41 [Type: unsigned char *]
[+0x10c] Address : 0x89db9460 [Type: unsigned long]
[+0x110] InstanceID : 0x89df9488 : 0x30 [Type: unsigned char *]
[+0x114] ResourceList : 0x0 [Type: _CM_RESOURCE_LIST *]
[+0x118] PnpResourceList : 0x0 [Type: _ObjData *]
[+0x11c] OutstandingIrpCount : 1 [Type: long]
[+0x120] ReferenceCount : 1 [Type: long]
[+0x124] HibernatePathCount : 0 [Type: long]
[+0x128] RemoveEvent : 0x0 [Type: _KEVENT *]
[+0x12c] AcpiObject : 0x0 [Type: _NSObj *]
[+0x130] DeviceObject : 0x89db4020 : Device for "\Driver\ACPI" [Type: _DEVICE_OBJECT *]
[+0x134] TargetDeviceObject : 0x89db5cb8 : Device for "\Driver\ACPI_HAL" [Type: _DEVICE_OBJECT *]
[+0x138] PhysicalDeviceObject : 0x89db5cb8 : Device for "\Driver\ACPI_HAL" [Type: _DEVICE_OBJECT *]
[+0x13c] ParentExtension : 0x0 [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> p
Breakpoint 33 hit
eax=0000001b ebx=00000000 ecx=89db5530 edx=89df3460 esi=89df3460 edi=89db4020
eip=f7403f70 esp=f789a400 ebp=f789a418 iopl=0 nv up ei ng nz na po nc
cs=0008 ss=0010 ds=0023 es=0023 fs=0030 gs=0000 efl=00000282
ACPI!ACPIDispatchIrp:
f7403f70 55 push ebp
1: kd> kc
#
00 ACPI!ACPIDispatchIrp
01 nt!IofCallDriver
02 ACPI!ACPIGetRegisterInterfaces
03 ACPI!ACPIDispatchAddDevice
04 nt!PpvUtilCallAddDevice
05 nt!PipCallDriverAddDevice
06 nt!PiProcessAddBootDevices
07 nt!PipDeviceActionWorker
08 nt!PipRequestDeviceAction
09 nt!PipAddDevicesToBootDriverWorker
0a nt!PipApplyFunctionToServiceInstances
0b nt!PipAddDevicesToBootDriver
0c nt!IopInitializeBootDrivers
0d nt!IoInitSystem
0e nt!Phase1Initialization
0f nt!PspSystemThreadStartup
10 nt!KiThreadStartup


1: kd> dv dispatchTable
dispatchTable = 0xf743826c
1: kd> dx -id 0,0,ffffffff89dd5240 -r1 ((ACPI!IRP_DISPATCH_TABLE *)0xf743826c)
((ACPI!IRP_DISPATCH_TABLE *)0xf743826c) : 0xf743826c [Type: IRP_DISPATCH_TABLE *]
[+0x000] CreateClose : 0xf740354e [Type: long (*)(_DEVICE_OBJECT *,_IRP *)]
[+0x004] DeviceControl : 0xf7429a84 [Type: long (*)(_DEVICE_OBJECT *,_IRP *)]
[+0x008] PnpStartDevice : 0xf744f3ea [Type: long (*)(_DEVICE_OBJECT *,_IRP *)]
[+0x00c] Pnp : 0xf745b000 [Type: long (**)(_DEVICE_OBJECT *,_IRP *)]
[+0x010] Power : 0xf7438168 [Type: long (**)(_DEVICE_OBJECT *,_IRP *)]
[+0x014] SystemControl : 0xf741300c [Type: long (*)(_DEVICE_OBJECT *,_IRP *)]
[+0x018] Other : 0xf7403358 [Type: long (*)(_DEVICE_OBJECT *,_IRP *)]
[+0x01c] Worker : 0x0 [Type: void (*)(_DEVICE_EXTENSION *,unsigned long)]

case IRP_MJ_PNP:

if (minorFunction == IRP_MN_START_DEVICE) {

//
// Dispatch to start device handler
//
dispatch = dispatchTable->PnpStartDevice;

} else if (minorFunction < (ACPIDispatchPnpTableSize-1)) {

//
// Dispatch based on minor function. Not that we don't store
// IRP_MN_START_DEVICE (0x0) in this table, so we have to
// sub one from the minor code
//
dispatch = dispatchTable->Pnp[minorFunction];

}


1: kd> dv
DeviceObject = 0x89db4020 Device for "\Driver\ACPI"
Irp = 0x89df3460
removeEvent = struct _KEVENT
dispatchTable = 0xf743826c
deviceExtension = 0x89db4ea0
1: kd> !irp 0x89df3460
Irp is active with 2 stacks 2 is current (= 0x89df34f4)
No Mdl: No System Buffer: Thread 89dd4020: Irp stack trace.
cmd flg cl Device File Completion-Context
[N/A(0), N/A(0)]
0 0 00000000 00000000 00000000-00000000

Args: 00000000 00000000 00000000 00000000
>[IRP_MJ_PNP(1b), IRP_MN_QUERY_INTERFACE(8)]
0 0 89db4020 00000000 00000000-00000000
\Driver\ACPI
Args: f742b448 00010018 f789a42c 00000000

1: kd> t
eax=00000002 ebx=89df3408 ecx=89db4fbc edx=f745b000 esi=f744f032 edi=00000000
eip=f744f032 esp=f789a3cc ebp=f789a3fc 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!ACPIRootIrpQueryInterface:
f744f032 55 push ebp
1: kd> kc
#
00 ACPI!ACPIRootIrpQueryInterface
01 ACPI!ACPIDispatchIrp
02 nt!IofCallDriver
03 ACPI!ACPIGetRegisterInterfaces
04 ACPI!ACPIDispatchAddDevice
05 nt!PpvUtilCallAddDevice
06 nt!PipCallDriverAddDevice
07 nt!PiProcessAddBootDevices
08 nt!PipDeviceActionWorker
09 nt!PipRequestDeviceAction
0a nt!PipAddDevicesToBootDriverWorker
0b nt!PipApplyFunctionToServiceInstances
0c nt!PipAddDevicesToBootDriver
0d nt!IopInitializeBootDrivers
0e nt!IoInitSystem
0f nt!Phase1Initialization
10 nt!PspSystemThreadStartup
11 nt!KiThreadStartup
1: kd> dv
DeviceObject = 0x89db4020 Device for "\Driver\ACPI"
Irp = 0x89df3460
ArbiterTable = struct _ARBITER_INTERFACE
resource = 0n-1981860768
deviceExtension = 0x00000008

1: kd> p
eax=f742b700 ebx=89df3460 ecx=00000008 edx=f74387c0 esi=f742b448 edi=89df34f4
eip=f744f0bf esp=f789a378 ebp=f789a3c8 iopl=0 nv up ei ng nz na pe cy
cs=0008 ss=0010 ds=0023 es=0023 fs=0030 gs=0000 efl=00000287
ACPI!ACPIRootIrpQueryInterface+0x8d:
f744f0bf e8d8fefaff call ACPI!ACPIDebugDevicePrint (f73fef9c)
1: kd> t
eax=f742b700 ebx=89df3460 ecx=00000008 edx=f74387c0 esi=f742b448 edi=89df34f4
eip=f73fef9c esp=f789a374 ebp=f789a3c8 iopl=0 nv up ei ng nz na pe cy
cs=0008 ss=0010 ds=0023 es=0023 fs=0030 gs=0000 efl=00000287
ACPI!ACPIDebugDevicePrint:
f73fef9c 55 push ebp
1: kd> x nt!*acpi*mask
80b18958 nt!Kd_ACPI_Mask = 0
1: kd> ed 80b18958 ffffffff

1: kd> gu
89DB4EA0 ACPI\PNP0C08-0x5F534750 (0x89df3460): IRP_MN_QUERY_INTERFACE - Res 0 Type = {06141966-7245-6369-462e-4e656c736f6e}
eax=00000000 ebx=89df3460 ecx=80ae0dfa edx=0000005b esi=f742b448 edi=89df34f4
eip=f744f0c4 esp=f789a378 ebp=f789a3c8 iopl=0 nv up ei pl nz ac po cy
cs=0008 ss=0010 ds=0023 es=0023 fs=0030 gs=0000 efl=00000213
ACPI!ACPIRootIrpQueryInterface+0x92:
f744f0c4 83c41c add esp,1Ch
NTSTATUS
ACPIDispatchForwardIrp(
IN PDEVICE_OBJECT DeviceObject,
IN PIRP Irp
)

{
PDEVICE_EXTENSION deviceExtension;
NTSTATUS status;

deviceExtension = ACPIInternalGetDeviceExtension(DeviceObject);
if (deviceExtension->TargetDeviceObject) {

//
// Forward to target device
//
IoSkipCurrentIrpStackLocation (Irp);
status = IoCallDriver (deviceExtension->TargetDeviceObject, Irp);

} else {


1: kd> kc
#
00 hal!HalpDispatchPnp
01 nt!IofCallDriver
02 ACPI!ACPIDispatchForwardIrp
03 ACPI!ACPIRootIrpQueryInterface
04 ACPI!ACPIDispatchIrp
05 nt!IofCallDriver
06 ACPI!ACPIGetRegisterInterfaces
07 ACPI!ACPIDispatchAddDevice
08 nt!PpvUtilCallAddDevice
09 nt!PipCallDriverAddDevice
0a nt!PiProcessAddBootDevices
0b nt!PipDeviceActionWorker
0c nt!PipRequestDeviceAction
0d nt!PipAddDevicesToBootDriverWorker
0e nt!PipApplyFunctionToServiceInstances
0f nt!PipAddDevicesToBootDriver
10 nt!IopInitializeBootDrivers
11 nt!IoInitSystem
12 nt!Phase1Initialization
13 nt!PspSystemThreadStartup
14 nt!KiThreadStartup
1: kd> dv
DeviceObject = 0x89db5cb8 Device for "\Driver\ACPI_HAL"
Irp = 0x89df3460


1: kd> ! Irp 0x89df3460
Irp is active with 2 stacks 2 is current (= 0x89df34f4)
No Mdl: No System Buffer: Thread 89dd4020: Irp stack trace.
cmd flg cl Device File Completion-Context
[N/A(0), N/A(0)]
0 0 00000000 00000000 00000000-00000000

Args: 00000000 00000000 00000000 00000000
>[IRP_MJ_PNP(1b), IRP_MN_QUERY_INTERFACE(8)]
0 0 89db5cb8 00000000 00000000-00000000
\Driver\ACPI_HAL
Args: f742b448 00010018 f789a42c 00000000


case IRP_MN_QUERY_INTERFACE:

HalPrint(("HAL: (%s) Query_Interface Irp received\n",
objectTypeString));

status = HalpQueryInterface(
DeviceObject,
irpSp->Parameters.QueryInterface.InterfaceType,
irpSp->Parameters.QueryInterface.Version,
irpSp->Parameters.QueryInterface.InterfaceSpecificData,
irpSp->Parameters.QueryInterface.Size,
irpSp->Parameters.QueryInterface.Interface,
&Irp->IoStatus.Information
);
break;

1: kd> !drvobj 89db5530
Driver object (89db5530) is for:
\Driver\ACPI
Driver Extension List: (id , addr)

Device Object list:
89db4020

版权声明: 本文来自互联网用户投稿,该文观点仅代表作者本人,不代表本站立场。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如若内容造成侵权/违法违规/事实不符,请联系邮箱:809451989@qq.com进行投诉反馈,一经查实,立即删除!
网站建设 2026/4/18 7:06:54

Confluence搭建Sonic内部Wiki协作平台

Confluence 搭建 Sonic 内部 Wiki 协作平台 在虚拟主播、在线教育和企业数字人宣传日益普及的今天&#xff0c;如何以低成本、高效率生成自然流畅的说话视频&#xff0c;已成为许多团队面临的核心挑战。传统方案依赖复杂的3D建模与动作捕捉系统&#xff0c;不仅周期长、门槛高&…

作者头像 李华
网站建设 2026/4/18 0:28:59

超导磁能储存系统的建模和仿真附Simulink仿真

✅作者简介&#xff1a;热爱科研的Matlab仿真开发者&#xff0c;擅长数据处理、建模仿真、程序设计、完整代码获取、论文复现及科研仿真。&#x1f34e; 往期回顾关注个人主页&#xff1a;Matlab科研工作室&#x1f34a;个人信条&#xff1a;格物致知,完整Matlab代码及仿真咨询…

作者头像 李华
网站建设 2026/4/18 20:30:03

vivado2025多节点通信网络拓扑设计完整指南

一文吃透vivado2025多节点通信网络设计&#xff1a;从AXI到NoC的实战全解你有没有遇到过这样的情况&#xff1f;FPGA系统越做越大&#xff0c;模块越来越多&#xff0c;原本清晰的信号连接图变成了“意大利面条”——满屏交叉、时序难调、资源抢夺严重。特别是当你试图把ADC采集…

作者头像 李华
网站建设 2026/4/18 7:46:18

港大与Adobe联合推出突破性Self-E模型

在人工智能绘图领域&#xff0c;传统方法就像一个谨小慎微的画家&#xff0c;需要反复涂抹几十次才能完成一幅画作。而现在&#xff0c;来自香港大学和Adobe Research的研究团队带来了一个令人惊喜的突破。这项由香港大学的余鑫、齐晓娟教授以及Adobe Research的李政奇、张凯、…

作者头像 李华
网站建设 2026/4/23 1:05:47

TrGLUE和SentiTurca:土耳其语AI终于有了自己的“智商测试卷“

这项研究由德国柏林独立研究者Duygu Altinok完成&#xff0c;发表于2025年12月26日的arXiv预印本平台&#xff0c;论文编号为arXiv:2512.22100v1。有兴趣深入了解的读者可以通过该编号查询完整论文。一、土耳其语AI的"成长困境"想象一下&#xff0c;如果你想测试一个…

作者头像 李华
网站建设 2026/4/12 18:33:36

新生儿护理:月嫂使用VoxCPM-1.5-TTS-WEB-UI学习科学喂养方法

新生儿护理&#xff1a;月嫂使用VoxCPM-1.5-TTS-WEB-UI学习科学喂养方法 在一线城市的一家月子中心里&#xff0c;一位刚上岗的月嫂正戴着耳机&#xff0c;一边整理婴儿衣物&#xff0c;一边听着一段语音&#xff1a;“新生儿每次哺乳时间应控制在15到20分钟之间&#xff0c;注…

作者头像 李华