保山市网站建设_网站建设公司_自助建站_seo优化
2026/1/19 17:24:08 网站建设 项目流程

ACPI!WriteCookAccess函数分析到ACPI!InternalOpRegionHandler到ACPI!PciConfigSpaceHandler
1: kd> kc
#
00 ACPI!WriteCookAccess
01 ACPI!RunContext
02 ACPI!InsertReadyQueue
03 ACPI!RestartCtxtPassive
04 ACPI!ACPIWorker
05 nt!PspSystemThreadStartup
06 nt!KiThreadStartup
1: kd> dv
pctxt = 0x8997c000
pwca = 0x8997dc08
rc = 0n0
oldIrql = 0x00 ''
busy = 0n-1986536440
dwOldFlags = 8

POPREGIONOBJ pop = (POPREGIONOBJ)pwca->pnsBase->ObjData.pbDataBuff;

1: kd> dx -r1 ((ACPI!_wrcookacc *)0x8997dc08)
((ACPI!_wrcookacc *)0x8997dc08) : 0x8997dc08 [Type: _wrcookacc *]
[+0x000] FrameHdr [Type: _framehdr]
[+0x010] pnsBase : 0x899b0b50 [Type: _NSObj *]
[+0x014] prsa : 0x89996d68 [Type: _rsaccess *]
[+0x018] dwAddr : 0xd8 [Type: unsigned long]
[+0x01c] dwSize : 0x4 [Type: unsigned long]
[+0x020] dwData : 0x40e98102 [Type: unsigned long]
[+0x024] dwDataMask : 0xffffffff [Type: unsigned long]
[+0x028] dwDataTmp : 0x0 [Type: unsigned long]
[+0x02c] fPreserve : 0x0 [Type: unsigned char]
1: kd> dx -r1 ((ACPI!_rsaccess *)0x89996d68)
((ACPI!_rsaccess *)0x89996d68) : 0x89996d68 [Type: _rsaccess *]
[+0x000] prsaNext : 0x0 [Type: _rsaccess *]
[+0x004] dwRegionSpace : 0x2 [Type: unsigned long]
[+0x008] pfnCookAccess : 0xf74280d6[Type: long (__cdecl*)(unsigned long,_NSObj *,unsigned long,unsigned long,unsigned long *,unsigned long,void (__cdecl*)(void *),void *)]
[+0x00c] uipCookParam : 0x899bfea0 [Type: unsigned long]
[+0x010] pfnRawAccess : 0x0 [Type: long (__cdecl*)(unsigned long,_FieldUnitObj *,_ObjData *,unsigned long,void (__cdecl*)(void *),void *)]
[+0x014] uipRawParam : 0x0 [Type: unsigned long]
1: kd> u f74280d6
ACPI!InternalOpRegionHandler [d:\srv03rtm\base\busdrv\acpi\driver\shared\acpioprg.c @ 113]:
f74280d6 55 push ebp
f74280d7 8bec mov ebp,esp
f74280d9 56 push esi
f74280da 57 push edi
f74280db 8b7d0c mov edi,dword ptr [ebp+0Ch]
f74280de 8b7708 mov esi,dword ptr [edi+8]
f74280e1 56 push esi
f74280e2 57 push edi
1: kd> dx -r1 ((ACPI!_NSObj *)0x899b0b50)
((ACPI!_NSObj *)0x899b0b50) : 0x899b0b50 [Type: _NSObj *]
[+0x000] list [Type: _List]
[+0x008] pnsParent : 0x899affac [Type: _NSObj *]
[+0x00c] pnsFirstChild : 0x0 [Type: _NSObj *]
[+0x010] dwNameSeg : 0x30304552 [Type: unsigned long]
[+0x014] hOwner : 0x899af330 [Type: void *]
[+0x018] pnsOwnedNext : 0x899b0a90 [Type: _NSObj *]
[+0x01c] ObjData [Type: _ObjData]
[+0x030] Context : 0x899affac [Type: void *]
[+0x034] dwRefCount : 0x0 [Type: unsigned long]
1: kd> db 0x899b0b50
899b0b50 90 0a 9b 89 94 0b 9b 89-ac ff 9a 89 00 00 00 00 ................
899b0b60 52 45 30 30 30 f3 9a 89-90 0a 9b 89 00 00 0a 00 RE000...........
899b0b70 00 00 00 00 00 00 00 00-18 00 00 00 34 01 9b 89 ............4...
899b0b80 ac ff 9a 89 00 00 00 00-48 4e 53 4f 44 00 00 00 ........HNSOD...
899b0b90 00 f0 9a 89 50 0b 9b 89-d8 0b 9b 89 ac ff 9a 89 ....P...........
899b0ba0 00 00 00 00 00 00 00 00-30 f3 9a 89 50 0b 9b 89 ........0...P...
899b0bb0 00 00 83 00 00 00 00 00-00 00 00 00 04 00 00 00 ................
899b0bc0 28 0b 9b 89 00 00 00 00-00 00 00 00 48 4e 53 4f (...........HNSO
1: kd> dx -r1 (*((ACPI!_ObjData *)0x899b0b6c))
(*((ACPI!_ObjData *)0x899b0b6c)) [Type: _ObjData]
[+0x000] dwfData : 0x0 [Type: unsigned short]
[+0x002] dwDataType : 0xa [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 : 0x18 [Type: unsigned long]
[+0x010] pbDataBuff : 0x899b0134 : 0xd8 [Type: unsigned char *]
1: kd> dt opregionobj 0x899b0134
ACPI!OPREGIONOBJ
+0x000 uipOffset : 0xd8
+0x004 dwLen : 4
+0x008 bRegionSpace : 0x2 ''
+0x009 reserved : [3] ""
+0x00c RegionBusy : 0n0
+0x010 listLock : 0
+0x014 plistWaiters : (null)


pwca->FrameHdr.dwfFrame++;
ASSERT(!(pctxt->dwfCtxt & CTXTF_READY));
rc = pwca->prsa->pfnCookAccess(RSACCESS_READ, pwca->pnsBase,
(ULONG_PTR)pwca->dwAddr,
pwca->dwSize,
&pwca->dwDataTmp,
pwca->prsa->uipCookParam,
RestartCtxtCallback,
&pctxt->CtxtData);


1: kd> dx -r1 ((ACPI!_wrcookacc *)0x8997dc08)
((ACPI!_wrcookacc *)0x8997dc08) : 0x8997dc08 [Type: _wrcookacc *]
[+0x000] FrameHdr [Type: _framehdr]
[+0x010] pnsBase : 0x899b0b50 [Type: _NSObj *]
[+0x014] prsa : 0x89996d68 [Type: _rsaccess *]
[+0x018] dwAddr : 0xd8 [Type: unsigned long]
[+0x01c] dwSize : 0x4 [Type: unsigned long]
[+0x020] dwData : 0x40e98102 [Type: unsigned long]
[+0x024] dwDataMask : 0xffffffff [Type: unsigned long]
[+0x028] dwDataTmp : 0x0 [Type: unsigned long]
[+0x02c] fPreserve : 0x0 [Type: unsigned char]
1: kd> dx -r1 ((ACPI!_rsaccess *)0x89996d68)
((ACPI!_rsaccess *)0x89996d68) : 0x89996d68 [Type: _rsaccess *]
[+0x000] prsaNext : 0x0 [Type: _rsaccess *]
[+0x004] dwRegionSpace : 0x2 [Type: unsigned long]
[+0x008] pfnCookAccess : 0xf74280d6 [Type: long (__cdecl*)(unsigned long,_NSObj *,unsigned long,unsigned long,unsigned long *,unsigned long,void (__cdecl*)(void *),void *)]
[+0x00c] uipCookParam : 0x899bfea0 [Type: unsigned long]
[+0x010] pfnRawAccess : 0x0 [Type: long (__cdecl*)(unsigned long,_FieldUnitObj *,_ObjData *,unsigned long,void (__cdecl*)(void *),void *)]
[+0x014] uipRawParam : 0x0 [Type: unsigned long]

1: kd> dt ACPI!_ctxt 0x8997c000
+0x000 dwSig : 0x54585443
+0x004 pbCtxtEnd : 0x8997e000 "TSER"
+0x008 listCtxt : _List
+0x010 listQueue : _List
+0x018 pplistCtxtQueue : (null)
+0x01c plistResources : 0x8997c198 _List
+0x020 dwfCtxt : 0x130
+0x024 pnsObj : 0x899b4938 _NSObj
+0x028 pnsScope : 0x899b40ac _NSObj
+0x02c powner : 0x8997c1ac _objowner
+0x030 pcall : 0x8997dd18 _call
+0x034 pnctxt : (null)
+0x038 dwSyncLevel : 0xf
+0x03c pbOp : 0x899b4122 ""
+0x040 Result : _ObjData
+0x054 pfnAsyncCallBack : 0xf7407364 void ACPI!ACPIGetWorkerForInteger+0
+0x058 pdataCallBack : 0x899c634c _ObjData
+0x05c pvContext : 0x899c6320 Void
+0x060 Timer : _KTIMER
+0x088 Dpc : _KDPC
+0x0a8 pheapCurrent : 0x8997c0bc _heap
+0x0ac CtxtData : _ctxtdata
+0x0bc LocalHeap : _heap
1: kd> dx -id 0,0,899a2278 -r1 (*((ACPI!_ctxtdata *)0x8997c0ac))
(*((ACPI!_ctxtdata *)0x8997c0ac)) [Type: _ctxtdata]
[+0x000] dwData1 : 0x0 [Type: void *]
[+0x004] dwData2 : 0x0 [Type: void *]
[+0x008] dwData3 : 0x0 [Type: void *]
[+0x00c] dwData4 : 0x0 [Type: void *]


1: kd> kc
#
00 ACPI!InternalOpRegionHandler
01 ACPI!WriteCookAccess
02 ACPI!RunContext
03 ACPI!InsertReadyQueue
04 ACPI!RestartCtxtPassive
05 ACPI!ACPIWorker
06 nt!PspSystemThreadStartup
07 nt!KiThreadStartup
1: kd> dv
dwAccType = 1
pnsOpRegion = 0x899b0b50
dwAddr = 0xd8
dwSize = 4
pdwData = 0x8997dc28
Context = 0x899bfea0
CompletionHandler = 0xf7420914
IntContext = 0x8997c0ac


1: kd> dt OPREGIONHANDLER 0x899bfea0
ACPI!OPREGIONHANDLER
+0x000 Handler : 0xf740d970 long ACPI!PciConfigSpaceHandler+0
+0x004 HandlerContext : (null)
+0x008 AccessType : 6
+0x00c RegionSpace : 2

1: kd>dt OPREGIONHANDLER 0x899bfea0
ACPI!OPREGIONHANDLER
+0x000 Handler : 0xf740d970 long ACPI!PciConfigSpaceHandler+0
+0x004 HandlerContext : (null)
+0x008 AccessType : 6
+0x00c RegionSpace : 2
1: kd> dx -r1 ((ACPI!_NSObj *)0x899b0b50)
((ACPI!_NSObj *)0x899b0b50) : 0x899b0b50 [Type: _NSObj *]
[+0x000] list [Type: _List]
[+0x008] pnsParent : 0x899affac [Type: _NSObj *]
[+0x00c] pnsFirstChild : 0x0 [Type: _NSObj *]
[+0x010] dwNameSeg : 0x30304552 [Type: unsigned long]
[+0x014] hOwner : 0x899af330 [Type: void *]
[+0x018] pnsOwnedNext : 0x899b0a90 [Type: _NSObj *]
[+0x01c] ObjData [Type: _ObjData]
[+0x030] Context : 0x899affac [Type: void *]
[+0x034] dwRefCount : 0x0 [Type: unsigned long]
1: kd> dx -r1 ((ACPI!_NSObj *)0x899affac)
((ACPI!_NSObj *)0x899affac) : 0x899affac [Type: _NSObj *]
[+0x000] list [Type: _List]
[+0x008] pnsParent : 0x899af0f0 [Type: _NSObj *]
[+0x00c] pnsFirstChild : 0x899b0024 [Type: _NSObj *]
[+0x010] dwNameSeg : 0x30494350 [Type: unsigned long]
[+0x014] hOwner : 0x899af330 [Type: void *]
[+0x018] pnsOwnedNext : 0x899aff4c [Type: _NSObj *]
[+0x01c] ObjData [Type: _ObjData]
[+0x030] Context : 0x899c0d58 [Type: void *]
[+0x034] dwRefCount : 0x0 [Type: unsigned long]
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> kc
#
00 ACPI!PciConfigSpaceHandler
01 ACPI!InternalOpRegionHandler
02 ACPI!WriteCookAccess
03 ACPI!RunContext
04 ACPI!InsertReadyQueue
05 ACPI!RestartCtxtPassive
06 ACPI!ACPIWorker
07 nt!PspSystemThreadStartup
08 nt!KiThreadStartup
1: kd> dv
AccessType = 1
OpRegion = 0x899b0b50
Address = 0xd8
Size = 4
Data = 0x8997dc28
Context = 0
CompletionHandler = 0xf7420914
CompletionContext = 0x8997c0ac

第二部分:CompletionContext代表PCTXT

1: kd> u f7420914
ACPI!RestartCtxtCallback [d:\srv03rtm\base\busdrv\acpi\driver\amlinew\sched.c @ 401]:
f7420914 55 push ebp
f7420915 8bec mov ebp,esp
f7420917 56 push esi
f7420918 8b7508 mov esi,dword ptr [ebp+8]
f742091b 57 push edi
f742091c 6a01 push 1
f742091e bf603f43f7 mov edi,offset ACPI!`string' (f7433f60)
f7420923 57 push edi


VOID EXPORT RestartCtxtCallback(PCTXTDATA pctxtdata)
{
TRACENAME("RESTARTCTXTCALLBACK")
PCTXT pctxt = CONTAINING_RECORD(pctxtdata, CTXT, CtxtData);

ENTER(2, ("RestartCtxtCallback(pctxt=%x)\n", pctxt));

ASSERT(pctxt->dwSig == SIG_CTXT);
LOGSCHEDEVENT('RSCB', (ULONG_PTR)pctxt, 0, 0);
RestartContext(pctxt,
(BOOLEAN)((pctxt->dwfCtxt & CTXTF_ASYNC_EVAL) == 0));

EXIT(2, ("RestartCtxtCallback!\n"));
} //RestartCtxtCallback


1: kd> dt CTXT 0x8997c0ac-ac
ACPI!CTXT
+0x000 dwSig : 0x54585443
+0x004 pbCtxtEnd : 0x8997e000 "TSER"
+0x008 listCtxt : _List
+0x010 listQueue : _List
+0x018 pplistCtxtQueue : (null)
+0x01c plistResources : 0x8997c198 _List
+0x020 dwfCtxt : 0x130
+0x024 pnsObj : 0x899b4938 _NSObj
+0x028 pnsScope : 0x899b40ac _NSObj
+0x02c powner : 0x8997c1ac _objowner
+0x030 pcall : 0x8997dd18 _call
+0x034 pnctxt : (null)
+0x038 dwSyncLevel : 0xf
+0x03c pbOp : 0x899b4122 ""
+0x040 Result : _ObjData
+0x054 pfnAsyncCallBack : 0xf7407364 void ACPI!ACPIGetWorkerForInteger+0
+0x058 pdataCallBack : 0x899c634c _ObjData
+0x05c pvContext : 0x899c6320 Void
+0x060 Timer : _KTIMER
+0x088 Dpc : _KDPC
+0x0a8 pheapCurrent : 0x8997c0bc _heap
+0x0ac CtxtData : _ctxtdata
+0x0bc LocalHeap : _heap

1: kd> dx -id 0,0,899a2278 -r1 (*((ACPI!_heap *)0x8997c0bc))
(*((ACPI!_heap *)0x8997c0bc)) [Type: _heap]
[+0x000] dwSig : 0x50414548 [Type: unsigned long]
[+0x004] pbHeapEnd : 0x8997dc08: 0x57 [Type: unsigned char *]
[+0x008] pheapHead : 0x8997c0bc [Type: _heap *]
[+0x00c] pheapNext : 0x0 [Type: _heap *]
[+0x010] pbHeapTop : 0x8997c1f0 : 0x0 [Type: unsigned char *]
[+0x014] plistFreeHeap : 0x0 [Type: _List *]
[+0x018] Heap [Type: _heapobjhdr]
1: kd> dt framehdr 0x8997dc08
ACPI!FRAMEHDR
+0x000 dwSig : 0x41435257
+0x004 dwLen : 0x30
+0x008 dwfFrame : 3
+0x00c pfnParse : 0xf7417c1d long ACPI!WriteCookAccess+0

会再次回到ACPI!WriteCookAccess!!!

需要专业的网站建设服务?

联系我们获取免费的网站建设咨询和方案报价,让我们帮助您实现业务目标

立即咨询