summaryrefslogtreecommitdiff
path: root/drivers/char/tpm/tpm_eventlog_of.c
diff options
context:
space:
mode:
authorThiebaud Weksteen <tweek@google.com>2017-09-20 10:13:40 +0200
committerJarkko Sakkinen <jarkko.sakkinen@linux.intel.com>2018-01-08 12:58:35 +0200
commit58cc1e4faf10a73c4302825ffd37a47d410fc1b5 (patch)
tree11116081f88d7715e754baafe565603398fca5fe /drivers/char/tpm/tpm_eventlog_of.c
parent33b6d03469b2206fb51ecc37f40411a857ad8fff (diff)
tpm: parse TPM event logs based on EFI table
If we are not able to retrieve the TPM event logs from the ACPI table, check the EFI configuration table (Linux-specific GUID). The format version of the log is now returned by the provider function. Signed-off-by: Thiebaud Weksteen <tweek@google.com> Reviewed-by: Jason Gunthorpe <jgunthorpe@obsidianresearch.com> Reviewed-by: Javier Martinez Canillas <javierm@redhat.com> Tested-by: Javier Martinez Canillas <javierm@redhat.com> Tested-by: Jarkko Sakkinen <jarkko.sakkinen@linux.intel.com> Reviewed-by: Jarkko Sakkinen <jarkko.sakkinen@linux.intel.com> Signed-off-by: Jarkko Sakkinen <jarkko.sakkinen@linux.intel.com>
Diffstat (limited to 'drivers/char/tpm/tpm_eventlog_of.c')
-rw-r--r--drivers/char/tpm/tpm_eventlog_of.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/drivers/char/tpm/tpm_eventlog_of.c b/drivers/char/tpm/tpm_eventlog_of.c
index 4a2f8c79231e..96fd5646f866 100644
--- a/drivers/char/tpm/tpm_eventlog_of.c
+++ b/drivers/char/tpm/tpm_eventlog_of.c
@@ -76,5 +76,7 @@ int tpm_read_log_of(struct tpm_chip *chip)
memcpy(log->bios_event_log, __va(base), size);
- return 0;
+ if (chip->flags & TPM_CHIP_FLAG_TPM2)
+ return EFI_TCG2_EVENT_LOG_FORMAT_TCG_2;
+ return EFI_TCG2_EVENT_LOG_FORMAT_TCG_1_2;
}