处理完ACPI!AcpiBuildRunMethodList链表后处理ACPI!AcpiBuildDeviceList链表--大转折

处理完ACPI!AcpiBuildRunMethodList链表后处理ACPI!AcpiBuildDeviceList链表--大转折

之节点ISA的处理

第一部分:

1: kd> kc

00 ACPI!OSQueueWorkItem

01 ACPI!RestartContext

02 ACPI!AsyncEvalObject

03 ACPI!AMLIAsyncEvalObject

04 ACPI!ACPIGet

05 ACPI!ACPIBuildProcessDevicePhaseAdrOrHid

06 ACPI!ACPIBuildProcessGenericList

07 ACPI!ACPIBuildDeviceDpc

08 nt!KiRetireDpcList

09 nt!KiDispatchInterrupt

WARNING: Frame IP not in any known module. Following frames may be wrong.

0a 0x0

1: kd> g

Breakpoint 4 hit

eax=00000000 ebx=c0000034 ecx=00000000 edx=00000000 esi=899c0d58 edi=0000000f

eip=f7409910 esp=f78aee7c ebp=f78aee9c 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

1: kd> dv

DeviceExtension = 0x899c0d58

DeviceStatus = 0xf

oldIrql = 0x00 ''

1: kd> dx -r1 ((ACPI!_DEVICE_EXTENSION *)0x899c0d58)

((ACPI!_DEVICE_EXTENSION *)0x899c0d58) : 0x899c0d58 [Type: _DEVICE_EXTENSION *]

