news 2026/2/15 9:51:07

ACPI!ACPIBuildProcessDevicePhaseEjd和ACPI!ACPIBuildProcessDevicePhasePrw对节点ISA的处理

作者头像

张小明

前端开发工程师

1.2k 24
文章封面图
ACPI!ACPIBuildProcessDevicePhaseEjd和ACPI!ACPIBuildProcessDevicePhasePrw对节点ISA的处理

ACPI!ACPIBuildProcessDevicePhaseEjd和ACPI!ACPIBuildProcessDevicePhasePrw对节点ISA的处理

1: kd> g
Breakpoint 6 hit
eax=00000000 ebx=00000009 ecx=00000041 edx=00000002 esi=89984188 edi=80b019f4
eip=f73fb914 esp=f78aef6c ebp=f78aef84 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!ACPIBuildProcessGenericList+0x50:
f73fb914 85db test ebx,ebx
1: kd> g
Breakpoint 5 hit
eax=0000000a ebx=0000000a ecx=89984198 edx=00000001 esi=89984188 edi=80b019f4
eip=f73fb911 esp=f78aef68 ebp=f78aef84 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!ACPIBuildProcessGenericList+0x4d:
f73fb911 ff55f4 call dword ptr [ebp-0Ch] ss:0010:f78aef78={ACPI!ACPIBuildProcessDevicePhaseEjd (f73fddf2)}
1: kd> t
eax=0000000a ebx=0000000a ecx=89984198 edx=00000001 esi=89984188 edi=80b019f4
eip=f73fddf2 esp=f78aef64 ebp=f78aef84 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!ACPIBuildProcessDevicePhaseEjd:
f73fddf2 55 push ebp
1: kd> kc
#
00 ACPI!ACPIBuildProcessDevicePhaseEjd
01 ACPI!ACPIBuildProcessGenericList
02 ACPI!ACPIBuildDeviceDpc
03 nt!KiRetireDpcList
04 nt!KiDispatchInterrupt
WARNING: Frame IP not in any known module. Following frames may be wrong.
05 0x0
1: kd> dv
BuildRequest = 0x89984188
status = 0n-1986510456


#define DEV_CAP_SERIAL 0x00000000 0400 0000

1: kd> dx -r1 ((ACPI!_ACPI_BUILD_REQUEST *)0x89984188)
((ACPI!_ACPI_BUILD_REQUEST *)0x89984188) : 0x89984188 [Type: _ACPI_BUILD_REQUEST *]
[+0x000] ListEntry [Type: _LIST_ENTRY]
[+0x008] Signature : 0x5f534750 [Type: unsigned long]
[+0x00c] Flags : 0x1 [Type: unsigned long]
[+0x00c] UFlags [Type: __unnamed]
[+0x010] WorkDone : 0x1 [Type: unsigned long]
[+0x014] CurrentWorkDone : 0xa [Type: unsigned long]
[+0x018] NextWorkDone : 0x2 [Type: unsigned long]
[+0x01c] BuildContext : 0x899c0a88 [Type: void *]
[+0x020] Status : 0 [Type: long]
[+0x024] CurrentObject : 0x0 [Type: _NSObj *]
[+0x028] CallBack : 0x0 [Type: void (*)(void *,void *,long)]
[+0x02c] CallBackContext : 0x0 [Type: void *]
[+0x030] DeviceRequest [Type: __unnamed]
[+0x030] RunRequest [Type: __unnamed]
[+0x030] SynchronizeRequest [Type: __unnamed]
[+0x044] Integer : 0xf [Type: unsigned long]
[+0x044] String : 0xf : Unable to read memory at Address 0xf [Type: unsigned char *]
[+0x044] TargetListEntry : 0xf [Type: _LIST_ENTRY *]

