当前位置: 首页 > news >正文

从nt!PipEnumerateDevice到ACPI!ACPIRootIrpQueryDeviceRelations--重要

从nt!PipEnumerateDevice到ACPI!ACPIRootIrpQueryDeviceRelations
0: kd> p
Breakpoint 96 hit
eax=00000000 ebx=00000000 ecx=899c1de0 edx=80b18978 esi=00000000 edi=899c1008
eip=80a2ec74 esp=f789a330 ebp=f789a38c 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!PipSetDevNodeState:
80a2ec74 55 push ebp
0: kd> dv
DeviceNode = 0x899c1008
State = DeviceNodeStarted (0n776)
OldState = 0x00000000
oldIrql = 0x89 ''
0: kd> gu
eax=00000000 ebx=00000000 ecx=80ae0dfa edx=80b18978 esi=00000000 edi=899c1008
eip=80c926f1 esp=f789a340 ebp=f789a38c iopl=0 nv up ei ng nz na po cy
cs=0008 ss=0010 ds=0023 es=0023 fs=0030 gs=0000 efl=00000283
nt!PipProcessStartPhase3+0x3cb:
80c926f1 33c0 xor eax,eax
0: kd> !DeviceNode 0x899c1008
No export DeviceNode found
0: kd> !DevNode 0x899c1008
DevNode 0x899c1008 for PDO 0x899c1de0
Parent 0x89986008 Sibling 0000000000 Child 0000000000
InstancePath is "ACPI_HAL\PNP0C08\0"
ServiceName is "ACPI"
State = DeviceNodeStarted (0x308)
Previous State = DeviceNodeStartPostWork (0x307)
StateHistory[05] = DeviceNodeStartPostWork (0x307)
StateHistory[04] = DeviceNodeStartCompletion (0x306)
StateHistory[03] = DeviceNodeResourcesAssigned (0x304)
StateHistory[02] = DeviceNodeDriversAdded (0x303)
StateHistory[01] = DeviceNodeInitialized (0x302)
StateHistory[00] = DeviceNodeUninitialized (0x301)
StateHistory[19] = Unknown State (0x0)
StateHistory[18] = Unknown State (0x0)
StateHistory[17] = Unknown State (0x0)
StateHistory[16] = Unknown State (0x0)
StateHistory[15] = Unknown State (0x0)
StateHistory[14] = Unknown State (0x0)
StateHistory[13] = Unknown State (0x0)
StateHistory[12] = Unknown State (0x0)
StateHistory[11] = Unknown State (0x0)
StateHistory[10] = Unknown State (0x0)
StateHistory[09] = Unknown State (0x0)
StateHistory[08] = Unknown State (0x0)
StateHistory[07] = Unknown State (0x0)
StateHistory[06] = Unknown State (0x0)
Flags (0x000000f8) DNF_REENUMERATE, DNF_ENUMERATED,
DNF_IDS_QUERIED, DNF_HAS_BOOT_CONFIG,
DNF_BOOT_CONFIG_RESERVED
CapabilityFlags (0x000000c0) UniqueID, SilentInstall

case DeviceNodeStarted:

nextNode = ChildNode;
if (!ProcessOnlyIntermediateStates) {

if ((currentNode->Flags & DNF_REENUMERATE)) {

status = PipEnumerateDevice(currentNode, Synchronous);
if (NT_SUCCESS(status)) {

//
// Remember the bus we just enumerated.
//

enumeratedBus = currentNode;
nextNode = SameNode;

} else if (status == STATUS_PENDING) {

nextNode = SiblingNode;
}
}
}
break;


0: kd> kc
#
00 nt!PipEnumerateDevice
01 nt!PipProcessDevNodeTree
02 nt!PipDeviceActionWorker
03 nt!PipRequestDeviceAction
04 nt!IopInitializeBootDrivers
05 nt!IoInitSystem
06 nt!Phase1Initialization
07 nt!PspSystemThreadStartup
08 nt!KiThreadStartup
0: kd> dv
DeviceNode = 0x899c1008
Synchronous = 0x00 ''
0: kd> !DevNode 0x899c1008
DevNode 0x899c1008 for PDO 0x899c1de0
Parent 0x89986008 Sibling 0000000000 Child 0000000000
InstancePath is "ACPI_HAL\PNP0C08\0"
ServiceName is "ACPI"
State = DeviceNodeStarted (0x308)
Previous State = DeviceNodeStartPostWork (0x307)
StateHistory[05] = DeviceNodeStartPostWork (0x307)
StateHistory[04] = DeviceNodeStartCompletion (0x306)
StateHistory[03] = DeviceNodeResourcesAssigned (0x304)
StateHistory[02] = DeviceNodeDriversAdded (0x303)
StateHistory[01] = DeviceNodeInitialized (0x302)
StateHistory[00] = DeviceNodeUninitialized (0x301)
StateHistory[19] = Unknown State (0x0)
StateHistory[18] = Unknown State (0x0)
StateHistory[17] = Unknown State (0x0)
StateHistory[16] = Unknown State (0x0)
StateHistory[15] = Unknown State (0x0)
StateHistory[14] = Unknown State (0x0)
StateHistory[13] = Unknown State (0x0)
StateHistory[12] = Unknown State (0x0)
StateHistory[11] = Unknown State (0x0)
StateHistory[10] = Unknown State (0x0)
StateHistory[09] = Unknown State (0x0)
StateHistory[08] = Unknown State (0x0)
StateHistory[07] = Unknown State (0x0)
StateHistory[06] = Unknown State (0x0)
Flags (0x000000f8) DNF_REENUMERATE, DNF_ENUMERATED,
DNF_IDS_QUERIED, DNF_HAS_BOOT_CONFIG,
DNF_BOOT_CONFIG_RESERVED
CapabilityFlags (0x000000c0) UniqueID, SilentInstall


