ACPI!ACPIInitStartACPI函数分析和ACPI!ACPIInitialize之后的设备节点情况!devnode 0 1

ACPI!ACPIInitStartACPI函数分析和ACPI!ACPIInitialize之后的设备节点情况!devnode 0 1

NTSTATUS

ACPIInitStartACPI(

IN PDEVICE_OBJECT DeviceObject

)

{

KEVENT event;

KIRQL oldIrql;

NTSTATUS status;

OBJDATA objData;

PDEVICE_EXTENSION deviceExtension = ACPIInternalGetDeviceExtension(DeviceObject);

PNSOBJ acpiObject = NULL;

PNSOBJ sleepObject = NULL;

PNSOBJ childObject = NULL;

POWER_STATE state;

//

// This will prevent the system from processing power irps

//

KeAcquireSpinLock( &AcpiDeviceTreeLock, &oldIrql );

AcpiSystemInitialized = FALSE;

KeReleaseSpinLock( &AcpiDeviceTreeLock, oldIrql );

//

// Initialize the event

//

KeInitializeEvent( &event, SynchronizationEvent, FALSE );

//

// Setup the synchronization request

//

status = ACPIBuildSynchronizationRequest(

deviceExtension,

ACPIBuildNotifyEvent,

&event,

&AcpiBuildDeviceList,

FALSE

);

//

// What happened?

//

if (!NT_SUCCESS(status)) {

return status;

}

//

// Start the initilization

//

// NOTE: This routine causes many things to happens. Namely, it starts

// the process of loading ACPI tables. This (eventually) causes the

// Driver to start building device extensions. For this function to

// work properly, after we call this function, we need to wait until

// we have finished building device extensions. That means that we

// must wait for the event to be signaled

//

if (ACPIInitialize( (PVOID) DeviceObject ) == FALSE) {

return STATUS_DEVICE_DOES_NOT_EXIST;

}

//

// At this point, we have to wait. The check for STATUS_PENDING is

// just good programming practice sicne BuildSynchronizationRequest can

// only return Failure or STATUS_PENDING

//

if (status == STATUS_PENDING) {

//

// We had better wait for the above to complete

//

KeWaitForSingleObject(

&event,

Executive,

KernelMode,

FALSE,

NULL

);

}

//

// Hand all the machine state stuff to the HAL

//

NotifyHalWithMachineStates();

//

// Register the Power Callback

//

ACPIInternalRegisterPowerCallBack(

deviceExtension,

(PCALLBACK_FUNCTION) ACPIRootPowerCallBack

);

0: kd> kc

00 ACPI!ACPIInitStartACPI

01 ACPI!ACPIRootIrpStartDevice

02 ACPI!ACPIDispatchIrp

03 nt!IofCallDriver

04 nt!IopSynchronousCall

05 nt!IopStartDevice

06 nt!PipProcessStartPhase1

07 nt!PipProcessDevNodeTree

08 nt!PipDeviceActionWorker

09 nt!PipRequestDeviceAction

0a nt!IopInitializeBootDrivers

0b nt!IoInitSystem

0c nt!Phase1Initialization

0d nt!PspSystemThreadStartup

0e nt!KiThreadStartup

0: kd> kv

ChildEBP RetAddr Args to Child

00 f789a27c f744f51e 89981b98 00000000 f744f3ea ACPI!ACPIInitStartACPI+0x93 (FPO: [Non-Fpo]) (CONV: stdcall) [d:\srv03rtm\base\busdrv\acpi\driver\nt\init.c @ 1240]

01 f789a2a8 f740410e 89981b98 899bf500 89981b98 ACPI!ACPIRootIrpStartDevice+0x134 (FPO: [Non-Fpo]) (CONV: stdcall) [d:\srv03rtm\base\busdrv\acpi\driver\nt\root.c @ 1340]

02 f789a2dc 80a2675c 89981b98 899bf5b0 899bf668 ACPI!ACPIDispatchIrp+0x19e (FPO: [Non-Fpo]) (CONV: stdcall) [d:\srv03rtm\base\busdrv\acpi\driver\nt\dispatch.c @ 690]

03 f789a2f8 80c95e00 f789a36c 899c1008 899c1de0 nt!IofCallDriver+0x62 (FPO: [Non-Fpo]) (CONV: fastcall) [d:\srv03rtm\base\ntos\io\iomgr\iosubs.c @ 2237]

04 f789a328 80c95f56 00000000 f789a348 00000000 nt!IopSynchronousCall+0x1aa (FPO: [Non-Fpo]) (CONV: stdcall) [d:\srv03rtm\base\ntos\io\pnpmgr\pnpirp.c @ 258]

05 f789a36c 80c8f415 899c1de0 00000001 00000000 nt!IopStartDevice+0x78 (FPO: [Non-Fpo]) (CONV: stdcall) [d:\srv03rtm\base\ntos\io\pnpmgr\pnpirp.c @ 334]

06 f789a388 80c94d55 899c1de0 00000000 00000000 nt!PipProcessStartPhase1+0x9d (FPO: [Non-Fpo]) (CONV: stdcall) [d:\srv03rtm\base\ntos\io\pnpmgr\pnpenum.c @ 5014]

07 f789a5d4 80a2dde9 899c5ac8 00000000 899c4100 nt!PipProcessDevNodeTree+0x1c7 (FPO: [Non-Fpo]) (CONV: stdcall) [d:\srv03rtm\base\ntos\io\pnpmgr\pnpenum.c @ 4648]

08 f789a618 80a2e161 00000000 00000000 800836b0 nt!PipDeviceActionWorker+0xcd (FPO: [Non-Fpo]) (CONV: stdcall) [d:\srv03rtm\base\ntos\io\pnpmgr\pnpenum.c @ 710]

09 f789a630 80e69358 00000000 00000005 00000000 nt!PipRequestDeviceAction+0x139 (FPO: [Non-Fpo]) (CONV: stdcall) [d:\srv03rtm\base\ntos\io\pnpmgr\pnpenum.c @ 598]

0a f789a694 80e655c7 80077000 f789a7dc 00034000 nt!IopInitializeBootDrivers+0x392 (FPO: [Non-Fpo]) (CONV: stdcall) [d:\srv03rtm\base\ntos\io\pnpmgr\pnpinit.c @ 1440]

0b f789a838 80e632fd 80077000 00000000 899a1020 nt!IoInitSystem+0x70b (FPO: [Non-Fpo]) (CONV: stdcall) [d:\srv03rtm\base\ntos\io\iomgr\ioinit.c @ 665]

0c f789adac 80d391f0 80077000 00000000 00000000 nt!Phase1Initialization+0x9b3 (FPO: [Non-Fpo]) (CONV: stdcall) [d:\srv03rtm\base\ntos\init\init.c @ 2221]

0d f789addc 80b00d52 80e6294a 80077000 00000000 nt!PspSystemThreadStartup+0x2e (FPO: [Non-Fpo]) (CONV: stdcall) [d:\srv03rtm\base\ntos\ps\create.c @ 2213]

0e 00000000 00000000 00000000 00000000 00000000 nt!KiThreadStartup+0x16 [d:\srv03rtm\base\ntos\ke\i386\threadbg.asm @ 81]

windbg> .open -a ffffffff80c8f415

0: kd> !devnode

Dumping IopRootDeviceNode (= 0x899c5ac8)

DevNode 0x899c5ac8 for PDO 0x899c5c08

Parent 0000000000 Sibling 0000000000 Child 0x89986008

InstancePath is "HTREE\ROOT\0"

State = DeviceNodeStarted (0x308)

Previous State = DeviceNodeEnumerateCompletion (0x30d)

StateHistory[04] = DeviceNodeEnumerateCompletion (0x30d)

StateHistory[03] = DeviceNodeStarted (0x308)

StateHistory[02] = DeviceNodeEnumerateCompletion (0x30d)

StateHistory[01] = DeviceNodeStarted (0x308)

StateHistory[00] = DeviceNodeUninitialized (0x301)

StateHistory[19] = Unknown State (0x0)

StateHistory[18] = Unknown State (0x0)

StateHistory[17] = Unknown State (0x0)

StateHistory[16] = Unknown State (0x0)

StateHistory[15] = Unknown State (0x0)

StateHistory[14] = Unknown State (0x0)

StateHistory[13] = Unknown State (0x0)

StateHistory[12] = Unknown State (0x0)

StateHistory[11] = Unknown State (0x0)

StateHistory[10] = Unknown State (0x0)

StateHistory[09] = Unknown State (0x0)

StateHistory[08] = Unknown State (0x0)

StateHistory[07] = Unknown State (0x0)

StateHistory[06] = Unknown State (0x0)

StateHistory[05] = Unknown State (0x0)

Flags (0x00000131) DNF_MADEUP, DNF_ENUMERATED,

DNF_IDS_QUERIED, DNF_NO_RESOURCE_REQUIRED

0: kd> !devnode 0 1

Dumping IopRootDeviceNode (= 0x899c5ac8)

DevNode 0x899c5ac8 for PDO 0x899c5c08

InstancePath is "HTREE\ROOT\0"

State = DeviceNodeStarted (0x308)

Previous State = DeviceNodeEnumerateCompletion (0x30d)
DevNode 0x89986008 for PDO 0x899c5938
InstancePath is "Root\ACPI_HAL\0000"
State = DeviceNodeStarted (0x308)
Previous State = DeviceNodeEnumerateCompletion (0x30d)
DevNode 0x899c1008 for PDO 0x899c1de0
InstancePath is "ACPI_HAL\PNP0C08\0"
ServiceName is "ACPI"
State = DeviceNodeResourcesAssigned (0x304)
Previous State = DeviceNodeDriversAdded (0x303)

DevNode 0x89986d38 for PDO 0x89986e90

InstancePath is "Root\COMPOSITE_BATTERY\0000"

ServiceName is "Compbatt"

State = DeviceNodeInitialized (0x302)

Previous State = DeviceNodeUninitialized (0x301)

DevNode 0x89986ae8 for PDO 0x89986c40

InstancePath is "Root\dmio\0000"

ServiceName is "dmio"

State = DeviceNodeInitialized (0x302)

Previous State = DeviceNodeUninitialized (0x301)

DevNode 0x89986898 for PDO 0x899869f0

InstancePath is "Root\ftdisk\0000"

ServiceName is "ftdisk"

State = DeviceNodeInitialized (0x302)

Previous State = DeviceNodeUninitialized (0x301)

DevNode 0x89986648 for PDO 0x899867a0

InstancePath is "Root\LEGACY_AFD\0000"

ServiceName is "AFD"

State = DeviceNodeStarted (0x308)

Previous State = DeviceNodeEnumerateCompletion (0x30d)

DevNode 0x899863f8 for PDO 0x89986550

InstancePath is "Root\LEGACY_BEEP\0000"

ServiceName is "Beep"

State = DeviceNodeStarted (0x308)

Previous State = DeviceNodeEnumerateCompletion (0x30d)

DevNode 0x899861a8 for PDO 0x89986300

InstancePath is "Root\LEGACY_CRCDISK\0000"

ServiceName is "crcdisk"

State = DeviceNodeStarted (0x308)

Previous State = DeviceNodeEnumerateCompletion (0x30d)

DevNode 0x899c4ee0 for PDO 0x899c4038

InstancePath is "Root\LEGACY_DMBOOT\0000"

ServiceName is "dmboot"

State = DeviceNodeStarted (0x308)

Previous State = DeviceNodeEnumerateCompletion (0x30d)

DevNode 0x899c4c90 for PDO 0x899c4de8

InstancePath is "Root\LEGACY_DMLOAD\0000"

ServiceName is "dmload"

State = DeviceNodeStarted (0x308)

Previous State = DeviceNodeEnumerateCompletion (0x30d)

DevNode 0x899c4a40 for PDO 0x899c4b98

InstancePath is "Root\LEGACY_FIPS\0000"

ServiceName is "Fips"

State = DeviceNodeStarted (0x308)

Previous State = DeviceNodeEnumerateCompletion (0x30d)

DevNode 0x899c47f0 for PDO 0x899c4948

InstancePath is "Root\LEGACY_GPC\0000"

ServiceName is "Gpc"

State = DeviceNodeStarted (0x308)

Previous State = DeviceNodeEnumerateCompletion (0x30d)

DevNode 0x899c45a0 for PDO 0x899c46f8

InstancePath is "Root\LEGACY_IPSEC\0000"

ServiceName is "IPSec"

State = DeviceNodeStarted (0x308)

Previous State = DeviceNodeEnumerateCompletion (0x30d)

DevNode 0x899c4350 for PDO 0x899c44a8

InstancePath is "Root\LEGACY_KSECDD\0000"

ServiceName is "ksecdd"

State = DeviceNodeStarted (0x308)

Previous State = DeviceNodeEnumerateCompletion (0x30d)

DevNode 0x89985008 for PDO 0x899c4258

InstancePath is "Root\LEGACY_MNMDD\0000"

ServiceName is "mnmdd"

State = DeviceNodeStarted (0x308)

Previous State = DeviceNodeEnumerateCompletion (0x30d)

DevNode 0x89985db8 for PDO 0x89985f10

InstancePath is "Root\LEGACY_MOUNTMGR\0000"

ServiceName is "mountmgr"

State = DeviceNodeStarted (0x308)

Previous State = DeviceNodeEnumerateCompletion (0x30d)

DevNode 0x89985b68 for PDO 0x89985cc0

InstancePath is "Root\LEGACY_NDIS\0000"

ServiceName is "NDIS"

State = DeviceNodeStarted (0x308)

Previous State = DeviceNodeEnumerateCompletion (0x30d)

DevNode 0x89985918 for PDO 0x89985a70

InstancePath is "Root\LEGACY_NDISTAPI\0000"

ServiceName is "NdisTapi"

State = DeviceNodeStarted (0x308)

Previous State = DeviceNodeEnumerateCompletion (0x30d)

DevNode 0x899856c8 for PDO 0x89985820

InstancePath is "Root\LEGACY_NDISUIO\0000"

ServiceName is "Ndisuio"

State = DeviceNodeStarted (0x308)

Previous State = DeviceNodeEnumerateCompletion (0x30d)

DevNode 0x89985478 for PDO 0x899855d0

InstancePath is "Root\LEGACY_NDPROXY\0000"

ServiceName is "NDProxy"

State = DeviceNodeStarted (0x308)

Previous State = DeviceNodeEnumerateCompletion (0x30d)

DevNode 0x89985228 for PDO 0x89985380

InstancePath is "Root\LEGACY_NETBT\0000"

ServiceName is "NetBT"

State = DeviceNodeStarted (0x308)

Previous State = DeviceNodeEnumerateCompletion (0x30d)

DevNode 0x899c3ee0 for PDO 0x899c3038

InstancePath is "Root\LEGACY_NULL\0000"

ServiceName is "Null"

State = DeviceNodeStarted (0x308)

Previous State = DeviceNodeEnumerateCompletion (0x30d)

DevNode 0x899c3c90 for PDO 0x899c3de8

InstancePath is "Root\LEGACY_PARTMGR\0000"

ServiceName is "PartMgr"

State = DeviceNodeStarted (0x308)

Previous State = DeviceNodeEnumerateCompletion (0x30d)

DevNode 0x899c3a40 for PDO 0x899c3b98

InstancePath is "Root\LEGACY_RASACD\0000"

ServiceName is "RasAcd"

State = DeviceNodeStarted (0x308)

Previous State = DeviceNodeEnumerateCompletion (0x30d)

DevNode 0x899c37f0 for PDO 0x899c3948

InstancePath is "Root\LEGACY_RDPCDD\0000"

ServiceName is "RDPCDD"

State = DeviceNodeStarted (0x308)

Previous State = DeviceNodeEnumerateCompletion (0x30d)

DevNode 0x899c35a0 for PDO 0x899c36f8

InstancePath is "Root\LEGACY_RDPWD\0000"

ServiceName is "RDPWD"

State = DeviceNodeStarted (0x308)

Previous State = DeviceNodeEnumerateCompletion (0x30d)

DevNode 0x899c3350 for PDO 0x899c34a8

InstancePath is "Root\LEGACY_TCPIP\0000"

ServiceName is "Tcpip"

State = DeviceNodeStarted (0x308)

Previous State = DeviceNodeEnumerateCompletion (0x30d)

DevNode 0x89984008 for PDO 0x899c3258

InstancePath is "Root\LEGACY_TDTCP\0000"

ServiceName is "TDTCP"

State = DeviceNodeStarted (0x308)

Previous State = DeviceNodeEnumerateCompletion (0x30d)

DevNode 0x89984db8 for PDO 0x89984f10

InstancePath is "Root\LEGACY_VGASAVE\0000"

ServiceName is "VgaSave"

State = DeviceNodeStarted (0x308)

Previous State = DeviceNodeEnumerateCompletion (0x30d)

DevNode 0x89984b68 for PDO 0x89984cc0

InstancePath is "Root\LEGACY_VOLSNAP\0000"

ServiceName is "volsnap"

State = DeviceNodeStarted (0x308)

Previous State = DeviceNodeEnumerateCompletion (0x30d)

DevNode 0x89984918 for PDO 0x89984a70

InstancePath is "Root\LEGACY_WANARP\0000"

ServiceName is "Wanarp"

State = DeviceNodeStarted (0x308)

Previous State = DeviceNodeEnumerateCompletion (0x30d)

DevNode 0x899846c8 for PDO 0x89984820

InstancePath is "Root\MEDIA\MS_MMACM"

ServiceName is "audstub"

State = DeviceNodeInitialized (0x302)

Previous State = DeviceNodeUninitialized (0x301)

DevNode 0x89984478 for PDO 0x899845d0

InstancePath is "Root\MEDIA\MS_MMDRV"

ServiceName is "audstub"

State = DeviceNodeInitialized (0x302)

Previous State = DeviceNodeUninitialized (0x301)

DevNode 0x89984228 for PDO 0x89984380

InstancePath is "Root\MEDIA\MS_MMMCI"

ServiceName is "audstub"

State = DeviceNodeInitialized (0x302)

Previous State = DeviceNodeUninitialized (0x301)

DevNode 0x899c2ee0 for PDO 0x899c2038

InstancePath is "Root\MEDIA\MS_MMVCD"

ServiceName is "audstub"

State = DeviceNodeInitialized (0x302)

Previous State = DeviceNodeUninitialized (0x301)

DevNode 0x899c2c90 for PDO 0x899c2de8

InstancePath is "Root\MEDIA\MS_MMVID"

ServiceName is "audstub"

State = DeviceNodeInitialized (0x302)

Previous State = DeviceNodeUninitialized (0x301)

DevNode 0x899c2a40 for PDO 0x899c2b98

InstancePath is "Root\MS_L2TPMINIPORT\0000"

ServiceName is "Rasl2tp"

State = DeviceNodeInitialized (0x302)

Previous State = DeviceNodeUninitialized (0x301)

DevNode 0x899c27f0 for PDO 0x899c2948

InstancePath is "Root\MS_NDISWANIP\0000"

ServiceName is "NdisWan"

State = DeviceNodeInitialized (0x302)

Previous State = DeviceNodeUninitialized (0x301)

DevNode 0x899c25a0 for PDO 0x899c26f8

InstancePath is "Root\MS_PPPOEMINIPORT\0000"

ServiceName is "RasPppoe"

State = DeviceNodeInitialized (0x302)

Previous State = DeviceNodeUninitialized (0x301)

DevNode 0x899c2350 for PDO 0x899c24a8

InstancePath is "Root\MS_PPTPMINIPORT\0000"

ServiceName is "PptpMiniport"

State = DeviceNodeInitialized (0x302)

Previous State = DeviceNodeUninitialized (0x301)

DevNode 0x89983008 for PDO 0x899c2258

InstancePath is "Root\MS_PTIMINIPORT\0000"

ServiceName is "Raspti"

State = DeviceNodeInitialized (0x302)

Previous State = DeviceNodeUninitialized (0x301)

DevNode 0x89983db8 for PDO 0x89983f10

InstancePath is "Root\RDPDR\0000"

ServiceName is "rdpdr"

State = DeviceNodeInitialized (0x302)

Previous State = DeviceNodeUninitialized (0x301)

DevNode 0x89983b68 for PDO 0x89983cc0

InstancePath is "Root\RDP_KBD\0000"

ServiceName is "TermDD"

State = DeviceNodeInitialized (0x302)

Previous State = DeviceNodeUninitialized (0x301)

DevNode 0x89983918 for PDO 0x89983a70

InstancePath is "Root\RDP_MOU\0000"

ServiceName is "TermDD"

State = DeviceNodeInitialized (0x302)

Previous State = DeviceNodeUninitialized (0x301)

DevNode 0x899836c8 for PDO 0x89983820

InstancePath is "Root\SYSTEM\0000"

ServiceName is "swenum"

State = DeviceNodeInitialized (0x302)

Previous State = DeviceNodeUninitialized (0x301)

DevNode 0x89983478 for PDO 0x899835d0

InstancePath is "Root\SYSTEM\0001"

ServiceName is "update"

State = DeviceNodeInitialized (0x302)

Previous State = DeviceNodeUninitialized (0x301)

相关推荐
sitelist1 个月前
ACPI!ACPIInitialize函数分析之nt!ACPILoadFindRSDT
loadfindrsdt·acpiinitialize