diff options
author | Tom Rini <trini@konsulko.com> | 2023-01-07 12:32:42 -0500 |
---|---|---|
committer | Tom Rini <trini@konsulko.com> | 2023-01-07 12:32:42 -0500 |
commit | be914b00df4aeb6c115b412313f31daedab75fb5 (patch) | |
tree | b300b0210942482ba87e61b14e20ea8199fcaed6 /cmd | |
parent | 9ddcdcc03cc6f0f46895604c589af17fdbdfe8b7 (diff) | |
parent | 4bba71ff83e2b2a1607c5b3b9995767691242b29 (diff) |
Merge tag 'efi-2023-01-rc5-4' of https://source.denx.de/u-boot/custodians/u-boot-efi
Pull request efi-2023-01-rc5-4
UEFI:
* correct the vexpress loaddr which collides with memory used by EFI
* consider the EFI memory map for LMB memory reservation
* avoid RWX section warnings for .data section of *_efi.so files
Diffstat (limited to 'cmd')
-rw-r--r-- | cmd/efidebug.c | 18 |
1 files changed, 4 insertions, 14 deletions
diff --git a/cmd/efidebug.c b/cmd/efidebug.c index 569003ae2ef..e6959ede930 100644 --- a/cmd/efidebug.c +++ b/cmd/efidebug.c @@ -591,25 +591,15 @@ static void print_memory_attributes(u64 attributes) static int do_efi_show_memmap(struct cmd_tbl *cmdtp, int flag, int argc, char *const argv[]) { - struct efi_mem_desc *memmap = NULL, *map; - efi_uintn_t map_size = 0; + struct efi_mem_desc *memmap, *map; + efi_uintn_t map_size; const char *type; int i; efi_status_t ret; - ret = efi_get_memory_map(&map_size, memmap, NULL, NULL, NULL); - if (ret == EFI_BUFFER_TOO_SMALL) { - map_size += sizeof(struct efi_mem_desc); /* for my own */ - ret = efi_allocate_pool(EFI_BOOT_SERVICES_DATA, map_size, - (void *)&memmap); - if (ret != EFI_SUCCESS) - return CMD_RET_FAILURE; - ret = efi_get_memory_map(&map_size, memmap, NULL, NULL, NULL); - } - if (ret != EFI_SUCCESS) { - efi_free_pool(memmap); + ret = efi_get_memory_map_alloc(&map_size, &memmap); + if (ret != EFI_SUCCESS) return CMD_RET_FAILURE; - } printf("Type Start%.*s End%.*s Attributes\n", EFI_PHYS_ADDR_WIDTH - 5, spc, EFI_PHYS_ADDR_WIDTH - 3, spc); |