All of lore.kernel.org
 help / color / mirror / Atom feed
From: Simon Glass <sjg@chromium.org>
To: u-boot@lists.denx.de
Subject: [PATCH v4 00/11] tpm: Support using TPM1 and TPM2 from a single API
Date: Sat,  6 Feb 2021 14:23:31 -0700	[thread overview]
Message-ID: <20210206212343.3567308-1-sjg@chromium.org> (raw)

At present if an application wants to be written so it can work with
both TPMv1.2 and TPM2 it must use two different APIs. This is inconvenient
since it requires adding code to deal with the mismatch between the two.
It would be better to have a common API that all boards could share.

This series provides a simple API the covers some basic features and
implements them for both TPM standards.

Changes in v4:
- Use uint type for size and explain it in the commit message
- Drop unnecessary update of offset

Changes in v3:
- Add a comment to the offset and fix up the value

Changes in v2:
- Add comments for the offset value
- Add definition of TPM2_RC_NV_DEFINED return code

Simon Glass (11):
  tpm: Don't include cr50 in TPL/SPL
  tpm: Use logging in the uclass
  tpm: Add debugging of request in tpm_sendrecv_command()
  tpm: Add an API that can support v1.2 and v2
  tpm: Switch TPMv1 over to use the new API
  tpm: Add a basic API implementation for TPMv2
  tpm: Reduce duplication in a few functions
  tpm: Add an implementation of define_space
  tpm: Add TPM2 support for read/write values
  tpm: Add TPM2 support for write_lock
  tpm: Allow disabling platform hierarchy with TPM2

 board/gdsys/a38x/controlcenterdc.c    |   4 +-
 board/gdsys/a38x/hre.c                |  28 +--
 board/gdsys/a38x/keyprogram.c         |   8 +-
 board/gdsys/mpc8308/gazerbeam.c       |   4 +-
 board/gdsys/p1022/controlcenterd-id.c |  36 +--
 cmd/tpm-v1.c                          |  25 +-
 cmd/tpm_test.c                        |  40 ++--
 drivers/tpm/Makefile                  |   2 +-
 drivers/tpm/cr50_i2c.c                |   4 +-
 drivers/tpm/tpm-uclass.c              |   8 +-
 include/tpm-common.h                  |   3 +
 include/tpm-v1.h                      |  76 +++---
 include/tpm-v2.h                      |  81 +++++++
 include/tpm_api.h                     | 322 ++++++++++++++++++++++++++
 lib/Makefile                          |   1 +
 lib/tpm-common.c                      |  10 +-
 lib/tpm-v1.c                          | 115 +++++----
 lib/tpm-v2.c                          | 202 +++++++++++++++-
 lib/tpm_api.c                         | 285 +++++++++++++++++++++++
 19 files changed, 1072 insertions(+), 182 deletions(-)
 create mode 100644 include/tpm_api.h
 create mode 100644 lib/tpm_api.c

-- 
2.30.0.478.g8a0d178c01-goog

             reply	other threads:[~2021-02-06 21:23 UTC|newest]

Thread overview: 25+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-02-06 21:23 Simon Glass [this message]
2021-02-06 21:23 ` [PATCH v4 01/11] tpm: Don't include cr50 in TPL/SPL Simon Glass
2021-03-03 19:10   ` Tom Rini
2021-02-06 21:23 ` [PATCH v4 02/11] tpm: Use logging in the uclass Simon Glass
2021-03-03 19:10   ` Tom Rini
2021-02-06 21:23 ` [PATCH v4 03/11] tpm: Add debugging of request in tpm_sendrecv_command() Simon Glass
2021-03-03 19:10   ` Tom Rini
2021-02-06 21:23 ` [PATCH v4 04/11] tpm: Add an API that can support v1.2 and v2 Simon Glass
2021-03-03 19:10   ` Tom Rini
2021-02-06 21:23 ` [PATCH v4 05/11] tpm: Switch TPMv1 over to use the new API Simon Glass
2021-02-07 11:44   ` Ilias Apalodimas
2021-03-03 19:11   ` Tom Rini
2021-02-06 21:23 ` [PATCH v4 06/11] tpm: Add a basic API implementation for TPMv2 Simon Glass
2021-03-03 19:11   ` Tom Rini
2021-02-06 21:23 ` [PATCH v4 07/11] tpm: Reduce duplication in a few functions Simon Glass
2021-03-03 19:11   ` Tom Rini
2021-02-06 21:23 ` [PATCH v4 08/11] tpm: Add an implementation of define_space Simon Glass
2021-02-07 11:44   ` Ilias Apalodimas
2021-03-03 19:11   ` Tom Rini
2021-02-06 21:23 ` [PATCH v4 09/11] tpm: Add TPM2 support for read/write values Simon Glass
2021-03-03 19:11   ` Tom Rini
2021-02-06 21:23 ` [PATCH v4 10/11] tpm: Add TPM2 support for write_lock Simon Glass
2021-03-03 19:11   ` Tom Rini
2021-02-06 21:23 ` [PATCH v4 11/11] tpm: Allow disabling platform hierarchy with TPM2 Simon Glass
2021-03-03 19:11   ` Tom Rini

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20210206212343.3567308-1-sjg@chromium.org \
    --to=sjg@chromium.org \
    --cc=u-boot@lists.denx.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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.