
This function should return pointers, not addresses. Add the conversion.
Signed-off-by: Simon Glass sjg@chromium.org ---
lib/efi_loader/efi_memory.c | 5 +++++ 1 file changed, 5 insertions(+)
diff --git a/lib/efi_loader/efi_memory.c b/lib/efi_loader/efi_memory.c index e493934c713..8b01821a993 100644 --- a/lib/efi_loader/efi_memory.c +++ b/lib/efi_loader/efi_memory.c @@ -748,6 +748,11 @@ efi_status_t efi_get_memory_map(efi_uintn_t *memory_map_size, memory_map = &memory_map[map_entries - 1]; list_for_each_entry(lmem, &efi_mem, link) { *memory_map = lmem->desc; + /* Convert to pointers, which is what the caller expects */ + memory_map->physical_start = + (ulong)map_sysmem(lmem->desc.physical_start, 0); + memory_map->virtual_start = + (ulong)map_sysmem(lmem->desc.virtual_start, 0); memory_map--; }