news 2026/3/24 10:19:11

Device (PE70)节点的Return (And (LEqual (ID, 0x07A015AD), 0x0F))比较是否相等与0xF和返回结果--非常重要

作者头像

张小明

前端开发工程师

1.2k 24
文章封面图
Device (PE70)节点的Return (And (LEqual (ID, 0x07A015AD), 0x0F))比较是否相等与0xF和返回结果--非常重要

Device (PE70)节点的Return (And (LEqual (ID, 0x07A015AD), 0x0F))比较是否相等与0xF和返回结果--非常重要

第一部分:
Device (PE70)
{


OperationRegion (REGS, PCI_Config, 0x00, 0x04)
Field (REGS, DWordAcc, NoLock, Preserve)
{
ID, 32
}

Method (_STA, 0, NotSerialized) // _STA: Status
{
Return (And (LEqual (ID, 0x07A015AD), 0x0F))
}

第二部分:
1: kd> g
Breakpoint 45 hit
eax=00000000 ebx=f743a948 ecx=898e7000 edx=00000020 esi=898e7000 edi=898e8e58
eip=f741d82f esp=f791ad14 ebp=f791ad34 iopl=0 nv up ei ng nz na pe nc
cs=0008 ss=0010 ds=0023 es=0023 fs=0030 gs=0000 efl=00000286
ACPI!RunContext+0x11f:
f741d82f ff570c call dword ptr [edi+0Ch] ds:0023:898e8e64={ACPI!AccFieldUnit (f7419b71)}
1: kd> t
eax=00000000 ebx=f743a948 ecx=898e7000 edx=00000020 esi=898e7000 edi=898e8e58
eip=f7419b71 esp=f791ad10 ebp=f791ad34 iopl=0 nv up ei ng nz na pe nc
cs=0008 ss=0010 ds=0023 es=0023 fs=0030 gs=0000 efl=00000286
ACPI!AccFieldUnit:
f7419b71 55 push ebp
1: kd> kc
#
00 ACPI!AccFieldUnit
01 ACPI!RunContext
02 ACPI!DispatchCtxtQueue
03 ACPI!StartTimeSlicePassive
04 ACPI!ACPIWorker
05 nt!PspSystemThreadStartup
06 nt!KiThreadStartup


1: kd> dv
pctxt = 0x898e7000
pafu = 0x898e8e58
rc = 0n0
1: kd> dx -r1 ((ACPI!_accfieldunit *)0x898e8e58)
((ACPI!_accfieldunit *)0x898e8e58) : 0x898e8e58 [Type: _accfieldunit *]
[+0x000] FrameHdr [Type: _framehdr]
[+0x010] pdataObj : 0x89947b44 [Type: _ObjData *]
[+0x014] pdata : 0x898e7164 [Type: _ObjData *]
1: kd> dx -r1 ((ACPI!_ObjData *)0x898e7164)
((ACPI!_ObjData *)0x898e7164) : 0x898e7164 [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 : 0x7a015ad [Type: unsigned long]
[+0x008] uipDataValue : 0x7a015ad [Type: unsigned long]
[+0x008] pnsAlias : 0x7a015ad [Type: _NSObj *]
[+0x008] pdataAlias : 0x7a015ad [Type: _ObjData *]
[+0x008] powner : 0x7a015ad [Type: void *]
[+0x00c] dwDataLen : 0x0 [Type: unsigned long]
[+0x010] pbDataBuff : 0x0 [Type: unsigned char *]
1: kd> dx -r1 (*((ACPI!_framehdr *)0x898e8e58))
(*((ACPI!_framehdr *)0x898e8e58)) [Type: _framehdr]
[+0x000] dwSig : 0x55464341 [Type: unsigned long]
[+0x004] dwLen : 0x18 [Type: unsigned long]
[+0x008] dwfFrame : 0x10003 [Type: unsigned long] 到第三阶段了。
[+0x00c] pfnParse : 0xf7419b71 [Type: long (__cdecl*)(_ctxt *,void *,long)]

1: kd> kc
#
00 ACPI!ParseTerm
01 ACPI!RunContext
02 ACPI!DispatchCtxtQueue
03 ACPI!StartTimeSlicePassive
04 ACPI!ACPIWorker
05 nt!PspSystemThreadStartup
06 nt!KiThreadStartup
1: kd> dv
pctxt = 0x898e7000
pterm = 0x898e8e70
rc = 0n0
1: kd> dx -r1 ((ACPI!_term *)0x898e8e70)
((ACPI!_term *)0x898e8e70) : 0x898e8e70 [Type: _term *]
[+0x000] FrameHdr [Type: _framehdr]
[+0x010] pbOpTerm : 0x89947bc3 : 0x93 [Type: unsigned char *]
[+0x014] pbOpEnd : 0x0 [Type: unsigned char *]
[+0x018] pbScopeEnd : 0x0 [Type: unsigned char *]
[+0x01c] pamlterm : 0xf7439310 [Type: _amlterm *]
[+0x020] pnsObj : 0x0 [Type: _NSObj *]
[+0x024] iArg : 1 [Type: int]
[+0x028] icArgs : 2 [Type: int]
[+0x02c] pdataArgs : 0x898e7164 [Type: _ObjData *]
[+0x030] pdataResult : 0x898e711c [Type: _ObjData *]
1: kd> dx -r1 ((ACPI!_amlterm *)0xf7439310)
((ACPI!_amlterm *)0xf7439310) : 0xf7439310 [Type: _amlterm *]
[+0x000] pszTermName : 0xf742c534 : "LEqual" [Type: char *]
[+0x004] dwOpcode : 0x93 [Type: unsigned long]
[+0x008] pszArgTypes : 0xf742c53c : "CC" [Type: char *]
[+0x00c] dwTermClass : 0x4 [Type: unsigned long]
[+0x010] dwfOpcode : 0x0 [Type: unsigned long]
[+0x014] pfnCallBack : 0x0 [Type: long (__cdecl*)(unsigned long,unsigned long,_NSObj *,unsigned long)]
[+0x018] dwCBData : 0x0 [Type: unsigned long]
[+0x01c] pfnOpcode : 0xf7423d65 [Type: long (__cdecl*)()]
1: kd> u f7423d65
ACPI!LogOp2 [d:\srv03rtm\base\busdrv\acpi\driver\amlinew\type2op.c @ 1084]:
f7423d65 55 push ebp
f7423d66 8bec mov ebp,esp
f7423d68 56 push esi
f7423d69 57 push edi
f7423d6a 6a01 push 1
f7423d6c be405643f7 mov esi,offset ACPI!`string' (f7435640)
f7423d71 56 push esi
f7423d72 6a02 push 2

1: kd> dx -r1 ((ACPI!_ObjData *)0x898e7164) 第一个参数:
((ACPI!_ObjData *)0x898e7164) : 0x898e7164 [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 : 0x7a015ad [Type: unsigned long]
[+0x008] uipDataValue : 0x7a015ad [Type: unsigned long]
[+0x008] pnsAlias : 0x7a015ad [Type: _NSObj *]
[+0x008] pdataAlias : 0x7a015ad [Type: _ObjData *]
[+0x008] powner : 0x7a015ad [Type: void *]
[+0x00c] dwDataLen : 0x0 [Type: unsigned long]
[+0x010] pbDataBuff : 0x0 [Type: unsigned char *]
1: kd> dt ACPI!_ObjData 0x898e7164+14 第二个参数:
+0x000 dwfData : 0
+0x002 dwDataType : 0
+0x004 dwRefCount : 0
+0x004 pdataBase : (null)
+0x008 dwDataValue : 0
+0x008 uipDataValue : 0
+0x008 pnsAlias : (null)
+0x008 pdataAlias : (null)
+0x008 powner : (null)
+0x00c dwDataLen : 0
+0x010 pbDataBuff : (null)

1: kd> dx -r1 ((ACPI!_ctxt *)0x898e7000)
((ACPI!_ctxt *)0x898e7000) : 0x898e7000 [Type: _ctxt *]
[+0x000] dwSig : 0x54585443 [Type: unsigned long]
[+0x004] pbCtxtEnd : 0x898e9000 : 0x0 [Type: unsigned char *]
[+0x008] listCtxt [Type: _List]
[+0x010] listQueue [Type: _List]
[+0x018] pplistCtxtQueue : 0x0 [Type: _List * *]
[+0x01c] plistResources : 0x0 [Type: _List *]
[+0x020] dwfCtxt : 0x130 [Type: unsigned long]
[+0x024] pnsObj : 0x89947b6c [Type: _NSObj *]
[+0x028] pnsScope : 0x89947b6c [Type: _NSObj *]
[+0x02c] powner : 0x898e70e0 [Type: _objowner *]
[+0x030] pcall : 0x898e8f34 [Type: _call *]
[+0x034] pnctxt : 0x0 [Type: _nestedctxt *]
[+0x038] dwSyncLevel : 0x0 [Type: unsigned long]
[+0x03c] pbOp : 0x89947bc8 : 0xc [Type: unsigned char *]
[+0x040] Result [Type: _ObjData]
[+0x054] pfnAsyncCallBack : 0xf7407364 [Type: void (__cdecl*)(_NSObj *,long,_ObjData *,void *)]
[+0x058] pdataCallBack : 0x898f7d5c [Type: _ObjData *]
[+0x05c] pvContext : 0x898f7d30 [Type: void *]
[+0x060] Timer [Type: _KTIMER]
[+0x088] Dpc [Type: _KDPC]
[+0x0a8] pheapCurrent : 0x898e70bc [Type: _heap *]
[+0x0ac] CtxtData [Type: _ctxtdata]
[+0x0bc] LocalHeap [Type: _heap]
1: kd> db 0x89947bc8
89947bc8 0c ad 15 a0 07 0a 0f 00-48 4e 53 4f 44 00 00 00 ........HNSOD...
89947bd8 00 20 94 89 6c 7b 94 89-20 7c 94 89 7c 77 94 89 . ..l{.. |..|w..
89947be8 00 00 00 00 50 50 48 52-30 f3 9a 89 6c 7b 94 89 ....PPHR0...l{..
89947bf8 00 00 08 00 00 00 00 00-00 00 00 00 1b 00 00 00 ................
89947c08 78 7a 94 89 00 00 00 00-00 00 00 00 48 4e 53 4f xz..........HNSO
89947c18 44 00 00 00 00 20 94 89-dc 7b 94 89 c0 77 94 89 D.... ...{...w..
89947c28 7c 77 94 89 98 7c 94 89-53 31 46 30 30 f3 9a 89 |w...|..S1F00...
89947c38 dc 7b 94 89 00 00 06 00-00 00 00 00 00 00 00 00 .{..............


OperationRegion (REGS, PCI_Config, 0x00, 0x04)
Field (REGS, DWordAcc, NoLock, Preserve)
{
ID, 32
}

Method (_STA, 0, NotSerialized) // _STA: Status
{
Return (And (LEqual (ID, 0x07A015AD), 0x0F))
}

Stage1:
//
// Stage 1: Parse arguments.
//
while (pterm->iArg < pterm->icArgs)
{


[+0x024] iArg : 1 [Type: int]
[+0x028] icArgs : 2 [Type: int]

分析第二个参数: [+0x008] pszArgTypes : 0xf742c53c : "CC" [Type: char *]

1: kd> db 0x89947bc8
89947bc8 0c ad 15 a0 07 0a 0f 00-48 4e 53 4f 44 00 00 00 ........HNSOD...

1: kd> dv
pctxt = 0x898e7000
pterm = 0x898e8e70
rc = 0n0
1: kd> dx -r1 ((ACPI!_term *)0x898e8e70)
((ACPI!_term *)0x898e8e70) : 0x898e8e70 [Type: _term *]
[+0x000] FrameHdr [Type: _framehdr]
[+0x010] pbOpTerm : 0x89947bc3 : 0x93 [Type: unsigned char *]
[+0x014] pbOpEnd : 0x0 [Type: unsigned char *]
[+0x018] pbScopeEnd : 0x0 [Type: unsigned char *]
[+0x01c] pamlterm : 0xf7439310 [Type: _amlterm *]
[+0x020] pnsObj : 0x0 [Type: _NSObj *]
[+0x024] iArg : 2 [Type: int]
[+0x028] icArgs : 2 [Type: int]
[+0x02c] pdataArgs : 0x898e7164 [Type: _ObjData *]
[+0x030] pdataResult : 0x898e711c [Type: _ObjData *]
1: kd> dx -r1 ((ACPI!_amlterm *)0xf7439310)
((ACPI!_amlterm *)0xf7439310) : 0xf7439310 [Type: _amlterm *]
[+0x000] pszTermName : 0xf742c534 : "LEqual" [Type: char *]
[+0x004] dwOpcode : 0x93 [Type: unsigned long]
[+0x008] pszArgTypes : 0xf742c53c : "CC" [Type: char *]
[+0x00c] dwTermClass : 0x4 [Type: unsigned long]
[+0x010] dwfOpcode : 0x0 [Type: unsigned long]
[+0x014] pfnCallBack : 0x0 [Type: long (__cdecl*)(unsigned long,unsigned long,_NSObj *,unsigned long)]
[+0x018] dwCBData : 0x0 [Type: unsigned long]
[+0x01c] pfnOpcode : 0xf7423d65 [Type: long (__cdecl*)()]

rc = ParseArg(pctxt, pterm->pamlterm->pszArgTypes[i],
&pterm->pdataArgs[i]);


#define ARGTYPE_NAME 'N' //name argument
#define ARGTYPE_DATAOBJ 'O' //data argument
#define ARGTYPE_DWORD 'D' //numeric dword argument
#define ARGTYPE_WORD 'W' //numeric word argument
#define ARGTYPE_BYTE 'B' //numeric byte argument
#define ARGTYPE_SNAME 'S' //supername argument
#define ARGTYPE_SNAME2 's' //supername argument
// object can be non-existing
#define ARGTYPE_OPCODE 'C' //opcode argument 这个:


case ARGTYPE_OPCODE:
rc = ParseOpcode(pctxt, NULL, pdataArg);
break;

1: kd> t
eax=00000043 ebx=898e7000 ecx=898e7164 edx=00000020 esi=898e8e70 edi=00000001
eip=f7427378 esp=f791acf0 ebp=f791ad0c 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!ParseArg:
f7427378 55 push ebp
1: kd> kc
#
00 ACPI!ParseArg
01 ACPI!ParseTerm
02 ACPI!RunContext
03 ACPI!DispatchCtxtQueue
04 ACPI!StartTimeSlicePassive
05 ACPI!ACPIWorker
06 nt!PspSystemThreadStartup
07 nt!KiThreadStartup
1: kd> dv
pctxt = 0x898e7000
chArgType = 0n67 'C'
pdataArg = 0x898e7178

case ARGTYPE_OPCODE:
rc = ParseOpcode(pctxt, NULL, pdataArg);
break;

1: kd> kc
#
00 ACPI!ParseOpcode
01 ACPI!ParseArg
02 ACPI!ParseTerm
03 ACPI!RunContext
04 ACPI!DispatchCtxtQueue
05 ACPI!StartTimeSlicePassive
06 ACPI!ACPIWorker
07 nt!PspSystemThreadStartup
08 nt!KiThreadStartup
1: kd> dv
pctxt = 0x898e7000
pbScopeEnd = 0x00000000 ""
pdataResult = 0x898e7178
pamlterm = 0x898e7000


pbOpTerm = pctxt->pbOp;
if (*pctxt->pbOp == OP_EXT_PREFIX)
{
pctxt->pbOp++;
pamlterm = FindOpcodeTerm(*pctxt->pbOp, ExOpcodeTable);
}
else
{
pamlterm = OpcodeTable[*pctxt->pbOp];
}

1: kd> db 0x89947bc8
89947bc8 0c ad 15 a0 07 0a 0f 00-48 4e 53 4f 44 00 00 00 ........HNSOD...

1: kd> x acpi!OpcodeTable
f74396b0 ACPI!OpcodeTable = struct _amlterm *[256]
1: kd> dx -r1 (*((ACPI!_amlterm * (*)[256])0xf74396b0))
(*((ACPI!_amlterm * (*)[256])0xf74396b0)) [Type: _amlterm * [256]]
[0] : 0xf7439610 [Type: _amlterm *]
[1] : 0xf7439610 [Type: _amlterm *]
[2] : 0x0 [Type: _amlterm *]
[3] : 0x0 [Type: _amlterm *]
[4] : 0x0 [Type: _amlterm *]
[5] : 0x0 [Type: _amlterm *]
[6] : 0xf7438cd0 [Type: _amlterm *]
[7] : 0x0 [Type: _amlterm *]
[8] : 0xf7438cf0 [Type: _amlterm *]
[9] : 0x0 [Type: _amlterm *]
[10] : 0xf7439610 [Type: _amlterm *]
[11] : 0xf7439610 [Type: _amlterm *]
[12] : 0xf7439610 [Type: _amlterm *]

1: kd> dx -r1 ((ACPI!_amlterm *)0xf7439610)
((ACPI!_amlterm *)0xf7439610) : 0xf7439610 [Type: _amlterm *]
[+0x000] pszTermName : 0x0 [Type: char *]
[+0x004] dwOpcode : 0xffffffff [Type: unsigned long]
[+0x008] pszArgTypes : 0x0 [Type: char *]
[+0x00c] dwTermClass : 0x5 [Type: unsigned long]
[+0x010] dwfOpcode : 0x8 [Type: unsigned long]
[+0x014] pfnCallBack : 0x0 [Type: long (__cdecl*)(unsigned long,unsigned long,_NSObj *,unsigned long)]
[+0x018] dwCBData : 0x0 [Type: unsigned long]
[+0x01c] pfnOpcode : 0x0 [Type: long (__cdecl*)()]


// dwfOpcode flags
#define OF_VARIABLE_LIST 0x00000001
#define OF_ARG_OBJECT 0x00000002
#define OF_LOCAL_OBJECT 0x00000004
#define OF_DATA_OBJECT 0x00000008
#define OF_STRING_OBJECT 0x00000010
#define OF_NAME_OBJECT 0x00000020
#define OF_DEBUG_OBJECT 0x00000040
#define OF_REF_OBJECT 0x00000080
#define OF_CALLBACK_EX 0x80000000

else if (pamlterm->dwfOpcode & OF_DATA_OBJECT) #define OF_DATA_OBJECT 0x00000008
{
rc = ParseIntObj(&pctxt->pbOp, pdataResult, FALSE);
}

else
{
pamlterm = OpcodeTable[*pctxt->pbOp]; =eax=f7439610
}
1: kd> p
eax=f7439610 ebx=898e7000 ecx=89947bc8 edx=00000020 esi=898e703c edi=89947bc8
eip=f742728c esp=f791acc0 ebp=f791accc iopl=0 nv up ei ng nz na pe cy
cs=0008 ss=0010 ds=0023 es=0023 fs=0030 gs=0000 efl=00000287
ACPI!ParseOpcode+0xa4:
f742728c 8bc8 mov ecx,eax


参考:第一个参数和第二个参数
1: kd> db 0x89947bc8-10
89947bb8 00 00 00 00 00 00 00 00-00 a4 7b 93 49 44 5f 5f ..........{.ID__
89947bc8 0c ad 15 a0 07 0a 0f 00-48 4e 53 4f 44 00 00 00 ........HNSOD...
参考:第一个参数和第二个参数


else if (pamlterm->dwfOpcode & OF_DATA_OBJECT)
{
rc = ParseIntObj(&pctxt->pbOp, pdataResult, FALSE);
}

1: kd> dv
pctxt = 0xf7439610
pbScopeEnd = 0x00000000 ""
pdataResult = 0x898e7178
pamlterm = 0xf7439610
1: kd> dx -r1 ((ACPI!_ObjData *)0x898e7178)
((ACPI!_ObjData *)0x898e7178) : 0x898e7178 [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 : 0x7a015ad [Type: unsigned long]
[+0x008] uipDataValue : 0x7a015ad [Type: unsigned long]
[+0x008] pnsAlias : 0x7a015ad [Type: _NSObj *]
[+0x008] pdataAlias : 0x7a015ad [Type: _ObjData *]
[+0x008] powner : 0x7a015ad [Type: void *]
[+0x00c] dwDataLen : 0x0 [Type: unsigned long]
[+0x010] pbDataBuff : 0x0 [Type: unsigned char *]

rc = ParseArg(pctxt, pterm->pamlterm->pszArgTypes[i],
&pterm->pdataArgs[i]); 返回到这里:

1: kd> gu
eax=00000000 ebx=898e7000 ecx=f743960c edx=00000000 esi=898e8e70 edi=00000001
eip=f7427b66 esp=f791acf4 ebp=f791ad0c 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!ParseTerm+0x132:
f7427b66 83c40c add esp,0Ch
1: kd> dv
pctxt = 0x898e7000
pterm = 0x898e8e70
rc = 0n0
1: kd> dx -r1 ((ACPI!_term *)0x898e8e70)
((ACPI!_term *)0x898e8e70) : 0x898e8e70 [Type: _term *]
[+0x000] FrameHdr [Type: _framehdr]
[+0x010] pbOpTerm : 0x89947bc3 : 0x93 [Type: unsigned char *]
[+0x014] pbOpEnd : 0x0 [Type: unsigned char *]
[+0x018] pbScopeEnd : 0x0 [Type: unsigned char *]
[+0x01c] pamlterm : 0xf7439310 [Type: _amlterm *]
[+0x020] pnsObj : 0x0 [Type: _NSObj *]
[+0x024] iArg : 2 [Type: int]
[+0x028] icArgs : 2 [Type: int]
[+0x02c] pdataArgs : 0x898e7164 [Type: _ObjData *]
[+0x030] pdataResult : 0x898e711c [Type: _ObjData *]
1: kd> dx -r1 ((ACPI!_ObjData *)0x898e7164) 第一个参数:
((ACPI!_ObjData *)0x898e7164) : 0x898e7164 [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 : 0x7a015ad [Type: unsigned long]
[+0x008] uipDataValue : 0x7a015ad [Type: unsigned long]
[+0x008] pnsAlias : 0x7a015ad [Type: _NSObj *]
[+0x008] pdataAlias : 0x7a015ad [Type: _ObjData *]
[+0x008] powner : 0x7a015ad [Type: void *]
[+0x00c] dwDataLen : 0x0 [Type: unsigned long]
[+0x010] pbDataBuff : 0x0 [Type: unsigned char *]
1: kd> dt ACPI!_ObjData 0x898e7164+14 得到了第二个参数:
+0x000 dwfData : 0
+0x002 dwDataType : 1
+0x004 dwRefCount : 0
+0x004 pdataBase : (null)
+0x008 dwDataValue : 0x7a015ad
+0x008 uipDataValue : 0x7a015ad
+0x008 pnsAlias : 0x07a015ad _NSObj
+0x008 pdataAlias : 0x07a015ad _ObjData
+0x008 powner : 0x07a015ad Void
+0x00c dwDataLen : 0
+0x010 pbDataBuff : (null)

调用函数

//
// If we come here, there is no more argument, so we can fall
// through to the next stage.
//
pterm->FrameHdr.dwfFrame++;

case 2:


if (pterm->pamlterm->pfnOpcode != NULL)
{
if (((rc = pterm->pamlterm->pfnOpcode(pctxt, pterm)) !=
STATUS_SUCCESS) ||
(&pterm->FrameHdr != (PFRAMEHDR)pctxt->LocalHeap.pbHeapEnd))
{
break;
}
}


1: kd> kc
#
00 ACPI!LogOp2
01 ACPI!ParseTerm
02 ACPI!RunContext
03 ACPI!DispatchCtxtQueue
04 ACPI!StartTimeSlicePassive
05 ACPI!ACPIWorker
06 nt!PspSystemThreadStartup
07 nt!KiThreadStartup
1: kd> dv
pctxt = 0x898e7000
pterm = 0x898e8e70
rc = 0n-1987146128

1: kd> dx -r1 ((ACPI!_term *)0x898e8e70)
((ACPI!_term *)0x898e8e70) : 0x898e8e70 [Type: _term *]
[+0x000] FrameHdr [Type: _framehdr]
[+0x010] pbOpTerm : 0x89947bc3 : 0x93 [Type: unsigned char *]
[+0x014] pbOpEnd : 0x0 [Type: unsigned char *]
[+0x018] pbScopeEnd : 0x0 [Type: unsigned char *]
[+0x01c] pamlterm : 0xf7439310 [Type: _amlterm *]
[+0x020] pnsObj : 0x0 [Type: _NSObj *]
[+0x024] iArg : 2 [Type: int]
[+0x028] icArgs : 2 [Type: int]
[+0x02c] pdataArgs : 0x898e7164 [Type: _ObjData *]
[+0x030] pdataResult : 0x898e711c [Type: _ObjData *]
1: kd> dx -r1 ((ACPI!_amlterm *)0xf7439310)
((ACPI!_amlterm *)0xf7439310) : 0xf7439310 [Type: _amlterm *]
[+0x000] pszTermName : 0xf742c534 : "LEqual" [Type: char *]
[+0x004] dwOpcode : 0x93 [Type: unsigned long]
[+0x008] pszArgTypes : 0xf742c53c : "CC" [Type: char *]
[+0x00c] dwTermClass : 0x4 [Type: unsigned long]
[+0x010] dwfOpcode : 0x0 [Type: unsigned long]
[+0x014] pfnCallBack : 0x0 [Type: long (__cdecl*)(unsigned long,unsigned long,_NSObj *,unsigned long)]
[+0x018] dwCBData : 0x0 [Type: unsigned long]
[+0x01c] pfnOpcode : 0xf7423d65 [Type: long (__cdecl*)()]
1: kd> dx -r1 ((ACPI!_ObjData *)0x898e711c)
((ACPI!_ObjData *)0x898e711c) : 0x898e711c [Type: _ObjData *]
[+0x000] dwfData : 0x0 [Type: unsigned short]
[+0x002] dwDataType : 0x0 [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 *]


1: kd> db 0x89947bc8-10
89947bb8 00 00 00 00 00 00 00 00-00 a4 7b 93 49 44 5f 5f ..........{.ID__
89947bc8 0c ad 15 a0 07 0a 0f 00-48 4e 53 4f 44 00 00 00 ........HNSOD...

93 49 44 5f 5f ..........{.ID__


D:\srv03rtm\base\busdrv\acpi/driver/inc/aml.h:84:#define OP_LAND 0x90


#define OP_NONE 0xffffffff //not a valid opcode

#define OP_ZERO 0x00
#define OP_ONE 0x01
#define OP_ALIAS 0x06
#define OP_NAME 0x08
#define OP_BYTE 0x0a
#define OP_WORD 0x0b
#define OP_DWORD 0x0c
#define OP_STRING 0x0d
#define OP_SCOPE 0x10
#define OP_BUFFER 0x11
#define OP_PACKAGE 0x12
#define OP_METHOD 0x14
#define OP_DUAL_NAME_PREFIX 0x2e // '.'
#define OP_MULTI_NAME_PREFIX 0x2f // '/'
#define OP_EXT_PREFIX 0x5b // '['
#define OP_ROOT_PREFIX 0x5c // '\'
#define OP_PARENT_PREFIX 0x5e // '^'
#define OP_LOCAL0 0x60 // '`'
#define OP_LOCAL1 0x61 // 'a'
#define OP_LOCAL2 0x62 // 'b'
#define OP_LOCAL3 0x63 // 'c'
#define OP_LOCAL4 0x64 // 'd'
#define OP_LOCAL5 0x65 // 'e'
#define OP_LOCAL6 0x66 // 'f'
#define OP_LOCAL7 0x67 // 'g'
#define OP_ARG0 0x68 // 'h'
#define OP_ARG1 0x69 // 'i'
#define OP_ARG2 0x6a // 'j'
#define OP_ARG3 0x6b // 'k'
#define OP_ARG4 0x6c // 'l'
#define OP_ARG5 0x6d // 'm'
#define OP_ARG6 0x6e // 'n'
#define OP_STORE 0x70 // 'p'
#define OP_REFOF 0x71
#define OP_ADD 0x72
#define OP_CONCAT 0x73
#define OP_SUBTRACT 0x74
#define OP_INCREMENT 0x75
#define OP_DECREMENT 0x76
#define OP_MULTIPLY 0x77
#define OP_DIVIDE 0x78
#define OP_SHIFTL 0x79
#define OP_SHIFTR 0x7a
#define OP_AND 0x7b #define OP_AND 0x7b
#define OP_NAND 0x7c
#define OP_OR 0x7d
#define OP_NOR 0x7e
#define OP_XOR 0x7f
#define OP_NOT 0x80
#define OP_FINDSETLBIT 0x81
#define OP_FINDSETRBIT 0x82
#define OP_DEREFOF 0x83
#define OP_NOTIFY 0x86
#define OP_SIZEOF 0x87
#define OP_INDEX 0x88
#define OP_MATCH 0x89
#define OP_DWORDFIELD 0x8a
#define OP_WORDFIELD 0x8b
#define OP_BYTEFIELD 0x8c
#define OP_BITFIELD 0x8d
#define OP_OBJTYPE 0x8e
#define OP_LAND 0x90
#define OP_LOR 0x91
#define OP_LNOT 0x92
#define OP_LNOTEQ 0x9392
#define OP_LLEQ 0x9492
#define OP_LGEQ 0x9592
#define OP_LEQ 0x93 #define OP_LEQ 0x93
#define OP_LG 0x94
#define OP_LL 0x95
#define OP_IF 0xa0
#define OP_ELSE 0xa1
#define OP_WHILE 0xa2
#define OP_NOP 0xa3
#define OP_RETURN 0xa4 #define OP_RETURN 0xa4
#define OP_BREAK 0xa5
#define OP_OSI 0xca
#define OP_BREAKPOINT 0xcc
#define OP_ONES 0xff

OperationRegion (REGS, PCI_Config, 0x00, 0x04)
Field (REGS, DWordAcc, NoLock, Preserve)
{
ID, 32
}

Method (_STA, 0, NotSerialized) // _STA: Status
{
Return (And (LEqual (ID, 0x07A015AD), 0x0F))
}

case OP_LEQ:
ENTER(2, ("LEqual(Value1=%x,Value2=%x)\n",
pterm->pdataArgs[0].uipDataValue,
pterm->pdataArgs[1].uipDataValue));
fResult = (BOOLEAN)(pterm->pdataArgs[0].uipDataValue ==
pterm->pdataArgs[1].uipDataValue);
EXIT(2, ("LEqual=%x (Result=%x)\n", rc, fResult));
}
pterm->pdataResult->dwDataType = OBJTYPE_INTDATA;
pterm->pdataResult->uipDataValue = fResult?
DATAVALUE_ONES: DATAVALUE_ZERO;
}


