summaryrefslogtreecommitdiff
path: root/src/security/tpm/tss/tcg-2.0
diff options
context:
space:
mode:
Diffstat (limited to 'src/security/tpm/tss/tcg-2.0')
-rw-r--r--src/security/tpm/tss/tcg-2.0/tss.c11
1 files changed, 10 insertions, 1 deletions
diff --git a/src/security/tpm/tss/tcg-2.0/tss.c b/src/security/tpm/tss/tcg-2.0/tss.c
index 135d2964e6..27390a78ab 100644
--- a/src/security/tpm/tss/tcg-2.0/tss.c
+++ b/src/security/tpm/tss/tcg-2.0/tss.c
@@ -211,15 +211,24 @@ tpm_result_t tlcl_clear_control(bool disable)
/* This function is called directly by vboot, uses vboot return types. */
tpm_result_t tlcl_lib_init(void)
{
+ enum tpm_family family;
+
if (tis_sendrecv != NULL)
return TPM_SUCCESS;
- tis_sendrecv = tis_probe();
+ tis_sendrecv = tis_probe(&family);
if (tis_sendrecv == NULL) {
printk(BIOS_ERR, "%s: tis_probe returned error\n", __func__);
return TPM_CB_NO_DEVICE;
}
+ if (family != TPM_2) {
+ tis_sendrecv = NULL;
+ printk(BIOS_ERR, "%s: tis_probe returned unsupported TPM family: %d\n",
+ __func__, family);
+ return TPM_CB_INTERNAL_INCONSISTENCY;
+ }
+
return TPM_SUCCESS;
}