diff mbox series

[2/2,v3] efi_loader: use tpm_auto_start for the tpm device

Message ID 20230126081844.591148-2-ilias.apalodimas@linaro.org
State Superseded
Headers show
Series [1/2,v3] tpm: add a function that performs selftest + startup | expand

Commit Message

Ilias Apalodimas Jan. 26, 2023, 8:18 a.m. UTC
A previous commit is adding a new tpm startup functions which
initializes the TPMv2 and performs all the needed selftests.
Since the TPM selftests might be needed depending on the requested
lgorithm or functional module use that instead.

Signed-off-by: Ilias Apalodimas <ilias.apalodimas@linaro.org>
---
No changes since v1

 lib/efi_loader/efi_tcg2.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

--
2.38.1

Comments

Simon Glass Jan. 28, 2023, 10:01 p.m. UTC | #1
On Thu, 26 Jan 2023 at 01:18, Ilias Apalodimas
<ilias.apalodimas@linaro.org> wrote:
>
> A previous commit is adding a new tpm startup functions which
> initializes the TPMv2 and performs all the needed selftests.
> Since the TPM selftests might be needed depending on the requested
> lgorithm or functional module use that instead.

spelling

>
> Signed-off-by: Ilias Apalodimas <ilias.apalodimas@linaro.org>
> ---
> No changes since v1
>
>  lib/efi_loader/efi_tcg2.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)

Reviewed-by: Simon Glass <sjg@chromium.org>


>
> diff --git a/lib/efi_loader/efi_tcg2.c b/lib/efi_loader/efi_tcg2.c
> index 918e9a268641..d035a00d98ac 100644
> --- a/lib/efi_loader/efi_tcg2.c
> +++ b/lib/efi_loader/efi_tcg2.c
> @@ -2422,7 +2422,7 @@ efi_status_t efi_tcg2_register(void)
>         }
>
>         /* initialize the TPM as early as possible. */
> -       err = tpm_startup(dev, TPM_ST_CLEAR);
> +       err = tpm_auto_start(dev);
>         if (err) {
>                 log_err("TPM startup failed\n");
>                 goto fail;
> --
> 2.38.1
>
diff mbox series

Patch

diff --git a/lib/efi_loader/efi_tcg2.c b/lib/efi_loader/efi_tcg2.c
index 918e9a268641..d035a00d98ac 100644
--- a/lib/efi_loader/efi_tcg2.c
+++ b/lib/efi_loader/efi_tcg2.c
@@ -2422,7 +2422,7 @@  efi_status_t efi_tcg2_register(void)
 	}

 	/* initialize the TPM as early as possible. */
-	err = tpm_startup(dev, TPM_ST_CLEAR);
+	err = tpm_auto_start(dev);
 	if (err) {
 		log_err("TPM startup failed\n");
 		goto fail;