sh_eth: fix EESIPR values for SH77{34|63}
[linux/fpc-iii.git] / drivers / char / tpm / tpm_eventlog.h
blob1660d74ea79a3a436ef5a1bc8a293f5d52f1e771
2 #ifndef __TPM_EVENTLOG_H__
3 #define __TPM_EVENTLOG_H__
5 #define TCG_EVENT_NAME_LEN_MAX 255
6 #define MAX_TEXT_EVENT 1000 /* Max event string length */
7 #define ACPI_TCPA_SIG "TCPA" /* 0x41504354 /'TCPA' */
9 #ifdef CONFIG_PPC64
10 #define do_endian_conversion(x) be32_to_cpu(x)
11 #else
12 #define do_endian_conversion(x) x
13 #endif
15 enum bios_platform_class {
16 BIOS_CLIENT = 0x00,
17 BIOS_SERVER = 0x01,
20 struct tpm_bios_log {
21 void *bios_event_log;
22 void *bios_event_log_end;
25 struct tcpa_event {
26 u32 pcr_index;
27 u32 event_type;
28 u8 pcr_value[20]; /* SHA1 */
29 u32 event_size;
30 u8 event_data[0];
33 enum tcpa_event_types {
34 PREBOOT = 0,
35 POST_CODE,
36 UNUSED,
37 NO_ACTION,
38 SEPARATOR,
39 ACTION,
40 EVENT_TAG,
41 SCRTM_CONTENTS,
42 SCRTM_VERSION,
43 CPU_MICROCODE,
44 PLATFORM_CONFIG_FLAGS,
45 TABLE_OF_DEVICES,
46 COMPACT_HASH,
47 IPL,
48 IPL_PARTITION_DATA,
49 NONHOST_CODE,
50 NONHOST_CONFIG,
51 NONHOST_INFO,
54 struct tcpa_pc_event {
55 u32 event_id;
56 u32 event_size;
57 u8 event_data[0];
60 enum tcpa_pc_event_ids {
61 SMBIOS = 1,
62 BIS_CERT,
63 POST_BIOS_ROM,
64 ESCD,
65 CMOS,
66 NVRAM,
67 OPTION_ROM_EXEC,
68 OPTION_ROM_CONFIG,
69 OPTION_ROM_MICROCODE = 10,
70 S_CRTM_VERSION,
71 S_CRTM_CONTENTS,
72 POST_CONTENTS,
73 HOST_TABLE_OF_DEVICES,
76 #if defined(CONFIG_ACPI)
77 int tpm_read_log_acpi(struct tpm_chip *chip);
78 #else
79 static inline int tpm_read_log_acpi(struct tpm_chip *chip)
81 return -ENODEV;
83 #endif
84 #if defined(CONFIG_OF)
85 int tpm_read_log_of(struct tpm_chip *chip);
86 #else
87 static inline int tpm_read_log_of(struct tpm_chip *chip)
89 return -ENODEV;
91 #endif
93 int tpm_bios_log_setup(struct tpm_chip *chip);
94 void tpm_bios_log_teardown(struct tpm_chip *chip);
96 #endif