news 2026/6/15 16:12:45

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/15 14:00:32

餐饮管理系统的设计与实现(11827)

有需要的同学,源代码和配套文档领取,加文章最下方的名片哦 一、项目演示 项目演示视频 二、资料介绍 完整源代码(前后端源代码SQL脚本)配套文档(LWPPT开题报告)远程调试控屏包运行 三、技术介绍 Java…

作者头像 李华
网站建设 2026/6/15 14:28:06

大方县粮油购销有限公司粮食收购管理系统(11830)

有需要的同学,源代码和配套文档领取,加文章最下方的名片哦 一、项目演示 项目演示视频 二、资料介绍 完整源代码(前后端源代码SQL脚本)配套文档(LWPPT开题报告)远程调试控屏包运行 三、技术介绍 Java…

作者头像 李华
网站建设 2026/6/13 13:43:37

windows下基于openssl生成自签名证书

安装git,然后选择一个文件夹右键Git Bash Here 生成 IP 自签名证书(含 SAN) 例如我的内网ip:172.16.1.22 MSYS_NO_PATHCONV1 openssl req -x509 -nodes -days 3650 \ -newkey rsa:2048 \ -keyout server.key \ -out server.crt \ -subj…

作者头像 李华
网站建设 2026/6/15 15:00:50

AI写专著超神攻略!精选工具测评,为你提供最佳写作方案

首次尝试写学术专著的困境与AI工具解决方案 对于首次尝试写学术专著的研究者来说,整个写作过程就像是一场“摸索前行”的旅程,随处都是未知的挑战。在选题上常常会感到困惑,不知道如何在“有意义”与“可行性”之间找到一个合适的平衡点&…

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

神经符号AI:驱动软件测试的智能化变革

一、技术融合:重新定义测试智能化 神经符号AI通过融合深度学习的模式识别能力与符号系统的逻辑推理机制,构建了"感知-推理-决策"闭环。在测试领域,该技术主要体现为三大核心应用: 智能测试用例生成 深度学习组件&#x…

作者头像 李华