+0x000\] Flags : 0x40200002000008 \[Type: unsigned __int64

+0x000\] UFlags \[Type: __unnamed

+0x008\] Signature : 0x5f534750 \[Type: unsigned long

+0x00c\] DebugFlags : 0x0 \[Type: unsigned long

+0x010\] DispatchTable : 0x0 \[Type: IRP_DISPATCH_TABLE \*

+0x014\] WorkContext \[Type: WORK_QUEUE_CONTEXT

+0x014\] Fdo \[Type: _FDO_DEVICE_EXTENSION

+0x014\] Filter \[Type: _FILTER_DEVICE_EXTENSION

+0x014\] Pdo \[Type: _PDO_DEVICE_EXTENSION

+0x058\] WorkQueue \[Type: EXTENSION_WORKER

+0x058\] Button \[Type: BUTTON_EXTENSION

+0x058\] Thermal \[Type: THERMAL_EXTENSION

+0x058\] LinkNode \[Type: LINK_NODE_EXTENSION

+0x058\] Dock \[Type: DOCK_EXTENSION

+0x058\] Processor \[Type: _PROCESSOR_DEVICE_EXTENSION

+0x088\] DeviceState : Stopped (0) \[Type: _ACPI_DEVICE_STATE

+0x08c\] PreviousState : Stopped (0) \[Type: _ACPI_DEVICE_STATE

+0x090\] PowerInfo \[Type: _ACPI_POWER_INFO

+0x10c\] DeviceID : 0x899c1148 : 0x41 \[Type: unsigned char \*

+0x10c\] Address : 0x899c1148 \[Type: unsigned long

+0x110\] InstanceID : 0x0 \[Type: unsigned char \*

+0x114\] ResourceList : 0x0 \[Type: _CM_RESOURCE_LIST \*

+0x118\] PnpResourceList : 0x0 \[Type: _ObjData \*

+0x11c\] OutstandingIrpCount : 1 \[Type: long

+0x120\] ReferenceCount : 82 \[Type: long

+0x124\] HibernatePathCount : 0 \[Type: long

+0x128\] RemoveEvent : 0x0 \[Type: _KEVENT \*

+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

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.......

第二部分:

1: kd> g

Breakpoint 4 hit

eax=00000000 ebx=c0000034 ecx=00000000 edx=00000000 esi=899c0bf0 edi=0000000f

eip=f7409910 esp=f78aee84 ebp=f78aeea4 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

1: kd> dv

DeviceExtension = 0x899c0bf0

DeviceStatus = 0xf

oldIrql = 0x00 ''

1: kd> dx -r1 ((ACPI!_DEVICE_EXTENSION *)0x899c0bf0)

((ACPI!_DEVICE_EXTENSION *)0x899c0bf0) : 0x899c0bf0 [Type: _DEVICE_EXTENSION *]

+0x000\] Flags : 0x40100000000008 \[Type: unsigned __int64

+0x000\] UFlags \[Type: __unnamed

+0x008\] Signature : 0x5f534750 \[Type: unsigned long

+0x00c\] DebugFlags : 0x0 \[Type: unsigned long

+0x010\] DispatchTable : 0x0 \[Type: IRP_DISPATCH_TABLE \*

+0x014\] WorkContext \[Type: WORK_QUEUE_CONTEXT

+0x014\] Fdo \[Type: _FDO_DEVICE_EXTENSION

+0x014\] Filter \[Type: _FILTER_DEVICE_EXTENSION

+0x014\] Pdo \[Type: _PDO_DEVICE_EXTENSION

+0x058\] WorkQueue \[Type: EXTENSION_WORKER

+0x058\] Button \[Type: BUTTON_EXTENSION

+0x058\] Thermal \[Type: THERMAL_EXTENSION

+0x058\] LinkNode \[Type: LINK_NODE_EXTENSION

+0x058\] Dock \[Type: DOCK_EXTENSION

+0x058\] Processor \[Type: _PROCESSOR_DEVICE_EXTENSION

+0x088\] DeviceState : Stopped (0) \[Type: _ACPI_DEVICE_STATE

+0x08c\] PreviousState : Stopped (0) \[Type: _ACPI_DEVICE_STATE

+0x090\] PowerInfo \[Type: _ACPI_POWER_INFO

+0x10c\] DeviceID : 0x10000 : 0xd \[Type: unsigned char \*

+0x10c\] Address : 0x10000 \[Type: unsigned long

+0x110\] InstanceID : 0x0 \[Type: unsigned char \*

+0x114\] ResourceList : 0x0 \[Type: _CM_RESOURCE_LIST \*

+0x118\] PnpResourceList : 0x0 \[Type: _ObjData \*

+0x11c\] OutstandingIrpCount : 1 \[Type: long

+0x120\] ReferenceCount : 3 \[Type: long

+0x124\] HibernatePathCount : 0 \[Type: long

+0x128\] RemoveEvent : 0x0 \[Type: _KEVENT \*

+0x12c\] AcpiObject : 0x899b21bc \[Type: _NSObj \*

+0x130\] DeviceObject : 0x0 \[Type: _DEVICE_OBJECT \*

+0x134\] TargetDeviceObject : 0x0 \[Type: _DEVICE_OBJECT \*

+0x138\] PhysicalDeviceObject : 0x0 \[Type: _DEVICE_OBJECT \*

+0x13c\] ParentExtension : 0x899c0d58 \[Type: _DEVICE_EXTENSION \*

+0x140\] ChildDeviceList \[Type: _LIST_ENTRY

+0x148\] SiblingDeviceList \[Type: _LIST_ENTRY

+0x150\] EjectDeviceHead \[Type: _LIST_ENTRY

+0x158\] EjectDeviceList \[Type: _LIST_ENTRY

1: kd> db 0x899b21bc

899b21bc 9c 14 9b 89 78 22 9b 89-ac ff 9a 89 34 22 9b 89 ....x"......4"..

899b21cc 41 47 50 5f 30 f3 9a 89-9c 14 9b 89 00 00 06 00 AGP_0...........

899b21dc 00 00 00 00 00 00 00 00-00 00 00 00 00 00 00 00 ................

899b21ec f0 0b 9c 89 00 00 00 00-48 4f 52 47 34 00 00 00 ........HORG4...

899b21fc 00 f0 9a 89 60 00 00 00-04 00 00 00 02 00 00 00 ....`...........

899b220c 00 00 00 00 00 00 00 00-00 00 00 00 00 00 00 00 ................

899b221c 00 00 00 00 00 00 00 00-00 00 00 00 48 4e 53 4f ............HNSO

899b222c 44 00 00 00 00 f0 9a 89-34 22 9b 89 34 22 9b 89 D.......4"..4"..

第三部分:

1: kd> g

Breakpoint 71 hit

eax=899841cc ebx=899c0a88 ecx=00400000 edx=00400000 esi=89984188 edi=00000000

eip=f74076b8 esp=f78aef2c ebp=f78aef60 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:

f74076b8 55 push ebp

1: kd> kc

00 ACPI!ACPIGet

01 ACPI!ACPIBuildProcessDevicePhaseAdr

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

1: kd> dv

Target = 0x899c0a88

ObjectID = 0x4154535f

Flags = 0x40040802

SimpleArgument = 0x00000000

SimpleArgumentSize = 0

CallBackRoutine = 0xf73fa5bc

CallBackContext = 0x89984188

Buffer = 0x899841cc

BufferSize = 0x00000000

completionRoutine = 0xf74076b9

status = 0n1074006018

argument = struct _ObjData

argumentPtr = 0x89984188

acpiObject = 0x899c0a88

deviceExtension = 0xf78aef60

async = 0x00 ''

argumentCount = 0

1: kd> be 5

1: kd> be 6

1: kd> db 0x899c0a88

899c0a88 08 00 00 00 00 10 40 00-50 47 53 5f 00 00 00 00 ......@.PGS_....

899c0a98 00 00 00 00 00 00 00 00-00 00 00 00 00 00 00 00 ................

899c0aa8 00 00 00 00 00 00 00 00-00 00 00 00 00 00 00 00 ................

899c0ab8 00 00 00 00 00 00 00 00-00 00 00 00 00 00 00 00 ................

899c0ac8 00 00 00 00 00 00 00 00-00 00 00 00 00 00 00 00 ................

899c0ad8 00 00 00 00 00 00 00 00-00 00 00 00 00 00 00 00 ................

899c0ae8 00 00 00 00 00 00 00 00-00 00 00 00 00 00 00 00 ................

899c0af8 00 00 00 00 00 00 00 00-00 00 00 00 00 00 00 00 ................

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> db 0x899b2278

899b2278 bc 21 9b 89 68 3c 9b 89-ac ff 9a 89 bc 22 9b 89 .!..h<......."..

899b2288 49 53 41 5f 30 f3 9a 89-34 22 9b 89 00 00 06 00 ISA_0...4"......

899b2298 00 00 00 00 00 00 00 00-00 00 00 00 00 00 00 00 ................

899b22a8 88 0a 9c 89 00 00 00 00-48 4e 53 4f 44 00 00 00 ........HNSOD...

899b22b8 00 f0 9a 89 0c e5 9b 89-00 23 9b 89 78 22 9b 89 .........#..x"..

899b22c8 00 00 00 00 5f 41 44 52-30 f3 9a 89 78 22 9b 89 ...._ADR0...x"..

899b22d8 00 00 01 00 00 00 00 00-00 00 07 00 00 00 00 00 ................

899b22e8 00 00 00 00 00 00 00 00-00 00 00 00 48 4e 53 4f ............HNSO

1: kd> dx -r1 (*((ACPI!long (*(*)[23])(_ACPI_BUILD_REQUEST *))0xf7438008))

(*((ACPI!long (*(*)[23])(_ACPI_BUILD_REQUEST *))0xf7438008)) [Type: long (* [23])(_ACPI_BUILD_REQUEST *)]

0\] : 0xf73fb840 \[Type: long (\*)(_ACPI_BUILD_REQUEST \*)

1\] : 0x0 \[Type: long (\*)(_ACPI_BUILD_REQUEST \*)

2\] : 0xf73fce98 \[Type: long (\*)(_ACPI_BUILD_REQUEST \*)

3\] : 0xf73fb118 \[Type: long (\*)(_ACPI_BUILD_REQUEST \*)

4\] : 0xf73fb09e \[Type: long (\*)(_ACPI_BUILD_REQUEST \*)

5\] : 0xf73fb40c \[Type: long (\*)(_ACPI_BUILD_REQUEST \*)

6\] : 0xf73fb7a0 \[Type: long (\*)(_ACPI_BUILD_REQUEST \*)

7\] : 0xf73fb246 \[Type: long (\*)(_ACPI_BUILD_REQUEST \*)

8\] : 0xf73fb72e \[Type: long (\*)(_ACPI_BUILD_REQUEST \*)

9\] : 0xf73fafda \[Type: long (\*)(_ACPI_BUILD_REQUEST \*)

10\] : 0xf73fddf2 \[Type: long (\*)(_ACPI_BUILD_REQUEST \*)

11\] : 0xf73fafda \[Type: long (\*)(_ACPI_BUILD_REQUEST \*)

12\] : 0xf73fd18a \[Type: long (\*)(_ACPI_BUILD_REQUEST \*)

13\] : 0xf73fafda \[Type: long (\*)(_ACPI_BUILD_REQUEST \*)

14\] : 0xf73fcf04 \[Type: long (\*)(_ACPI_BUILD_REQUEST \*)

15\] : 0xf73fafda \[Type: long (\*)(_ACPI_BUILD_REQUEST \*)

16\] : 0xf73fcfca \[Type: long (\*)(_ACPI_BUILD_REQUEST \*)

17\] : 0xf73fafda \[Type: long (\*)(_ACPI_BUILD_REQUEST \*)

18\] : 0xf73fd09e \[Type: long (\*)(_ACPI_BUILD_REQUEST \*)

19\] : 0xf73fafda \[Type: long (\*)(_ACPI_BUILD_REQUEST \*)

20\] : 0xf73fb36a \[Type: long (\*)(_ACPI_BUILD_REQUEST \*)

21\] : 0xf73faf0a \[Type: long (\*)(_ACPI_BUILD_REQUEST \*)

22\] : 0xf73fb57c \[Type: long (\*)(_ACPI_BUILD_REQUEST \*)

1: kd> dds 0xf7438008

f7438008 f73fb840 ACPI!ACPIBuildProcessGenericComplete [d:\srv03rtm\base\busdrv\acpi\driver\nt\buildsrc.c @ 4654]

f743800c 00000000

f7438010 f73fce98 ACPI!ACPIBuildProcessDeviceFailure [d:\srv03rtm\base\busdrv\acpi\driver\nt\buildsrc.c @ 2507]

f7438014 f73fb118 ACPI!ACPIBuildProcessDevicePhaseAdrOrHid [d:\srv03rtm\base\busdrv\acpi\driver\nt\buildsrc.c @ 2844]

f7438018 f73fb09e ACPI!ACPIBuildProcessDevicePhaseAdr [d:\srv03rtm\base\busdrv\acpi\driver\nt\buildsrc.c @ 2754]

f743801c f73fb40c ACPI!ACPIBuildProcessDevicePhaseHid [d:\srv03rtm\base\busdrv\acpi\driver\nt\buildsrc.c @ 3434]

f7438020 f73fb7a0 ACPI!ACPIBuildProcessDevicePhaseUid [d:\srv03rtm\base\busdrv\acpi\driver\nt\buildsrc.c @ 4547]

f7438024 f73fb246 ACPI!ACPIBuildProcessDevicePhaseCid [d:\srv03rtm\base\busdrv\acpi\driver\nt\buildsrc.c @ 3018]

f7438028 f73fb72e ACPI!ACPIBuildProcessDevicePhaseSta [d:\srv03rtm\base\busdrv\acpi\driver\nt\buildsrc.c @ 4479]

f743802c f73fafda ACPI!ACPIBuildProcessDeviceGenericEvalStrict [d:\srv03rtm\base\busdrv\acpi\driver\nt\buildsrc.c @ 2657]

f7438030 f73fddf2 ACPI!ACPIBuildProcessDevicePhaseEjd [d:\srv03rtm\base\busdrv\acpi\driver\nt\buildsrc.c @ 3247]

f7438034 f73fafda ACPI!ACPIBuildProcessDeviceGenericEvalStrict [d:\srv03rtm\base\busdrv\acpi\driver\nt\buildsrc.c @ 2657]

f7438038 f73fd18a ACPI!ACPIBuildProcessDevicePhasePrw [d:\srv03rtm\base\busdrv\acpi\driver\nt\buildsrc.c @ 3935]

f743803c f73fafda ACPI!ACPIBuildProcessDeviceGenericEvalStrict [d:\srv03rtm\base\busdrv\acpi\driver\nt\buildsrc.c @ 2657]

f7438040 f73fcf04 ACPI!ACPIBuildProcessDevicePhasePr0 [d:\srv03rtm\base\busdrv\acpi\driver\nt\buildsrc.c @ 3572]

f7438044 f73fafda ACPI!ACPIBuildProcessDeviceGenericEvalStrict [d:\srv03rtm\base\busdrv\acpi\driver\nt\buildsrc.c @ 2657]

f7438048 f73fcfca ACPI!ACPIBuildProcessDevicePhasePr1 [d:\srv03rtm\base\busdrv\acpi\driver\nt\buildsrc.c @ 3684]

f743804c f73fafda ACPI!ACPIBuildProcessDeviceGenericEvalStrict [d:\srv03rtm\base\busdrv\acpi\driver\nt\buildsrc.c @ 2657]

f7438050 f73fd09e ACPI!ACPIBuildProcessDevicePhasePr2 [d:\srv03rtm\base\busdrv\acpi\driver\nt\buildsrc.c @ 3803]

f7438054 f73fafda ACPI!ACPIBuildProcessDeviceGenericEvalStrict [d:\srv03rtm\base\busdrv\acpi\driver\nt\buildsrc.c @ 2657]

f7438058 f73fb36a ACPI!ACPIBuildProcessDevicePhaseCrs [d:\srv03rtm\base\busdrv\acpi\driver\nt\buildsrc.c @ 3147]

f743805c f73faf0a ACPI!ACPIBuildProcessDeviceGenericEval [d:\srv03rtm\base\busdrv\acpi\driver\nt\buildsrc.c @ 2562]

f7438060 f73fb57c ACPI!ACPIBuildProcessDevicePhasePsc [d:\srv03rtm\base\busdrv\acpi\driver\nt\buildsrc.c @ 4228]

f7438064 00000000

1: kd> kc

00 ACPI!ACPIGet

01 ACPI!ACPIBuildProcessDevicePhaseAdr

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

1: kd> dv

Target = 0x899c0a88

ObjectID = 0x4154535f

Flags = 0x40040802

SimpleArgument = 0x00000000

SimpleArgumentSize = 0

CallBackRoutine = 0xf73fa5bc

CallBackContext = 0x89984188

Buffer = 0x899841cc

BufferSize = 0x00000000

completionRoutine = 0xf74076b9

status = 0n1074006018

argument = struct _ObjData

argumentPtr = 0x89984188

acpiObject = 0x899c0a88

deviceExtension = 0xf78aef60

async = 0x00 ''

argumentCount = 0

1: kd> r

eax=899841cc ebx=899c0a88 ecx=00400000 edx=00400000 esi=89984188 edi=00000000

eip=f74076b8 esp=f78aef2c ebp=f78aef60 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:

f74076b8 55 push ebp

1: kd> db f78aef2c

f78aef2c dd b0 3f f7 88 0a 9c 89-5f 53 54 41 02 08 04 40 ..?....._STA...@

1: kd> kv

ChildEBP RetAddr Args to Child

00 f78aef28 f73fb0dd 899c0a88 4154535f 40040802 ACPI!ACPIGet (FPO: [Non-Fpo]) (CONV: stdcall) [d:\srv03rtm\base\busdrv\acpi\driver\nt\get.c @ 76]

01 f78aef60 f73fb914 89984188 f7737980 80afae90 ACPI!ACPIBuildProcessDevicePhaseAdr+0x3f (FPO: [Non-Fpo]) (CONV: stdcall) [d:\srv03rtm\base\busdrv\acpi\driver\nt\buildsrc.c @ 2792]

02 f78aef84 f73fc692 f743b888 f7438008 f7737980 ACPI!ACPIBuildProcessGenericList+0x50 (FPO: [Non-Fpo]) (CONV: stdcall) [d:\srv03rtm\base\busdrv\acpi\driver\nt\buildsrc.c @ 4847]

03 f78aef9c 80a41432 f743b840 00000000 00000000 ACPI!ACPIBuildDeviceDpc+0xe0 (FPO: [4,0,0]) (CONV: stdcall) [d:\srv03rtm\base\busdrv\acpi\driver\nt\buildsrc.c @ 659]

04 f78aeff4 80b00756 f791abfc 00000000 00000000 nt!KiRetireDpcList+0xd6 (FPO: [Non-Fpo]) (CONV: fastcall) [d:\srv03rtm\base\ntos\ke\dpcsup.c @ 1076]

05 f78aeff8 f791abfc 00000000 00000000 00000000 nt!KiDispatchInterrupt+0x36 (FPO: [Uses EBP] [0,0,1]) [d:\srv03rtm\base\ntos\ke\i386\ctxswap.asm @ 226]

WARNING: Frame IP not in any known module. Following frames may be wrong.

06 80b00756 00000000 00000009 bb837775 00000128 0xf791abfc

windbg> .open -a fffffffff73fb0dd

NTSTATUS

ACPIBuildProcessDevicePhaseAdr(

IN PACPI_BUILD_REQUEST BuildRequest

)

{

//

// Get the device status

//

status = ACPIGetDevicePresenceAsync(

deviceExtension,

ACPIBuildCompleteMustSucceed,

BuildRequest,

(PVOID *) &(BuildRequest->Integer),

NULL

);

//

// This macro is used to get the device status asynchronously

//

#define ACPIGetDevicePresenceAsync( \

DeviceExtension, \

CallBack, \

Context, \

Buffer, \

BufferSize \

) \

ACPIGetDevicePresence( \

DeviceExtension, \

GET_PROP_ASYNCHRONOUS, \

CallBack, \

Context, \

Buffer, \

BufferSize \

)

//

// This macro is used to get the device presence

//

#define ACPIGetDevicePresence( \

DeviceExtension, \

Flags, \

CallBack, \

Context, \

Buffer, \

BufferSize \

) \

ACPIGet( \

DeviceExtension, \

PACKED_STA, \

(GET_REQUEST_INTEGER | \

GET_TYPE_INTEGER | \

GET_CONVERT_TO_DEVICE_PRESENCE | \

Flags ), \

NULL, \

0, \

CallBack, \

Context, \

(PVOID *) Buffer, \

(PULONG) BufferSize \

)

1: kd> dt ACPI_BUILD_REQUEST 89984188

+0x000 ListEntry : _LIST_ENTRY [ 0x89984138 - 0x89986158 ]

+0x008 Signature : 0x5f534750

+0x00c Flags : 1

+0x00c UFlags : __unnamed

+0x010 WorkDone : 1

+0x014 CurrentWorkDone : 4

+0x018 NextWorkDone : 8

+0x01c BuildContext : 0x899c0a88 Void

+0x020 Status : 0n0

+0x024 CurrentObject : 0x899b22bc _NSObj

+0x028 CallBack : (null)

+0x02c CallBackContext : (null)

+0x030 DeviceRequest : __unnamed

+0x030 RunRequest : __unnamed

+0x030 SynchronizeRequest : __unnamed

+0x044 Integer : 0

+0x044 String : (null)

+0x044 TargetListEntry : (null)

1: kd> dx -id 0,0,899a2278 -r1 (*((ACPI!_LIST_ENTRY *)0x89984188))

(*((ACPI!_LIST_ENTRY *)0x89984188)) [Type: _LIST_ENTRY]

+0x000\] Flink : 0x89984138 \[Type: _LIST_ENTRY \*

+0x004\] Blink : 0x89986158 \[Type: _LIST_ENTRY \*

1: kd> dx -id 0,0,899a2278 -r1 ((ACPI!_LIST_ENTRY *)0x89986158)

((ACPI!_LIST_ENTRY *)0x89986158) : 0x89986158 [Type: _LIST_ENTRY *]

+0x000\] Flink : 0x89984188 \[Type: _LIST_ENTRY \*

+0x004\] Blink : 0xf743b888 \[Type: _LIST_ENTRY \*

1: kd> u 0xf743b888

ACPI!AcpiBuildDeviceList:

f743b888 58 pop eax

f743b889 61 popad

f743b88a 98 cwde

f743b88b 895873 mov dword ptr [eax+73h],ebx

f743b88e 90 nop

f743b88f 8990b843f790 mov dword ptr [eax-6F08BC48h],edx

f743b895 b843f70000 mov eax,0F743h

f743b89a 0000 add byte ptr [eax],al

1: kd> x ACPI!AcpiBuildDeviceList

f743b888 ACPI!AcpiBuildDeviceList = struct _LIST_ENTRY [ 0x89986158 - 0x89907358 ]

1: kd> dx -r1 (*((ACPI!_LIST_ENTRY *)0xf743b888))

(*((ACPI!_LIST_ENTRY *)0xf743b888)) [Type: _LIST_ENTRY]

+0x000\] Flink : 0x89986158 \[Type: _LIST_ENTRY \*

+0x004\] Blink : 0x89907358 \[Type: _LIST_ENTRY \*

1: kd> dx -r1 ((ACPI!_LIST_ENTRY *)0x89986158)

((ACPI!_LIST_ENTRY *)0x89986158) : 0x89986158 [Type: _LIST_ENTRY *]

+0x000\] Flink : 0x89984188 \[Type: _LIST_ENTRY \*

+0x004\] Blink : 0xf743b888 \[Type: _LIST_ENTRY \*

1: kd> dt ACPI_BUILD_REQUEST 0x89986158

+0x000 ListEntry : _LIST_ENTRY [ 0x89984188 - 0xf743b888 ]

+0x008 Signature : 0x5f534750

+0x00c Flags : 1

+0x00c UFlags : __unnamed

+0x010 WorkDone : 1

+0x014 CurrentWorkDone : 0xb

+0x018 NextWorkDone : 0xc

+0x01c BuildContext : 0x899c0d58 Void

+0x020 Status : 0n0

+0x024 CurrentObject : 0x899b1458 _NSObj

+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

1: kd> dt acpi!_DEVICE_EXTENSION 0x899c0d58

+0x000 Flags : 0x00402000`02000008

+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 : 0x899c1148 "ACPI\PNP0A03"

+0x10c Address : 0x899c1148

+0x110 InstanceID : (null)

+0x114 ResourceList : (null)

+0x118 PnpResourceList : (null)

+0x11c OutstandingIrpCount : 0n1

+0x120 ReferenceCount : 0n82

+0x124 HibernatePathCount : 0n0

+0x128 RemoveEvent : (null)

+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 ]

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 ................

