nt!IopInitializeBootDrivers和ACPI!ACPIInitialize和pci!PciScanBus先后关系

nt!IopInitializeBootDrivers和ACPI!ACPIInitialize和pci!PciScanBus先后关系

kd> g

Breakpoint 1 hit

nt!IopInitializeBootDrivers:

80e68fc6 55 push ebp

1: kd> kc

00 nt!IopInitializeBootDrivers

01 nt!IoInitSystem

02 nt!Phase1Initialization

03 nt!PspSystemThreadStartup

04 nt!KiThreadStartup

1: kd> bl

0 e Disable Clear f73e2c3e [d:\srv03rtm\base\busdrv\pci\enum.c @ 2179] 0001 (0001) pci!PciScanBus

1 e Disable Clear 80e68fc6 [d:\srv03rtm\base\ntos\io\pnpmgr\pnpinit.c @ 1152] 0001 (0001) nt!IopInitializeBootDrivers

2 e Disable Clear f74541c8 [d:\srv03rtm\base\busdrv\acpi\driver\shared\acpiinit.c @ 82] 0001 (0001) ACPI!ACPIInitialize

1: kd> g

Breakpoint 2 hit

ACPI!ACPIInitialize:

f74541c8 55 push ebp

1: kd> kc

00 ACPI!ACPIInitialize

01 ACPI!ACPIInitStartACPI

02 ACPI!ACPIRootIrpStartDevice

03 ACPI!ACPIDispatchIrp

04 nt!IofCallDriver

05 nt!IopSynchronousCall

06 nt!IopStartDevice

07 nt!PipProcessStartPhase1

08 nt!PipProcessDevNodeTree

09 nt!PipDeviceActionWorker

0a nt!PipRequestDeviceAction

0b nt!IopInitializeBootDrivers

0c nt!IoInitSystem

0d nt!Phase1Initialization

0e nt!PspSystemThreadStartup

0f nt!KiThreadStartup

1: kd> g

Breakpoint 0 hit

pci!PciScanBus:

f73e2c3e 55 push ebp

0: kd> kc

00 pci!PciScanBus

01 pci!PciQueryDeviceRelations

02 pci!PciFdoIrpQueryDeviceRelations

03 pci!PciDispatchIrp

04 nt!IofCallDriver

05 nt!IopSynchronousCall

06 nt!IopQueryDeviceRelations

07 nt!PipEnumerateDevice

08 nt!PipProcessDevNodeTree

09 nt!PipDeviceActionWorker

0a nt!PipRequestDeviceAction

0b nt!IopInitializeBootDrivers

0c nt!IoInitSystem

0d nt!Phase1Initialization

0e nt!PspSystemThreadStartup

0f nt!KiThreadStartup

0: kd> dv

FdoExtension = 0x89df3ca8

secondary = 0x89 ''

slot = struct _PCI_SLOT_NUMBER

commonHeader = struct PCI_COMMON_HEADER [2]

newDevices = 0x00 ''

physicalDeviceObject = 0xffffffff

functionNumber = 0xf73e2c3f

hackFlags = 0xf789a2ac

deviceNumber = 0x804edc6c

maximumDevices = 0xf789adcc

isRoot = 0x00 ''

nshort = 0x30

capOffset = 0xa8 ''

cap = union _cap_buffer

0: kd> dx -r1 ((pci!_PCI_FDO_EXTENSION *)0x89df3ca8)

((pci!_PCI_FDO_EXTENSION *)0x89df3ca8) : 0x89df3ca8 [Type: _PCI_FDO_EXTENSION *]

