
On 11/9/21 10:44, Masahisa Kojima wrote:
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
=> tpm2 init && tpm2 startup TPM2_SU_CLEAR => efidebug boot order 1000 Found 0 disks Missing RNG device for EFI_RNG_PROTOCOL No EFI system partition No EFI system partition Failed to persist EFI variables => efidebug boot order 1: Boot1000: (not defined) => bootefi hello Booting /MemoryMapped(0x0,0x7ff9b1f0,0x11e0) Boot1000 not found Hello, world! Running on UEFI 2.8 Have SMBIOS table Have device tree Load options: <none> Boot device: /MemoryMapped(0x0,0x7ff9b1f0,0x11e0) File path: <none> =>
The message "Boot1000 not found" is created in lib/efi_loader/efi_tcg2.c(1475) tcg2_measure_boot_variable(). That message should be log_debug(). But that can be done in a separate patch.
Reviewed-by: Heinrich Schuchardt heinrich.schuchardt@canonical.com