1: kd> dt acpi!_DEVICE_EXTENSION 0x899c0a88
+0x000 Flags : 0x00401000`00000008

_PRW (Power Resources for Wake)

当设备有能力从睡眠状态唤醒系统时,_PRW被用来列举设备所依赖的用于唤醒的电源资源列表。


} else {

//
// The next step is to run the _PRW
//
BuildRequest->NextWorkDone = WORK_DONE_PRW;

}

#define WORK_DONE_PRW WORK_DONE_STEP_8

typedef enum _WORK_DONE {
WORK_DONE_COMPLETE = 0,
WORK_DONE_PENDING,
WORK_DONE_FAILURE,
WORK_DONE_STEP_0,
WORK_DONE_STEP_1,
WORK_DONE_STEP_2,
WORK_DONE_STEP_3,
WORK_DONE_STEP_4,
WORK_DONE_STEP_5,
WORK_DONE_STEP_6,
WORK_DONE_STEP_7, a
WORK_DONE_STEP_8, b=8+3

1: kd> dt ACPI!_ACPI_BUILD_REQUEST 0x89984188
+0x000 ListEntry : _LIST_ENTRY [ 0x89984138 - 0x89986158 ]
+0x008 Signature : 0x5f534750
+0x00c Flags : 1
+0x00c UFlags : __unnamed
+0x010 WorkDone : 1
+0x014 CurrentWorkDone : 0xa
+0x018 NextWorkDone : 0xb
+0x01c BuildContext : 0x899c0a88 Void
+0x020 Status : 0n0
+0x024 CurrentObject : (null)
+0x028 CallBack : (null)
+0x02c CallBackContext : (null)
+0x030 DeviceRequest : __unnamed
+0x030 RunRequest : __unnamed
+0x030 SynchronizeRequest : __unnamed
+0x044 Integer : 0xf
+0x044 String : 0x0000000f "--- memory read error at address 0x0000000f ---"
+0x044 TargetListEntry : 0x0000000f _LIST_ENTRY


ACPIBuildProcessDevicePhaseEjdExit:

//
// Check to see if we have a dock device
//
if (!ACPIDockIsDockDevice( deviceExtension->AcpiObject) ) {

//
// If it's not a dock, then don't bother...
//
status = STATUS_SUCCESS;
goto ACPIBuildProcessDevicePhaseEjdExit2;

}

//
// We won't actually need to call the interpreter, but we will call
// the generic callback so that we don't have to duplicate code
//
ACPIBuildCompleteGeneric(
NULL,
status,
NULL,
BuildRequest
);

//
// Done
//
return status;

}

1: kd> kc
#
00 ACPI!ACPIBuildProcessDeviceGenericEvalStrict
01 ACPI!ACPIBuildProcessGenericList
02 ACPI!ACPIBuildDeviceDpc
03 nt!KiRetireDpcList
04 nt!KiDispatchInterrupt
WARNING: Frame IP not in any known module. Following frames may be wrong.
05 0x0
1: kd> dv
BuildRequest = 0x89984188
status = 0n8
1: kd> dx -r1 ((ACPI!_ACPI_BUILD_REQUEST *)0x89984188)
((ACPI!_ACPI_BUILD_REQUEST *)0x89984188) : 0x89984188 [Type: _ACPI_BUILD_REQUEST *]
[+0x000] ListEntry [Type: _LIST_ENTRY]
[+0x008] Signature : 0x5f534750 [Type: unsigned long]
[+0x00c] Flags : 0x1 [Type: unsigned long]
[+0x00c] UFlags [Type: __unnamed]
[+0x010] WorkDone : 0x1 [Type: unsigned long]
[+0x014] CurrentWorkDone : 0xb [Type: unsigned long]
[+0x018] NextWorkDone : 0x2 [Type: unsigned long]
[+0x01c] BuildContext : 0x899c0a88 [Type: void *]
[+0x020] Status : 0 [Type: long]
[+0x024] CurrentObject : 0x0 [Type: _NSObj *]
[+0x028] CallBack : 0x0 [Type: void (*)(void *,void *,long)]
[+0x02c] CallBackContext : 0x0 [Type: void *]
[+0x030] DeviceRequest [Type: __unnamed]
[+0x030] RunRequest [Type: __unnamed]
[+0x030] SynchronizeRequest [Type: __unnamed]
[+0x044] Integer : 0xf [Type: unsigned long]
[+0x044] String : 0xf : Unable to read memory at Address 0xf [Type: unsigned char *]
[+0x044] TargetListEntry : 0xf [Type: _LIST_ENTRY *]


1: kd> x acpi!AcpiBuildDevicePowerNameLookup
f7438068 ACPI!AcpiBuildDevicePowerNameLookup = unsigned long [23]
1: kd> dd f7438068
f7438068 00000000 00000000 00000000 00000000
f7438078 00000000 00000000 00000000 00000000
f7438088 00000000 444a455f 00000000 5752505f
f7438098 00000000 3052505f 00000000 3152505f
f74380a8 00000000 3252505f 00000000 5352435f
f74380b8 00000000 4353505f 00000000 f73fb840
f74380c8 00000000 00000000 00000000 f73fb840
f74380d8 00000000 f73fb94c f73fb98a f73fba36
1: kd> db f7438068
f7438068 00 00 00 00 00 00 00 00-00 00 00 00 00 00 00 00 ................
f7438078 00 00 00 00 00 00 00 00-00 00 00 00 00 00 00 00 ................
f7438088 00 00 00 00 5f 45 4a 44-00 00 00 00 5f 50 52 57 ...._EJD...._PRW
f7438098 00 00 00 00 5f 50 52 30-00 00 00 00 5f 50 52 31 ...._PR0...._PR1
f74380a8 00 00 00 00 5f 50 52 32-00 00 00 00 5f 43 52 53 ...._PR2...._CRS
f74380b8 00 00 00 00 5f 50 53 43-00 00 00 00 40 b8 3f f7 ...._PSC....@.?.
f74380c8 00 00 00 00 00 00 00 00-00 00 00 00 40 b8 3f f7 ............@.?.
f74380d8 00 00 00 00 4c b9 3f f7-8a b9 3f f7 36 ba 3f f7 ....L.?...?.6.?.


1: kd> g
Breakpoint 6 hit
eax=00000000 ebx=0000000b ecx=00000041 edx=00000002 esi=89984188 edi=80b019f4
eip=f73fb914 esp=f78aef6c ebp=f78aef84 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!ACPIBuildProcessGenericList+0x50:
f73fb914 85db test ebx,ebx
1: kd> g
Breakpoint 5 hit
eax=0000000c ebx=0000000c ecx=89984198 edx=00000001 esi=89984188 edi=80b019f4
eip=f73fb911 esp=f78aef68 ebp=f78aef84 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!ACPIBuildProcessGenericList+0x4d:
f73fb911 ff55f4 call dword ptr [ebp-0Ch] ss:0010:f78aef78={ACPI!ACPIBuildProcessDevicePhasePrw (f73fd18a)}
1: kd> t

1: kd> kc
#
00 ACPI!ACPIBuildProcessDevicePhasePrw
01 ACPI!ACPIBuildProcessGenericList
02 ACPI!ACPIBuildDeviceDpc
03 nt!KiRetireDpcList
04 nt!KiDispatchInterrupt
WARNING: Frame IP not in any known module. Following frames may be wrong.
05 0x0
1: kd> dv
BuildRequest = 0x89984188
ignorePrw = 0x00 ''
status = 0n-146812534
argData = struct _ObjData

1: kd> dx -r1 ((ACPI!_ACPI_BUILD_REQUEST *)0x89984188)
((ACPI!_ACPI_BUILD_REQUEST *)0x89984188) : 0x89984188 [Type: _ACPI_BUILD_REQUEST *]
[+0x000] ListEntry [Type: _LIST_ENTRY]
[+0x008] Signature : 0x5f534750 [Type: unsigned long]
[+0x00c] Flags : 0x1 [Type: unsigned long]
[+0x00c] UFlags [Type: __unnamed]
[+0x010] WorkDone : 0x1 [Type: unsigned long]
[+0x014] CurrentWorkDone : 0xc [Type: unsigned long]
[+0x018] NextWorkDone : 0x2 [Type: unsigned long]
[+0x01c] BuildContext : 0x899c0a88 [Type: void *]
[+0x020] Status : 0 [Type: long]
[+0x024] CurrentObject : 0x0 [Type: _NSObj *]
[+0x028] CallBack : 0x0 [Type: void (*)(void *,void *,long)]
[+0x02c] CallBackContext : 0x0 [Type: void *]
[+0x030] DeviceRequest [Type: __unnamed]
[+0x030] RunRequest [Type: __unnamed]
[+0x030] SynchronizeRequest [Type: __unnamed]
[+0x044] Integer : 0xf [Type: unsigned long]
[+0x044] String : 0xf : Unable to read memory at Address 0xf [Type: unsigned char *]
[+0x044] TargetListEntry : 0xf [Type: _LIST_ENTRY *]
1: kd> dt acpi!_DEVICE_EXTENSION 0x899c0a88
+0x000 Flags : 0x00401000`00000008
+0x000 UFlags : __unnamed
+0x008 Signature : 0x5f534750
+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 : 0x00070000 "--- memory read error at address 0x00070000 ---"
+0x10c Address : 0x70000
+0x110 InstanceID : (null)
+0x114 ResourceList : (null)
+0x118 PnpResourceList : (null)
+0x11c OutstandingIrpCount : 0n1
+0x120 ReferenceCount : 0n52
+0x124 HibernatePathCount : 0n0
+0x128 RemoveEvent : (null)
+0x12c AcpiObject : 0x899b2278 _NSObj
+0x130 DeviceObject : (null)
+0x134 TargetDeviceObject : (null)
+0x138 PhysicalDeviceObject : (null)
+0x13c ParentExtension : 0x899c0d58 _DEVICE_EXTENSION
+0x140 ChildDeviceList : _LIST_ENTRY [ 0x899c0a68 - 0x89979710 ]
+0x148 SiblingDeviceList : _LIST_ENTRY [ 0x89982768 - 0x899c0d38 ]
+0x150 EjectDeviceHead : _LIST_ENTRY [ 0x899c0bd8 - 0x899c0bd8 ]
+0x158 EjectDeviceList : _LIST_ENTRY [ 0x899c0be0 - 0x899c0be0 ]
1: kd> dx -id 0,0,899a2278 -r1 (*((ACPI!_ACPI_POWER_INFO *)0x899c0b18))
(*((ACPI!_ACPI_POWER_INFO *)0x899c0b18)) [Type: _ACPI_POWER_INFO]
[+0x000] Context : 0x0 [Type: void *]
[+0x004] PowerState : PowerDeviceUnspecified (0) [Type: _DEVICE_POWER_STATE]
[+0x008] DeviceNotifyHandler : 0x0 [Type: void (*)(void *,unsigned long)]
[+0x00c] HandlerContext : 0x0 [Type: void *]
[+0x010] PowerNode [Type: _ACPI_DEVICE_POWER_NODE * [4]]
[+0x020] PowerObject [Type: _NSObj * [5]]
[+0x034] WakeBit : 0x0 [Type: unsigned long]
[+0x038] DevicePowerMatrix [Type: _DEVICE_POWER_STATE [7]]
[+0x054] SystemWakeLevel : PowerSystemUnspecified (0) [Type: _SYSTEM_POWER_STATE]
[+0x058] DeviceWakeLevel : PowerDeviceUnspecified (0) [Type: _DEVICE_POWER_STATE]
[+0x05c] DesiredPowerState : PowerDeviceUnspecified (0) [Type: _DEVICE_POWER_STATE]
[+0x060] WakeSupportCount : 0x0 [Type: unsigned long]
[+0x064] WakeSupportList [Type: _LIST_ENTRY]
[+0x06c] CurrentPowerRequest : 0x0 [Type: _ACPI_POWER_REQUEST *]
[+0x070] PowerRequestListEntry [Type: _LIST_ENTRY]
[+0x078 ( 0: 0)] SupportDeviceD1 : 0x0 [Type: unsigned long]
[+0x078 ( 1: 1)] SupportDeviceD2 : 0x0 [Type: unsigned long]
[+0x078 ( 2: 2)] SupportWakeFromD0 : 0x0 [Type: unsigned long]
[+0x078 ( 3: 3)] SupportWakeFromD1 : 0x0 [Type: unsigned long]
[+0x078 ( 4: 4)] SupportWakeFromD2 : 0x0 [Type: unsigned long]
[+0x078 ( 5: 5)] SupportWakeFromD3 : 0x0 [Type: unsigned long]
[+0x078 (31: 6)] Reserved : 0x0 [Type: unsigned long]
1: kd> dx -id 0,0,899a2278 -r1 (*((ACPI!_NSObj * (*)[5])0x899c0b38))
(*((ACPI!_NSObj * (*)[5])0x899c0b38)) [Type: _NSObj * [5]]
[0] : 0x0 [Type: _NSObj *]
[1] : 0x0 [Type: _NSObj *]
[2] : 0x0 [Type: _NSObj *]
[3] : 0x0 [Type: _NSObj *]
[4] : 0x0 [Type: _NSObj *]

