summaryrefslogtreecommitdiff
path: root/cmd/efidebug.c
diff options
context:
space:
mode:
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 21dfd44fcc..bb7c13d6a1 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;
}
}