
Hi Heinrich, On Mon, 18 Aug 2025 at 17:12, Heinrich Schuchardt <xypron.glpk@gmx.de> wrote:
On 18.08.25 23:20, Simon Glass wrote:
From: Simon Glass <sjg@chromium.org>
Rather than immediately falling back to the pool allocator when we cannot get enough memory below 4GB, try the page allocator first. This provides 4K-aligned memory, which is nicer to look at when debugging.
Signed-off-by: Simon Glass <sjg@chromium.org> ---
(no changes since v1)
lib/efi_client/efi_app.c | 6 ++++++ 1 file changed, 6 insertions(+)
diff --git a/lib/efi_client/efi_app.c b/lib/efi_client/efi_app.c index 764e562692e..92aee94a695 100644 --- a/lib/efi_client/efi_app.c +++ b/lib/efi_client/efi_app.c @@ -112,6 +112,11 @@ static efi_status_t setup_memory(struct efi_priv *priv) addr = 1ULL << 32; ret = boot->allocate_pages(EFI_ALLOCATE_MAX_ADDRESS, priv->image_data_type, pages, &addr); + if (ret) { + log_info("(any address) ");
This message is not helpful for users. It should be log_debug().
+ ret = boot->allocate_pages(EFI_ALLOCATE_ANY_PAGES, + priv->image_data_type, pages, &addr); + } if (ret) { log_info("(using pool %lx) ", ret);
ditto
Missed this one too, so I sent a follow-up patch. Regards, Simon
Best regards
Heinrich
priv->ram_base = (ulong)efi_malloc(priv, CONFIG_EFI_RAM_SIZE, @@ -123,6 +128,7 @@ static efi_status_t setup_memory(struct efi_priv *priv) log_info("(using allocated RAM address %lx) ", (ulong)addr); priv->ram_base = addr; } + gd->ram_base = addr; gd->ram_size = pages << 12;
return 0;