+0x000\] List \[Type: _SINGLE_LIST_ENTRY

+0x004\] ExtensionType : PciFdoExtensionType (1768116273) \[Type: PCI_SIGNATURE

+0x008\] IrpDispatchTable : 0xf73d9398 \[Type: _PCI_MJ_DISPATCH_TABLE \*

+0x00c\] DeviceState : 0x1 \[Type: unsigned char

+0x00d\] TentativeNextState : 0x5 \[Type: unsigned char

+0x010\] SecondaryExtMutex \[Type: _FAST_MUTEX

+0x030\] PhysicalDeviceObject : 0x89d37230 : Device for "\\Driver\\ACPI" \[Type: _DEVICE_OBJECT \*

+0x034\] FunctionalDeviceObject : 0x89df3bf0 : Device for "\\Driver\\PCI" \[Type: _DEVICE_OBJECT \*

+0x038\] AttachedDeviceObject : 0x89d37230 : Device for "\\Driver\\ACPI" \[Type: _DEVICE_OBJECT \*

+0x03c\] ChildListMutex \[Type: _FAST_MUTEX

+0x05c\] ChildPdoList : 0x0 \[Type: _PCI_PDO_EXTENSION \*

+0x060\] BusRootFdoExtension : 0x89df3ca8 \[Type: _PCI_FDO_EXTENSION \*

+0x064\] ParentFdoExtension : 0x0 \[Type: _PCI_FDO_EXTENSION \*

+0x068\] ChildBridgePdoList : 0x0 \[Type: _PCI_PDO_EXTENSION \*

+0x06c\] PciBusInterface : 0x89d38600 \[Type: _PCI_BUS_INTERFACE_STANDARD \*

+0x070\] MaxSubordinateBus : 0x7f \[Type: unsigned char

+0x074\] BusHandler : 0x0 \[Type: _BUS_HANDLER \*

+0x078\] BaseBus : 0x0 \[Type: unsigned char

+0x079\] Fake : 0x0 \[Type: unsigned char

+0x07a\] Scanned : 0x0 \[Type: unsigned char

+0x07b\] ArbitersInitialized : 0x1 \[Type: unsigned char

+0x07c\] BrokenVideoHackApplied : 0x0 \[Type: unsigned char

+0x07d\] Hibernated : 0x0 \[Type: unsigned char

+0x080\] PowerState \[Type: PCI_POWER_STATE

+0x0c0\] SecondaryExtension \[Type: _SINGLE_LIST_ENTRY

+0x0c4\] ChildWaitWakeCount : 0x0 \[Type: unsigned long

+0x0c8\] IchHackConfig : 0x0 \[Type: _PCI_COMMON_CONFIG \*

+0x0cc\] Lock \[Type: _PCI_LOCK

+0x0dc\] HotPlugParameters \[Type: __unnamed

+0x0e4\] BusHackFlags : 0x0 \[Type: unsigned long

0: kd> !devobj 0x89d37230

Device object (89d37230) is for:

0000002e \Driver\ACPI DriverObject 89db5f38

Current Irp 00000000 RefCount 0 Type 00000032 Flags 00001040

SecurityDescriptor e129bf70 DevExt 89db4008 DevObjExt 89d372e8 DevNode 89df32f0

ExtensionFlags (0000000000)

Characteristics (0x00000080) FILE_AUTOGENERATED_DEVICE_NAME

AttachedDevice (Upper) 89df3bf0 \Driver\PCI

Device queue is not busy.

0: kd> !drvobj 89db5f38

Driver object (89db5f38) is for:

\Driver\ACPI

Driver Extension List: (id , addr)

Device Object list:

89dc7a68 89db9f18 89d38658 89d37d28

89d37230 89df37d8

0: kd> bl

0 e Disable Clear f73e2c3e [d:\srv03rtm\base\busdrv\pci\enum.c @ 2179] 0001 (0001) pci!PciScanBus

1 e Disable Clear 80e68fc6 [d:\srv03rtm\base\ntos\io\pnpmgr\pnpinit.c @ 1152] 0001 (0001) nt!IopInitializeBootDrivers

2 e Disable Clear f74541c8 [d:\srv03rtm\base\busdrv\acpi\driver\shared\acpiinit.c @ 82] 0001 (0001) ACPI!ACPIInitialize

0: kd> !devnode 0 1

Dumping IopRootDeviceNode (= 0x89db9ac0)

DevNode 0x89db9ac0 for PDO 0x89db9c00

InstancePath is "HTREE\ROOT\0"

State = DeviceNodeStarted (0x308)

Previous State = DeviceNodeEnumerateCompletion (0x30d)

DevNode 0x89df8008 for PDO 0x89db98a0

InstancePath is "Root\ACPI_HAL\0000"

State = DeviceNodeStarted (0x308)

Previous State = DeviceNodeEnumerateCompletion (0x30d)

DevNode 0x89db5008 for PDO 0x89df5278

InstancePath is "ACPI_HAL\PNP0C08\0"

ServiceName is "ACPI"

State = DeviceNodeStarted (0x308)

Previous State = DeviceNodeEnumerateCompletion (0x30d)

DevNode 0x89df32f0 for PDO 0x89d37230

InstancePath is "ACPI\PNP0A03\2&daba3ff&0"

ServiceName is "pci"

State = DeviceNodeStarted (0x308)

Previous State = DeviceNodeStartPostWork (0x307)

DevNode 0x89df9530 for PDO 0x89d37d28

InstancePath is "ACPI\ACPI0003\1"

ServiceName is "CmBatt"

State = DeviceNodeInitialized (0x302)

Previous State = DeviceNodeUninitialized (0x301)

DevNode 0x89db3008 for PDO 0x89d38658

InstancePath is "ACPI\GenuineIntel_-_x86_Family_6_Model_14\_0"

ServiceName is "Processor"

State = DeviceNodeInitialized (0x302)

Previous State = DeviceNodeUninitialized (0x301)

DevNode 0x89d393f8 for PDO 0x89db9f18

InstancePath is "ACPI\GenuineIntel_-_x86_Family_6_Model_14\_1"

ServiceName is "Processor"

State = DeviceNodeInitialized (0x302)

Previous State = DeviceNodeUninitialized (0x301)

DevNode 0x89d37ee0 for PDO 0x89dc7a68

InstancePath is "ACPI\FixedButton\2&daba3ff&0"

State = DeviceNodeStarted (0x308)

Previous State = DeviceNodeEnumerateCompletion (0x30d)

DevNode 0x89df8c98 for PDO 0x89df8df0

InstancePath is "Root\COMPOSITE_BATTERY\0000"

ServiceName is "Compbatt"

State = DeviceNodeInitialized (0x302)

Previous State = DeviceNodeUninitialized (0x301)

DevNode 0x89df8a48 for PDO 0x89df8ba0

InstancePath is "Root\dmio\0000"

ServiceName is "dmio"

State = DeviceNodeInitialized (0x302)

Previous State = DeviceNodeUninitialized (0x301)

下面的省略ROOT