diff options
| author | Tom Rini <[email protected]> | 2026-03-16 08:23:18 -0600 |
|---|---|---|
| committer | Tom Rini <[email protected]> | 2026-03-16 08:23:18 -0600 |
| commit | fa3a11fcf01a27f038789f4ef36d0414fe78b493 (patch) | |
| tree | 416a413625c79ac468a679a5f6cb0c1610a70280 /cmd | |
| parent | 071e914b4aa139c9c411efda3fe1ffaebda5c76e (diff) | |
| parent | 8f83a4596677fe6a3f3b587b76d460644205a922 (diff) | |
Merge tag 'efi-2026-03-14' of https://source.denx.de/u-boot/custodians/u-boot-efi into next
Pull request efi-2026-03-14
CI: https://source.denx.de/u-boot/custodians/u-boot-efi/-/pipelines/29512
UEFI:
* Require at least 128 KiB of stack space to use EFI sub-system.
* Avoid buffer overrun in efi_var_restore().
* Avoid superfluous variable store writes on unchanged data
* Implement SPI Flash store for EFI variables.
* Add an efidebug ecpt sub-command to display the ECPT table
and a unit test for the command.
Others:
* Add missing include string.h to make exception command build again.
* lib: uuid: add EBBR 2.1 conformance profile GUID
Diffstat (limited to 'cmd')
| -rw-r--r-- | cmd/efidebug.c | 49 |
1 files changed, 49 insertions, 0 deletions
diff --git a/cmd/efidebug.c b/cmd/efidebug.c index 109496d9e95..7b733119c82 100644 --- a/cmd/efidebug.c +++ b/cmd/efidebug.c @@ -533,6 +533,47 @@ static int do_efi_show_defaults(struct cmd_tbl *cmdtp, int flag, return CMD_RET_SUCCESS; } +#if CONFIG_IS_ENABLED(EFI_ECPT) +/** + * do_efi_show_ecpt() - show UEFI conformance profiles in ECPT + * + * @cmdtp: Command table + * @flag: Command flag + * @argc: Number of arguments + * @argv: Argument array + * Return: CMD_RET_SUCCESS on success, + * CMD_RET_USAGE or CMD_RET_FAILURE on failure + * + * Implement efidebug "ecpt" sub-command. + * Show all the UEFI Conformance Profiles listed in the EFI Conformance Profiles + * Table (ECPT). + */ +static int do_efi_show_ecpt(struct cmd_tbl *cmdtp, int flag, int argc, + char *const argv[]) +{ + const struct efi_conformance_profiles_table *ecpt; + u16 n; + + if (argc != 1) + return CMD_RET_USAGE; + + ecpt = efi_get_configuration_table(&efi_ecpt_guid); + if (!ecpt) { + log_err("ECPT table missing\n"); + return CMD_RET_FAILURE; + } + + for (n = 0; n < ecpt->number_of_profiles; n++) { + const efi_guid_t *guid = &ecpt->conformance_profiles[n]; + + printf("%pUl %s\n", guid->b, + uuid_guid_get_str(guid->b) ?: "(unknown)"); + } + + return CMD_RET_SUCCESS; +} +#endif /* CONFIG_IS_ENABLED(EFI_ECPT) */ + static const char * const efi_mem_type_string[] = { [EFI_RESERVED_MEMORY_TYPE] = "RESERVED", [EFI_LOADER_CODE] = "LOADER CODE", @@ -1586,6 +1627,10 @@ static struct cmd_tbl cmd_efidebug_sub[] = { "", ""), U_BOOT_CMD_MKENT(defaults, CONFIG_SYS_MAXARGS, 1, do_efi_show_defaults, "", ""), +#if CONFIG_IS_ENABLED(EFI_ECPT) + U_BOOT_CMD_MKENT(ecpt, CONFIG_SYS_MAXARGS, 1, do_efi_show_ecpt, + "", ""), +#endif 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, @@ -1680,6 +1725,10 @@ U_BOOT_LONGHELP(efidebug, " - show UEFI handles\n" "efidebug defaults\n" " - show default EFI filename and PXE architecture\n" +#if CONFIG_IS_ENABLED(EFI_ECPT) + "efidebug ecpt\n" + " - show conformance profiles in the ECPT\n" +#endif "efidebug images\n" " - show loaded images\n" "efidebug memmap\n" |
