diff options
author | Simon Glass <sjg@chromium.org> | 2022-08-30 21:05:36 -0600 |
---|---|---|
committer | Ilias Apalodimas <ilias.apalodimas@linaro.org> | 2022-09-03 16:59:05 +0300 |
commit | 3bb4db4c3883c66ee0bbf152e9ba1d2504fa8c9f (patch) | |
tree | b94da976937e8039287e79b395ca9068f9f9e34f /cmd/tpm-v2.c | |
parent | 6694c997b210656fc3e6ce63ba780bc9bf97c077 (diff) | |
download | u-boot-3bb4db4c3883c66ee0bbf152e9ba1d2504fa8c9f.tar.gz |
tpm: Allow reporting the internal state
It is useful to read information about the current TPM state, where
supported, e.g. for debugging purposes when verified boot fails.
Add support for this to the TPM interface as well as Cr50. Add a simple
sandbox test.
Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Ilias Apalodimas <ilias.apalodimas@linaro.org>
Signed-off-by: Ilias Apalodimas <ilias.apalodimas@linaro.org>
Diffstat (limited to 'cmd/tpm-v2.c')
-rw-r--r-- | cmd/tpm-v2.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/cmd/tpm-v2.c b/cmd/tpm-v2.c index 4ea5f9f094f..d93b83ada93 100644 --- a/cmd/tpm-v2.c +++ b/cmd/tpm-v2.c @@ -359,6 +359,7 @@ static int do_tpm_pcr_setauthvalue(struct cmd_tbl *cmdtp, int flag, static struct cmd_tbl tpm2_commands[] = { U_BOOT_CMD_MKENT(device, 0, 1, do_tpm_device, "", ""), U_BOOT_CMD_MKENT(info, 0, 1, do_tpm_info, "", ""), + U_BOOT_CMD_MKENT(state, 0, 1, do_tpm_report_state, "", ""), U_BOOT_CMD_MKENT(init, 0, 1, do_tpm_init, "", ""), U_BOOT_CMD_MKENT(startup, 0, 1, do_tpm2_startup, "", ""), U_BOOT_CMD_MKENT(self_test, 0, 1, do_tpm2_self_test, "", ""), @@ -389,6 +390,8 @@ U_BOOT_CMD(tpm2, CONFIG_SYS_MAXARGS, 1, do_tpm, "Issue a TPMv2.x command", " Show all devices or set the specified device\n" "info\n" " Show information about the TPM.\n" +"state\n" +" Show internal state from the TPM (if available)\n" "init\n" " Initialize the software stack. Always the first command to issue.\n" "startup <mode>\n" |