efi/libstub: Add get_event_log() support for CC platforms
authorKuppuswamy Sathyanarayanan <sathyanarayanan.kuppuswamy@linux.intel.com>
Thu, 15 Feb 2024 03:00:02 +0000 (03:00 +0000)
committerArd Biesheuvel <ardb@kernel.org>
Sat, 9 Mar 2024 10:37:17 +0000 (11:37 +0100)
commitd228814b1913444dfdd9a25519ed7b38a19653e2
treeda1c5fbd06f55da6d67716a55377f13bede8f2db
parentac93cbfc2a2c8e9641a4b49cd1e7b9d34f935e1a
efi/libstub: Add get_event_log() support for CC platforms

To allow event log info access after boot, EFI boot stub extracts
the event log information and installs it in an EFI configuration
table. Currently, EFI boot stub only supports installation of event
log only for TPM 1.2 and TPM 2.0 protocols. Extend the same support
for CC protocol. Since CC platform also uses TCG2 format, reuse TPM2
support code as much as possible.

Link: https://uefi.org/specs/UEFI/2.10/38_Confidential_Computing.html#efi-cc-measurement-protocol
Signed-off-by: Kuppuswamy Sathyanarayanan <sathyanarayanan.kuppuswamy@linux.intel.com>
Link: https://lkml.kernel.org/r/0229a87e-fb19-4dad-99fc-4afd7ed4099a%40collabora.com
[ardb: Split out final events table handling to avoid version confusion]
Signed-off-by: Ard Biesheuvel <ardb@kernel.org>
drivers/firmware/efi/efi.c
drivers/firmware/efi/libstub/efi-stub.c
drivers/firmware/efi/libstub/efistub.h
drivers/firmware/efi/libstub/tpm.c
drivers/firmware/efi/libstub/x86-stub.c
include/linux/efi.h