efi: libstub/tpm: enable tpm eventlog function for ARM platforms
authorXinwei Kong <kong.kongxinwei@hisilicon.com>
Thu, 7 Nov 2019 08:24:21 +0000 (16:24 +0800)
committerArd Biesheuvel <ardb@kernel.org>
Thu, 7 Nov 2019 09:18:45 +0000 (10:18 +0100)
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>
drivers/firmware/efi/libstub/arm-stub.c

index c382a48c667889ef3130cd2a2bb956696cf1d0fb..817237ce2420f11ba0cb37655a977a7f012d7e9f 100644 (file)
@@ -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);