
26 Nov
2024
26 Nov
'24
10:22 a.m.
On 25.11.24 21:44, Simon Glass wrote:
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 =
memory_map--; }(ulong)map_sysmem(lmem->desc.virtual_start, 0);
NAK.
physical_start and virtual_addr are not sandbox virtual addresses.
The sandbox virtual address space is irrelevant for UEFI. They should be restricted to the CLI.
Best regards
Heinrich