diff --git a/boot/freeldr/freeldr/arch/uefi/uefildr.c b/boot/freeldr/freeldr/arch/uefi/uefildr.c index e694b7aa2b0..08f7efc3ec0 100644 --- a/boot/freeldr/freeldr/arch/uefi/uefildr.c +++ b/boot/freeldr/freeldr/arch/uefi/uefildr.c @@ -57,6 +57,19 @@ EfiEntry( /* Initialize I/O subsystem */ FsInit(); + /* Initialize the module list */ + if (!PeLdrInitializeModuleList()) + { + UiMessageBoxCritical("Unable to initialize module list."); + goto Quit; + } + + if (!MachInitializeBootDevices()) + { + UiMessageBoxCritical("Error when detecting hardware."); + goto Quit; + } + /* 0x32000 is what UEFI defines, but we can go smaller if we want */ BasicStack = (PVOID)((ULONG_PTR)0x32000 + (ULONG_PTR)MmAllocateMemoryWithType(0x32000, LoaderOsloaderStack)); _changestack();