summaryrefslogtreecommitdiff
path: root/cmd/efidebug.c
diff options
context:
space:
mode:
authorTom Rini <trini@konsulko.com>2020-03-31 17:24:19 -0400
committerTom Rini <trini@konsulko.com>2020-03-31 17:24:19 -0400
commit2b18b89156335bf1f0d84f81d3597762bc48c61d (patch)
tree544e93c39bfaeff20b2ac47980de27edf1a585e4 /cmd/efidebug.c
parent779e6dc6a429ac28dfd4f07ab0c3648a31399d4a (diff)
parentac28e59a574dd231a4787752d923f618587e3d10 (diff)
Merge branch 'next' of git://git.denx.de/u-boot-usb into next
Diffstat (limited to 'cmd/efidebug.c')
-rw-r--r--cmd/efidebug.c13
1 files changed, 8 insertions, 5 deletions
diff --git a/cmd/efidebug.c b/cmd/efidebug.c
index 21dfd44fcc9..bb7c13d6a1c 100644
--- a/cmd/efidebug.c
+++ b/cmd/efidebug.c
@@ -12,6 +12,7 @@
#include <exports.h>
#include <hexdump.h>
#include <malloc.h>
+#include <mapmem.h>
#include <search.h>
#include <linux/ctype.h>
@@ -488,9 +489,10 @@ static int do_efi_show_memmap(cmd_tbl_t *cmdtp, int flag,
printf("%-16s %.*llx-%.*llx", type,
EFI_PHYS_ADDR_WIDTH,
- map->physical_start,
+ (u64)map_to_sysmem((void *)map->physical_start),
EFI_PHYS_ADDR_WIDTH,
- map->physical_start + map->num_pages * EFI_PAGE_SIZE);
+ (u64)map_to_sysmem((void *)map->physical_start +
+ map->num_pages * EFI_PAGE_SIZE));
print_memory_attributes(map->attribute);
putc('\n');
@@ -649,7 +651,7 @@ static int do_efi_boot_rm(cmd_tbl_t *cmdtp, int flag,
int id, i;
char *endp;
char var_name[9];
- u16 var_name16[9];
+ u16 var_name16[9], *p;
efi_status_t ret;
if (argc == 1)
@@ -662,11 +664,12 @@ static int do_efi_boot_rm(cmd_tbl_t *cmdtp, int flag,
return CMD_RET_FAILURE;
sprintf(var_name, "Boot%04X", id);
- utf8_utf16_strncpy((u16 **)&var_name16, var_name, 9);
+ p = var_name16;
+ utf8_utf16_strncpy(&p, var_name, 9);
ret = EFI_CALL(RT->set_variable(var_name16, &guid, 0, 0, NULL));
if (ret) {
- printf("Cannot remove Boot%04X", id);
+ printf("Cannot remove %ls\n", var_name16);
return CMD_RET_FAILURE;
}
}