[U-Boot] [PATCH v2 0/7] Allow both TPM stacks to be compiled at the same time
Miquel Raynal
miquel.raynal at bootlin.com
Thu Jul 19 20:35:05 UTC 2018
It was first decided that the user would choose the TPM version (1.x
or 2.x) that he wants to use at compile time. After some time the
decision has been made to change this and allow both stacks (and
drivers) to be compiled at the same time. The primary benefit would be
to be able to compile the maximum of code with only one Sandbox
configuration.
This series removes this limitation by creating a 'tpm2' command
(instead of two commands named 'tpm'). While test suites must be
updated to use 'tpm2' instead of 'tpm' (in case both stacks are
compiled), the user will not have to change anything as U-Boot prompt
will find the closest matching command by default.
In the TPM private data a version entry is added, updated by TPMv2
drivers in the ->set_version() hook added in the uclass.
This has been tested with the tpm2.py test suite on Sandbox with
either only the V1, only the V2 and with both versions selected.
Thanks,
Miquèl
Changes since v1:
=================
* Added Simon's Reviewed-by tags.
* Added a patch to remove TPM_DRIVER_SELECTED stale symbol from
Kconfig.
* s/int rc/int ret/
* Removed conditionals from the code.
* Moved the TPM stack version selection in the probe, removed the
->set_version() helper.
Miquel Raynal (7):
tpm: fix typo in kernel doc
tpm: compile Sandbox driver by default
tpm: remove stale symbol in Kconfig
tpm: allow TPM v1 and v2 to be compiled at the same time
test/py: tpm2: switch from 'tpm' to 'tpm2' command
tpm: make TPM_V2 be compiled by default
sandbox: compile both TPM stack versions and drivers
cmd/tpm-common.c | 24 +++++++++++++++++++++++-
cmd/tpm-v1.c | 2 +-
cmd/tpm-v2.c | 4 ++--
configs/sandbox_defconfig | 3 +++
drivers/tpm/Kconfig | 13 +++++--------
drivers/tpm/tpm-uclass.c | 3 ---
drivers/tpm/tpm2_tis_sandbox.c | 3 +++
drivers/tpm/tpm2_tis_spi.c | 4 ++++
include/tpm-common.h | 42 +++++++++++++++++++++++++++++++++++-------
test/py/tests/test_tpm2.py | 40 ++++++++++++++++++++--------------------
10 files changed, 96 insertions(+), 42 deletions(-)
--
2.14.1
More information about the U-Boot
mailing list