Skip to content

Commit

Permalink
docs: Add support for TPM devices over I2C bus
Browse files Browse the repository at this point in the history
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
  • Loading branch information
ninadpalsule authored and stefanberger committed Apr 20, 2023
1 parent 2d82c32 commit fbd945e
Showing 1 changed file with 21 additions and 0 deletions.
21 changes: 21 additions & 0 deletions docs/specs/tpm.rst
Original file line number Diff line number Diff line change
Expand Up @@ -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
-------------

Expand Down Expand Up @@ -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'.

Expand Down

0 comments on commit fbd945e

Please sign in to comment.