ACPI!ACPIBuildProcessDevicePhaseHid函数分析之DMAC节点的处理1: kd guBreakpoint 5 hiteax00000005 ebx00000005 ecx899c21e8 edx00000001 esi899c21d8 edi80b019f4eipf73fb911 espf78aef68 ebpf78aef84 iopl0 nv up ei pl zr na pe nccs0008 ss0010 ds0023 es0023 fs0030 gs0000 efl00000246ACPI!ACPIBuildProcessGenericList0x4d:f73fb911 ff55f4 call dword ptr [ebp-0Ch] ss:0010:f78aef78{ACPI!ACPIBuildProcessDevicePhaseHid (f73fb40c)}1: kd teax00000005 ebx00000005 ecx899c21e8 edx00000001 esi899c21d8 edi80b019f4eipf73fb40c espf78aef64 ebpf78aef84 iopl0 nv up ei pl zr na pe nccs0008 ss0010 ds0023 es0023 fs0030 gs0000 efl00000246ACPI!ACPIBuildProcessDevicePhaseHid:f73fb40c 55 push ebp1: kd kc#00 ACPI!ACPIBuildProcessDevicePhaseHid01 ACPI!ACPIBuildProcessGenericList02 ACPI!ACPIBuildDeviceDpc03 nt!KiRetireDpcList04 nt!KiDispatchInterruptWARNING: Frame IP not in any known module. Following frames may be wrong.05 0x01: kd dvBuildRequest 0x899c21d8nsObject 0x899c21d8tempPtr 0xf73fb40c U???matchFound 0x00 1: kd x acpi!AcpiInternalDeviceFlagTablef7438530 ACPI!AcpiInternalDeviceFlagTable struct INTERNAL_DEVICE_FLAG_TABLE []f7438530 ACPI!AcpiInternalDeviceFlagTable struct INTERNAL_DEVICE_FLAG_TABLE [37]1: kd dx -r1 (*((ACPI!INTERNAL_DEVICE_FLAG_TABLE (*)[37])0xf7438530))(*((ACPI!INTERNAL_DEVICE_FLAG_TABLE (*)[37])0xf7438530)) [Type: INTERNAL_DEVICE_FLAG_TABLE [37]][0] [Type: INTERNAL_DEVICE_FLAG_TABLE][1] [Type: INTERNAL_DEVICE_FLAG_TABLE][2] [Type: INTERNAL_DEVICE_FLAG_TABLE][3] [Type: INTERNAL_DEVICE_FLAG_TABLE][4] [Type: INTERNAL_DEVICE_FLAG_TABLE][5] [Type: INTERNAL_DEVICE_FLAG_TABLE][6] [Type: INTERNAL_DEVICE_FLAG_TABLE][7] [Type: INTERNAL_DEVICE_FLAG_TABLE][8] [Type: INTERNAL_DEVICE_FLAG_TABLE][9] [Type: INTERNAL_DEVICE_FLAG_TABLE][10] [Type: INTERNAL_DEVICE_FLAG_TABLE][11] [Type: INTERNAL_DEVICE_FLAG_TABLE][12] [Type: INTERNAL_DEVICE_FLAG_TABLE][13] [Type: INTERNAL_DEVICE_FLAG_TABLE][14] [Type: INTERNAL_DEVICE_FLAG_TABLE][15] [Type: INTERNAL_DEVICE_FLAG_TABLE][16] [Type: INTERNAL_DEVICE_FLAG_TABLE][17] [Type: INTERNAL_DEVICE_FLAG_TABLE][18] [Type: INTERNAL_DEVICE_FLAG_TABLE][19] [Type: INTERNAL_DEVICE_FLAG_TABLE][20] [Type: INTERNAL_DEVICE_FLAG_TABLE][21] [Type: INTERNAL_DEVICE_FLAG_TABLE][22] [Type: INTERNAL_DEVICE_FLAG_TABLE][23] [Type: INTERNAL_DEVICE_FLAG_TABLE][24] [Type: INTERNAL_DEVICE_FLAG_TABLE][25] [Type: INTERNAL_DEVICE_FLAG_TABLE][26] [Type: INTERNAL_DEVICE_FLAG_TABLE][27] [Type: INTERNAL_DEVICE_FLAG_TABLE][28] [Type: INTERNAL_DEVICE_FLAG_TABLE][29] [Type: INTERNAL_DEVICE_FLAG_TABLE][30] [Type: INTERNAL_DEVICE_FLAG_TABLE][31] [Type: INTERNAL_DEVICE_FLAG_TABLE][32] [Type: INTERNAL_DEVICE_FLAG_TABLE][33] [Type: INTERNAL_DEVICE_FLAG_TABLE][34] [Type: INTERNAL_DEVICE_FLAG_TABLE][35] [Type: INTERNAL_DEVICE_FLAG_TABLE][36] [Type: INTERNAL_DEVICE_FLAG_TABLE]1: kd dx -r1 (*((ACPI!INTERNAL_DEVICE_FLAG_TABLE *)0xf7438530))(*((ACPI!INTERNAL_DEVICE_FLAG_TABLE *)0xf7438530)) [Type: INTERNAL_DEVICE_FLAG_TABLE][0x000] PnPId : 0xf742b2f4 : 0x43 [Type: unsigned char *][0x008] Flags : 0x80000000 [Type: unsigned __int64]1: kd db 0xf742b2f4f742b2f4 43 50 51 42 30 31 44 00-50 72 6f 63 65 73 73 6f CPQB01D.Processof742b304 72 00 00 00 54 68 65 72-6d 61 6c 5a 6f 6e 65 00 r...ThermalZone.f742b314 44 6f 63 6b 44 65 76 69-63 65 00 00 49 42 4d 30 DockDevice..IBM0f742b324 30 36 32 00 53 4e 59 35-30 30 31 00 50 4e 50 30 062.SNY5001.PNP0f742b334 43 30 45 00 50 4e 50 30-43 30 44 00 50 4e 50 30 C0E.PNP0C0D.PNP0f742b344 43 30 43 00 50 4e 50 30-43 30 42 00 50 4e 50 30 C0C.PNP0C0B.PNP0f742b354 43 30 35 00 50 4e 50 30-43 30 34 00 50 4e 50 30 C05.PNP0C04.PNP0f742b364 43 30 32 00 50 4e 50 30-43 30 31 00 50 4e 50 30 C02.PNP0C01.PNP01: kd dx -r1 (*((ACPI!INTERNAL_DEVICE_FLAG_TABLE *)0xf7438540))(*((ACPI!INTERNAL_DEVICE_FLAG_TABLE *)0xf7438540)) [Type: INTERNAL_DEVICE_FLAG_TABLE][0x000] PnPId : 0xf742b2ec : 0x49 [Type: unsigned char *][0x008] Flags : 0x80000000 [Type: unsigned __int64]1: kd db 0xf742b2ecf742b2ec 49 42 4d 33 37 36 30 00-43 50 51 42 30 31 44 00 IBM3760.CPQB01D.f742b2fc 50 72 6f 63 65 73 73 6f-72 00 00 00 54 68 65 72 Processor...Therf742b30c 6d 61 6c 5a 6f 6e 65 00-44 6f 63 6b 44 65 76 69 malZone.DockDevif742b31c 63 65 00 00 49 42 4d 30-30 36 32 00 53 4e 59 35 ce..IBM0062.SNY5f742b32c 30 30 31 00 50 4e 50 30-43 30 45 00 50 4e 50 30 001.PNP0C0E.PNP0f742b33c 43 30 44 00 50 4e 50 30-43 30 43 00 50 4e 50 30 C0D.PNP0C0C.PNP0f742b34c 43 30 42 00 50 4e 50 30-43 30 35 00 50 4e 50 30 C0B.PNP0C05.PNP0f742b35c 43 30 34 00 50 4e 50 30-43 30 32 00 50 4e 50 30 C04.PNP0C02.PNP01: kd dx -r1 (*((ACPI!INTERNAL_DEVICE_FLAG_TABLE *)0xf7438550))(*((ACPI!INTERNAL_DEVICE_FLAG_TABLE *)0xf7438550)) [Type: INTERNAL_DEVICE_FLAG_TABLE][0x000] PnPId : 0xf742b3fc : 0x41 [Type: unsigned char *][0x008] Flags : 0x2000120000 [Type: unsigned __int64]1: kd db 0xf742b3fcf742b3fc 41 43 50 49 30 30 30 36-00 00 00 00 f5 6f 95 a9 ACPI0006.....o..f742b40c da 13 d3 11 97 db 00 a0-c9 40 52 2e c0 18 bc a1 .........R.....f742b41c c8 a7 d1 11 bf 3c 00 a0-c9 06 29 10 54 f8 76 e6 .........).T.v.f742b42c 7d d8 d0 11 92 b2 00 a0-c9 05 5f c5 9b 60 4f f1 }........._..O.f742b43c bd cb 57 49 a6 74 bc 00-21 3f 1c 97 66 19 14 06 ..WI.t..!?..f...f742b44c 45 72 69 63 46 2e 4e 65-6c 73 6f 6e f4 1b 94 70 EricF.Nelson...pf742b45c 73 00 d1 11 a0 9e 00 c0-4f c3 40 b1 8a a0 91 b0 s.......O......f742b46c 97 ba d0 11 bd 14 00 aa-00 b7 b3 2a 92 4a 15 6c ...........*.J.lDevice (DMAC){Name (_HID, EisaId (PNP0200)) // _HID: Hardware IDName (_CRS, ResourceTemplate () // _CRS: Current Resource Settings{IO (Decode16,0x0000, // Range Minimum0x0000, // Range Maximum0x01, // Alignment0x10, // Length)IO (Decode16,0x0081, // Range Minimum0x0081, // Range Maximum0x01, // Alignment0x0F, // Length)IO (Decode16,0x00C0, // Range Minimum0x00C0, // Range Maximum0x01, // Alignment0x20, // Length)DMA (Compatibility, NotBusMaster, Transfer16, ){4}})}Breakpoint 71 hiteax00000000 ebx4449435f ecx899c221c edx00500000 esi899c21d8 edi899c07b8eipf74076b8 espf78aef24 ebpf78aef60 iopl0 nv up ei pl zr na pe nccs0008 ss0010 ds0023 es0023 fs0030 gs0000 efl00000246ACPI!ACPIGet:f74076b8 55 push ebp1: kd kc#00 ACPI!ACPIGet01 ACPI!ACPIBuildProcessDevicePhaseHid02 ACPI!ACPIBuildProcessGenericList03 ACPI!ACPIBuildDeviceDpc04 nt!KiRetireDpcList05 nt!KiDispatchInterruptWARNING: Frame IP not in any known module. Following frames may be wrong.06 0x01: kd dvTarget 0x899c07b8ObjectID 0x4154535fFlags 0x40040802SimpleArgument 0x00000000SimpleArgumentSize 0CallBackRoutine 0xf73fa5bcCallBackContext 0x899c21d8Buffer 0x899c221cBufferSize 0x00000000completionRoutine 0xf74076b9status 0n1074006018argument struct _ObjDataargumentPtr 0x899c21d8acpiObject 0x899c07b8deviceExtension 0xf78aef60async 0x00 argumentCount 0x899c07b81: kd reax00000000 ebx4449435f ecx899c221c edx00500000 esi899c21d8 edi899c07b8eipf74076b8 espf78aef24 ebpf78aef60 iopl0 nv up ei pl zr na pe nccs0008 ss0010 ds0023 es0023 fs0030 gs0000 efl00000246ACPI!ACPIGet:f74076b8 55 push ebp1: kd db f78aef24f78aef24 e5 b4 3f f7 b8 07 9c 89-5f 53 54 41 02 08 04 40 ..?....._STA...f78aef34 00 00 00 00 00 00 00 00-bc a5 3f f7 d8 21 9c 89 ..........?..!..f78aef44 1c 22 9c 89 00 00 00 00-f4 19 b0 80 d8 21 9c 89 ............!..f78aef54 05 00 00 00 88 fe 9b 89-e8 21 9c 01 84 ef 8a f7 .........!......f78aef64 14 b9 3f f7 00 00 00 00-80 79 73 f7 90 ae af 80 ..?......ys.....f78aef74 98 b8 43 f7 0c b4 3f f7-88 21 9c 89 98 b8 43 00 ..C...?..!....C.f78aef84 f4 ef 8a f7 92 c6 3f f7-88 b8 43 f7 08 80 43 f7 ......?...C...C.f78aef94 80 79 73 f7 b2 c5 3f f7-20 71 73 f7 32 14 a4 80 .ys...?. qs.2...1: kd dt acpi!_DEVICE_EXTENSION 0x899c07b80x000 Flags : 0x00502000003000080x000 UFlags : __unnamed0x008 Signature : 0x5f5347500x00c DebugFlags : 00x010 DispatchTable : (null)0x014 WorkContext : WORK_QUEUE_CONTEXT0x014 Fdo : _FDO_DEVICE_EXTENSION0x014 Filter : _FILTER_DEVICE_EXTENSION0x014 Pdo : _PDO_DEVICE_EXTENSION0x058 WorkQueue : EXTENSION_WORKER0x058 Button : BUTTON_EXTENSION0x058 Thermal : THERMAL_EXTENSION0x058 LinkNode : LINK_NODE_EXTENSION0x058 Dock : DOCK_EXTENSION0x058 Processor : _PROCESSOR_DEVICE_EXTENSION0x088 DeviceState : 0 ( Stopped )0x08c PreviousState : 0 ( Stopped )0x090 PowerInfo : _ACPI_POWER_INFO0x10c DeviceID : 0x899bfe88 ACPI\PNP02000x10c Address : 0x899bfe880x110 InstanceID : (null)0x114 ResourceList : (null)0x118 PnpResourceList : (null)0x11c OutstandingIrpCount : 0n10x120 ReferenceCount : 0n30x124 HibernatePathCount : 0n00x128 RemoveEvent : (null)0x12c AcpiObject : 0x899b25c0 _NSObj0x130 DeviceObject : (null)0x134 TargetDeviceObject : (null)0x138 PhysicalDeviceObject : (null)0x13c ParentExtension : 0x899c0a88 _DEVICE_EXTENSION0x140 ChildDeviceList : _LIST_ENTRY [ 0x899c08f8 - 0x899c08f8 ]0x148 SiblingDeviceList : _LIST_ENTRY [ 0x899c0798 - 0x899c0a68 ]0x150 EjectDeviceHead : _LIST_ENTRY [ 0x899c0908 - 0x899c0908 ]0x158 EjectDeviceList : _LIST_ENTRY [ 0x899c0910 - 0x899c0910 ]1: kd db 0x899b25c0899b25c0 00 23 9b 89 b8 26 9b 89-78 22 9b 89 04 26 9b 89 .#.....x.....899b25d0 44 4d 41 43 30 f3 9a 89-f0 24 9b 89 00 00 06 00 DMAC0....$......NTSTATUSACPIBuildProcessDevicePhaseHid(IN PACPI_BUILD_REQUEST BuildRequest){} else {//// The next step is to run the _STA//BuildRequest-NextWorkDone WORK_DONE_STA;//// Get the device status//status ACPIGetDevicePresenceAsync(deviceExtension,ACPIBuildCompleteMustSucceed,BuildRequest,(PVOID *) (BuildRequest-Integer),NULL);}Device (DMAC)没有_STA方法。1: kd gBreakpoint 29 hiteax00000000 ebxf743b938 ecx00502000 edx00000000 esi898f72a0 edi898f72a8eipf74078d8 espf78aeedc ebpf78aef20 iopl0 nv up ei pl zr na pe nccs0008 ss0010 ds0023 es0023 fs0030 gs0000 efl00000246ACPI!ACPIGet0x220:f74078d8 e83b2bffff call ACPI!ACPIAmliGetNamedChild (f73fa418)1: kd teax00000000 ebxf743b938 ecx00502000 edx00000000 esi898f72a0 edi898f72a8eipf73fa418 espf78aeed8 ebpf78aef20 iopl0 nv up ei pl zr na pe nccs0008 ss0010 ds0023 es0023 fs0030 gs0000 efl00000246ACPI!ACPIAmliGetNamedChild:f73fa418 55 push ebp1: kd kc#00 ACPI!ACPIAmliGetNamedChild01 ACPI!ACPIGet02 ACPI!ACPIBuildProcessDevicePhaseHid03 ACPI!ACPIBuildProcessGenericList04 ACPI!ACPIBuildDeviceDpc05 nt!KiRetireDpcList06 nt!KiDispatchInterruptWARNING: Frame IP not in any known module. Following frames may be wrong.07 0x01: kd dvAcpiObject 0x899b25c0ObjectId 0x4154535f1: kd reax00000000 ebxf743b938 ecx00502000 edx00000000 esi898f72a0 edi898f72a8eipf73fa418 espf78aeed8 ebpf78aef20 iopl0 nv up ei pl zr na pe nccs0008 ss0010 ds0023 es0023 fs0030 gs0000 efl00000246ACPI!ACPIAmliGetNamedChild:f73fa418 55 push ebp1: kd db f78aeed8f78aeed8 dd 78 40 f7 c0 25 9b 89-5f 53 54 41 b8 07 9c 89 .x..%.._STA....1: kd gueax00000000 ebxf743b938 ecx899b25c0 edx00000000 esi898f72a0 edi898f72a8eipf74078dd espf78aeee4 ebpf78aef20 iopl0 nv up ei pl zr na pe nccs0008 ss0010 ds0023 es0023 fs0030 gs0000 efl00000246ACPI!ACPIGet0x225:f74078dd 85c0 test eax,eax//// Go out and see if the requested object is present//acpiObject ACPIAmliGetNamedChild(acpiObject,ObjectID);if (!acpiObject) {status STATUS_OBJECT_NAME_NOT_FOUND;goto ACPIGetExit;}#define STATUS_OBJECT_NAME_NOT_FOUND ((NTSTATUS)0xC0000034L)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);1: kd kc#00 ACPI!ACPIGetWorkerForInteger01 ACPI!ACPIGet02 ACPI!ACPIBuildProcessDevicePhaseHid03 ACPI!ACPIBuildProcessGenericList04 ACPI!ACPIBuildDeviceDpc05 nt!KiRetireDpcList06 nt!KiDispatchInterruptWARNING: Frame IP not in any known module. Following frames may be wrong.07 0x01: kd dvAcpiObject 0x00000000Status 0n-1073741772Result 0x898f72ccContext 0x898f72a0freeData 0x00 1: kd ?0n-1073741772Evaluate expression: -1073741772 c00000341: kd dt ACPI_GET_REQUEST 0x898f72a00x000 Flags : 0x600408020x000 UFlags : __unnamed0x004 ObjectID : 0x4154535f0x008 ListEntry : _LIST_ENTRY [ 0xf743b940 - 0x898f7240 ]0x010 DeviceExtension : 0x899c07b8 _DEVICE_EXTENSION0x014 AcpiObject : 0x899b25c0 _NSObj0x018 CallBackRoutine : 0xf73fa5bc void ACPI!ACPIBuildCompleteMustSucceed00x01c CallBackContext : 0x899c21d8 Void0x020 Buffer : 0x899c221c - (null)0x024 BufferSize : (null)0x028 Status : 0n00x02c ResultData : _ObjData1: kd kc#00 ACPI!ACPIGetConvertToDevicePresence01 ACPI!ACPIGetWorkerForInteger02 ACPI!ACPIGet03 ACPI!ACPIBuildProcessDevicePhaseHid04 ACPI!ACPIBuildProcessGenericList05 ACPI!ACPIBuildDeviceDpc06 nt!KiRetireDpcList07 nt!KiDispatchInterruptWARNING: Frame IP not in any known module. Following frames may be wrong.08 0x01: kd dvDeviceExtension 0x899c07b8Status 0n-1073741772Result 0x898f72ccFlags 0x60040802Buffer 0x899c221cBufferSize 0x000000001: kd db 0x899b25c0899b25c0 00 23 9b 89 b8 26 9b 89-78 22 9b 89 04 26 9b 89 .#.....x.....899b25d0 44 4d 41 43 30 f3 9a 89-f0 24 9b 89 00 00 06 00 DMAC0....$......NTSTATUSACPIGetConvertToDevicePresence(IN PDEVICE_EXTENSION DeviceExtension,IN NTSTATUS Status,IN POBJDATA Result,IN ULONG Flags,OUT PVOID *Buffer,OUT ULONG *BufferSize){ULONG deviceStatus STA_STATUS_DEFAULT;1: kd gBreakpoint 4 hiteax00000000 ebxc0000034 ecx00000000 edx00000000 esi899c07b8 edi0000000feipf7409910 espf78aee7c ebpf78aee9c iopl0 nv up ei pl zr na pe nccs0008 ss0010 ds0023 es0023 fs0030 gs0000 efl00000246ACPI!ACPIInternalUpdateDeviceStatus:f7409910 55 push ebp1: kd kc#00 ACPI!ACPIInternalUpdateDeviceStatus01 ACPI!ACPIGetConvertToDevicePresence02 ACPI!ACPIGetWorkerForInteger03 ACPI!ACPIGet04 ACPI!ACPIBuildProcessDevicePhaseHid05 ACPI!ACPIBuildProcessGenericList06 ACPI!ACPIBuildDeviceDpc07 nt!KiRetireDpcList08 nt!KiDispatchInterruptWARNING: Frame IP not in any known module. Following frames may be wrong.09 0x01: kd dvDeviceExtension 0x899c07b8DeviceStatus 0xfoldIrql 0x00 1: kd dx -r1 ((ACPI!_DEVICE_EXTENSION *)0x899c07b8)((ACPI!_DEVICE_EXTENSION *)0x899c07b8) : 0x899c07b8 [Type: _DEVICE_EXTENSION *][0x000] Flags : 0x50200000300008 [Type: unsigned __int64][0x000] UFlags [Type: __unnamed][0x008] Signature : 0x5f534750 [Type: unsigned long][0x00c] DebugFlags : 0x0 [Type: unsigned long]1: kd gueax00000000 ebxc0000034 ecx00502000 edx00000000 esi899c07b8 edi0000000feipf7406da5 espf78aee88 ebpf78aee9c iopl0 nv up ei pl nz na po nccs0008 ss0010 ds0023 es0023 fs0030 gs0000 efl00000202ACPI!ACPIGetConvertToDevicePresence0xcf:f7406da5 5e pop esi1: kd dx -r1 ((ACPI!_DEVICE_EXTENSION *)0x899c07b8)((ACPI!_DEVICE_EXTENSION *)0x899c07b8) : 0x899c07b8 [Type: _DEVICE_EXTENSION *][0x000] Flags : 0x50200000300008 [Type: unsigned __int64][0x000] UFlags [Type: __unnamed][0x008] Signature : 0x5f534750 [Type: unsigned long]