//Predefined data values (dwDataValue)
#define DATAVALUE_ZERO 0
#define DATAVALUE_ONE 1
#define DATAVALUE_ONES 0xffffffff


switch (pterm->pamlterm->dwOpcode)
{
case OP_LAND:
ENTER(2, ("LAnd(Value1=%x,Value2=%x)\n",
pterm->pdataArgs[0].uipDataValue,
pterm->pdataArgs[1].uipDataValue));
fResult = (BOOLEAN)(pterm->pdataArgs[0].uipDataValue &&
pterm->pdataArgs[1].uipDataValue);
EXIT(2, ("LAnd=%x (Result=%x)\n", rc, fResult));
break;

case OP_LOR:
ENTER(2, ("LOr(Value1=%x,Value2=%x)\n",
pterm->pdataArgs[0].uipDataValue,
pterm->pdataArgs[1].uipDataValue));
fResult = (BOOLEAN)(pterm->pdataArgs[0].uipDataValue ||
pterm->pdataArgs[1].uipDataValue);
EXIT(2, ("LOr=%x (Result=%x)\n", rc, fResult));
break;

case OP_LG:
ENTER(2, ("LGreater(Value1=%x,Value2=%x)\n",
pterm->pdataArgs[0].uipDataValue,
pterm->pdataArgs[1].uipDataValue));
fResult = (BOOLEAN)(pterm->pdataArgs[0].uipDataValue >
pterm->pdataArgs[1].uipDataValue);
EXIT(2, ("LGreater=%x (Result=%x)\n", rc, fResult));
break;

case OP_LL:
ENTER(2, ("LLess(Value1=%x,Value2=%x)\n",
pterm->pdataArgs[0].uipDataValue,
pterm->pdataArgs[1].uipDataValue));
fResult = (BOOLEAN)(pterm->pdataArgs[0].uipDataValue <
pterm->pdataArgs[1].uipDataValue);
EXIT(2, ("LLess=%x (Result=%x)\n", rc, fResult));
break;

case OP_LEQ:
ENTER(2, ("LEqual(Value1=%x,Value2=%x)\n",
pterm->pdataArgs[0].uipDataValue,
pterm->pdataArgs[1].uipDataValue));
fResult = (BOOLEAN)(pterm->pdataArgs[0].uipDataValue ==
pterm->pdataArgs[1].uipDataValue);
EXIT(2, ("LEqual=%x (Result=%x)\n", rc, fResult));
}
pterm->pdataResult->dwDataType = OBJTYPE_INTDATA;
pterm->pdataResult->uipDataValue = fResult?
DATAVALUE_ONES: DATAVALUE_ZERO;
}

