efi-loader: add efi_has_tpm2() helper
authorLennart Poettering <lennart@poettering.net>
Thu, 11 Feb 2021 22:10:07 +0000 (23:10 +0100)
committerLennart Poettering <lennart@poettering.net>
Thu, 11 Feb 2021 22:10:07 +0000 (23:10 +0100)
commitd0ddaf587f23f68c9c34bd88b272d63ca098dd0d
treea87d5fe8f07dcc77618c01fd42464eb76e8d9bcd
parent5b4c163002be61e240b1622a64917aee1793c00a
efi-loader: add efi_has_tpm2() helper

The helper checks if the UEFI firmware is hooked up to a TPM2 chip. This
is useful to know in trusted boot scenarios, in particular during early
boot in auto-enroll scenarios where we want to know whether TPM2 is
available or not, and the Linux drivers are not loaded yet, and where it
might or not be worth waiting for it.
src/shared/efi-loader.c
src/shared/efi-loader.h