All of lore.kernel.org
 help / color / mirror / Atom feed
From: Simon Glass <sjg@chromium.org>
To: u-boot@lists.denx.de
Subject: [U-Boot] [PATCH v2 4/7] tpm: allow TPM v1 and v2 to be compiled at the same time
Date: Thu, 19 Jul 2018 20:17:11 -0600	[thread overview]
Message-ID: <CAPnjgZ1mbwRi6=iH3VecOCyJQw7cG+6kgQw3ukDRi+Zb0VYN8Q@mail.gmail.com> (raw)
In-Reply-To: <20180719203512.346-5-miquel.raynal@bootlin.com>

On 19 July 2018 at 14:35, Miquel Raynal <miquel.raynal@bootlin.com> wrote:
> While there is probably no reason to do so in a real life situation, it
> will allow to compile test both stacks with the same sandbox defconfig.
>
> As we cannot define two 'tpm' commands at the same time, the command for
> TPM v1 is still called 'tpm' and the one for TPM v2 'tpm2'. While this
> is the exact command name that must be written into eg. test files, any
> user already using the TPM v2 stack can continue to do so by just writing
> 'tpm' because as long as TPM v1 support is not compiled, U-Boot prompt
> will search for the closest command named after 'tpm'.
>
> The command set can also be changed at runtime (not supported yet, but
> ready to be), but as one can compile only either one stack or the other,
> there is still one spot in the code where conditionals are used: to
> retrieve the v1 or v2 command set.
>
> Signed-off-by: Miquel Raynal <miquel.raynal@bootlin.com>
> ---
>  cmd/tpm-common.c               | 24 +++++++++++++++++++++++-
>  cmd/tpm-v1.c                   |  2 +-
>  cmd/tpm-v2.c                   |  4 ++--
>  drivers/tpm/Kconfig            |  7 ++-----
>  drivers/tpm/tpm-uclass.c       |  3 ---
>  drivers/tpm/tpm2_tis_sandbox.c |  3 +++
>  drivers/tpm/tpm2_tis_spi.c     |  4 ++++
>  include/tpm-common.h           | 40 ++++++++++++++++++++++++++++++++++------
>  8 files changed, 69 insertions(+), 18 deletions(-)

Reviewed-by: Simon Glass <sjg@chromium.org>

  reply	other threads:[~2018-07-20  2:17 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-07-19 20:35 [U-Boot] [PATCH v2 0/7] Allow both TPM stacks to be compiled at the same time Miquel Raynal
2018-07-19 20:35 ` [U-Boot] [PATCH v2 1/7] tpm: fix typo in kernel doc Miquel Raynal
2018-07-30 20:00   ` [U-Boot] [U-Boot,v2,1/7] " Tom Rini
2018-07-19 20:35 ` [U-Boot] [PATCH v2 2/7] tpm: compile Sandbox driver by default Miquel Raynal
2018-07-30 20:01   ` [U-Boot] [U-Boot, v2, " Tom Rini
2018-07-19 20:35 ` [U-Boot] [PATCH v2 3/7] tpm: remove stale symbol in Kconfig Miquel Raynal
2018-07-20  2:17   ` Simon Glass
2018-07-30 20:01   ` [U-Boot] [U-Boot,v2,3/7] " Tom Rini
2018-07-19 20:35 ` [U-Boot] [PATCH v2 4/7] tpm: allow TPM v1 and v2 to be compiled at the same time Miquel Raynal
2018-07-20  2:17   ` Simon Glass [this message]
2018-07-30 20:01   ` [U-Boot] [U-Boot, v2, " Tom Rini
2018-07-19 20:35 ` [U-Boot] [PATCH v2 5/7] test/py: tpm2: switch from 'tpm' to 'tpm2' command Miquel Raynal
2018-07-30 20:01   ` [U-Boot] [U-Boot, v2, " Tom Rini
2018-07-19 20:35 ` [U-Boot] [PATCH v2 6/7] tpm: make TPM_V2 be compiled by default Miquel Raynal
2018-07-30 20:01   ` [U-Boot] [U-Boot, v2, " Tom Rini
2018-07-19 20:35 ` [U-Boot] [PATCH v2 7/7] sandbox: compile both TPM stack versions and drivers Miquel Raynal
2018-07-30 20:01   ` [U-Boot] [U-Boot, v2, " 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='CAPnjgZ1mbwRi6=iH3VecOCyJQw7cG+6kgQw3ukDRi+Zb0VYN8Q@mail.gmail.com' \
    --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.