mbox series

Pull request for tpm-next-28022023

Message ID 20230228092825.334248-1-ilias.apalodimas@linaro.org
State New
Headers show
Series Pull request for tpm-next-28022023 | expand

Pull-request

https://source.denx.de/u-boot/custodians/u-boot-tpm/ tags/tpm-next-28022023

Message

Ilias Apalodimas Feb. 28, 2023, 9:28 a.m. UTC
Hi Tom,

The following changes since commit 5b197eee334bdf75cc9e9148161299679a5251ea:

  Merge tag 'v2023.04-rc3' into next (2023-02-27 17:28:21 -0500)

are available in the Git repository at:

  https://source.denx.de/u-boot/custodians/u-boot-tpm/ tags/tpm-next-28022023

for you to fetch changes up to a11be4c303eabb142e074c7ca14b6ae0d293f0cb:

  tpm: Implement tpm_auto_start() for TPMv1.2 (2023-02-28 09:44:33 +0200)

The CI showed no issues:
https://source.denx.de/u-boot/custodians/u-boot-tpm/-/pipelines/15398

----------------------------------------------------------------
Due to U-Boot's lazy binding we always relied on command line tools
to initialize the TPM subsystem and devices.  One exception is the EFI
subsystem.  When compiled with TCG2 measured boot support the TPM was
automatically initialized.

However that init was not complete.  The TCG specs [0] (and specifically
ยง12.3 Self-test modes) describe how self-tests on the device should be
performed.  This PR is adding an extra API function, that can be used to
initialize the TPM2.0 properly.

Simon added the equivalent for TPM1.2 and refactored the DM tests to include
the new funtion.

[0]  https://trustedcomputinggroup.org/wp-content/uploads/TPM-Rev-2.0-Part-1-Architecture-01.07-2014-03-13.pdf
----------------------------------------------------------------


Ilias Apalodimas (4):
      tpm: add a function that performs selftest + startup
      efi_loader: use tpm_auto_start for the tpm device
      tpm: sandbox: Change the return code when device is already open
      test: add a test for the new tpm_auto_start() function

Simon Glass (2):
      tpm: Separate out the TPM tests for v1 and v2
      tpm: Implement tpm_auto_start() for TPMv1.2

 arch/sandbox/dts/test.dts      |   4 ++
 drivers/tpm/tpm2_tis_sandbox.c |   2 +-
 include/tpm-common.h           |   2 +-
 include/tpm-v1.h               |  11 +++++
 include/tpm-v2.h               |  16 +++++++
 include/tpm_api.h              |   8 ++++
 lib/efi_loader/efi_tcg2.c      |   2 +-
 lib/tpm-v1.c                   |  14 ++++++
 lib/tpm-v2.c                   |  17 +++++++
 lib/tpm_api.c                  |  21 +++++++++
 test/dm/tpm.c                  | 102 +++++++++++++++++++++++++++++++++++++++--
 11 files changed, 191 insertions(+), 8 deletions(-)

Comments

Tom Rini Feb. 28, 2023, 6:50 p.m. UTC | #1
On Tue, Feb 28, 2023 at 11:28:24AM +0200, Ilias Apalodimas wrote:

> Hi Tom,
> 
> The following changes since commit 5b197eee334bdf75cc9e9148161299679a5251ea:
> 
>   Merge tag 'v2023.04-rc3' into next (2023-02-27 17:28:21 -0500)
> 
> are available in the Git repository at:
> 
>   https://source.denx.de/u-boot/custodians/u-boot-tpm/ tags/tpm-next-28022023
> 
> for you to fetch changes up to a11be4c303eabb142e074c7ca14b6ae0d293f0cb:
> 
>   tpm: Implement tpm_auto_start() for TPMv1.2 (2023-02-28 09:44:33 +0200)
> 
> The CI showed no issues:
> https://source.denx.de/u-boot/custodians/u-boot-tpm/-/pipelines/15398
> 

Applied to u-boot/next, thanks!