第四部分:全局变量ACPI!AcpiBuildDeviceList链表中节点的由来

NTSTATUS

ACPIBuildDeviceRequest(

IN PDEVICE_EXTENSION DeviceExtension,

IN PACPI_BUILD_CALLBACK CallBack,

IN PVOID CallBackContext,

IN BOOLEAN RunDPC

)

{

PACPI_BUILD_REQUEST buildRequest;

ASSERT( KeGetCurrentIrql() == DISPATCH_LEVEL );

//

// Allocate a buildRequest structure

//

buildRequest = ExAllocateFromNPagedLookasideList(

&BuildRequestLookAsideList

);

if (buildRequest == NULL) {

return STATUS_INSUFFICIENT_RESOURCES;

}

//

// If the current reference is 0, that means that someone else beat

// use to the device extension that that we *CANNOT* touch it

//

if (DeviceExtension->ReferenceCount == 0) {

ExFreeToNPagedLookasideList(

&BuildRequestLookAsideList,

buildRequest

);

return STATUS_DEVICE_REMOVED;

} else {

InterlockedIncrement( &(DeviceExtension->ReferenceCount) );

}

//

// Fill in the structure

//

RtlZeroMemory( buildRequest, sizeof(ACPI_BUILD_REQUEST) );

buildRequest->Signature = ACPI_SIGNATURE;

buildRequest->TargetListEntry = &AcpiBuildDeviceList;

buildRequest->WorkDone = WORK_DONE_STEP_0;

buildRequest->Status = STATUS_SUCCESS;

buildRequest->CallBack = CallBack;

buildRequest->CallBackContext = CallBackContext;

buildRequest->BuildContext = DeviceExtension;

buildRequest->Flags = BUILD_REQUEST_VALID_TARGET |

BUILD_REQUEST_DEVICE;

//

// At this point, we need the spinlock

//

KeAcquireSpinLockAtDpcLevel( &AcpiBuildQueueLock );

//

// Add this to the list

//

InsertTailList(

&AcpiBuildQueueList,

&(buildRequest->ListEntry)

);

//

// Do we need to queue up the DPC?

//

if (RunDPC && !AcpiBuildDpcRunning) {

KeInsertQueueDpc( &AcpiBuildDpc, 0, 0 );

}

//

// Done with the lock

//

KeReleaseSpinLockFromDpcLevel( &AcpiBuildQueueLock );

//

// Done

//

return STATUS_PENDING;

}

