diff options
author | Alexander Steffen <[email protected]> | 2022-06-08 19:31:13 +0200 |
---|---|---|
committer | Jarkko Sakkinen <[email protected]> | 2022-08-03 23:56:20 +0300 |
commit | bbc23a07b0728c820d665d0054b2e2a6d01f0a98 (patch) | |
tree | 21faa692d92b1cd57b297aa6fc01231287d08077 /lib/mpi/mpi-sub-ui.c | |
parent | f25534a68b8e1ed8266d23b464a3b512364b124d (diff) |
tpm: Add tpm_tis_i2c backend for tpm_tis_core
Implement the TCG I2C Interface driver, as specified in the TCG PC
Client Platform TPM Profile (PTP) specification for TPM 2.0 v1.04
revision 14, section 8, I2C Interface Definition.
This driver supports Guard Times. That is, if required by the TPM, the
driver has to wait by a vendor-specific time after each I2C read/write.
The specific time is read from the TPM_I2C_INTERFACE_CAPABILITY register.
Unfortunately, the TCG specified almost but not quite compatible
register addresses. Therefore, the TIS register addresses need to be
mapped to I2C ones. The locality is stripped because for now, only
locality 0 is supported.
Add a sanity check to I2C reads of e.g. TPM_ACCESS and TPM_STS. This is
to detect communication errors and issues due to non-standard behaviour
(E.g. the clock stretching quirk in the BCM2835, see 4dbfb5f4401f). In
case the sanity check fails, attempt a retry.
Co-developed-by: Johannes Holland <[email protected]>
Signed-off-by: Johannes Holland <[email protected]>
Co-developed-by: Amir Mizinski <[email protected]>
Signed-off-by: Amir Mizinski <[email protected]>
Signed-off-by: Alexander Steffen <[email protected]>
Reviewed-by: Jarkko Sakkinen <[email protected]>
Signed-off-by: Jarkko Sakkinen <[email protected]>
Diffstat (limited to 'lib/mpi/mpi-sub-ui.c')
0 files changed, 0 insertions, 0 deletions