节点Device (P2P0)的子节点Device (S1F0)存在后还原原来的_CTXT放入ACPI!gReadyQueue
if (state->RunCompletion) {
if (state->CompletionHandlerType ==
PCISUPP_COMPLETION_HANDLER_PFNAA) {
simpleCompletion = (PFNAA)state->CompletionHandler;
simpleCompletion(state->CompletionContext);
}
1: kd> u 0xf7420914
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> g
Breakpoint 42 hit
eax=00000000 ebx=898a8a10 ecx=8997e000 edx=00002707 esi=897e4000 edi=f7433f60
eip=f74207d4 esp=f791ab60 ebp=f791ab84 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!RestartContext:
f74207d4 55 push ebp
1: kd> kc
00 ACPI!RestartContext
01 ACPI!RestartCtxtCallback
02 ACPI!PciConfigSpaceHandlerWorker
03 ACPI!GetPciAddressWorker
04 ACPI!GetPciAddressWorker
05 ACPI!ACPIGetWorkerForInteger
06 ACPI!AsyncCallBack
07 ACPI!RunContext
08 ACPI!DispatchCtxtQueue
09 ACPI!StartTimeSlicePassive
0a ACPI!ACPIWorker
0b nt!PspSystemThreadStartup
0c nt!KiThreadStartup
1: kd> dv
pctxt = 0x897e4000
fDelayExecute = 0x00 ''
1: kd> p
eax=00000000 ebx=898a8a10 ecx=8997e000 edx=00002707 esi=897e4000 edi=f7433f60
eip=f74207d8 esp=f791ab58 ebp=f791ab5c 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!RestartContext+0x4:
f74207d8 6a01 push 1
1: kd> dx -r1 ((ACPI!_ctxt *)0x897e4000)
((ACPI!_ctxt *)0x897e4000) : 0x897e4000 [Type: _ctxt *]
+0x000\] dwSig : 0x54585443 \[Type: unsigned long
+0x004\] pbCtxtEnd : 0x897e6000 : 0x43 \[Type: unsigned char \*
+0x008\] listCtxt \[Type: _List
+0x010\] listQueue \[Type: _List
+0x018\] pplistCtxtQueue : 0x0 \[Type: _List \* \*
+0x01c\] plistResources : 0x0 \[Type: _List \*
+0x020\] dwfCtxt : 0x120 \[Type: unsigned long
+0x024\] pnsObj : 0x8996d684 \[Type: _NSObj \*
+0x028\] pnsScope : 0x8996d684 \[Type: _NSObj \*
+0x02c\] powner : 0x897e40e0 \[Type: _objowner \*
+0x030\] pcall : 0x897e5f34 \[Type: _call \*
+0x034\] pnctxt : 0x0 \[Type: _nestedctxt \*
+0x038\] dwSyncLevel : 0x0 \[Type: unsigned long
+0x03c\] pbOp : 0x8996d6e2 : 0x0 \[Type: unsigned char \*
+0x040\] Result \[Type: _ObjData
+0x054\] pfnAsyncCallBack : 0xf7407364 \[Type: void (__cdecl\*)(_NSObj \*,long,_ObjData \*,void \*)
+0x058\] pdataCallBack : 0x899bfc3c \[Type: _ObjData \*
+0x05c\] pvContext : 0x899bfc10 \[Type: void \*
+0x060\] Timer \[Type: _KTIMER
+0x088\] Dpc \[Type: _KDPC
+0x0a8\] pheapCurrent : 0x897e40bc \[Type: _heap \*
+0x0ac\] CtxtData \[Type: _ctxtdata
+0x0bc\] LocalHeap \[Type: _heap
1: kd> dx -r1 (*((ACPI!_heap *)0x897e40bc))
(*((ACPI!_heap *)0x897e40bc)) [Type: _heap]
+0x000\] dwSig : 0x50414548 \[Type: unsigned long
+0x004\] pbHeapEnd : 0x897e5dac : 0x41 \[Type: unsigned char \*
+0x008\] pheapHead : 0x897e40bc \[Type: _heap \*
+0x00c\] pheapNext : 0x0 \[Type: _heap \*
+0x010\] pbHeapTop : 0x897e4130 : 0x0 \[Type: unsigned char \*
+0x014\] plistFreeHeap : 0x0 \[Type: _List \*
+0x018\] Heap \[Type: _heapobjhdr
1: kd> dt framehdr 0x897e5dac
ACPI!FRAMEHDR
+0x000 dwSig : 0x4f464341
+0x004 dwLen : 0x48
+0x008 dwfFrame : 2
+0x00c pfnParse : 0xf741957d long ACPI!ReadFieldObj+0
1: kd> u f741957d
ACPI!ReadFieldObj [d:\srv03rtm\base\busdrv\acpi\driver\amlinew\object.c @ 588]:
f741957d 55 push ebp
f741957e 8bec mov ebp,esp
f7419580 837d1000 cmp dword ptr [ebp+10h],0
f7419584 53 push ebx
f7419585 56 push esi
f7419586 8b750c mov esi,dword ptr [ebp+0Ch]
f7419589 57 push edi
f741958a b8d80143f7 mov eax,offset ACPI!`string' (f74301d8)
windbg> .open -a fffffffff741957d
1: kd> dt ACCFIELDOBJ 0x897e5dac
ACPI!ACCFIELDOBJ
+0x000 FrameHdr : _framehdr
+0x010 pdataObj : 0x8996d65c _ObjData
+0x014 pbBuff : 0x897e4124 ""
+0x018 pbBuffEnd : 0x897e4128 ""
+0x01c dwAccSize : 4
+0x020 dwcAccesses : 1
+0x024 dwDataMask : 0xffffffff
+0x028 iLBits : 0n32
+0x02c iRBits : 0n0
+0x030 iAccess : 0n0
+0x034 dwData : 0x77415ad
+0x038 fd : _FieldDesc
1: kd> dx -id 0,0,899a2278 -r1 (*((ACPI!_FieldDesc *)0x897e5de4))
(*((ACPI!_FieldDesc *)0x897e5de4)) [Type: _FieldDesc]
+0x000\] dwByteOffset : 0x0 \[Type: unsigned long
+0x004\] dwStartBitPos : 0x0 \[Type: unsigned long
+0x008\] dwNumBits : 0x20 \[Type: unsigned long
+0x00c\] dwFieldFlags : 0x3 \[Type: unsigned long
1: kd> dx -id 0,0,899a2278 -r1 ((ACPI!_ObjData *)0x8996d65c)
((ACPI!_ObjData *)0x8996d65c) : 0x8996d65c [Type: _ObjData *]
+0x000\] dwfData : 0x0 \[Type: unsigned short
+0x002\] dwDataType : 0x5 \[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 : 0x14 \[Type: unsigned long
+0x010\] pbDataBuff : 0x8996d590 : 0x0 \[Type: unsigned char \*
1: kd> dt fieldunitobj 0x8996d590
ACPI!FIELDUNITOBJ
+0x000 FieldDesc : _FieldDesc
+0x010 pnsFieldParent : 0x8996d5fc _NSObj
1: kd> dx -id 0,0,899a2278 -r1 (*((ACPI!_FieldDesc *)0x8996d590))
(*((ACPI!_FieldDesc *)0x8996d590)) [Type: _FieldDesc]
+0x000\] dwByteOffset : 0x0 \[Type: unsigned long
+0x004\] dwStartBitPos : 0x0 \[Type: unsigned long
+0x008\] dwNumBits : 0x20 \[Type: unsigned long
+0x00c\] dwFieldFlags : 0x3 \[Type: unsigned long
1: kd> dx -id 0,0,899a2278 -r1 ((ACPI!_NSObj *)0x8996d5fc)
((ACPI!_NSObj *)0x8996d5fc) : 0x8996d5fc [Type: _NSObj *]
+0x000\] list \[Type: _List
+0x008\] pnsParent : 0x8996d45c \[Type: _NSObj \*
+0x00c\] pnsFirstChild : 0x0 \[Type: _NSObj \*
+0x010\] dwNameSeg : 0x0 \[Type: unsigned long
+0x014\] hOwner : 0x899af330 \[Type: void \*
+0x018\] pnsOwnedNext : 0x8996d5b8 \[Type: _NSObj \*
+0x01c\] ObjData \[Type: _ObjData
+0x030\] Context : 0x0 \[Type: void \*
+0x034\] dwRefCount : 0x0 \[Type: unsigned long
1: kd> dx -id 0,0,899a2278 -r1 (*((ACPI!_ObjData *)0x8996d618))
(*((ACPI!_ObjData *)0x8996d618)) [Type: _ObjData]
+0x000\] dwfData : 0x0 \[Type: unsigned short
+0x002\] dwDataType : 0x83 \[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 : 0x4 \[Type: unsigned long
+0x010\] pbDataBuff : 0x8996d0dc : 0xb8 \[Type: unsigned char \*
1: kd> dt fieldobj 0x8996d0dc
ACPI!FIELDOBJ
+0x000 pnsBase : 0x8996d5b8 _NSObj
1: kd> dx -id 0,0,899a2278 -r1 ((ACPI!_NSObj *)0x8996d5b8)
((ACPI!_NSObj *)0x8996d5b8) : 0x8996d5b8 [Type: _NSObj *]
+0x000\] list \[Type: _List
+0x008\] pnsParent : 0x8996d45c \[Type: _NSObj \*
+0x00c\] pnsFirstChild : 0x0 \[Type: _NSObj \*
+0x010\] dwNameSeg : 0x53474552 \[Type: unsigned long
+0x014\] hOwner : 0x899af330 \[Type: void \*
+0x018\] pnsOwnedNext : 0x8996d518 \[Type: _NSObj \*
+0x01c\] ObjData \[Type: _ObjData
+0x030\] Context : 0x8996d45c \[Type: void \*
+0x034\] dwRefCount : 0x0 \[Type: unsigned long
1: kd> db 0x8996d5b8
8996d5b8 18 d5 96 89 fc d5 96 89-5c d4 96 89 00 00 00 00 ........\.......
8996d5c8 52 45 47 53 30 f3 9a 89-18 d5 96 89 00 00 0a 00 REGS0...........
8996d5d8 00 00 00 00 00 00 00 00-18 00 00 00 a0 d4 96 89 ................
8996d5e8 5c d4 96 89 00 00 00 00-48 4e 53 4f 44 00 00 00 \.......HNSOD...
8996d5f8 00 90 96 89 b8 d5 96 89-40 d6 96 89 5c d4 96 89 ........@...\...
8996d608 00 00 00 00 00 00 00 00-30 f3 9a 89 b8 d5 96 89 ........0.......
8996d618 00 00 83 00 00 00 00 00-00 00 00 00 04 00 00 00 ................
8996d628 dc d0 96 89 00 00 00 00-00 00 00 00 48 4e 53 4f ............HNSO
1: kd> db 0x8996d45c
8996d45c 98 d2 96 89 60 d8 96 89-78 cd 96 89 d4 d4 96 89 ....`...x.......
8996d46c 53 31 46 30 30 f3 9a 89-98 d2 96 89 00 00 06 00 S1F00...........
8996d47c 00 00 00 00 00 00 00 00-00 00 00 00 00 00 00 00 ................
8996d48c 88 8c 96 89 00 00 00 00-48 4f 52 47 34 00 00 00 ........HORG4...
8996d49c 00 90 96 89 00 00 00 00-04 00 00 00 02 00 00 00 ................
8996d4ac 00 00 00 00 00 00 00 00-00 00 00 00 00 00 00 00 ................
8996d4bc 00 00 00 00 00 00 00 00-00 00 00 00 48 4e 53 4f ............HNSO
8996d4cc 44 00 00 00 00 90 96 89-1c d8 96 89 18 d5 96 89 D...............
1: kd> dx -id 0,0,899a2278 -r1 (*((ACPI!_ObjData *)0x8996d5d4))
(*((ACPI!_ObjData *)0x8996d5d4)) [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 : 0x8996d4a0 : 0x0 \[Type: unsigned char \*
1: kd> dt opregionobj 0x8996d4a0
ACPI!OPREGIONOBJ
+0x000 uipOffset : 0
+0x004 dwLen : 4
+0x008 bRegionSpace : 0x2 ''
+0x009 reserved : [3] ""
+0x00c RegionBusy : 0n0
+0x010 listLock : 0
+0x014 plistWaiters : (null)
Device (S1F0)
{
Name (_ADR, Zero) // _ADR: Address
Name (_SUN, 0x40) // _SUN: Slot User Number
OperationRegion (REGS, PCI_Config, 0x00, 0x04)
Field (REGS, DWordAcc, NoLock, Preserve)
{
ID, 32
}
Method (_STA, 0, NotSerialized) // _STA: Status
{
Return (BSTA (ID))
}
if (KeGetCurrentIrql() < DISPATCH_LEVEL)
{
AcquireMutex(&gReadyQueue.mutCtxtQ);
rc = InsertReadyQueue(pctxt, fDelayExecute);
ReleaseMutex(&gReadyQueue.mutCtxtQ);
}
1: kd> dx -r1 (*((ACPI!_ctxtq *)0xf743a928))
(*((ACPI!_ctxtq *)0xf743a928)) [Type: _ctxtq]
+0x000\] dwfCtxtQ : 0x0 \[Type: unsigned long
+0x004\] pkthCurrent : 0x89981ca0 \[Type: _KTHREAD \*
+0x008\] pctxtCurrent : 0x89857000 \[Type: _ctxt \*
+0x00c\] plistCtxtQ : 0x8985a010 \[Type: _List \*
+0x010\] dwmsTimeSliceLength : 0x64 \[Type: unsigned long
+0x014\] dwmsTimeSliceInterval : 0x64 \[Type: unsigned long
+0x018\] pfnPauseCallback : 0x0 \[Type: void (__cdecl\*)(void \*)
+0x01c\] PauseCBContext : 0x0 \[Type: void \*
+0x020\] mutCtxtQ \[Type: _mutex
+0x028\] Timer \[Type: _KTIMER
+0x050\] DpcStartTimeSlice \[Type: _KDPC
+0x070\] DpcExpireTimeSlice \[Type: _KDPC
+0x090\] WorkItem \[Type: _WORK_QUEUE_ITEM
1: kd> dx -r1 ((ACPI!_List *)0x8985a010)
((ACPI!_List *)0x8985a010) : 0x8985a010 [Type: _List *]
[+0x000] plistPrev : 0x897e4010[Type: _List *]
+0x004\] plistNext : 0x8985c010 \[Type: _List \*