news 2026/6/10 13:25:02

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/6/8 9:36:34

AI专著生成神器来袭:工具推荐,让你的专著创作又快又好

学术专著的创作,不仅考验着我们的学术才能,同时也是对心理素质的一种挑战。与团队合作的论文不同,专著写作通常是一个人全程独立的过程。从选择主题、搭建框架到具体内容的撰写和修改,几乎每个环节都需要研究者自己去完成。长时间…

作者头像 李华
网站建设 2026/6/10 11:58:13

【攻略】26年周杰伦、谢霆锋、陶喆、王力宏演唱会门票怎么买?

2026年周杰伦、谢霆锋、陶喆、王力宏等演唱会门票怎么买?抢票攻略来了!自进入 2026 年以来,周杰伦、陶喆、谢霆锋、王力宏、张杰、梓渝、汪苏泷、薛之谦、邓紫棋、蔡依林、凤凰传奇等多个顶流巨星,演唱会通过审批,可谓…

作者头像 李华
网站建设 2026/6/9 20:57:23

物联网在智慧城市构建中的作用是什么?

前言:城市不再是钢筋水泥,而是“分布式系统” 最近几年,大家都在谈“智慧城市”。但在我们程序员眼里,所谓的“智慧城市”,本质上就是一个巨大的、高并发的、异构的、实时处理的超大规模分布式物联网系统。 路灯不再是简单的电路开关,而是消息队列里的一个节点;垃圾桶…

作者头像 李华
网站建设 2026/6/9 14:41:11

批判AI安全炒作,新一代端点防护平台扩大内测

麦克莱恩,弗吉尼亚州,美国,2026年1月15日——AppGuard发布了一份新的十大网络安全创新者专题报告,重点关注了人们对AI增强型恶意软件日益增长的担忧。AI使得恶意软件更加难以检测。更糟糕的是,攻击者利用AI进行评估、适…

作者头像 李华