From bad53bf847e412c4ff51bc025bb2fac3569fbad8 Mon Sep 17 00:00:00 2001 From: Daniel Victor Date: Mon, 2 Jun 2025 07:42:49 -0300 Subject: [PATCH] [FREELDR] Fix UEFI boot after FreeLoader split (#8069) Add missing initialization of the module list and boot devices. This makes UEFI boot work again after #7488 merge. CORE-11954 --- boot/freeldr/freeldr/arch/uefi/uefildr.c | 13 +++++++++++++ 1 file changed, 13 insertions(+) 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();