[PATCH v2 0/3] Improve U-Boot's TPM handling in the non-EFI case
Ludwig Nussel
ludwig.nussel at siemens.com
Wed Jun 10 12:52:02 CEST 2026
U-Boot might be the first component to start the event log, eg when
used in qemu. So allocate and attach the TPM event log to the TPM
device if not initialized yet. The address is copied into the device
tree for the kernel so the event log is accessible from Linux
userspace too.
Changes in v2:
- fix return value handling
- imply DEVRES in config TPM
- use fdt_getprop for reading property
- don't wrap #include in #if
- fix memory leak in error case of tcg2_log_prepare_buffer
- handle NULL elog parameter in tcg2_measurement_term
- use CONFIG_TPM2_EVENT_LOG_SIZE
- pass log_size instead of position in dt
Ludwig Nussel (3):
test: include mapmem.h explicitly
tpm: print all PCRs from pcr_read
tpm: allocate tpm event log if missing
boot/bootm.c | 18 +++---
boot/image-fdt.c | 69 +++++++++++++++++++++
cmd/tpm-v2.c | 69 +++++++++++++++------
include/tpm-common.h | 2 +
include/tpm_tcg2.h | 9 +--
lib/Kconfig | 1 +
lib/tpm_tcg2.c | 130 ++++++++++++++++++++++++++++++++--------
test/boot/measurement.c | 1 +
8 files changed, 239 insertions(+), 60 deletions(-)
--
2.43.0
base-commit: 888a0e381cc76b1af4d2fb6308a5b257a9625a21
branch: us-tpm2
More information about the U-Boot
mailing list