[PATCH v4 6/6] Fix tcg2_measurement_init call
Ludwig Nussel
ludwig.nussel at siemens.com
Mon Jun 29 10:01:05 CEST 2026
Needed to fix the previous, forward ported patch
Signed-off-by: Ludwig Nussel <ludwig.nussel at siemens.com>
---
(no changes since v1)
lib/efi_loader/efi_tcg2.c | 7 ++-----
1 file changed, 2 insertions(+), 5 deletions(-)
diff --git a/lib/efi_loader/efi_tcg2.c b/lib/efi_loader/efi_tcg2.c
index 1da0bc37fa1..5935cb2ac8c 100644
--- a/lib/efi_loader/efi_tcg2.c
+++ b/lib/efi_loader/efi_tcg2.c
@@ -870,13 +870,10 @@ static efi_status_t efi_init_event_log(void)
* vendor_info_size is currently set to 0, we need to change the length
* and allocate the flexible array member if this changes
*/
- struct udevice *dev;
+ struct udevice *dev = NULL;
efi_status_t ret;
int rc;
- if (tcg2_platform_get_tpm2(&dev))
- return EFI_DEVICE_ERROR;
-
ret = efi_allocate_pool(EFI_BOOT_SERVICES_DATA,
CONFIG_TPM2_EVENT_LOG_SIZE,
(void **)&event_log.log);
@@ -904,7 +901,7 @@ static efi_status_t efi_init_event_log(void)
* platforms can use different ways to do so.
*/
event_log.log_size = CONFIG_TPM2_EVENT_LOG_SIZE;
- rc = tcg2_measurement_init(dev, &event_log, false);
+ rc = tcg2_measurement_init(&dev, &event_log);
if (rc) {
ret = (rc == -ENOBUFS) ? EFI_BUFFER_TOO_SMALL : EFI_DEVICE_ERROR;
goto free_pool;
--
2.43.0
More information about the U-Boot
mailing list