1: kd> x acpi!AcpiOverrideAttributes
f743b618 ACPI!AcpiOverrideAttributes = 0

//
// ACPI Override Attributes
//
#define ACPI_OVERRIDE_NVS_CHECK 0x00000001
#define ACPI_OVERRIDE_STA_CHECK 0x00000002
#define ACPI_OVERRIDE_MP_SLEEP 0x00000004
#define ACPI_OVERRIDE_OPTIONAL_WAKE 0x00000008
#define ACPI_OVERRIDE_DISABLE_S1 0x00000010
#define ACPI_OVERRIDE_DISABLE_S2 0x00000020
#define ACPI_OVERRIDE_DISABLE_S3 0x00000040
#define ACPI_OVERRIDE_DELL_MAXULONG_BUGCHECK 0x00000080

//
// Should we ignore the _PRW for this device?
//
if ( (AcpiOverrideAttributes & ACPI_OVERRIDE_OPTIONAL_WAKE) &&
!(deviceExtension->Flags & DEV_CAP_NO_DISABLE_WAKE) ) {

ignorePrw = TRUE;

}


typedef enum _DEVICE_POWER_STATE {
PowerDeviceUnspecified = 0, 未说明的;不明确的;
PowerDeviceD0,
PowerDeviceD1,
PowerDeviceD2,
PowerDeviceD3,
PowerDeviceMaximum
} DEVICE_POWER_STATE, *PDEVICE_POWER_STATE;

