tpm.h (9aa36b399a50bf8a1c9dae33c25164afae14e1e3) | tpm.h (58472f5cd4f6ff02488c8da3cdbf719e9dd21e48) |
---|---|
1/* 2 * Copyright (C) 2004 IBM Corporation 3 * Copyright (C) 2015 Intel Corporation 4 * 5 * Authors: 6 * Leendert van Doorn <leendert@watson.ibm.com> 7 * Dave Safford <safford@watson.ibm.com> 8 * Reiner Sailer <sailer@watson.ibm.com> --- 100 unchanged lines hidden (view full) --- 109enum tpm2_command_codes { 110 TPM2_CC_FIRST = 0x011F, 111 TPM2_CC_SELF_TEST = 0x0143, 112 TPM2_CC_STARTUP = 0x0144, 113 TPM2_CC_SHUTDOWN = 0x0145, 114 TPM2_CC_CREATE = 0x0153, 115 TPM2_CC_LOAD = 0x0157, 116 TPM2_CC_UNSEAL = 0x015E, | 1/* 2 * Copyright (C) 2004 IBM Corporation 3 * Copyright (C) 2015 Intel Corporation 4 * 5 * Authors: 6 * Leendert van Doorn <leendert@watson.ibm.com> 7 * Dave Safford <safford@watson.ibm.com> 8 * Reiner Sailer <sailer@watson.ibm.com> --- 100 unchanged lines hidden (view full) --- 109enum tpm2_command_codes { 110 TPM2_CC_FIRST = 0x011F, 111 TPM2_CC_SELF_TEST = 0x0143, 112 TPM2_CC_STARTUP = 0x0144, 113 TPM2_CC_SHUTDOWN = 0x0145, 114 TPM2_CC_CREATE = 0x0153, 115 TPM2_CC_LOAD = 0x0157, 116 TPM2_CC_UNSEAL = 0x015E, |
117 TPM2_CC_CONTEXT_SAVE = 0x0162, |
|
117 TPM2_CC_FLUSH_CONTEXT = 0x0165, 118 TPM2_CC_GET_CAPABILITY = 0x017A, 119 TPM2_CC_GET_RANDOM = 0x017B, 120 TPM2_CC_PCR_READ = 0x017E, 121 TPM2_CC_PCR_EXTEND = 0x0182, 122 TPM2_CC_LAST = 0x018F, 123}; 124 125enum tpm2_permanent_handles { 126 TPM2_RS_PW = 0x40000009, 127}; 128 129enum tpm2_capabilities { | 118 TPM2_CC_FLUSH_CONTEXT = 0x0165, 119 TPM2_CC_GET_CAPABILITY = 0x017A, 120 TPM2_CC_GET_RANDOM = 0x017B, 121 TPM2_CC_PCR_READ = 0x017E, 122 TPM2_CC_PCR_EXTEND = 0x0182, 123 TPM2_CC_LAST = 0x018F, 124}; 125 126enum tpm2_permanent_handles { 127 TPM2_RS_PW = 0x40000009, 128}; 129 130enum tpm2_capabilities { |
131 TPM2_CAP_COMMANDS = 2, |
|
130 TPM2_CAP_PCRS = 5, 131 TPM2_CAP_TPM_PROPERTIES = 6, 132}; 133 | 132 TPM2_CAP_PCRS = 5, 133 TPM2_CAP_TPM_PROPERTIES = 6, 134}; 135 |
136enum tpm2_properties { 137 TPM_PT_TOTAL_COMMANDS = 0x0129, 138}; 139 |
|
134enum tpm2_startup_types { 135 TPM2_SU_CLEAR = 0x0000, 136 TPM2_SU_STATE = 0x0001, 137}; 138 | 140enum tpm2_startup_types { 141 TPM2_SU_CLEAR = 0x0000, 142 TPM2_SU_STATE = 0x0001, 143}; 144 |
145enum tpm2_cc_attrs { 146 TPM2_CC_ATTR_CHANDLES = 25, 147 TPM2_CC_ATTR_RHANDLE = 28, 148}; 149 |
|
139#define TPM_VID_INTEL 0x8086 140#define TPM_VID_WINBOND 0x1050 141#define TPM_VID_STM 0x104A 142 143#define TPM_PPI_VERSION_LEN 3 144 145enum tpm_chip_flags { 146 TPM_CHIP_FLAG_TPM2 = BIT(1), --- 47 unchanged lines hidden (view full) --- 194 const struct attribute_group *groups[3]; 195 unsigned int groups_cnt; 196 197 u16 active_banks[7]; 198#ifdef CONFIG_ACPI 199 acpi_handle acpi_dev_handle; 200 char ppi_version[TPM_PPI_VERSION_LEN + 1]; 201#endif /* CONFIG_ACPI */ | 150#define TPM_VID_INTEL 0x8086 151#define TPM_VID_WINBOND 0x1050 152#define TPM_VID_STM 0x104A 153 154#define TPM_PPI_VERSION_LEN 3 155 156enum tpm_chip_flags { 157 TPM_CHIP_FLAG_TPM2 = BIT(1), --- 47 unchanged lines hidden (view full) --- 205 const struct attribute_group *groups[3]; 206 unsigned int groups_cnt; 207 208 u16 active_banks[7]; 209#ifdef CONFIG_ACPI 210 acpi_handle acpi_dev_handle; 211 char ppi_version[TPM_PPI_VERSION_LEN + 1]; 212#endif /* CONFIG_ACPI */ |
213 214 u32 nr_commands; 215 u32 *cc_attrs_tbl; |
|
202}; 203 204#define to_tpm_chip(d) container_of(d, struct tpm_chip, dev) 205 206struct tpm_input_header { 207 __be16 tag; 208 __be32 length; 209 __be32 ordinal; --- 341 unchanged lines hidden (view full) --- 551 struct trusted_key_options *options); 552ssize_t tpm2_get_tpm_pt(struct tpm_chip *chip, u32 property_id, 553 u32 *value, const char *desc); 554 555int tpm2_auto_startup(struct tpm_chip *chip); 556void tpm2_shutdown(struct tpm_chip *chip, u16 shutdown_type); 557unsigned long tpm2_calc_ordinal_duration(struct tpm_chip *chip, u32 ordinal); 558int tpm2_probe(struct tpm_chip *chip); | 216}; 217 218#define to_tpm_chip(d) container_of(d, struct tpm_chip, dev) 219 220struct tpm_input_header { 221 __be16 tag; 222 __be32 length; 223 __be32 ordinal; --- 341 unchanged lines hidden (view full) --- 565 struct trusted_key_options *options); 566ssize_t tpm2_get_tpm_pt(struct tpm_chip *chip, u32 property_id, 567 u32 *value, const char *desc); 568 569int tpm2_auto_startup(struct tpm_chip *chip); 570void tpm2_shutdown(struct tpm_chip *chip, u16 shutdown_type); 571unsigned long tpm2_calc_ordinal_duration(struct tpm_chip *chip, u32 ordinal); 572int tpm2_probe(struct tpm_chip *chip); |
573int tpm2_find_cc(struct tpm_chip *chip, u32 cc); |
|
559#endif | 574#endif |