History log of /openbmc/u-boot/lib/tpm_api.c (Results 1 – 4 of 4)
Revision (<<< Hide revision tags) (Show revision tags >>>) Date Author Comments
Revision tags: v00.04.15, v00.04.14
# edd88824 18-Feb-2023 Ilias Apalodimas <ilias.apalodimas@linaro.org>

tpm: add a function that performs selftest + startup

As described in [0] if a command requires use of an untested algorithm
or functional module, the TPM performs the test and then completes the
com

tpm: add a function that performs selftest + startup

As described in [0] if a command requires use of an untested algorithm
or functional module, the TPM performs the test and then completes the
command actions.

Since we don't check for TPM_RC_NEEDS_TEST (which is the return code of
the TPM in that case) and even if we would, it would complicate our TPM
code for no apparent reason, add a wrapper function that performs both
the selftest and the startup sequence of the TPM.

It's worth noting that this is implemented on TPMv2.0. The code for
1.2 would look similar, but I don't have a device available to test.

[0]
https://trustedcomputinggroup.org/wp-content/uploads/TPM-Rev-2.0-Part-1-Architecture-01.07-2014-03-13.pdf
§12.3 Self-test modes

Signed-off-by: Ilias Apalodimas <ilias.apalodimas@linaro.org>
Reviewed-by: Simon Glass <sjg@chromium.org>
Link: https://lore.kernel.org/r/20230218152741.528191-1-ilias.apalodimas@linaro.org
Signed-off-by: Joel Stanley <joel@jms.id.au>

show more ...


# d7869cec 25-Jan-2023 Eddie James <eajames@linux.ibm.com>

tpm: Pull in upstream changes

Get the TPM driver into the same state as upstream as of v2023.04-rc3.

FILES="cmd/tpm-user-utils.h include/tpm-common.h include/tpm-v1.h \
include/tpm-v2.h include/

tpm: Pull in upstream changes

Get the TPM driver into the same state as upstream as of v2023.04-rc3.

FILES="cmd/tpm-user-utils.h include/tpm-common.h include/tpm-v1.h \
include/tpm-v2.h include/tpm_api.h cmd/tpm-common.c cmd/tpm-v1.c \
cmd/tpm-v2.c drivers/tpm/tpm-uclass.c lib/tpm-v1.c lib/tpm-v2.c \
lib/tpm_api.c"

git checkout v2023.04-rc3 -- $FILES

sed -i 's/struct cmd_tbl/cmd_tbl_t/' $FILES
sed -i 's/env.h/environment.h/' $FILES

The tpm-uclass.c had tpm_uclass_post_probe and other references to
UCLASS_RNG removed, as that class does not exist in v2019.04.

Signed-off-by: Eddie James <eajames@linux.ibm.com>
Signed-off-by: Joel Stanley <joel@jms.id.au>

show more ...


# 40a7f28b 18-Feb-2023 Ilias Apalodimas <ilias.apalodimas@linaro.org>

tpm: add a function that performs selftest + startup

As described in [0] if a command requires use of an untested algorithm
or functional module, the TPM performs the test and then completes the
com

tpm: add a function that performs selftest + startup

As described in [0] if a command requires use of an untested algorithm
or functional module, the TPM performs the test and then completes the
command actions.

Since we don't check for TPM_RC_NEEDS_TEST (which is the return code of
the TPM in that case) and even if we would, it would complicate our TPM
code for no apparent reason, add a wrapper function that performs both
the selftest and the startup sequence of the TPM.

It's worth noting that this is implemented on TPMv2.0. The code for
1.2 would look similar, but I don't have a device available to test.

[0]
https://trustedcomputinggroup.org/wp-content/uploads/TPM-Rev-2.0-Part-1-Architecture-01.07-2014-03-13.pdf
§12.3 Self-test modes

Signed-off-by: Ilias Apalodimas <ilias.apalodimas@linaro.org>
Reviewed-by: Simon Glass <sjg@chromium.org>
Link: https://lore.kernel.org/r/20230218152741.528191-1-ilias.apalodimas@linaro.org
Signed-off-by: Joel Stanley <joel@jms.id.au>

show more ...


# ddca9f09 25-Jan-2023 Eddie James <eajames@linux.ibm.com>

tpm: Pull in upstream changes

Get the TPM driver into the same state as upstream as of v2023.04-rc3.

FILES="cmd/tpm-user-utils.h include/tpm-common.h include/tpm-v1.h \
include/tpm-v2.h include/

tpm: Pull in upstream changes

Get the TPM driver into the same state as upstream as of v2023.04-rc3.

FILES="cmd/tpm-user-utils.h include/tpm-common.h include/tpm-v1.h \
include/tpm-v2.h include/tpm_api.h cmd/tpm-common.c cmd/tpm-v1.c \
cmd/tpm-v2.c drivers/tpm/tpm-uclass.c lib/tpm-v1.c lib/tpm-v2.c \
lib/tpm_api.c"

git checkout v2023.04-rc3 -- $FILES

sed -i 's/struct cmd_tbl/cmd_tbl_t/' $FILES
sed -i 's/env.h/environment.h/' $FILES

The tpm-uclass.c had tpm_uclass_post_probe and other references to
UCLASS_RNG removed, as that class does not exist in v2019.04.

Signed-off-by: Eddie James <eajames@linux.ibm.com>
Signed-off-by: Joel Stanley <joel@jms.id.au>

show more ...