ACPI!ACPIBuildProcessRunMethodPhaseCheckSta函数对节点PCI0的处理
0: kd> t
Breakpoint 26 hit
eax=00000003 ebx=00000003 ecx=89906d80 edx=00000001 esi=89906d70 edi=80b019f4
eip=f73fbbfa esp=f789ef64 ebp=f789ef84 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!ACPIBuildProcessRunMethodPhaseCheckSta:
f73fbbfa 55 push ebp
0: kd> kc
#
00 ACPI!ACPIBuildProcessRunMethodPhaseCheckSta
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
0: kd> dv
BuildRequest = 0x89906d70
0: kd> dx -r1 ((ACPI!_ACPI_BUILD_REQUEST *)0x89906d70)
((ACPI!_ACPI_BUILD_REQUEST *)0x89906d70) : 0x89906d70 [Type: _ACPI_BUILD_REQUEST *]
[+0x000] ListEntry [Type: _LIST_ENTRY]
[+0x008] Signature : 0x5f534750 [Type: unsigned long]
[+0x00c] Flags : 0xc [Type: unsigned long]
[+0x00c] UFlags [Type: __unnamed]
[+0x010] WorkDone : 0x1 [Type: unsigned long]
[+0x014] CurrentWorkDone : 0x3 [Type: unsigned long]
[+0x018] NextWorkDone : 0x0 [Type: unsigned long]
[+0x01c] BuildContext : 0x899c0d58 [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 : 0x0 [Type: unsigned long]
[+0x044] String : 0x0 [Type: unsigned char *]
[+0x044] TargetListEntry : 0x0 [Type: _LIST_ENTRY *]
0: kd> dt ACPI!_DEVICE_EXTENSION 0x899c0d58
+0x000 Flags : 0xa
+0x12c AcpiObject : 0x899affac _NSObj
+0x130 DeviceObject : (null)
+0x134 TargetDeviceObject : (null)
+0x138 PhysicalDeviceObject : (null)
+0x13c ParentExtension : 0x89981a18 _DEVICE_EXTENSION
+0x140 ChildDeviceList : _LIST_ENTRY [ 0x899c0d38 - 0x8990efe8 ]
+0x148 SiblingDeviceList : _LIST_ENTRY [ 0x899ae150 - 0x89981b58 ]
+0x150 EjectDeviceHead : _LIST_ENTRY [ 0x899c0ea8 - 0x899c0ea8 ]
+0x158 EjectDeviceList : _LIST_ENTRY [ 0x899c0eb0 - 0x899c0eb0 ]
0: 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...
//
// Do we have to check the device status?
//
if (BuildRequest->RunRequest.Flags & RUN_REQUEST_CHECK_STATUS) {
//
// Get the device status
//
status = ACPIGetDevicePresenceAsync(
deviceExtension,
ACPIBuildCompleteMustSucceed,
BuildRequest,
(PVOID *) &(BuildRequest->Integer),
NULL
);
0: kd> p
eax=00000000 ebx=00000000 ecx=00000000 edx=00000000 esi=89906d70 edi=899c0d58
eip=f73fbc2b esp=f789ef54 ebp=f789ef60 iopl=0 nv up ei pl nz na po nc
cs=0008 ss=0010 ds=0023 es=0023 fs=0030 gs=0000 efl=00000202
ACPI!ACPIBuildProcessRunMethodPhaseCheckSta+0x31:
f73fbc2b 52 push edx
0: kd> t
eax=89906db4 ebx=00000000 ecx=00000000 edx=00000000 esi=89906d70 edi=899c0d58
eip=f74076b8 esp=f789ef2c ebp=f789ef60 iopl=0 nv up ei pl nz na po nc
cs=0008 ss=0010 ds=0023 es=0023 fs=0030 gs=0000 efl=00000202
ACPI!ACPIGet:
f74076b8 55 push ebp
0: kd> kc
#
00 ACPI!ACPIGet
01 ACPI!ACPIBuildProcessRunMethodPhaseCheckSta
02 ACPI!ACPIBuildProcessGenericList
03 ACPI!ACPIBuildDeviceDpc
04 nt!KiRetireDpcList
05 nt!KiDispatchInterrupt
WARNING: Frame IP not in any known module. Following frames may be wrong.
06 0x0
0: kd> dv
Target = 0x899c0d58
ObjectID = 0x4154535f
Flags = 0x40040802
#define GET_REQUEST_INTEGER 0x00040000
#define GET_REQUEST_BUFFER 0x00010000
#define GET_REQUEST_DATA 0x00020000
#define GET_REQUEST_INTEGER 0x00040000
#define GET_REQUEST_STRING 0x00080000
#define GET_REQUEST_NOTHING 0x00100000
//
// This is the mask for the requests
//
#define GET_REQUEST_MASK (GET_REQUEST_BUFFER | \
GET_REQUEST_DATA | \
GET_REQUEST_INTEGER | \
GET_REQUEST_STRING | \
GET_REQUEST_NOTHING)
//
// Determine the completion routine that we should use
//
switch( (Flags & GET_REQUEST_MASK) ) {
case GET_REQUEST_INTEGER:
completionRoutine = ACPIGetWorkerForInteger; //注意地方1:
Device (PCI0)
{
Name (_HID, EisaId ("PNP0A03")) // _HID: Hardware ID
Name (_CID, EisaId ("PNP0A08")) // _CID: Compatible ID
Name (_BBN, 0x00) // _BBN: BIOS Bus Number
Name (_ADR, 0x00) // _ADR: Address
OperationRegion (REGS, PCI_Config, 0x50, 0x30)
Device (PCI0) 没有_STA方法子对象。
//
// Go out and see if the requested object is present
//
acpiObject = ACPIAmliGetNamedChild(
acpiObject,
ObjectID
);
if (!acpiObject) {
status = STATUS_OBJECT_NAME_NOT_FOUND;//关键地方1:
goto ACPIGetExit;
}
0: kd> g
Breakpoint 29 hit
eax=00000000 ebx=f743b938 ecx=00000000 edx=00000000 esi=899c6320 edi=899c6328
eip=f74078d8 esp=f789eee4 ebp=f789ef28 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!ACPIGet+0x220:
f74078d8 e83b2bffff call ACPI!ACPIAmliGetNamedChild (f73fa418)
0: kd> t
eax=00000000 ebx=f743b938 ecx=00000000 edx=00000000 esi=899c6320 edi=899c6328
eip=f73fa418 esp=f789eee0 ebp=f789ef28 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!ACPIAmliGetNamedChild:
f73fa418 55 push ebp
0: kd> gu
eax=00000000ebx=f743b938 ecx=899affac edx=00000000 esi=899c6320 edi=899c6328
eip=f74078dd esp=f789eeec ebp=f789ef28 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!ACPIGet+0x225:
f74078dd 85c0 test eax,eax
ACPIGetExit:
//
// Remember to not execute the callback routine
//
request->Flags |= GET_PROP_SKIP_CALLBACK;
//
// Call the completion routine to actually do the post-processing
//
(completionRoutine)(
acpiObject,
status,
&(request->ResultData),
request
);
0: kd> g
Breakpoint 27 hit
eax=c0000034 ebx=f743b938 ecx=899c634c edx=00000000 esi=899c6320 edi=899c6328
eip=f7407932 esp=f789eedc ebp=f789ef28 iopl=0 nv up ei pl nz na pe nc
cs=0008 ss=0010 ds=0023 es=0023 fs=0030 gs=0000 efl=00000206
ACPI!ACPIGet+0x27a:
f7407932 ff55f8 call dword ptr [ebp-8] ss:0010:f789ef20={ACPI!ACPIGetWorkerForInteger (f7407364)}
0: kd> t
eax=c0000034 ebx=f743b938 ecx=899c634c edx=00000000 esi=899c6320 edi=899c6328
eip=f7407364 esp=f789eed8 ebp=f789ef28 iopl=0 nv up ei pl nz na pe nc
cs=0008 ss=0010 ds=0023 es=0023 fs=0030 gs=0000 efl=00000206
ACPI!ACPIGetWorkerForInteger:
f7407364 55 push ebp
0: kd> kc
#
00 ACPI!ACPIGetWorkerForInteger
01 ACPI!ACPIGet
02 ACPI!ACPIBuildProcessRunMethodPhaseCheckSta
03 ACPI!ACPIBuildProcessGenericList
04 ACPI!ACPIBuildDeviceDpc
05 nt!KiRetireDpcList
06 nt!KiDispatchInterrupt
WARNING: Frame IP not in any known module. Following frames may be wrong.
07 0x0
0: kd> dv
AcpiObject = 0x00000000
Status = 0n-1073741772
Result = 0x899c634c
Context = 0x899c6320
freeData = 0x00 ''
0: kd> ?0n-1073741772
Evaluate expression: -1073741772 = c0000034
0: kd> g
Breakpoint 15 hit
eax=89906db4 ebx=c0000034 ecx=60040802 edx=00000000 esi=899c6320 edi=899c634c
eip=f7406cd6 esp=f789eea8 ebp=f789eed4 iopl=0 nv up ei pl nz na po nc
cs=0008 ss=0010 ds=0023 es=0023 fs=0030 gs=0000 efl=00000202
ACPI!ACPIGetConvertToDevicePresence:
f7406cd6 55 push ebp
0: kd> kc
#
00 ACPI!ACPIGetConvertToDevicePresence
01 ACPI!ACPIGetWorkerForInteger
02 ACPI!ACPIGet
03 ACPI!ACPIBuildProcessRunMethodPhaseCheckSta
04 ACPI!ACPIBuildProcessGenericList
05 ACPI!ACPIBuildDeviceDpc
06 nt!KiRetireDpcList
07 nt!KiDispatchInterrupt
WARNING: Frame IP not in any known module. Following frames may be wrong.
08 0x0
0: kd> dv
DeviceExtension = 0x899c0d58
Status = 0n-1073741772
Result = 0x899c634c
Flags = 0x60040802
Buffer = 0x89906db4
BufferSize = 0x00000000
deviceStatus = 8
ULONG deviceStatus = STA_STATUS_DEFAULT;
NTSTATUS status;
0: kd> g
Breakpoint 4 hit
eax=00000000 ebx=c0000034 ecx=00000000 edx=00000000 esi=899c0d58 edi=0000000f
eip=f7409910 esp=f789ee84 ebp=f789eea4 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!ACPIInternalUpdateDeviceStatus:
f7409910 55 push ebp
0: kd> kc
#
00 ACPI!ACPIInternalUpdateDeviceStatus
01 ACPI!ACPIGetConvertToDevicePresence
02 ACPI!ACPIGetWorkerForInteger
03 ACPI!ACPIGet
04 ACPI!ACPIBuildProcessRunMethodPhaseCheckSta
05 ACPI!ACPIBuildProcessGenericList
06 ACPI!ACPIBuildDeviceDpc
07 nt!KiRetireDpcList
08 nt!KiDispatchInterrupt
WARNING: Frame IP not in any known module. Following frames may be wrong.
09 0x0
0: kd> dv
DeviceExtension = 0x899c0d58
DeviceStatus = 0xf
oldIrql = 0x00 ''
0: kd> dx -r1 ((ACPI!_DEVICE_EXTENSION *)0x899c0d58)
((ACPI!_DEVICE_EXTENSION *)0x899c0d58) : 0x899c0d58 [Type: _DEVICE_EXTENSION *]
[+0x000] Flags : 0xa [Type: unsigned __int64]
[+0x12c] AcpiObject : 0x899affac [Type: _NSObj *]
[+0x130] DeviceObject : 0x0 [Type: _DEVICE_OBJECT *]
[+0x134] TargetDeviceObject : 0x0 [Type: _DEVICE_OBJECT *]
[+0x138] PhysicalDeviceObject : 0x0 [Type: _DEVICE_OBJECT *]
[+0x13c] ParentExtension : 0x89981a18 [Type: _DEVICE_EXTENSION *]
[+0x140] ChildDeviceList [Type: _LIST_ENTRY]
[+0x148] SiblingDeviceList [Type: _LIST_ENTRY]
[+0x150] EjectDeviceHead [Type: _LIST_ENTRY]
[+0x158] EjectDeviceList [Type: _LIST_ENTRY]
0: kd> gu
eax=00000002 ebx=c0000034 ecx=00400000 edx=00000000 esi=899c0d58 edi=0000000f
eip=f7406da5 esp=f789ee90 ebp=f789eea4 iopl=0 nv up ei pl nz na po nc
cs=0008 ss=0010 ds=0023 es=0023 fs=0030 gs=0000 efl=00000202
ACPI!ACPIGetConvertToDevicePresence+0xcf:
f7406da5 5e pop esi
0: kd> dx -r1 ((ACPI!_DEVICE_EXTENSION *)0x899c0d58)
((ACPI!_DEVICE_EXTENSION *)0x899c0d58) : 0x899c0d58 [Type: _DEVICE_EXTENSION *]
[+0x000] Flags : 0x40000000000008 [Type: unsigned __int64]
0: kd> gu
eax=00000000 ebx=c0000034 ecx=00400000 edx=00000000 esi=899c6320 edi=899c634c
eip=f74073d9 esp=f789eec4 ebp=f789eed4 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!ACPIGetWorkerForInteger+0x75:
f74073d9 ebe6 jmp ACPI!ACPIGetWorkerForInteger+0x5d (f74073c1)
0: kd> dv
AcpiObject = 0x00000000
Status = 0n-1073741772
Result = 0x899c634c
Context = 0x899c6320
freeData = 0x00 ''
0: kd> dt ACPI_GET_REQUEST 0x899c6320
+0x000 Flags : 0x60040802
+0x000 UFlags : __unnamed
+0x004 ObjectID : 0x4154535f
+0x008 ListEntry : _LIST_ENTRY [ 0xf743b940 - 0xf743b940 ]
+0x010 DeviceExtension : 0x899c0d58 _DEVICE_EXTENSION
+0x014 AcpiObject : 0x899affac _NSObj
+0x018 CallBackRoutine : 0xf73fa5bc void ACPI!ACPIBuildCompleteMustSucceed+0
+0x01c CallBackContext : 0x89906d70 Void
+0x020 Buffer : 0x89906db4 -> 0x0000000f Void
+0x024 BufferSize : (null)
+0x028 Status : 0n0
+0x02c ResultData : _ObjData
0: kd> u f73fa5bc
ACPI!ACPIBuildCompleteMustSucceed [d:\srv03rtm\base\busdrv\acpi\driver\nt\buildsrc.c @ 399]:
f73fa5bc 55 push ebp
f73fa5bd 8bec mov ebp,esp
f73fa5bf 8b4d0c mov ecx,dword ptr [ebp+0Ch]
f73fa5c2 85c9 test ecx,ecx
f73fa5c4 8b4514 mov eax,dword ptr [ebp+14h]
f73fa5c7 8b5018 mov edx,dword ptr [eax+18h]
f73fa5ca 7d21 jge ACPI!ACPIBuildCompleteMustSucceed+0x31 (f73fa5ed)
f73fa5cc 8b5508 mov edx,dword ptr [ebp+8]
#define GET_PROP_SKIP_CALLBACK 0x20000000
0: kd> dt ACPI_GET_REQUEST 0x899c6320
+0x000 Flags : 0x60040802
//
// We are done, but we must check to see if we are the async or the
// sync case. If we are the sync case, then we have much less cleanup
// to perform
//
if ( !(request->Flags & GET_PROP_SKIP_CALLBACK) ) { 不符合条件
//
// Is there a callback routine to call?
//
if (request->CallBackRoutine != NULL) {
(request->CallBackRoutine)(
AcpiObject,
status,
NULL,
request->CallBackContext
);
}
0: kd> gu
eax=00000000 ebx=f743b938 ecx=00400000 edx=00000000 esi=899c6320 edi=899c6328
eip=f7407935 esp=f789eedc ebp=f789ef28 iopl=0 nv up ei pl nz na po nc
cs=0008 ss=0010 ds=0023 es=0023 fs=0030 gs=0000 efl=00000202
ACPI!ACPIGet+0x27d:
f7407935 8b4628 mov eax,dword ptr [esi+28h] ds:0023:899c6348=00000000
0: kd> kc
#
00 ACPI!ACPIGet
01 ACPI!ACPIBuildProcessRunMethodPhaseCheckSta
02 ACPI!ACPIBuildProcessGenericList
03 ACPI!ACPIBuildDeviceDpc
04 nt!KiRetireDpcList
05 nt!KiDispatchInterrupt
WARNING: Frame IP not in any known module. Following frames may be wrong.
06 0x0
0: kd> gu
eax=00000000 ebx=00000000 ecx=00020001 edx=00010000 esi=89906d70 edi=899c0d58
eip=f73fbc48 esp=f789ef54 ebp=f789ef60 iopl=0 nv up ei pl zr na po cy
cs=0008 ss=0010 ds=0023 es=0023 fs=0030 gs=0000 efl=00000243
ACPI!ACPIBuildProcessRunMethodPhaseCheckSta+0x4e:
f73fbc48 8bd8 mov ebx,eax
0: kd> kc
#
00 ACPI!ACPIBuildProcessRunMethodPhaseCheckSta
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