news 2026/5/3 4:27:46

ACPI!ACPIGetWorkerForInteger函数中的request->CallBackRoutine=ACPI!GetPciAddressWorker

作者头像

张小明

前端开发工程师

1.2k 24
文章封面图
ACPI!ACPIGetWorkerForInteger函数中的request->CallBackRoutine=ACPI!GetPciAddressWorker

ACPI!ACPIGetWorkerForInteger函数中的request->CallBackRoutine=ACPI!GetPciAddressWorker

第一部分:
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 = 0x899050cc
Context = 0x899050a0
freeData = 0x00 ''
1: kd> dt ACPI_GET_REQUEST 0x899050a0
+0x000 Flags : 0x48040402
+0x000 UFlags : __unnamed
+0x004 ObjectID : 0x5244415f
+0x008 ListEntry : _LIST_ENTRY [ 0xf743b940 - 0x899c6328 ]
+0x010 DeviceExtension : (null)
+0x014 AcpiObject : 0x899affac _NSObj
+0x018 CallBackRoutine : 0xf740ceea void ACPI!GetPciAddressWorker+0
+0x01c CallBackContext : 0x899bf408 Void
+0x020 Buffer : 0x899bf420 -> (null)
+0x024 BufferSize : (null)
+0x028 Status : 0n0
+0x02c ResultData : _ObjData
1: kd> p
eax=00000050 ebx=899b00f0 ecx=8997e000 edx=00002707 esi=89901000 edi=899050a0
eip=f7407369 esp=f791acd0 ebp=f791acd8 iopl=0 nv up ei ng nz ac pe cy
cs=0008 ss=0010 ds=0023 es=0023 fs=0030 gs=0000 efl=00000297
ACPI!ACPIGetWorkerForInteger+0x5:
f7407369 8b5d0c mov ebx,dword ptr [ebp+0Ch] ss:0010:f791ace4=00000000
1: kd> p
eax=00000050 ebx=00000000 ecx=8997e000 edx=00002707 esi=89901000 edi=899050a0
eip=f740736c esp=f791acd0 ebp=f791acd8 iopl=0 nv up ei ng nz ac pe cy
cs=0008 ss=0010 ds=0023 es=0023 fs=0030 gs=0000 efl=00000297
ACPI!ACPIGetWorkerForInteger+0x8:
f740736c 85db test ebx,ebx
1: kd> p
eax=00000050 ebx=00000000 ecx=8997e000 edx=00002707 esi=89901000 edi=899050a0
eip=f7407376 esp=f791acc8 ebp=f791acd8 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!ACPIGetWorkerForInteger+0x12:
f7407376 c645ff01 mov byte ptr [ebp-1],1 ss:0010:f791acd7=00
1: kd> p
eax=00000050 ebx=00000000 ecx=8997e000 edx=00002707 esi=89901000 edi=899050a0
eip=f740737a esp=f791acc8 ebp=f791acd8 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!ACPIGetWorkerForInteger+0x16:
f740737a 8b7514 mov esi,dword ptr [ebp+14h] ss:0010:f791acec=899050a0
1: kd> p
eax=00000050 ebx=00000000 ecx=8997e000 edx=00002707 esi=899050a0 edi=899050a0
eip=f740739a esp=f791acc8 ebp=f791acd8 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!ACPIGetWorkerForInteger+0x36:
f740739a 8b4620 mov eax,dword ptr [esi+20h] ds:0023:899050c0=899bf420
1: kd> p
eax=899bf420 ebx=00000000 ecx=8997e000 edx=00002707 esi=899050a0 edi=899050cc
eip=f74073ab esp=f791acc8 ebp=f791acd8 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!ACPIGetWorkerForInteger+0x47:
f74073ab 8b0e mov ecx,dword ptr [esi] ds:0023:899050a0=48040402
1: kd> p
eax=899bf420 ebx=00000000 ecx=48040402 edx=00002707 esi=899050a0 edi=899050cc
eip=f74073b2 esp=f791acc8 ebp=f791acd8 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+0x4e:
f74073b2 ff7624 push dword ptr [esi+24h] ds:0023:899050c4=00000000
1: kd> p
eax=00000000 ebx=00000000 ecx=48040402 edx=00002707 esi=899050a0 edi=899050cc
eip=f74073c3 esp=f791acc8 ebp=f791acd8 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!ACPIGetWorkerForInteger+0x5f:
f74073c3 eb43 jmp ACPI!ACPIGetWorkerForInteger+0xa4 (f7407408)
1: kd> dt ACPI_GET_REQUEST 0x899050a0
+0x000 Flags : 0x48040402
+0x000 UFlags : __unnamed
+0x004 ObjectID : 0x5244415f
+0x008 ListEntry : _LIST_ENTRY [ 0xf743b940 - 0x899c6328 ]
+0x010 DeviceExtension : (null)
+0x014 AcpiObject : 0x899affac _NSObj
+0x018 CallBackRoutine : 0xf740ceea void ACPI!GetPciAddressWorker+0
+0x01c CallBackContext : 0x899bf408 Void
+0x020 Buffer : 0x899bf420 -> (null)
+0x024 BufferSize : (null)
+0x028 Status : 0n0
+0x02c ResultData : _ObjData
1: kd> p
eax=00000000 ebx=00000000 ecx=48040402 edx=00002707 esi=899050a0 edi=899050cc
eip=f7407408 esp=f791acc8 ebp=f791acd8 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!ACPIGetWorkerForInteger+0xa4:
f7407408 807dff00 cmp byte ptr [ebp-1],0 ss:0010:f791acd7=01
1: kd> dt ACPI_GET_REQUEST 0x899050a0
+0x000 Flags : 0x48040402
+0x000 UFlags : __unnamed
+0x004 ObjectID : 0x5244415f
+0x008 ListEntry : _LIST_ENTRY [ 0xf743b940 - 0x899c6328 ]
+0x010 DeviceExtension : (null)
+0x014 AcpiObject : 0x899affac _NSObj
+0x018 CallBackRoutine : 0xf740ceea void ACPI!GetPciAddressWorker+0
+0x01c CallBackContext : 0x899bf408 Void
+0x020 Buffer : 0x899bf420 -> (null)
+0x024 BufferSize : (null)
+0x028 Status : 0n0
+0x02c ResultData : _ObjData
1: kd> p
eax=00000000 ebx=00000000 ecx=48040402 edx=00002707 esi=899050a0 edi=899050cc
eip=f7407411 esp=f791acc8 ebp=f791acd8 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+0xad:
f7407411 6a01 push 1
1: kd> db 0x899affac
899affac 4c ff 9a 89 ac 40 9b 89-f0 f0 9a 89 24 00 9b 89 L....@......$...
899affbc 50 43 49 30 30 f3 9a 89-4c ff 9a 89 00 00 06 00 PCI00...L.......
899affcc 00 00 00 00 00 00 00 00-00 00 00 00 00 00 00 00 ................
899affdc 58 0d 9c 89 00 00 00 00-48 4f 52 47 34 00 00 00 X.......HORG4...
899affec 00 f0 9a 89 50 00 00 00-30 00 00 00 02 00 00 00 ....P...0.......
899afffc 00 00 00 00 00 00 00 00-00 00 00 00 00 00 00 00 ................
899b000c 00 00 00 00 00 00 00 00-00 00 00 00 48 4e 53 4f ............HNSO
899b001c 44 00 00 00 00 f0 9a 89-64 a0 91 89 68 00 9b 89 D.......d...h...
1: kd> dv
AcpiObject = 0x899b00f0
Status = 0n0
Result = 0x899050cc
Context = 0x899050a0
freeData = 0x01 ''
1: kd> dx -r1 ((ACPI!_ObjData *)0x899050cc)
((ACPI!_ObjData *)0x899050cc) : 0x899050cc [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 *]

