boottime->efi_allocate_pages() returning EFI_NOT_FOUND
Sughosh Ganu
sughosh.ganu at linaro.org
Wed Mar 5 09:13:09 CET 2025
On Tue, 4 Mar 2025 at 23:34, Ben Schneider <ben at bens.haus> wrote:
>
> Hi, I'm trying to boot a compressed (via zboot) Linux kernel image
> for aarch64 and running into an error I didn't expect.
>
> To decompress itself, the kernel will run efi_zboot_entry() (found
> in drivers/firmware/efi/libstub/zboot.c) which wants additional
> memory so it asks for it via a call to the UEFI AllocatePages()
> service.
>
> U-Boot receives that request and runs efi_allocate_pages() (found
> in lib/efi_loader/efi_memory.c). In its call, Linux is setting
> type = EFI_ALLOCATE_ADDRESS, and memory_type = EFI_LOADER_CODE.
>
> Based on some testing, it seems that the call to lmb_alloc_addr()
> is not returning an address so efi_allocate_pages() returns
> along this path:
>
> addr = map_to_sysmem((void *)(uintptr_t)*memory);
> addr = (u64)lmb_alloc_addr(addr, len, flags);
> if (!addr)
> return EFI_NOT_FOUND;
>
Can you check what is the address being asked for in the
lmb_alloc_addr() function. Then you can check through the bdinfo
command if that address is already reserved, or not added to the
memory map.
-sughosh
> It's not clear to me why I'm getting this error. I am using U-Boot
> 2025.04-rc3 configured with mvebu_espressobin_ultra-
> 8f3720_defconfig. I use Standard Boot (bootflow scan -b) to find
> and load a systemd-boot EFI application which then tries to boot
> the compressed Linux kernel. I am encountering this issue on a
> real device with 1GB of memory. I would appreciate any guidance.
>
> Thank you!
>
> Ben
More information about the U-Boot
mailing list