diff options
author | Sergii Dmytruk <sergii.dmytruk@3mdeb.com> | 2022-10-23 00:47:55 +0300 |
---|---|---|
committer | Felix Held <felix-coreboot@felixheld.de> | 2023-03-04 02:01:48 +0000 |
commit | 53db677586e3e7c4a874f1ef16f34a6d01c269a0 (patch) | |
tree | 21f86ad11201bc00cf5a94653417ae3f96792e94 /src/security/tpm/tspi/crtm.h | |
parent | 4191dbf0c9a57088e7a7323d8bf02a8708eacdb9 (diff) | |
download | coreboot-53db677586e3e7c4a874f1ef16f34a6d01c269a0.tar.gz coreboot-53db677586e3e7c4a874f1ef16f34a6d01c269a0.tar.bz2 coreboot-53db677586e3e7c4a874f1ef16f34a6d01c269a0.zip |
security/tpm: add TPM log format as per 2.0 spec
Used by default for all boards with TPM2 which don't specify log
format explicitly.
Change-Id: I0fac386bebab1b7104378ae3424957c6497e84e1
Ticket: https://ticket.coreboot.org/issues/422
Ticket: https://ticket.coreboot.org/issues/423
Signed-off-by: Michał Żygowski <michal.zygowski@3mdeb.com>
Signed-off-by: Sergii Dmytruk <sergii.dmytruk@3mdeb.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/68748
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Julius Werner <jwerner@chromium.org>
Diffstat (limited to 'src/security/tpm/tspi/crtm.h')
-rw-r--r-- | src/security/tpm/tspi/crtm.h | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/src/security/tpm/tspi/crtm.h b/src/security/tpm/tspi/crtm.h index 241607757b76..ffa4867594ca 100644 --- a/src/security/tpm/tspi/crtm.h +++ b/src/security/tpm/tspi/crtm.h @@ -22,6 +22,19 @@ # define TPM_MEASURE_ALGO VB2_HASH_SHA256 #elif CONFIG(TPM_LOG_TPM1) # define TPM_MEASURE_ALGO VB2_HASH_SHA1 +#elif CONFIG(TPM_LOG_TPM2) +# if CONFIG(TPM_HASH_SHA1) +# define TPM_MEASURE_ALGO VB2_HASH_SHA1 +# endif +# if CONFIG(TPM_HASH_SHA256) +# define TPM_MEASURE_ALGO VB2_HASH_SHA256 +# endif +# if CONFIG(TPM_HASH_SHA384) +# define TPM_MEASURE_ALGO VB2_HASH_SHA384 +# endif +# if CONFIG(TPM_HASH_SHA512) +# define TPM_MEASURE_ALGO VB2_HASH_SHA512 +# endif #endif #if !defined(TPM_MEASURE_ALGO) |