All of lore.kernel.org
 help / color / mirror / Atom feed
From: Simon Glass <sjg@chromium.org>
To: u-boot@lists.denx.de
Subject: [PATCH 2/2 v4] efi: Add basic EFI_TCG2_PROTOCOL support
Date: Wed, 11 Nov 2020 07:42:31 -0700	[thread overview]
Message-ID: <CAPnjgZ3kXF1kec0To5oDvDNw5gv+8ZOZidTjYrj81-r7MDa31Q@mail.gmail.com> (raw)
In-Reply-To: <20201111091812.400969-2-ilias.apalodimas@linaro.org>

Hi Ilias,

On Wed, 11 Nov 2020 at 02:18, Ilias Apalodimas
<ilias.apalodimas@linaro.org> wrote:
>
> Since U-boot EFI implementation is getting richer it makes sense to
> add support for EFI_TCG2_PROTOCOL taking advantage of any hardware TPM
> available on the device.
>
> This is the initial implementation of the protocol which only adds
> support for GetCapability(). It's limited in the newer and safer
> TPMv2 devices.
>
> Signed-off-by: Ilias Apalodimas <ilias.apalodimas@linaro.org>
> ---
> * changes since v3:
> - added check for maximum number of PCRs allowed
> - replaced multiple return Xl with goto out tags
> * changes since v2:
> - added description about include/efi_tcg2.h
> - switch bool to u8 for tpm_present_flag
> - removed superfluous 'default n' from Kconfig
> - use 'goto 'tag' when possible
>
> * changes since v1:
> - change return variable of platform_get_tpm2_device() when used
> - since more headers were included in patch #2 use them in offset
>   calculations for all tpm commands
> - change the size of the response buffer regardless of what
>   tpm2_get_capability() is doing
>  include/efi_loader.h       |   2 +
>  include/efi_tcg2.h         |  94 +++++++
>  lib/efi_loader/Kconfig     |   7 +
>  lib/efi_loader/Makefile    |   1 +
>  lib/efi_loader/efi_setup.c |   7 +
>  lib/efi_loader/efi_tcg2.c  | 539 +++++++++++++++++++++++++++++++++++++
>  6 files changed, 650 insertions(+)
>  create mode 100644 include/efi_tcg2.h
>  create mode 100644 lib/efi_loader/efi_tcg2.c

I will let Heinrich review this one. I do feel that the overly long
identifiers make the code hard to read.

Regards,
Simon

  reply	other threads:[~2020-11-11 14:42 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-11-11  9:18 [PATCH 1/2 v4] tpm: Add some headers from the spec Ilias Apalodimas
2020-11-11  9:18 ` [PATCH 2/2 v4] efi: Add basic EFI_TCG2_PROTOCOL support Ilias Apalodimas
2020-11-11 14:42   ` Simon Glass [this message]
2020-11-11 14:46     ` Ilias Apalodimas
2020-11-12 18:49   ` Heinrich Schuchardt
2020-11-12 19:10     ` Ilias Apalodimas
2020-11-12 19:22       ` Heinrich Schuchardt
2020-11-12 19:27         ` Ilias Apalodimas
2020-11-12 19:21     ` Heinrich Schuchardt
2020-11-12 19:26   ` Heinrich Schuchardt
2020-11-11 14:42 ` [PATCH 1/2 v4] tpm: Add some headers from the spec Simon Glass

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=CAPnjgZ3kXF1kec0To5oDvDNw5gv+8ZOZidTjYrj81-r7MDa31Q@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.