summaryrefslogtreecommitdiff
path: root/doc/board
diff options
context:
space:
mode:
authorIlias Apalodimas <ilias.apalodimas@linaro.org>2021-11-09 09:02:21 +0200
committerHeinrich Schuchardt <xypron.glpk@gmx.de>2021-11-10 20:57:54 +0100
commitbe2868f097ee06ee98e71050f18d5d729106978f (patch)
treeaf2878ffd1816e1e2849eaee30cc0f96b6375dda /doc/board
parent1fb868c6b2e112242c71be8de3be0895ba979f3d (diff)
downloadu-boot-be2868f097ee06ee98e71050f18d5d729106978f.tar.gz
u-boot-be2868f097ee06ee98e71050f18d5d729106978f.tar.bz2
u-boot-be2868f097ee06ee98e71050f18d5d729106978f.zip
doc: qemu: Add instructions for swtpm usage
A previous patch added support for an mmio based TPM. Add an example in QEMU on it's usage Reviewed-by: Simon Glass <sjg@chromium.org> Signed-off-by: Ilias Apalodimas <ilias.apalodimas@linaro.org>
Diffstat (limited to 'doc/board')
-rw-r--r--doc/board/emulation/qemu-arm.rst25
1 files changed, 25 insertions, 0 deletions
diff --git a/doc/board/emulation/qemu-arm.rst b/doc/board/emulation/qemu-arm.rst
index 8d7fda10f1..584ef0a7e1 100644
--- a/doc/board/emulation/qemu-arm.rst
+++ b/doc/board/emulation/qemu-arm.rst
@@ -81,6 +81,31 @@ can be enabled with the following command line parameters:
These have been tested in QEMU 2.9.0 but should work in at least 2.5.0 as well.
+Enabling TPMv2 support
+----------------------
+
+To emulate a TPM the swtpm package may be used. It can be built from the
+following repositories:
+
+ https://github.com/stefanberger/swtpm.git
+
+Swtpm provides a socket for the TPM emulation which can be consumed by QEMU.
+
+In a first console invoke swtpm with::
+
+ swtpm socket --tpmstate dir=/tmp/mytpm1 \
+ --ctrl type=unixio,path=/tmp/mytpm1/swtpm-sock --log level=20
+
+In a second console invoke qemu-system-aarch64 with::
+
+ -chardev socket,id=chrtpm,path=/tmp/mytpm1/swtpm-sock \
+ -tpmdev emulator,id=tpm0,chardev=chrtpm \
+ -device tpm-tis-device,tpmdev=tpm0
+
+Enable the TPM on U-Boot's command line with::
+
+ tpm2 startup TPM2_SU_CLEAR
+
Debug UART
----------