1 /* SPDX-License-Identifier: GPL-2.0 */
3 #ifndef __LINUX_TPM_EVENTLOG_H__
4 #define __LINUX_TPM_EVENTLOG_H__
8 #define TCG_EVENT_NAME_LEN_MAX 255
9 #define MAX_TEXT_EVENT 1000 /* Max event string length */
10 #define ACPI_TCPA_SIG "TCPA" /* 0x41504354 /'TCPA' */
12 #define EFI_TCG2_EVENT_LOG_FORMAT_TCG_1_2 0x1
13 #define EFI_TCG2_EVENT_LOG_FORMAT_TCG_2 0x2
16 #define do_endian_conversion(x) be32_to_cpu(x)
18 #define do_endian_conversion(x) x
21 enum bios_platform_class {
29 u8 pcr_value[20]; /* SHA1 */
34 enum tcpa_event_types {
45 PLATFORM_CONFIG_FLAGS,
55 struct tcpa_pc_event {
61 enum tcpa_pc_event_ids {
70 OPTION_ROM_MICROCODE = 10,
74 HOST_TABLE_OF_DEVICES,
77 /* http://www.trustedcomputinggroup.org/tcg-efi-protocol-specification/ */
79 struct tcg_efi_specid_event_algs {
84 struct tcg_efi_specid_event_head {
87 u8 spec_version_minor;
88 u8 spec_version_major;
92 struct tcg_efi_specid_event_algs digest_sizes[];
95 struct tcg_pcr_event {
103 struct tcg_event_field {
108 struct tcg_pcr_event2_head {
112 struct tpm_digest digests[];