summaryrefslogtreecommitdiff
path: root/include/tpm-common.h
diff options
context:
space:
mode:
authorMiquel Raynal <miquel.raynal@bootlin.com>2018-05-15 11:57:08 +0200
committerTom Rini <trini@konsulko.com>2018-05-25 20:12:55 -0400
commitff32245bb3b57689cd7b1699ae29ff8fc0edc0d8 (patch)
treefacec1175fc0f7181817d13128d5d3e8214d2830 /include/tpm-common.h
parent3219cf693a1674650eba2a57d4bf8c87d9f21752 (diff)
tpm: prepare support for TPMv2.x commands
Choice between v1 and v2 compliant functions is done with the configuration. Create the various files that will receive TPMv2-only code on the same scheme as for the TPMv1 code. Signed-off-by: Miquel Raynal <miquel.raynal@bootlin.com> Reviewed-by: Simon Glass <sjg@chromium.org> Reviewed-by: Tom Rini <trini@konsulko.com>
Diffstat (limited to 'include/tpm-common.h')
-rw-r--r--include/tpm-common.h6
1 files changed, 6 insertions, 0 deletions
diff --git a/include/tpm-common.h b/include/tpm-common.h
index e0ba696f1c..734c2c9d53 100644
--- a/include/tpm-common.h
+++ b/include/tpm-common.h
@@ -35,11 +35,17 @@ enum tpm_duration {
*
* @duration_ms: Length of each duration type in milliseconds
* @retry_time_ms: Time to wait before retrying receive
+ * @pcr_count: Number of PCR per bank
+ * @pcr_select_min: Minimum size in bytes of the pcrSelect array
* @buf: Buffer used during the exchanges with the chip
*/
struct tpm_chip_priv {
uint duration_ms[TPM_DURATION_COUNT];
uint retry_time_ms;
+#if defined(CONFIG_TPM_V2)
+ uint pcr_count;
+ uint pcr_select_min;
+#endif
u8 buf[TPM_DEV_BUFSIZE + sizeof(u8)]; /* Max buffer size + addr */
};