0: kd> t

Breakpoint 4 hit

eax=0000000a ebx=00000000 ecx=00000000 edx=00000000 esi=00000000 edi=80ae2bca

eip=f73fcc7c esp=f789a0b4 ebp=f789a0d8 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!ACPIBuildDeviceRequest:

f73fcc7c 55 push ebp

0: kd> kc

00 ACPI!ACPIBuildDeviceRequest

01 ACPI!OSNotifyCreateDevice

02 ACPI!OSNotifyCreate

03 ACPI!Device

04 ACPI!ParseTerm

05 ACPI!RunContext

06 ACPI!InsertReadyQueue

07 ACPI!RestartContext

08 ACPI!SyncLoadDDB

09 ACPI!AMLILoadDDB

0a ACPI!ACPIInitializeDDB

0b ACPI!ACPIInitializeDDBs

0c ACPI!ACPIInitialize

0d ACPI!ACPIInitStartACPI

0e ACPI!ACPIRootIrpStartDevice

0f ACPI!ACPIDispatchIrp

10 nt!IofCallDriver

11 nt!IopSynchronousCall

12 nt!IopStartDevice

13 nt!PipProcessStartPhase1

14 nt!PipProcessDevNodeTree

15 nt!PipDeviceActionWorker

16 nt!PipRequestDeviceAction

