aboutsummaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorMasahisa Kojima <masahisa.kojima@linaro.org>2021-11-09 18:44:54 +0900
committerHeinrich Schuchardt <xypron.glpk@gmx.de>2021-11-10 20:57:54 +0100
commitc9c1cdbda3deea265838cf6c6bd6a1eb1569e15c (patch)
tree2aa2786c5dd95dd0b8f9cc5b59167dfebee7c061 /lib
parent6354913def1f61711c2278bd2616c748f21f69da (diff)
downloadu-boot-c9c1cdbda3deea265838cf6c6bd6a1eb1569e15c.zip
u-boot-c9c1cdbda3deea265838cf6c6bd6a1eb1569e15c.tar.gz
u-boot-c9c1cdbda3deea265838cf6c6bd6a1eb1569e15c.tar.bz2
efi_loader: fix BootOrder variable measurement handling
UEFI specification does not require that BootOrder is defined. In current implementation, boot variable measurement fails and returns EFI_NOT_FOUND if BootOrder is not defined. This commit correcly handles this case, skip the boot variable measurement if BootOrder is not defined. Signed-off-by: Masahisa Kojima <masahisa.kojima@linaro.org> Acked-by: Ilias Apalodimas <ilias.apalodimas@linaro.org> Reviewed-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>
Diffstat (limited to 'lib')
-rw-r--r--lib/efi_loader/efi_tcg2.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/efi_loader/efi_tcg2.c b/lib/efi_loader/efi_tcg2.c
index 586f73a..189e4a5 100644
--- a/lib/efi_loader/efi_tcg2.c
+++ b/lib/efi_loader/efi_tcg2.c
@@ -1452,8 +1452,8 @@ static efi_status_t tcg2_measure_boot_variable(struct udevice *dev)
boot_order = efi_get_var(var_name, &efi_global_variable_guid,
&var_data_size);
if (!boot_order) {
- ret = EFI_NOT_FOUND;
- goto error;
+ /* If "BootOrder" is not defined, skip the boot variable measurement */
+ return EFI_SUCCESS;
}
ret = tcg2_measure_variable(dev, 1, EV_EFI_VARIABLE_BOOT2, var_name,