diff mbox series

doc: qemu: switch swtpm instruction to 'tpm autostart'

Message ID 20230616084253.490380-1-ilias.apalodimas@linaro.org
State Accepted
Commit 5d1fa6b6a64713072eeb001247f2a083806f2c48
Headers show
Series doc: qemu: switch swtpm instruction to 'tpm autostart' | expand

Commit Message

Ilias Apalodimas June 16, 2023, 8:42 a.m. UTC
We don't have a documentation page for our TPM subsystem.  I plan
on sending one in the future,  but in the meantime document the
new 'tpm autostart' command in the QEMU instructions while using
a SWTPM

Signed-off-by: Ilias Apalodimas <ilias.apalodimas@linaro.org>
---
 doc/board/emulation/qemu-arm.rst | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

Simon Glass June 19, 2023, 12:36 p.m. UTC | #1
On Fri, 16 Jun 2023 at 09:43, Ilias Apalodimas
<ilias.apalodimas@linaro.org> wrote:
>
> We don't have a documentation page for our TPM subsystem.  I plan
> on sending one in the future,  but in the meantime document the
> new 'tpm autostart' command in the QEMU instructions while using
> a SWTPM
>
> Signed-off-by: Ilias Apalodimas <ilias.apalodimas@linaro.org>
> ---
>  doc/board/emulation/qemu-arm.rst | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
>

Reviewed-by: Simon Glass <sjg@chromium.org>
Heinrich Schuchardt Sept. 8, 2023, 7:17 p.m. UTC | #2
On 6/16/23 10:42, Ilias Apalodimas wrote:
> We don't have a documentation page for our TPM subsystem.  I plan
> on sending one in the future,  but in the meantime document the
> new 'tpm autostart' command in the QEMU instructions while using
> a SWTPM
>
> Signed-off-by: Ilias Apalodimas <ilias.apalodimas@linaro.org>
> Reviewed-by: Simon Glass <sjg@chromium.org>
> ---
>   doc/board/emulation/qemu-arm.rst | 2 +-
>   1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/doc/board/emulation/qemu-arm.rst b/doc/board/emulation/qemu-arm.rst
> index 16f66388eb1f..30819637723d 100644
> --- a/doc/board/emulation/qemu-arm.rst
> +++ b/doc/board/emulation/qemu-arm.rst
> @@ -113,7 +113,7 @@ In a second console invoke qemu-system-aarch64 with::
>
>   Enable the TPM on U-Boot's command line with::
>
> -    tpm2 startup TPM2_SU_CLEAR
> +    tpm autostart

Do you really intend switch from TPM v2 to the deprecated TPM v1?

I assume you mean "tpm2 autostart".

Best regards

Heinrich

>
>   Debug UART
>   ----------
Ilias Apalodimas Sept. 8, 2023, 8:32 p.m. UTC | #3
Hi Heinrich,

On Fri, 8 Sept 2023 at 22:16, Heinrich Schuchardt <xypron.glpk@gmx.de> wrote:
>
>
>
> On 6/16/23 10:42, Ilias Apalodimas wrote:
> > We don't have a documentation page for our TPM subsystem.  I plan
> > on sending one in the future,  but in the meantime document the
> > new 'tpm autostart' command in the QEMU instructions while using
> > a SWTPM
> >
> > Signed-off-by: Ilias Apalodimas <ilias.apalodimas@linaro.org>
> > Reviewed-by: Simon Glass <sjg@chromium.org>
> > ---
> >   doc/board/emulation/qemu-arm.rst | 2 +-
> >   1 file changed, 1 insertion(+), 1 deletion(-)
> >
> > diff --git a/doc/board/emulation/qemu-arm.rst b/doc/board/emulation/qemu-arm.rst
> > index 16f66388eb1f..30819637723d 100644
> > --- a/doc/board/emulation/qemu-arm.rst
> > +++ b/doc/board/emulation/qemu-arm.rst
> > @@ -113,7 +113,7 @@ In a second console invoke qemu-system-aarch64 with::
> >
> >   Enable the TPM on U-Boot's command line with::
> >
> > -    tpm2 startup TPM2_SU_CLEAR
> > +    tpm autostart
>
> Do you really intend switch from TPM v2 to the deprecated TPM v1?
>
> I assume you mean "tpm2 autostart".

Both tpm v1/v2 commands will call do_tpm(). That function will
properly call a v1 or v2 API depending on the device it discovered. So
the autostart function will work for both variants correctly.

P.S: Looking at commit e663b2ff4ba2("tpm: Add 'tpm autostart' shell
command"), I apparently messed up a c/p and autostart is missing from
the v1 version of the command.  I'll send a patch to fix that

Thanks
/Ilias

>
> Best regards
>
> Heinrich
>
> >
> >   Debug UART
> >   ----------
diff mbox series

Patch

diff --git a/doc/board/emulation/qemu-arm.rst b/doc/board/emulation/qemu-arm.rst
index 16f66388eb1f..30819637723d 100644
--- a/doc/board/emulation/qemu-arm.rst
+++ b/doc/board/emulation/qemu-arm.rst
@@ -113,7 +113,7 @@  In a second console invoke qemu-system-aarch64 with::
 
 Enable the TPM on U-Boot's command line with::
 
-    tpm2 startup TPM2_SU_CLEAR
+    tpm autostart
 
 Debug UART
 ----------