1: kd> dx -r1 ((ACPI!_ObjData *)0x898e711c)
((ACPI!_ObjData *)0x898e711c) : 0x898e711c [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 : 0xffffffff [Type: unsigned long]
[+0x008] uipDataValue : 0xffffffff [Type: unsigned long] 0xffffffff表示TURE。0表示FALSE。
[+0x008] pnsAlias : 0xffffffff [Type: _NSObj *]
[+0x008] pdataAlias : 0xffffffff [Type: _ObjData *]
[+0x008] powner : 0xffffffff [Type: void *]
[+0x00c] dwDataLen : 0x0 [Type: unsigned long]
[+0x010] pbDataBuff : 0x0 [Type: unsigned char *]


1: kd> gu
eax=00000000 ebx=898e7000 ecx=07a015ad edx=00000000 esi=898e8e70 edi=00000001
eip=f7427bf3 esp=f791acf8 ebp=f791ad0c 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!ParseTerm+0x1bf:
f7427bf3 85c0 test eax,eax rc=eax=00000000

if (pterm->pamlterm->pfnOpcode != NULL)
{
if (((rc = pterm->pamlterm->pfnOpcode(pctxt, pterm)) !=
STATUS_SUCCESS) ||
(&pterm->FrameHdr != (PFRAMEHDR)pctxt->LocalHeap.pbHeapEnd))
{


OperationRegion (REGS, PCI_Config, 0x00, 0x04)
Field (REGS, DWordAcc, NoLock, Preserve)
{
ID, 32
}

Method (_STA, 0, NotSerialized) // _STA: Status
{
Return (And (LEqual (ID, 0x07A015AD), 0x0F))
}


#define OP_AND 0x7b
#define OP_RETURN 0xa4

1: kd> db 0x89947bc8-10
89947bb8 00 00 00 00 00 00 00 00-00 a4 7b 93 49 44 5f 5f ..........{.ID__
89947bc8 0c ad 15 a0 07 0a 0f 00-48 4e 53 4f 44 00 00 00 ........HNSOD...

7b表示 OP_AND
93表示 OP_LEQ
a4表示 OP_RETURN

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

Universal-x86-Tuning-Utility硬件调优技术解析与实战指南

Universal-x86-Tuning-Utility硬件调优技术解析与实战指南 【免费下载链接】Universal-x86-Tuning-Utility Unlock the full potential of your Intel/AMD based device. 项目地址: https://gitcode.com/gh_mirrors/un/Universal-x86-Tuning-Utility Universal-x86-Tuni…

作者头像 李华
网站建设 2026/3/22 21:33:43

Qwen3-4B镜像部署推荐:开发者高效开发实操手册

Qwen3-4B镜像部署推荐&#xff1a;开发者高效开发实操手册 1. 为什么选Qwen3-4B&#xff1f;不是参数堆砌&#xff0c;而是真正好用的“工作搭子” 你有没有过这样的体验&#xff1a; 花半天配好一个大模型&#xff0c;结果一问“帮我写个周报模板”&#xff0c;它给你生成三…

作者头像 李华
网站建设 2026/3/15 12:13:26

语音被截断?噪声误判?FSMN VAD使用避坑指南

语音被截断&#xff1f;噪声误判&#xff1f;FSMN VAD使用避坑指南 1. 为什么你总在VAD上栽跟头&#xff1f; 你是不是也遇到过这些情况&#xff1a; 会议录音里&#xff0c;发言人刚说到关键句&#xff0c;语音就被“咔”一下切掉了&#xff1b;电话客服录音中&#xff0c;…

作者头像 李华
网站建设 2026/3/15 20:13:30

Qwen All-in-One容错机制:异常输入应对策略详解

Qwen All-in-One容错机制&#xff1a;异常输入应对策略详解 1. 为什么容错能力是轻量级AI服务的生命线 你有没有试过向一个AI助手输入一段乱码、半截句子、空格堆砌的文本&#xff0c;或者干脆只敲了一个问号&#xff1f;结果往往是卡顿、报错、返回一串毫无意义的符号&#…

作者头像 李华
网站建设 2026/3/15 16:15:42

Z-Image-Turbo写实人像生成,细节还原度高

Z-Image-Turbo写实人像生成&#xff0c;细节还原度高 你有没有试过输入“一位30岁亚洲女性&#xff0c;自然光下站在咖啡馆窗边&#xff0c;浅棕发微卷&#xff0c;穿米白色针织衫&#xff0c;皮肤纹理清晰&#xff0c;眼神温柔带笑意&#xff0c;背景虚化但能辨认出木质桌椅和…

作者头像 李华
网站建设 2026/3/15 20:13:35

5分钟精通DLSS Swapper:从配置到诊断的终极指南

5分钟精通DLSS Swapper&#xff1a;从配置到诊断的终极指南 【免费下载链接】dlss-swapper 项目地址: https://gitcode.com/GitHub_Trending/dl/dlss-swapper 你是否曾在游戏中启用DLSS却无法确认它是否真正工作&#xff1f;是否遇到过切换DLSS版本后游戏性能不升反降的…

作者头像 李华