From: Stefan Berger <stefanb@linux.ibm.com>
To: qemu-devel@nongnu.org
Cc: peter.maydell@linaro.org, "Ninad Palsule" <ninad@linux.ibm.com>,
"Stefan Berger" <stefanb@linux.ibm.com>,
"Cédric Le Goater" <clg@kaod.org>,
"Joel Stanley" <joel@jms.id.au>
Subject: [PULL 1/7] docs: Add support for TPM devices over I2C bus
Date: Thu, 20 Apr 2023 08:32:41 -0400 [thread overview]
Message-ID: <20230420123247.226312-2-stefanb@linux.ibm.com> (raw)
In-Reply-To: <20230420123247.226312-1-stefanb@linux.ibm.com>
From: Ninad Palsule <ninad@linux.ibm.com>
This is a documentation change for I2C TPM device support.
Qemu already supports devices attached to ISA and sysbus.
This drop adds support for the I2C bus attached TPM devices.
Signed-off-by: Ninad Palsule <ninad@linux.ibm.com>
Reviewed-by: Stefan Berger <stefanb@linux.ibm.com>
Reviewed-by: Cédric Le Goater <clg@kaod.org>
Reviewed-by: Joel Stanley <joel@jms.id.au>
Message-id: 20230414220754.1191476-2-ninadpalsule@us.ibm.com
---
docs/specs/tpm.rst | 21 +++++++++++++++++++++
1 file changed, 21 insertions(+)
diff --git a/docs/specs/tpm.rst b/docs/specs/tpm.rst
index 535912a92b..efe124a148 100644
--- a/docs/specs/tpm.rst
+++ b/docs/specs/tpm.rst
@@ -21,12 +21,16 @@ QEMU files related to TPM TIS interface:
- ``hw/tpm/tpm_tis_common.c``
- ``hw/tpm/tpm_tis_isa.c``
- ``hw/tpm/tpm_tis_sysbus.c``
+ - ``hw/tpm/tpm_tis_i2c.c``
- ``hw/tpm/tpm_tis.h``
Both an ISA device and a sysbus device are available. The former is
used with pc/q35 machine while the latter can be instantiated in the
Arm virt machine.
+An I2C device support is also provided which can be instantiated in the Arm
+based emulation machines. This device only supports the TPM 2 protocol.
+
CRB interface
-------------
@@ -348,6 +352,23 @@ In case an Arm virt machine is emulated, use the following command line:
-drive if=pflash,format=raw,file=flash0.img,readonly=on \
-drive if=pflash,format=raw,file=flash1.img
+In case a ast2600-evb bmc machine is emulated and you want to use a TPM device
+attached to I2C bus, use the following command line:
+
+.. code-block:: console
+
+ qemu-system-arm -M ast2600-evb -nographic \
+ -kernel arch/arm/boot/zImage \
+ -dtb arch/arm/boot/dts/aspeed-ast2600-evb.dtb \
+ -initrd rootfs.cpio \
+ -chardev socket,id=chrtpm,path=/tmp/mytpm1/swtpm-sock \
+ -tpmdev emulator,id=tpm0,chardev=chrtpm \
+ -device tpm-tis-i2c,tpmdev=tpm0,bus=aspeed.i2c.bus.12,address=0x2e
+
+ For testing, use this command to load the driver to the correct address
+
+ echo tpm_tis_i2c 0x2e > /sys/bus/i2c/devices/i2c-12/new_device
+
In case SeaBIOS is used as firmware, it should show the TPM menu item
after entering the menu with 'ESC'.
--
2.39.1
next prev parent reply other threads:[~2023-04-20 12:38 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-04-20 12:32 [PULL 0/7] Merge tpm 2023/04/20 v1 Stefan Berger
2023-04-20 12:32 ` Stefan Berger [this message]
2023-04-20 12:32 ` [PULL 2/7] tpm: Extend common APIs to support TPM TIS I2C Stefan Berger
2023-04-20 12:32 ` [PULL 3/7] tpm: Add support for TPM device over I2C bus Stefan Berger
2023-04-20 12:32 ` [PULL 4/7] tests/avocado/aspeed: Add TPM TIS I2C test Stefan Berger
2023-04-20 12:32 ` [PULL 5/7] qtest: Add functions for accessing devices on Aspeed I2C controller Stefan Berger
2023-04-20 12:32 ` [PULL 6/7] qtest: Move tpm_util_tis_transmit() into tpm-tis-utils.c and rename it Stefan Berger
2023-04-20 12:32 ` [PULL 7/7] qtest: Add a test case for TPM TIS I2C connected to Aspeed I2C controller Stefan Berger
2023-04-22 4:28 ` [PULL 0/7] Merge tpm 2023/04/20 v1 Richard Henderson
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20230420123247.226312-2-stefanb@linux.ibm.com \
--to=stefanb@linux.ibm.com \
--cc=clg@kaod.org \
--cc=joel@jms.id.au \
--cc=ninad@linux.ibm.com \
--cc=peter.maydell@linaro.org \
--cc=qemu-devel@nongnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).