其中D0是工作态, 状态D1、D2是休眠态,D3是关闭状态。

#define DEV_CAP_NO_DISABLE_WAKE 0x00000008 00000000


//
// Get the appropriate _PSx object to go with this object
//
deviceExtension->PowerInfo.PowerObject[PowerDeviceUnspecified] =
ACPIAmliGetNamedChild(
deviceExtension->AcpiObject,
PACKED_PSW
);

1: kd> dx -id 0,0,899a2278 -r1 (*((ACPI!_NSObj * (*)[5])0x899c0b38))
(*((ACPI!_NSObj * (*)[5])0x899c0b38)) [Type: _NSObj * [5]]
[0] : 0x0 [Type: _NSObj *]
[1] : 0x0 [Type: _NSObj *]
[2] : 0x0 [Type: _NSObj *]
[3] : 0x0 [Type: _NSObj *]
[4] : 0x0 [Type: _NSObj *]

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

厄达替尼Erdafitinib基于血磷水平的剂量调整方案

厄达替尼(Erdafitinib)作为全球首个获批用于治疗FGFR基因突变阳性局部晚期或转移性尿路上皮癌的口服靶向药物,其剂量调整策略的核心在于通过动态监测血磷水平实现个体化给药。这一策略基于药物作用机制与临床实践数据的深度结合,既…

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

