Skip to content
Snippets Groups Projects
Select Git revision
  • master default protected
  • early-display
  • variant-emmc-nvme-boot
  • 2023-01-25
  • v3
  • variant-emmc-nvme-boot
  • 2020-06-01
7 results

cmd_tpm.c

Blame
  • Forked from Reform / reform-boundary-uboot
    Source project has a limited visibility.
    • Vadim Bendebury's avatar
      576fb1ed
      Add a cli command to test the TPM device. · 576fb1ed
      Vadim Bendebury authored
      
      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: default avatarVadim Bendebury <vbendeb@chromium.org>
      CC: Wolfgang Denk <wd@denx.de>
      576fb1ed
      History
      Add a cli command to test the TPM device.
      Vadim Bendebury authored
      
      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: default avatarVadim Bendebury <vbendeb@chromium.org>
      CC: Wolfgang Denk <wd@denx.de>