news 2026/2/4 15:52:55

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/2/4 5:20:05

达姆施塔特工业大学发现:专家混合模型AI安全机制存在脆弱性

这项由德国达姆施塔特工业大学系统安全实验室的吴立超领导的国际研究团队&#xff0c;联合萨格勒布大学和拉德伯德大学的研究人员&#xff0c;于2025年发表的突破性研究&#xff0c;首次揭示了专家混合模型&#xff08;MoE&#xff09;大语言模型在安全防护方面的惊人漏洞。这项…

作者头像 李华
网站建设 2026/2/2 5:51:08

AI试验数据综合分析管理系统:数据价值的技术解码器

在AI研发与工业试验领域&#xff0c;数据是核心燃料&#xff0c;但杂乱无章的多源数据往往成为效率瓶颈。AI试验数据综合分析管理系统&#xff0c;并非简单的“数据容器”&#xff0c;而是通过多层技术架构&#xff0c;实现数据从采集、治理到分析、安全的全链路智能化&#xf…

作者头像 李华
网站建设 2026/2/3 4:11:25

UltraISO制作U盘启动盘同时部署VoxCPM-1.5-TTS-WEB-UI运行环境

UltraISO 制作 U 盘启动盘并部署 VoxCPM-1.5-TTS-WEB-UI 运行环境 在人工智能语音合成技术迅速普及的今天&#xff0c;如何让复杂的 AI 模型走出实验室、走进实际应用场景&#xff0c;成为许多开发者和企业关注的核心问题。尤其是在没有稳定网络或无法联网的环境中&#xff0c;…

作者头像 李华
网站建设 2026/2/2 18:53:05

导师推荐!8款AI论文软件测评:本科生写论文还能这么快

导师推荐&#xff01;8款AI论文软件测评&#xff1a;本科生写论文还能这么快 2025年AI论文写作工具测评&#xff1a;为何需要这份榜单&#xff1f; 随着人工智能技术的不断进步&#xff0c;越来越多的本科生开始借助AI论文软件提升写作效率。然而&#xff0c;面对市场上琳琅满目…

作者头像 李华
网站建设 2026/2/4 10:08:14

公交移动电视:车载屏幕配合VoxCPM-1.5-TTS-WEB-UI播报站点周边信息

公交移动电视&#xff1a;车载屏幕配合VoxCPM-1.5-TTS-WEB-UI播报站点周边信息 在早晚高峰的公交车上&#xff0c;你是否曾因听不清下一站名而错过下车&#xff1f;又或者听到机械生硬的“下一站&#xff1a;人民广场”时&#xff0c;心里默默期待一句更贴心的提醒——比如“前…

作者头像 李华
网站建设 2026/1/31 8:51:38

奖项申报准备:参选AI创新类比赛提升Sonic知名度

Sonic数字人口型同步技术深度解析&#xff1a;从原理到应用的全链路实践 在AI内容生成&#xff08;AIGC&#xff09;浪潮席卷各行各业的今天&#xff0c;如何以更低的成本、更高的效率生产高质量视听内容&#xff0c;已成为各大平台和企业的核心命题。尤其在短视频、在线教育、…

作者头像 李华