diff options
author | Arthur Heymans <arthur@aheymans.xyz> | 2021-06-14 09:18:45 +0200 |
---|---|---|
committer | Patrick Georgi <pgeorgi@google.com> | 2021-06-21 05:30:55 +0000 |
commit | d873fa8a8e8b1e5061c85fa406916af301257b67 (patch) | |
tree | 31168b4fa622abb935da50fc3e3257b63d6b6aea /src | |
parent | 8a6907c59219787d32608e1579b431a0ea2bffe4 (diff) |
security/tpm/tspi/crtm.c: Fix early init
If the early crtm is not initialised there is nothing to write to PCR
in the early tpm init.
Change-Id: I9fa05f04588321163afc817de29c03bd426fc1f0
Signed-off-by: Arthur Heymans <arthur@aheymans.xyz>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/55470
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Johnny Lin <Johnny_Lin@wiwynn.com>
Reviewed-by: Angel Pons <th3fanbus@gmail.com>
Reviewed-by: Christian Walter <christian.walter@9elements.com>
Reviewed-by: Julius Werner <jwerner@chromium.org>
Diffstat (limited to 'src')
-rw-r--r-- | src/security/tpm/tspi/crtm.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/src/security/tpm/tspi/crtm.c b/src/security/tpm/tspi/crtm.c index 1559838430..b64bbbf6c6 100644 --- a/src/security/tpm/tspi/crtm.c +++ b/src/security/tpm/tspi/crtm.c @@ -178,6 +178,10 @@ int tspi_measure_cache_to_pcr(void) enum vb2_hash_algorithm hash_alg; struct tcpa_table *tclt = tcpa_log_init(); + /* This means the table is empty. */ + if (!tcpa_log_available()) + return VB2_SUCCESS; + if (!tclt) { printk(BIOS_WARNING, "TCPA: Log non-existent!\n"); return VB2_ERROR_UNKNOWN; |