win11安装mysql

下载: https://dev.mysql.com/downloads/mysql/8.0.html 安装mysql数据库服务端 下载完成后,得到“mysql-8.0.45-winx64.msi”安装包,开始安装 选择典型安装 点击install 安装完成后,发现没有mysql服务 且打不开“MySQL 8.0 Com…

作者头像 李华
网站建设 2026/2/8 5:22:31

‌量子纠缠测试:bug在观察瞬间消失的灵异事件

1. 引言:量子世界的“幽灵”与测试中的谜团 在量子力学中,纠缠粒子的状态关联看似违背常识——当一方被观测时,另一方瞬间响应,无论距离多远,这种“超距作用”被爱因斯坦称为“鬼魅般的”现象。类似地,软件…

作者头像 李华
网站建设 2026/2/14 5:18:20

风险驱动测试新范式

几乎每个测试团队都经历过这样的尴尬时刻:自动化测试覆盖率达到85%,回归测试全部通过,信心满满地发布上线,结果第二天就收到严重线上故障报告。复盘时发现,出问题的恰恰是那些"被覆盖"的功能——测试用例执行…

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

HoRain云--XGBoost原理深度解析与实战指南

🎬 HoRain 云小助手:个人主页 ⛺️生活的理想,就是为了理想的生活! ⛳️ 推荐 前些天发现了一个超棒的服务器购买网站,性价比超高,大内存超划算!忍不住分享一下给大家。点击跳转到网站。 目录 ⛳️ 推荐 …

作者头像 李华