https://git.reactos.org/?p=reactos.git;a=commitdiff;h=d6ef8f97e943f6568da3f4...
commit d6ef8f97e943f6568da3f4c74ff55746480accba Author: Victor Perevertkin victor.perevertkin@reactos.org AuthorDate: Tue Nov 10 01:56:59 2020 +0300 Commit: Victor Perevertkin victor.perevertkin@reactos.org CommitDate: Tue Nov 10 01:59:49 2020 +0300
[NTOS:PNP] Enumerate the device tree after loading boot drivers and HAL --- ntoskrnl/io/iomgr/driver.c | 6 ++++++ ntoskrnl/io/iomgr/iomgr.c | 7 +++++++ 2 files changed, 13 insertions(+)
diff --git a/ntoskrnl/io/iomgr/driver.c b/ntoskrnl/io/iomgr/driver.c index 3c4f3433ecf..9fd8c9b87c5 100644 --- a/ntoskrnl/io/iomgr/driver.c +++ b/ntoskrnl/io/iomgr/driver.c @@ -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; } diff --git a/ntoskrnl/io/iomgr/iomgr.c b/ntoskrnl/io/iomgr/iomgr.c index ecdf3fbdb5e..0173cf4911d 100644 --- a/ntoskrnl/io/iomgr/iomgr.c +++ b/ntoskrnl/io/iomgr/iomgr.c @@ -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;