0: kd> kc
#
00 nt!IopQueryDeviceRelations
01 nt!PipEnumerateDevice
02 nt!PipProcessDevNodeTree
03 nt!PipDeviceActionWorker
04 nt!PipRequestDeviceAction
05 nt!IopInitializeBootDrivers
06 nt!IoInitSystem
07 nt!Phase1Initialization
08 nt!PspSystemThreadStartup
09 nt!KiThreadStartup
0: kd> dv
Relations = BusRelations (0n0)
DeviceObject = 0x899c1de0 Device for "\Driver\ACPI_HAL"
Synchronous = 0x00 ''
DeviceRelations = 0x899c10e8
irpSp = struct _IO_STACK_LOCATION
0: kd> dx -r1 ((ntkrnlmp!_DEVICE_RELATIONS * *)0x899c10e8)
((ntkrnlmp!_DEVICE_RELATIONS * *)0x899c10e8) : 0x899c10e8 [Type: _DEVICE_RELATIONS * *]
0x0 [Type: _DEVICE_RELATIONS *]


irpSp.Parameters.QueryDeviceRelations.Type = Relations;

//
// Make the call and return.
//
status = IopSynchronousCall(DeviceObject, &irpSp, (PULONG_PTR)DeviceRelations);

if (Relations == BusRelations) {

deviceNode->CompletionStatus = status;

PipSetDevNodeState( deviceNode, DeviceNodeEnumerateCompletion, NULL );

status = STATUS_SUCCESS;
}

return status;
}
0: kd> kc
#
00 nt!IopSynchronousCall
01 nt!IopQueryDeviceRelations
02 nt!PipEnumerateDevice
03 nt!PipProcessDevNodeTree
04 nt!PipDeviceActionWorker
05 nt!PipRequestDeviceAction
06 nt!IopInitializeBootDrivers
07 nt!IoInitSystem
08 nt!Phase1Initialization
09 nt!PspSystemThreadStartup
0a nt!KiThreadStartup
0: kd> d
@$debuggerRootNamespace
Debugger
Sessions
Settings
State
Utility
0: kd> dv
DeviceObject = 0x899c1de0 Device for "\Driver\ACPI_HAL"
TopStackLocation = 0xf789a348 IRP_MJ_PNP / IRP_MN_QUERY_DEVICE_RELATIONS for {...}
Information = 0x899c10e8
event = struct _KEVENT
statusBlock = struct _IO_STATUS_BLOCK
deviceObject = 0x00000008

0: kd> g
Breakpoint 81 hit
eax=0000001b ebx=00000000 ecx=89981f38 edx=899bf5b0 esi=899bf5b0 edi=89981b98
eip=f7403f70 esp=f789a2e4 ebp=f789a2fc iopl=0 nv up ei ng nz na pe nc
cs=0008 ss=0010 ds=0023 es=0023 fs=0030 gs=0000 efl=00000286
ACPI!ACPIDispatchIrp:
f7403f70 55 push ebp
0: kd> kc
#
00 ACPI!ACPIDispatchIrp
01 nt!IofCallDriver
02 nt!IopSynchronousCall
03 nt!IopQueryDeviceRelations
04 nt!PipEnumerateDevice
05 nt!PipProcessDevNodeTree
06 nt!PipDeviceActionWorker
07 nt!PipRequestDeviceAction
08 nt!IopInitializeBootDrivers
09 nt!IoInitSystem
0a nt!Phase1Initialization
0b nt!PspSystemThreadStartup
0c nt!KiThreadStartup

//
// Reference the device
//
InterlockedIncrement(&deviceExtension->OutstandingIrpCount);

//
// Dispatch to handler, then remove our reference
//
status = dispatch (DeviceObject, Irp);