17 nt!IopInitializeBootDrivers

18 nt!IoInitSystem

19 nt!Phase1Initialization

1a nt!PspSystemThreadStartup

1b nt!KiThreadStartup

第五部分:什么时候运行这些节点?处理完ACPI!AcpiBuildRunMethodList链表后处理ACPI!AcpiBuildDeviceList

VOID

ACPIBuildDeviceDpc(

IN PKDPC Dpc,

IN PVOID DpcContext,

IN PVOID SystemArgument1,

IN PVOID SystemArgument2

)

{

//

// If there are items in the Run Method list, then process the

// list

//

if (!IsListEmpty( &AcpiBuildRunMethodList ) ) {

//

// We actually care what this call returns. The reason we do

// is that we want all of the control methods to be run before

// we do any of the following steps

//
status = ACPIBuildProcessGenericList(
&AcpiBuildRunMethodList,

AcpiBuildRunMethodDispatch

);

//

// If there are items in the Power Resource list, then process

// the list

//

if (!IsListEmpty( &AcpiBuildPowerResourceList ) ) {

//

// We actually care what this call returns. The reason we do

// is that we want all of the power resources to be built before

// we do any of the following steps

//

status = ACPIBuildProcessGenericList(

&AcpiBuildPowerResourceList,

AcpiBuildPowerResourceDispatch

);

if (status == STATUS_PENDING) {

//

// We must own the spinlock before we continue

//

KeAcquireSpinLockAtDpcLevel( &AcpiBuildQueueLock );

continue;

}

}

1: kd> x acpi!AcpiBuildPowerResourceList

f743b878 ACPI!AcpiBuildPowerResourceList = struct _LIST_ENTRY [ 0xf743b878 - 0xf743b878 ]

1: kd> dx -r1 (*((ACPI!_LIST_ENTRY *)0xf743b878))

(*((ACPI!_LIST_ENTRY *)0xf743b878)) [Type: _LIST_ENTRY]

+0x000\] Flink : 0xf743b878 \[Type: _LIST_ENTRY \*

+0x004\] Blink : 0xf743b878 \[Type: _LIST_ENTRY \*

//

// If there are items in Device list, then process the list

//

if (!IsListEmpty( &AcpiBuildDeviceList ) ) {

//

// Since we don't block on this list --- ie we can create

// devices at any time that we want, we don't care what this

// function returns.

//
status = ACPIBuildProcessGenericList(
&AcpiBuildDeviceList,

AcpiBuildDeviceDispatch

);

}