diff options
author | Vadim Bendebury <vbendeb@chromium.org> | 2011-10-15 15:13:34 +0000 |
---|---|---|
committer | Wolfgang Denk <wd@denx.de> | 2011-12-06 21:30:03 +0100 |
commit | 576fb1ed3fca767c36c59161ab42e60a93ea4419 (patch) | |
tree | a26dd2c9536d9ccb8edfa44bc9ed732e56f50d72 /common/Makefile | |
parent | 6f40f2749ac34da91c7054ee6d94808ee1db4cb1 (diff) |
Add a cli command to test the TPM device.
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@chromium.org>
CC: Wolfgang Denk <wd@denx.de>
Diffstat (limited to 'common/Makefile')
-rw-r--r-- | common/Makefile | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/common/Makefile b/common/Makefile index 1b672ad96e..1be7236035 100644 --- a/common/Makefile +++ b/common/Makefile @@ -152,6 +152,7 @@ COBJS-$(CONFIG_CMD_STRINGS) += cmd_strings.o COBJS-$(CONFIG_CMD_TERMINAL) += cmd_terminal.o COBJS-$(CONFIG_CMD_TIME) += cmd_time.o COBJS-$(CONFIG_SYS_HUSH_PARSER) += cmd_test.o +COBJS-$(CONFIG_CMD_TPM) += cmd_tpm.o COBJS-$(CONFIG_CMD_TSI148) += cmd_tsi148.o COBJS-$(CONFIG_CMD_UBI) += cmd_ubi.o COBJS-$(CONFIG_CMD_UBIFS) += cmd_ubifs.o |