On Tue, 11 Mar 2025 at 18:16, Ben Schneider <ben@xxxxxxxxx> wrote: > > On Tuesday, March 11th, 2025 at 12:02 AM, Ilias Apalodimas <ilias.apalodimas@xxxxxxxxxx> wrote: > > Can you also print the size to ensure the requested size > > is less than 0x4000000? > > Size is 18087936! Ok that's interesting. Can you please apply diff --git a/drivers/firmware/efi/libstub/randomalloc.c b/drivers/firmware/efi/libstub/randomalloc.c index 1692d19ae80f..8073a80a6b76 100644 --- a/drivers/firmware/efi/libstub/randomalloc.c +++ b/drivers/firmware/efi/libstub/randomalloc.c @@ -76,6 +76,8 @@ efi_status_t efi_random_alloc(unsigned long size, efi_memory_desc_t *md = (void *)map->map + map_offset; unsigned long slots; + efi_printk("%-x %llx-%llx\n", md->type, md->phys_addr, md->phys_addr + (md->num_pages * EFI_PAGE_SIZE)); + slots = get_entry_num_slots(md, size, ilog2(align)); MD_NUM_SLOTS(md) = slots; total_slots += slots; and rerun it? This will print the memory map before get_entry_num_slots() calculates the available slots. Just to make sure the map doesn't change from the time the slots were calculated. Cheers /Ilias > > Ben