[PATCH V3 2/2] cmd: tpm: add a subcommand device

sjg at google.com sjg at google.com
Wed Feb 5 18:57:13 CET 2020


Hi,

Sorry, I forgot to report the Reviewed-by of Miquel Raynal.


> Objet: [PATCH V3 2/2] cmd: tpm: add a subcommand device

> The command tpm (and tpm2) search the tpm and use it.
> On sandbox, there are two tpm (tpm 1.x and tpm 2.0).
> So the command tpm and tpm2 are always executed with
> the first tpm (tpm 1.x), and the command tpm2 always
> fails.
>
> This add a subcommand device to command tpm and
> command tpm2. Then the command tpm and tpm2 use
> the device selected with the subcommand device.
>
> To be compatible with previous behaviour, if the
> subcommand device is not used before a tpm (or tpm2)
> command, the device 0 is selected.
>
> Signed-off-by: Philippe Reynes <philippe.reynes at softathome.com>

Reviewed-by: Miquel Raynal <miquel.raynal at bootlin.com>

> ---
> cmd/tpm-common.c | 77 +++++++++++++++++++++++++++++++++++++++++++++++++---
> cmd/tpm-user-utils.h | 1 +
> cmd/tpm-v1.c | 3 ++
> cmd/tpm-v2.c | 3 ++
> 4 files changed, 80 insertions(+), 4 deletions(-)
>
> Changelog:
> v3:
> - no change
> v2:
> - use helper for tpm device (idea from Miquel)
> - don't set tpm in the look (feedback from Miquel)
> - add a comment to explain the backward code (feedback from Miquel)
>
Applied to u-boot-dm, thanks!


More information about the U-Boot mailing list