aboutsummaryrefslogtreecommitdiff
path: root/lib/efi_loader/efi_bootmgr.c
diff options
context:
space:
mode:
authorTom Rini <trini@konsulko.com>2022-09-14 12:31:44 -0400
committerTom Rini <trini@konsulko.com>2022-09-14 12:31:44 -0400
commit1520af3f8450bb58168fe1cc827a56d435e9f74c (patch)
treec68826240a27e03c9edbbffdfc255d0ee6d51086 /lib/efi_loader/efi_bootmgr.c
parent6541726ee92108935b97449ed28d8dd28c0ef001 (diff)
parentda4fb707ca095c223b67637e2525df4866e51c62 (diff)
Merge tag 'efi-next-2022-09-14' of https://source.denx.de/u-boot/custodians/u-boot-efi into next
Pull request for efi next UEFI: Implement a command eficonfig to maintain Load Options and boot order via menus.
Diffstat (limited to 'lib/efi_loader/efi_bootmgr.c')
-rw-r--r--lib/efi_loader/efi_bootmgr.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/lib/efi_loader/efi_bootmgr.c b/lib/efi_loader/efi_bootmgr.c
index 234073ecb7..4b24b41047 100644
--- a/lib/efi_loader/efi_bootmgr.c
+++ b/lib/efi_loader/efi_bootmgr.c
@@ -19,6 +19,9 @@
static const struct efi_boot_services *bs;
static const struct efi_runtime_services *rs;
+const efi_guid_t efi_guid_bootmenu_auto_generated =
+ EFICONFIG_AUTO_GENERATED_ENTRY_GUID;
+
/*
* bootmgr implements the logic of trying to find a payload to boot
* based on the BootOrder + BootXXXX variables, and then loading it.
@@ -243,6 +246,10 @@ static efi_status_t try_load_entry(u16 n, efi_handle_t *handle,
}
/* Set load options */
+ if (size >= sizeof(efi_guid_t) &&
+ !guidcmp(lo.optional_data, &efi_guid_bootmenu_auto_generated))
+ size = 0;
+
if (size) {
*load_options = malloc(size);
if (!*load_options) {