//
// We are done, but we must check to see if we are the async or the
// sync case. If we are the sync case, then we have much less cleanup
// to perform
//
if ( !(request->Flags & GET_PROP_SKIP_CALLBACK) ) {

//
// Is there a callback routine to call?
//
if (request->CallBackRoutine != NULL) {

(request->CallBackRoutine)(
AcpiObject,
status,
NULL,
request->CallBackContext
);

}


第二部分:

1: kd> kc
#
00 ACPI!GetPciAddressWorker
01 ACPI!ACPIGetWorkerForInteger
02 ACPI!AsyncCallBack
03 ACPI!RunContext
04 ACPI!DispatchCtxtQueue
05 ACPI!StartTimeSlicePassive
06 ACPI!ACPIWorker
07 nt!PspSystemThreadStartup
08 nt!KiThreadStartup
1: kd> dv
AcpiObject = 0x899b00f0
Status = 0n0
Result = 0x00000000
Context = 0x899bf408
buffer = unsigned char [64] ""
1: kd> dt GET_ADDRESS_CONTEXT 0x899bf408
ACPI!GET_ADDRESS_CONTEXT
+0x000 PciObject : 0x899affac _NSObj
+0x004 Bus : 0x899873b0 ""
+0x008 Slot : 0x899873ac _PCI_SLOT_NUMBER
+0x00c ParentBus : 0 ''
+0x010 ParentSlot : _PCI_SLOT_NUMBER
+0x014 Flags : 8
+0x018 Address : 0
+0x01c BaseBusNumber : 0
+0x020 RunCompletion : 0n0
+0x024 CompletionRoutine : 0xf740d62c void ACPI!PciConfigSpaceHandlerWorker+0
+0x028 CompletionContext : 0x89987378 Void
1: kd> ?0x899bf408+0x018
Evaluate expression: -1986268128 = 899bf420 +0x020 Buffer : 0x899bf420 -> (null)

参考:
1: kd> dt ACPI_GET_REQUEST 0x899050a8-8
+0x000 Flags : 0x48040402
+0x000 UFlags : __unnamed
+0x004 ObjectID : 0x5244415f
+0x008 ListEntry : _LIST_ENTRY [ 0xf743b940 - 0x899c6328 ]
+0x010 DeviceExtension : (null)
+0x014 AcpiObject : 0x899affac _NSObj
+0x018 CallBackRoutine : 0xf740ceea void ACPI!GetPciAddressWorker+0
+0x01c CallBackContext : 0x899bf408 Void
+0x020 Buffer : 0x899bf420 -> (null)
+0x024 BufferSize : (null)
+0x028 Status : 0n0
+0x02c ResultData : _ObjData
参考:

#define PCISUPP_CHECKED_ADR 8


//
// First, determine the slot number.
//
if (!(state->Flags & PCISUPP_CHECKED_ADR)) {

//
// Get the _ADR.
//
state->Flags |= PCISUPP_CHECKED_ADR;这里设置的,现在不用再重入了。
status = ACPIGetNSAddressAsync(
state->PciObject,
GetPciAddressWorker,
(PVOID)state,
&(state->Address), ?0x899bf408+0x018=899bf420!!!
NULL
);

if (status == STATUS_PENDING) {
return status;
}

参考:
1: kd> dt ACPI_GET_REQUEST 0x899050a0
+0x000 Flags : 0x48040402
+0x000 UFlags : __unnamed
+0x004 ObjectID : 0x5244415f
+0x008 ListEntry : _LIST_ENTRY [ 0xf743b940 - 0x899c6328 ]
+0x010 DeviceExtension : (null)
+0x014 AcpiObject : 0x899affac _NSObj
+0x018 CallBackRoutine : 0xf740ceea void ACPI!GetPciAddressWorker+0
+0x01c CallBackContext : 0x899bf408 Void
+0x020 Buffer : 0x899bf420 -> (null) 这里正好是+0x020 Buffer : 0x899bf420!!!
+0x024 BufferSize : (null)
+0x028 Status : 0n0
+0x02c ResultData : _ObjData
参考:

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

盲写问卷 VS 科学设计!宏智树 AI 让实证研究数据不再 “打水漂”

作为深耕论文写作科普的教育博主,后台总能收到这样的吐槽:“辛辛苦苦发了 300 份问卷,结果导师说数据无效,全白费了!”“想设计一份靠谱的问卷,查了十几篇文献还是一头雾水!” 做实证研究的同学…

作者头像 李华
网站建设 2026/5/2 4:27:00

自学成为网络安全工程师:2026最新知识体系与实战学习路径解析

【2025网络安全趋势】从小白到专家:网安工程师入行指南(建议收藏) 文章详述2025年网络安全工程师入行路径,涵盖三大核心职责方向、需求薪资前景及权威认证报考指南。数据显示网安岗位需求年增37%,薪资上限高&#xff…

作者头像 李华
网站建设 2026/4/30 15:47:08

Linux信号机制详解:阻塞信号集与未决信号集

文章目录前言1. 阻塞信号集(Signal Mask)2. 未决信号集(Pending Signal Set)3. 两者关系与信号递达流程4. 相关系统调用简要说明5. 示例代码片段(查看 pending 与 mask)6.示例代码详解6.1 print_sigset函数…

作者头像 李华
网站建设 2026/5/1 19:19:41

搜索引擎排名内幕:前端也能撬动SEO流量密码

搜索引擎排名内幕:前端也能撬动SEO流量密码搜索引擎排名内幕:前端也能撬动SEO流量密码咱写前端的,凭啥不能抢 SEO 的饭碗?搜索引擎到底看啥?别被“算法”俩字吓尿内容质量与语义结构:别让爬虫看了一堆 div …

作者头像 李华
网站建设 2026/4/29 7:19:23

接口自动化测试覆盖率

一、接口覆盖率统计:3大核心维度 ▶ 1. 代码级覆盖率(最严谨) 原理:通过代码插桩,统计接口对应的业务代码执行情况 工具: Java:Jacoco Jenkins Python:Coverage.py Pytest 优…

作者头像 李华
网站建设 2026/4/29 7:19:09

Jenkins+Docker+Git实现自动化CI/CD

在如今的互联网时代,随着软件开发复杂度的不断提高,软件开发和发布管理也越来越重要。目前已经形成一套标准的流程,最重要的组成部分就是持续集成(Continuous Integration,CI)及持续部署、交付(…

作者头像 李华