public inbox for u-boot@lists.denx.de
 help / color / mirror / Atom feed
* [U-Boot] [PATCH 0/6] Allow both TPM stacks to be compiled at the same time
@ 2018-07-14 12:16 Miquel Raynal
  2018-07-14 12:16 ` [U-Boot] [PATCH 1/6] tpm: fix typo in kernel doc Miquel Raynal
                   ` (5 more replies)
  0 siblings, 6 replies; 14+ messages in thread
From: Miquel Raynal @ 2018-07-14 12:16 UTC (permalink / raw)
  To: u-boot

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

Miquel Raynal (6):
  tpm: fix typo in kernel doc
  tpm: compile Sandbox driver by default
  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            | 10 +++++-----
 drivers/tpm/tpm-uclass.c       | 13 ++++++++++---
 drivers/tpm/tpm2_tis_sandbox.c | 11 +++++++++++
 drivers/tpm/tpm2_tis_spi.c     | 15 +++++++++++++++
 include/tpm-common.h           | 38 +++++++++++++++++++++++++++++++-------
 lib/tpm-common.c               |  4 ++++
 lib/tpm-utils.h                |  9 +++++++++
 test/py/tests/test_tpm2.py     | 40 ++++++++++++++++++++--------------------
 12 files changed, 134 insertions(+), 39 deletions(-)

-- 
2.14.1

^ permalink raw reply	[flat|nested] 14+ messages in thread

end of thread, other threads:[~2018-07-19 20:31 UTC | newest]

Thread overview: 14+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2018-07-14 12:16 [U-Boot] [PATCH 0/6] Allow both TPM stacks to be compiled at the same time Miquel Raynal
2018-07-14 12:16 ` [U-Boot] [PATCH 1/6] tpm: fix typo in kernel doc Miquel Raynal
2018-07-19  1:31   ` Simon Glass
2018-07-14 12:16 ` [U-Boot] [PATCH 2/6] tpm: compile Sandbox driver by default Miquel Raynal
2018-07-19  1:31   ` Simon Glass
2018-07-14 12:16 ` [U-Boot] [PATCH 3/6] tpm: allow TPM v1 and v2 to be compiled at the same time Miquel Raynal
2018-07-19  1:31   ` Simon Glass
2018-07-19 20:31     ` Miquel Raynal
2018-07-14 12:16 ` [U-Boot] [PATCH 4/6] test/py: tpm2: switch from 'tpm' to 'tpm2' command Miquel Raynal
2018-07-19  1:31   ` Simon Glass
2018-07-14 12:16 ` [U-Boot] [PATCH 5/6] tpm: make TPM_V2 be compiled by default Miquel Raynal
2018-07-19  1:31   ` Simon Glass
2018-07-14 12:16 ` [U-Boot] [PATCH 6/6] sandbox: compile both TPM stack versions and drivers Miquel Raynal
2018-07-19  1:31   ` Simon Glass

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox