diff mbox series

[1/4] efi: libstub/tpm: enable tpm eventlog function for ARM platforms

Message ID 20200310080100.13969-1-ike.pan@canonical.com
State New
Headers show
Series Hisilicon driver updates and fixes for TPM | expand

Commit Message

Ike Panhc March 10, 2020, 8:01 a.m. UTC
From: Xinwei Kong <kong.kongxinwei@hisilicon.com>

BugLink: https://launchpad.net/bugs/1859743

Wire up the existing code for ARM that loads the TPM event log into
OS accessible buffers while running the EFI stub so that the kernel
proper can access it at runtime.

Tested-by: Zou Cao <zoucao@linux.alibaba.com>
Signed-off-by: Xinwei Kong <kong.kongxinwei@hisilicon.com>
Signed-off-by: Ard Biesheuvel <ardb@kernel.org>
(cherry picked from commit d99c1ba6a73b9e93e2884b7893fe19e3c082ba03)
Signed-off-by: Ike Panhc <ike.pan@canonical.com>
---
 drivers/firmware/efi/libstub/arm-stub.c | 2 ++
 1 file changed, 2 insertions(+)
diff mbox series

Patch

diff --git a/drivers/firmware/efi/libstub/arm-stub.c b/drivers/firmware/efi/libstub/arm-stub.c
index c382a48c6678..817237ce2420 100644
--- a/drivers/firmware/efi/libstub/arm-stub.c
+++ b/drivers/firmware/efi/libstub/arm-stub.c
@@ -189,6 +189,8 @@  unsigned long efi_entry(void *handle, efi_system_table_t *sys_table,
 		goto fail_free_cmdline;
 	}
 
+	efi_retrieve_tpm2_eventlog(sys_table);
+
 	/* Ask the firmware to clear memory on unclean shutdown */
 	efi_enable_reset_attack_mitigation(sys_table);