mirror of
https://github.com/u-boot/u-boot.git
synced 2025-04-26 23:41:50 +00:00
efi_loader: Allow reporting the host defaults
Add an 'efidebug filename' command to report the default filename and PXE architecture. Signed-off-by: Simon Glass <sjg@chromium.org>
This commit is contained in:
parent
8aa8a33661
commit
9fd84a3e1f
1 changed files with 25 additions and 0 deletions
|
@ -511,6 +511,27 @@ static int do_efi_show_images(struct cmd_tbl *cmdtp, int flag,
|
|||
return CMD_RET_SUCCESS;
|
||||
}
|
||||
|
||||
/**
|
||||
* do_efi_show_defaults() - show UEFI default filename and PXE architecture
|
||||
*
|
||||
* @cmdtp: Command table
|
||||
* @flag: Command flag
|
||||
* @argc: Number of arguments
|
||||
* @argv: Argument array
|
||||
* Return: CMD_RET_SUCCESS on success, CMD_RET_RET_FAILURE on failure
|
||||
*
|
||||
* Implement efidebug "defaults" sub-command.
|
||||
* Shows the default EFI filename and PXE architecture
|
||||
*/
|
||||
static int do_efi_show_defaults(struct cmd_tbl *cmdtp, int flag,
|
||||
int argc, char *const argv[])
|
||||
{
|
||||
printf("Default boot path: EFI\\BOOT\\%s\n", efi_get_basename());
|
||||
printf("PXE arch: 0x%02x\n", efi_get_pxe_arch());
|
||||
|
||||
return CMD_RET_SUCCESS;
|
||||
}
|
||||
|
||||
static const char * const efi_mem_type_string[] = {
|
||||
[EFI_RESERVED_MEMORY_TYPE] = "RESERVED",
|
||||
[EFI_LOADER_CODE] = "LOADER CODE",
|
||||
|
@ -1561,6 +1582,8 @@ static struct cmd_tbl cmd_efidebug_sub[] = {
|
|||
"", ""),
|
||||
U_BOOT_CMD_MKENT(dh, CONFIG_SYS_MAXARGS, 1, do_efi_show_handles,
|
||||
"", ""),
|
||||
U_BOOT_CMD_MKENT(defaults, CONFIG_SYS_MAXARGS, 1, do_efi_show_defaults,
|
||||
"", ""),
|
||||
U_BOOT_CMD_MKENT(images, CONFIG_SYS_MAXARGS, 1, do_efi_show_images,
|
||||
"", ""),
|
||||
U_BOOT_CMD_MKENT(memmap, CONFIG_SYS_MAXARGS, 1, do_efi_show_memmap,
|
||||
|
@ -1653,6 +1676,8 @@ U_BOOT_LONGHELP(efidebug,
|
|||
" - show UEFI drivers\n"
|
||||
"efidebug dh\n"
|
||||
" - show UEFI handles\n"
|
||||
"efidebug defaults\n"
|
||||
" - show default EFI filename and PXE architecture\n"
|
||||
"efidebug images\n"
|
||||
" - show loaded images\n"
|
||||
"efidebug memmap\n"
|
||||
|
|
Loading…
Add table
Reference in a new issue