1 /* SPDX-License-Identifier: BSD-3-Clause */
3 #ifndef __TPM1_LOG_SERIALIZED_H__
4 #define __TPM1_LOG_SERIALIZED_H__
6 #include <commonlib/bsd/helpers.h>
7 #include <commonlib/bsd/tpm_log_defs.h>
10 #define TPM_1_LOG_DIGEST_MAX_LENGTH 20
11 #define TPM_1_LOG_DATA_MAX_LENGTH 50
13 #define TPM_1_LOG_VI_MAGIC 0x31544243 /* "CBT1" in LE */
14 #define TPM_1_LOG_VI_MAJOR 1
15 #define TPM_1_LOG_VI_MINOR 0
17 struct tpm_1_log_entry
{
20 uint8_t digest
[TPM_1_LOG_DIGEST_MAX_LENGTH
];
22 uint8_t data
[TPM_1_LOG_DATA_MAX_LENGTH
];
27 uint8_t version_major
;
28 uint8_t version_minor
;
35 struct tpm_1_log_table
{
36 /* The first entry of the log is inlined and describes the log itself */
39 uint8_t digest
[TPM_1_LOG_DIGEST_MAX_LENGTH
];
40 uint32_t spec_id_size
;
41 struct spec_id_event_data spec_id
;
42 struct tpm_1_vendor vendor
;
44 struct tpm_1_log_entry entries
[]; /* Variable number of entries */