]> Git Repo - J-u-boot.git/commitdiff
efi_loader: fix BootOrder variable measurement handling
authorMasahisa Kojima <[email protected]>
Tue, 9 Nov 2021 09:44:54 +0000 (18:44 +0900)
committerHeinrich Schuchardt <[email protected]>
Wed, 10 Nov 2021 19:57:54 +0000 (20:57 +0100)
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 <[email protected]>
Acked-by: Ilias Apalodimas <[email protected]>
Reviewed-by: Heinrich Schuchardt <[email protected]>
lib/efi_loader/efi_tcg2.c

index 586f73af6d8120efdcb9d1e90f20df655947031b..189e4a5ba59c91c04133a00fde740a3f23df0c53 100644 (file)
@@ -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,
This page took 0.033129 seconds and 4 git commands to generate.