]> git.ipfire.org Git - thirdparty/grub.git/commit
commands/efi/tpm: Call get_active_pcr_banks() only with TCG2 1.1 or newer
authorLuca Boccassi <luca.boccassi@gmail.com>
Sat, 20 Sep 2025 01:12:32 +0000 (02:12 +0100)
committerDaniel Kiper <daniel.kiper@oracle.com>
Sat, 11 Oct 2025 13:36:54 +0000 (15:36 +0200)
commit9a725391f1a70b8a0ae4acde8fbb22a78e52697d
tree37f08f18b652e7eecfde2165a428d1cf84b1dc1b
parent894241c8543eb0dd27b16962a640f38e9b0c6e19
commands/efi/tpm: Call get_active_pcr_banks() only with TCG2 1.1 or newer

The call was added in the 1.1 revision of the spec, 1.0 does
not have it, and there are some machines out there with a TPM2
and a UEFI firmware that only supports version 1.0, so the
call fails in those cases. Check the reported version before
calling get_active_pcr_banks().

See Table 4 in section 6.2 of the TCG EFI Protocol Specification:

  https://trustedcomputinggroup.org/wp-content/uploads/EFI-Protocol-Specification-rev13-160330final.pdf

Fixes: f326c5c47 (commands/bli: Set LoaderTpm2ActivePcrBanks runtime variable)
Signed-off-by: Luca Boccassi <luca.boccassi@gmail.com>
Reviewed-by: Andrew Hamilton <adhamilt@gmail.com>
Reviewed-by: Daniel Kiper <daniel.kiper@oracle.com>
grub-core/commands/efi/tpm.c