diff options
author | Simon Glass <sjg@chromium.org> | 2022-08-30 21:05:32 -0600 |
---|---|---|
committer | Ilias Apalodimas <ilias.apalodimas@linaro.org> | 2022-09-03 16:53:58 +0300 |
commit | a557d258c6be49ec1253947a227189de149971df (patch) | |
tree | 0ebddc51dc00db955a9c3335a8836f1e6447383e /cmd/tpm_test.c | |
parent | 67fe8cc0016756f3479288b3f67d59a517e512d5 (diff) |
tpm: Require a digest source when extending the PCR
This feature is used for measured boot, so we can add a log entry to the
TCPA with some information about where the digest comes from. It is not
currently supported in the TPM drivers, but add it to the API so that
code which expects it can signal its request.
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_test.c')
-rw-r--r-- | cmd/tpm_test.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/cmd/tpm_test.c b/cmd/tpm_test.c index a3ccb12f53a..b35eae81dc3 100644 --- a/cmd/tpm_test.c +++ b/cmd/tpm_test.c @@ -91,7 +91,8 @@ static int test_early_extend(struct udevice *dev) tpm_init(dev); TPM_CHECK(tpm_startup(dev, TPM_ST_CLEAR)); TPM_CHECK(tpm_continue_self_test(dev)); - TPM_CHECK(tpm_pcr_extend(dev, 1, value_in, value_out)); + TPM_CHECK(tpm_pcr_extend(dev, 1, value_in, sizeof(value_in), value_out, + "test")); printf("done\n"); return 0; } @@ -438,7 +439,7 @@ static int test_timing(struct udevice *dev) 100); TTPM_CHECK(tpm_nv_read_value(dev, INDEX0, (uint8_t *)&x, sizeof(x)), 100); - TTPM_CHECK(tpm_pcr_extend(dev, 0, in, out), 200); + TTPM_CHECK(tpm_pcr_extend(dev, 0, in, sizeof(in), out, "test"), 200); TTPM_CHECK(tpm_set_global_lock(dev), 50); TTPM_CHECK(tpm_tsc_physical_presence(dev, PHYS_PRESENCE), 100); printf("done\n"); |