news 2026/2/24 16:28:02

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/2/24 0:25:43

2025年网络安全威胁趋势深度分析

A 2025 Threat Trends Analysis 随着2025年接近尾声并步入假日季节,现在是回顾和反思网络安全行业一年来所发生事件的好时机。业界人士都明白,虽然每年的情况不尽相同,但某些趋势往往会年复一年地持续存在。因此,牢记过去发生的事…

作者头像 李华
网站建设 2026/2/23 10:58:39

搞定Z世代求职者,你的招聘“操作系统”该升级了

各位HR伙伴,是否感觉招聘画风“突变”?严谨的JD阅读量不如团队趣味日常照,正式的邀约换来表情包回复,公司战略他们更关心“是否加班”和“同龄人多不多”……不必困惑,这标志着人才战场主力已迭代为“Z世代”。面对这群…

作者头像 李华
网站建设 2026/2/22 22:27:15

别嫌弃小客户!3个方法把“一次性小单”变成“长期返单”

很多制造业的销售人员眼里只看重那些大客户,对于小订单总是不屑一顾,他们觉得:“小订单量太小、利润也薄,不值得花费精力去跟进,”结果往往是大客户难以攻克下来,小客户也一个个流失了,最终陷入…

作者头像 李华
网站建设 2026/2/23 11:27:45

Keil:函数级优化技巧全解

目录 一、Keil 优化设置的核心方法 1. 全局优化等级设置(基础) 2. 函数级单独优化(核心) 方式 1:使用 __attribute__ 关键字(推荐,通用) 方式 2:使用 #pragma 指令&…

作者头像 李华
网站建设 2026/2/23 15:53:28

你真的理解 ASP.NET Core 的中间件吗?搞懂它只需要这一篇

在 ASP.NET Core 的设计中,高性能、高灵活性和模块化并不是偶然结果,而是源于一套非常清晰的架构理念。其中,中间件(Middleware)是整个 Web 框架的核心基础设施之一。每一个 HTTP 请求,从进入应用到返回响应…

作者头像 李华
网站建设 2026/2/19 13:45:28

【运维】小回顾

今天早上和大领导沟通完接下来的解决方案之后,顺利解决了客户那边由于服务器断电造成的软件故障,所幸昨天我的失误没有造成生产事故。今天其实还有一次删除的工作要实施,这次谨记昨天的教训,反复验证完待删除文件已备份之后&#…

作者头像 李华