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/logs.h | |
parent | 4191dbf0c9a57088e7a7323d8bf02a8708eacdb9 (diff) |
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/logs.h')
-rw-r--r-- | src/security/tpm/tspi/logs.h | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/src/security/tpm/tspi/logs.h b/src/security/tpm/tspi/logs.h index 417017628e..2d802f0bc5 100644 --- a/src/security/tpm/tspi/logs.h +++ b/src/security/tpm/tspi/logs.h @@ -36,4 +36,19 @@ void tpm1_log_add_table_entry(const char *name, const uint32_t pcr, const size_t digest_len); void tpm1_log_dump(void); +/* TPM 2.0 log format */ + +void *tpm2_log_init(void); +void *tpm2_log_cbmem_init(void); +void tpm2_preram_log_clear(void); +uint16_t tpm2_log_get_size(const void *log_table); +void tpm2_log_copy_entries(const void *from, void *to); +int tpm2_log_get(int entry_idx, int *pcr, const uint8_t **digest_data, + enum vb2_hash_algorithm *digest_algo, const char **event_name); +void tpm2_log_add_table_entry(const char *name, const uint32_t pcr, + enum vb2_hash_algorithm digest_algo, + const uint8_t *digest, + const size_t digest_len); +void tpm2_log_dump(void); + #endif /* LOGS_H_ */ |