efi: stub: log EFI memory banks

Add a debug log for these since its often useful to inspect the memory
map from the EFI we're jumping from.

Signed-off-by: Caleb Connolly <caleb.connolly@linaro.org>
This commit is contained in:
Caleb Connolly
2024-11-24 21:27:02 +01:00
committed by Simon Glass
parent cef0312def
commit 8cb8d63b43

View File

@@ -143,7 +143,7 @@ int dram_init_banksize_from_efi(void)
{
struct efi_mem_desc *desc, *end;
struct efi_entry_memmap *map;
int ret, size;
int ret, size, bank = 0;
int num_banks;
ret = efi_info_get(EFIET_MEMORY_MAP, (void **)&map, &size);
@@ -161,7 +161,12 @@ int dram_init_banksize_from_efi(void)
* We only use conventional memory and ignore
* anything less than 1MB.
*/
if (!efi_mem_type_is_usable(desc->type) || (desc->num_pages << EFI_PAGE_SHIFT) < 1 << 20)
log_debug("EFI bank #%d: start %llx, size %llx type %u\n",
bank, desc->physical_start,
desc->num_pages << EFI_PAGE_SHIFT, desc->type);
bank++;
if (!efi_mem_type_is_usable(desc->type) ||
(desc->num_pages << EFI_PAGE_SHIFT) < 1 << 20)
continue;
gd->bd->bi_dram[num_banks].start = desc->physical_start;
gd->bd->bi_dram[num_banks].size = desc->num_pages <<