[U-Boot] [PATCH v3 2/2] Add a cli command to test the TPM device.

Wolfgang Denk wd at denx.de
Tue Dec 6 21:30:16 CET 2011


Dear Vadim Bendebury,

In message <20111016011334.94BB741138 at eskimo.mtv.corp.google.com> you wrote:
> The command gets an arbitrary number of arguments (up to 30), which
> are interpreted as byte values and are feed into the TPM device after
> proper initialization. Then the return value and data of the TPM
> driver is examined.
> 
> TPM commands are described in the TCG specification.
> 
> For instance, the following sequence is the 'TPM Startup' command, it
> is processed by the TPM and a response is generated:
> 
> boot > tpm 0x0 0xc1 0x0 0x0 0x0 0xc 0x0 0x0 0x0 0x99 0x0 0x1
> Found TPM SLB9635 TT 1.2 by Infineon
> Got TPM response:
>  00 c4 00 00 00 0a 00 00 00 00
> 
> If the command is corrupted (fed one byte short), an error is reported:
> boot > tpm 0x0 0xc1 0x0 0x0 0x0 0xc 0x0 0x0 0x0 0x99 0x0
> generic_lpc_tpm.c:311 unexpected TPM status 0xff000888
> generic_lpc_tpm.c:516 failed sending data to TPM
> tpm command failed
> boot >
> 
> Change-Id: I3f3c5bfec8b852e208c4e99ba37b0f2b875140b0
> Signed-off-by: Vadim Bendebury <vbendeb at chromium.org>
> CC: Wolfgang Denk <wd at denx.de>
> ---
>  common/Makefile  |    1 +
>  common/cmd_tpm.c |  103 ++++++++++++++++++++++++++++++++++++++++++++++++++++++
>  2 files changed, 104 insertions(+), 0 deletions(-)
>  create mode 100644 common/cmd_tpm.c

Applied, thanks.

Best regards,

Wolfgang Denk

-- 
DENX Software Engineering GmbH,     MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: wd at denx.de
Lady Nancy Astor:
    "Winston, if you were my husband, I'd put poison in your coffee."
Winston Churchill:
    "Nancy, if you were my wife, I'd drink it."


More information about the U-Boot mailing list