[NTOS:PNP] Enumerate the device tree after loading boot drivers and HAL

This commit is contained in:
Victor Perevertkin
2020-11-10 01:56:59 +03:00
parent 334abba1c3
commit d6ef8f97e9
2 changed files with 13 additions and 0 deletions

View File

@@ -1122,6 +1122,12 @@ IopInitializeBootDrivers(VOID)
/* Initialize it */
IopInitializeBuiltinDriver(LdrEntry);
/* Start the devices found by a driver (if any) */
PiQueueDeviceAction(IopRootDeviceNode->PhysicalDeviceObject,
PiActionEnumRootDevices,
NULL,
NULL);
/* Next entry */
NextEntry = NextEntry->Flink;
}

View File

@@ -543,6 +543,13 @@ IoInitSystem(IN PLOADER_PARAMETER_BLOCK LoaderBlock)
/* Initialize HAL Root Bus Driver */
HalInitPnpDriver();
/* Reenumerate what HAL has added (synchronously)
* This function call should eventually become a 2nd stage of the PnP initialization */
PiQueueDeviceAction(IopRootDeviceNode->PhysicalDeviceObject,
PiActionEnumRootDevices,
NULL,
NULL);
/* Make loader block available for the whole kernel */
IopLoaderBlock = LoaderBlock;