0: kd> kc
#
00 ACPI!ACPIRootIrpQueryDeviceRelations
01 ACPI!ACPIDispatchIrp
02 nt!IofCallDriver
03 nt!IopSynchronousCall
04 nt!IopQueryDeviceRelations
05 nt!PipEnumerateDevice
06 nt!PipProcessDevNodeTree
07 nt!PipDeviceActionWorker
08 nt!PipRequestDeviceAction
09 nt!IopInitializeBootDrivers
0a nt!IoInitSystem
0b nt!Phase1Initialization
0c nt!PspSystemThreadStartup
0d nt!KiThreadStartup
0: kd> dv
DeviceObject = 0x89981b98 Device for "\Driver\ACPI"
Irp = 0x899bf5b0
deviceExtension = 0x00000000
deviceRelations = 0xf744edca
minorFunction = 0xb0 ''
queryEvent = struct _KEVENT
checkForFilters = 0x00 ''


参考:
0: kd> kc
#
00 ACPI!InternalOpRegionHandler
01 ACPI!AccessBaseField
02 ACPI!AccessFieldData
03 ACPI!ReadFieldObj
04 ACPI!RunContext
05 ACPI!InsertReadyQueue
06 ACPI!RestartContext
07 ACPI!SyncEvalObject
08 ACPI!AMLIEvalNameSpaceObject
09 ACPI!ACPIGet
0a ACPI!ACPIDetectPdoDevices
0b ACPI!ACPIRootIrpQueryBusRelations
0c ACPI!ACPIRootIrpQueryDeviceRelations
0d ACPI!ACPIDispatchIrp
0e nt!IofCallDriver
0f nt!IopSynchronousCall
10 nt!IopQueryDeviceRelations
11 nt!PipEnumerateDevice
12 nt!PipProcessDevNodeTree
13 nt!PipDeviceActionWorker
14 nt!PipRequestDeviceAction
15 nt!IopInitializeBootDrivers
16 nt!IoInitSystem
17 nt!Phase1Initialization
18 nt!PspSystemThreadStartup
19 nt!KiThreadStartup
参考:

http://www.jsqmd.com/news/332545/

相关文章:

  • 13. 数组
  • MindSpore 大模型可解释性与鲁棒性协同优化:梯度归因可视化 + 对抗训练
  • 基于深度学习YOLOv11的篮球运动员识别检测系统(YOLOv11+YOLO数据集+UI界面+登录注册界面+Python项目源码+模型)
  • 基于深度学习YOLOv11的扑克牌识别检测系统(YOLOv11+YOLO数据集+UI界面+登录注册界面+Python项目源码+模型)
  • 2026最新版 Notepad2 下载安装与配置完整教程:轻量编辑器的高效选择
  • <span class=“js_title_inner“>特斯拉年营收948亿美元:交付164万辆车,减少7% FSD付费用户达110万人</span>
  • 基于深度学习YOLOv12的篮球运动员识别检测系统(YOLOv12+YOLO数据集+UI界面+登录注册界面+Python项目源码+模型)
  • 2026年 微波暗室/电波暗室厂家实力推荐榜:专业设计与精密屏蔽性能深度解析及选购指南
  • CMake链接库教程:target_link_libraries用法详解
  • 2026年西安抖音推广、GEO、AI搜索、短视频拍摄、抖音代运营服务公司竞争格局深度分析报告
  • 2026年屏蔽机房厂家推荐排行榜:焊接式/拼装式/铝板室/部队/政府保密级电磁屏蔽机房专业解决方案深度解析
  • MindSpore 多模态大模型进阶:跨模态对齐增强 + 算力高效调度
  • 物位计厂家推广必看:5大高效平台全解析
  • 剖析就业规划机构排名,就业规划哪个比较好,名企就业规划机构哪家靠谱
  • <span class=“js_title_inner“>甘草医生冲刺港股:9个月营收5.5亿亏124万 许志良控制82%股权</span>
  • 固相萃取仪:现代实验室高效前处理的核心技术与应用展望
  • 2026年潘家园眼镜店价格大比拼,哪家服务好又实惠
  • 2026年1月四川成都空气治理/甲醛检测/除甲醛/空气检测/甲醛治理公司哪家好
  • 深蓝保Java一面复盘:高并发、JVM调优、索引优化…这些面试题你真的会答吗?
  • 2026年安阳锻压数控设备选购攻略,靠谱品牌大揭秘
  • 【Python】将表格图片批量导出到本地文件夹
  • SEW变频器MC07A450-503-4-01 08283494
  • 2026年国企就业辅导机构推荐,上岸率高的平台排名
  • 2026年京津冀地区适合婴幼儿的板材全屋定制服务品牌推荐
  • 广东西娅图家具制造怎么样?产品好用吗?值得推荐吗?
  • 【Windows】查看电脑系统日志
  • 维修SEW变频器MC07A110-503-4-01 08282781
  • 网红冰柿厂家靠谱吗,国强农业用品质给出答案
  • 2026年橡胶制品性价比排名,解读东莞卓世橡胶制品专业靠谱程度
  • 2026年 车库门厂家推荐排行榜:高端车库门、快速卷帘门、智能涡轮门,匠心工艺与创新科技完美融合