Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

tpm: add decoders for Trusted Platform Module (TPM) communication. #88

Open
wants to merge 3 commits into
base: master
Choose a base branch
from

Conversation

joholl
Copy link

@joholl joholl commented Jun 29, 2022

Add decoders for the communication stack between the Trusted Platform Module (TPM) and a host machine. Included are three decoders, tpm_tis_i2c and tpm_tis_spi which implement register access and tpm_fifo_tis which implements the so-called (TPM Interface Specification) TIS protocol on top of that.

The TPM commands and responses are not yet implemented, the tpm_fifo_tis decoder merely decodes command names and response error codes.

Protocol layer / Decoder name Description Specification
not included in this PR TPM commands and responses (via the FIFO register) TPM 2.0 Library Specification
tpm_fifo_tis Stateful protocol based on register writes/reads TCG PC Client Platform TPM Profile (PTP) Specification
tpm_tis_i2c, tpm_tis_spi Register access based on I2C and SPI (as seperate decoders) TCG PC Client Platform TPM Profile (PTP) Specification
spi, i2c

Tobias Peter and others added 3 commits June 10, 2022 17:42
The Trusted Platform Module (TPM) Interface Specification (TIS)
describes the protocol for communicating with a TPM on a PC platform,
including an register-based protocol over SPI.
This decoder stacks on the existing SPI decoder, and decodes the TIS
register transactions.

Signed-off-by: Tobias Peter <[email protected]>
The Trusted Platform Module (TPM) Interface Specification (TIS)
in combination with the TPM I2C Interface Specification describe
the protocol for communicating with a TPM on a PC platform,
including a register-based protocol over I2C.
This decoder stacks on the existing I2C decoder, and decodes the TIS
register transactions.

Signed-off-by: Johannes Holland <[email protected]>
The Trusted Platform Module (TPM) Interface Specification (TIS)
describes the protocol for communicating with a TPM on a PC platform,
including a FIFO protocol based on register transactions.
This decoder stacks on a TPM TIS decoder, and decodes the TPM Commands
and Responses encoded in the register transactions.

Signed-off-by: Tobias Peter <[email protected]>
@depili
Copy link
Contributor

depili commented Nov 18, 2022

Having more dumps of TPM data would be helpful, and test cases for sigrok-test would be extra helpful.

We have some SPI TPM data in sigrokproject/sigrok-dumps#38 but no I2C or TIS at all making testing the decoder hard.

@joholl
Copy link
Author

joholl commented Nov 30, 2022

See an I2C trace of a TPM2_GetRandom command attached:
tpm_i2c.sr.gz

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants