tpm: Implement tpm20_set_timeouts

The TIS timeouts for TPM 2 are different than for TPM 1.2.
Also the timeouts indicating a failed TPM 2 command are different.
Further, the  command durations and timeouts cannot be read from the device.

We take the command timeout values for short, medium, and long running
commands from table 15 of the following specification:

TCG PC Client Platform TPM Profile (PTP) Specification

The values should work for all physical TPMs.

The tricky thing with virtualized environments is that the values
may need to be longer for a system where a vTPM cannot get sufficient
cycles. So a future patch _may_ need to multiply those values here
with some factor.

Signed-off-by: Stefan Berger <>
2 files changed
tree: 749cdde709c644c52821b7060251c29707ffdbc1
  1. .gitignore
  4. Makefile
  6. docs/
  7. scripts/
  8. src/
  9. vgasrc/