All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 0/6 v4] TPM cleanups and MMIO driver
@ 2021-11-03 15:09 Ilias Apalodimas
  2021-11-03 15:09 ` [PATCH 1/6 v4] tpm2: Introduce TIS tpm core Ilias Apalodimas
                   ` (5 more replies)
  0 siblings, 6 replies; 17+ messages in thread
From: Ilias Apalodimas @ 2021-11-03 15:09 UTC (permalink / raw)
  To: u-boot
  Cc: trini, Ilias Apalodimas, Rick Chen, Sean Anderson, Simon Glass,
	Heinrich Schuchardt, Masahisa Kojima

Hi! 

This is the followup series on the TPM cleanup and driver additions.

The major change since v3 [1] is that I implemented Simon's request and
converted an existing driver using the API.  We now have two consumers of
the API, MMIO and SPI TPMs.  It's worth noting that using the API reduces
the code duplication in the SPI TPM driver a lot.  

I've tested the SPI TPM on an RPI4 with [2]. As far as I can tell everything
seems to be working fine, including the EFI TCG2 protocol.  The MMIO one was
tested with QEMU and SWTPM [3] and I've added documentation on how to reproduce
that.

There was also a discussion on v2 [4] regarding the MMIO accesses and if we
should convert those to a uclass.  But the MMIO functions are just
calling io(read|write),  so after considering it for a while,  I couldn't
find any reasonable abstraction that would justify another uclass.

[1] https://lore.kernel.org/u-boot/20210708082310.87540-1-ilias.apalodimas@linaro.org/
[2] https://buyzero.de/en/products/letstrust-hardware-tpm-trusted-platform-module
[3] https://github.com/stefanberger/swtpm
[4] https://lore.kernel.org/u-boot/CAPnjgZ1U6VgeOcTuy-G=nbYFTNnu_8MqGf-o6LF6ivk=TwE4iQ@mail.gmail.com/

Changes since v3:
- Coverted SPI TPM to use the API as well
- moved some log_info to log_debug
- Added documentation on how to run QEMU and enabled TPM by default on arm qemu
  builds
Changes since v2:
- Add myself as a maintainer on TPM drivers
Changes since v1:
- split off the tis core code into a different file

Ilias Apalodimas (6):
  tpm2: Introduce TIS tpm core
  tpm2: Add a TPMv2 MMIO TIS driver
  tpm: Use the new API on tpm2 spi driver
  configs: Enable tpmv2 mmio on qemu for arm/arm64
  doc: qemu: Add instructions for swtpm usage
  MAINTAINERS: Add entry for TPM drivers

 MAINTAINERS                      |   5 +
 configs/qemu_arm64_defconfig     |   2 +
 configs/qemu_arm_defconfig       |   2 +
 doc/board/emulation/qemu-arm.rst |  25 ++
 drivers/tpm/Kconfig              |   9 +
 drivers/tpm/Makefile             |   3 +-
 drivers/tpm/tpm2_tis_core.c      | 523 +++++++++++++++++++++++++++++++
 drivers/tpm/tpm2_tis_mmio.c      | 152 +++++++++
 drivers/tpm/tpm2_tis_spi.c       | 440 ++------------------------
 drivers/tpm/tpm_tis.h            |  39 +++
 include/tpm-v2.h                 |   1 +
 11 files changed, 791 insertions(+), 410 deletions(-)
 create mode 100644 drivers/tpm/tpm2_tis_core.c
 create mode 100644 drivers/tpm/tpm2_tis_mmio.c

-- 
2.33.1


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

end of thread, other threads:[~2021-11-05 16:15 UTC | newest]

Thread overview: 17+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-11-03 15:09 [PATCH 0/6 v4] TPM cleanups and MMIO driver Ilias Apalodimas
2021-11-03 15:09 ` [PATCH 1/6 v4] tpm2: Introduce TIS tpm core Ilias Apalodimas
2021-11-05  2:02   ` Simon Glass
2021-11-05  7:01     ` Ilias Apalodimas
2021-11-05 16:12       ` Simon Glass
2021-11-03 15:09 ` [PATCH 2/6 v4] tpm2: Add a TPMv2 MMIO TIS driver Ilias Apalodimas
2021-11-05  2:02   ` Simon Glass
2021-11-05  8:17     ` Ilias Apalodimas
2021-11-05  8:23       ` Ilias Apalodimas
2021-11-05 16:12         ` Simon Glass
2021-11-03 15:09 ` [PATCH 3/6 v4] tpm: Use the new API on tpm2 spi driver Ilias Apalodimas
2021-11-05  2:02   ` Simon Glass
2021-11-03 15:09 ` [PATCH 4/6 v4] configs: Enable tpmv2 mmio on qemu for arm/arm64 Ilias Apalodimas
2021-11-05  2:02   ` Simon Glass
2021-11-03 15:09 ` [PATCH 5/6 v4] doc: qemu: Add instructions for swtpm usage Ilias Apalodimas
2021-11-05  2:02   ` Simon Glass
2021-11-03 15:09 ` [PATCH 6/6 v4] MAINTAINERS: Add entry for TPM drivers Ilias Apalodimas

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.