2 * Copyright (c) 2015 Google, Inc
4 * SPDX-License-Identifier: GPL-2.0+
7 #ifndef __tpm_internal_h
8 #define __tpm_internal_h
11 TPM_MAX_ORDINAL = 243,
12 TPM_MAX_PROTECTED_ORDINAL = 12,
13 TPM_PROTECTED_ORDINAL_MASK = 0xff,
14 TPM_CMD_COUNT_BYTE = 2,
15 TPM_CMD_ORDINAL_BYTE = 6,
19 * Array with one entry per ordinal defining the maximum amount
20 * of time the chip could take to return the result. The ordinal
21 * designation of short, medium or long is defined in a table in
22 * TCG Specification TPM Main Part 2 TPM Structures Section 17. The
23 * values of the SHORT, MEDIUM, and LONG durations are retrieved
24 * from the chip during initialization with a call to tpm_get_timeouts.
26 static const u8 tpm_protected_ordinal_duration[TPM_MAX_PROTECTED_ORDINAL] = {
27 TPM_UNDEFINED, /* 0 */
32 TPM_UNDEFINED, /* 5 */
41 static const u8 tpm_ordinal_duration[TPM_MAX_ORDINAL] = {
42 TPM_UNDEFINED, /* 0 */
47 TPM_UNDEFINED, /* 5 */
97 TPM_UNDEFINED, /* 55 */
117 TPM_UNDEFINED, /* 75 */
127 TPM_UNDEFINED, /* 85 */
137 TPM_UNDEFINED, /* 95 */
142 TPM_MEDIUM, /* 100 */
147 TPM_UNDEFINED, /* 105 */
177 TPM_UNDEFINED, /* 135 */
187 TPM_UNDEFINED, /* 145 */
197 TPM_UNDEFINED, /* 155 */
207 TPM_UNDEFINED, /* 165 */
217 TPM_UNDEFINED, /* 175 */
222 TPM_MEDIUM, /* 180 */
227 TPM_MEDIUM, /* 185 */
232 TPM_UNDEFINED, /* 190 */
237 TPM_UNDEFINED, /* 195 */
252 TPM_MEDIUM, /* 210 */
257 TPM_UNDEFINED, /* 215 */
267 TPM_UNDEFINED, /* 225 */
277 TPM_UNDEFINED, /* 235 */