coreboot/src/drivers
Tsung Ho Wu 804a0433e0 drivers/pc80/tpm: add support for TPM emulator SwTPM 2.0 module
Add software TPM 2.0 emulator to tpm device probe list.
SwTPM: https://github.com/stefanberger/swtpm

Tested on qemu q35 with MAINBOARD_HAS_LPC_TPM and MAINBOARD_HAS_TPM2
set in qemu-q35 Kconfig.
Qemu: see qemu flags at
https://s3hh.wordpress.com/2018/06/03/tpm-2-0-in-qemu/

How to see it work.
Ubuntu 18.04:
1. Install SwTPM from https://github.com/stefanberger/swtpm

2. Add MAINBOARD_HAS_LPC_TPM and MAINBOARD_HAS_TPM2 to
src/mainboard/emulation/qemu-q35/Kconfig and rebuild
coreboot.rom

3. mkdir -p swtpm0

4. swtpm socket --tpmstate dir=swtpm0 --tpm2 --ctrl \
type=unixio,path=swtpm0/swtpm-sock --log level=20 &

5. qemu-system-x86_64 -machine q35 -m 2G \
-chardev socket,id=chrtpm,path=swtpm0/swtpm-sock \
-tpmdev emulator,id=tpm0,chardev=chrtpm -device \
tpm-tis,tpmdev=tpm0 -pflash build/coreboot.rom \
-serial $(tty) -display none

6. Check boot log and search 'Found TPM'.

Change-Id: I5f58d2c117afbd057bb91697912db826db1d67a1
Signed-off-by: Tsung Ho Wu <tsungho.wu@gmail.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/33302
Reviewed-by: Philipp Deppenwiese <zaolin.daisuki@gmail.com>
Reviewed-by: Patrick Rudolph <siro@das-labor.org>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2019-06-27 10:04:17 +00:00
..
amd/agesa drivers: Add missing #include <commonlib/helpers.h> 2019-06-22 11:40:39 +00:00
ams src: Remove unneeded include <console/console.h> 2018-11-16 09:50:29 +00:00
asmedia drivers/asmedia: Add ASPM blacklist 2018-04-27 09:17:52 +00:00
aspeed drivers/aspeed/ast2050: Remove variable set but not used 2019-06-03 13:29:26 +00:00
dec/21143 device/pci: Fix PCI accessor headers 2019-03-01 20:32:15 +00:00
elog Replace ENV_RAMSTAGE with ENV_PAYLOAD_LOADER 2019-06-24 04:33:06 +00:00
emulation/qemu drivers/emulation/qemu_debugcon: Don't use CAR_GLOBAL 2019-05-29 20:05:41 +00:00
generic src/{device,drivers}: Add missing 'include <types.h>' 2019-05-29 20:27:52 +00:00
gic device/mmio.h: Add include file for MMIO ops 2019-03-04 15:57:39 +00:00
i2c drivers/i2c/sx9310: Print I2C SAR device info 2019-06-18 21:15:23 +00:00
intel drivers: Add missing #include <commonlib/helpers.h> 2019-06-22 11:40:39 +00:00
ipmi drivers/ipmi: Add chip ops 2019-06-21 12:53:44 +00:00
lenovo mb/lenovo/t430: Fix Dual Graphics 2019-06-08 11:33:41 +00:00
maxim device/mmio.h: Add include file for MMIO ops 2019-03-04 15:57:39 +00:00
mrc_cache coreboot: Replace all IS_ENABLED(CONFIG_XXX) with CONFIG(XXX) 2019-03-08 08:33:24 +00:00
net src/{device,drivers}: Add missing 'include <types.h>' 2019-05-29 20:27:52 +00:00
parade src: Add missing include <stdint.h> 2018-11-01 11:25:07 +00:00
pc80 drivers/pc80/tpm: add support for TPM emulator SwTPM 2.0 module 2019-06-27 10:04:17 +00:00
ricoh/rce822 arch/io.h: Drop unnecessary include 2019-03-04 15:08:03 +00:00
siemens/nc_fpga src: Use include <delay.h> when appropriate 2019-04-06 16:09:12 +00:00
sil/3114 src: Use include <delay.h> when appropriate 2019-04-06 16:09:12 +00:00
smmstore drivers: Add missing #include <commonlib/helpers.h> 2019-06-22 11:40:39 +00:00
spi spi_flash: Add Dual SPI support 2019-06-10 18:02:33 +00:00
ti src/drivers: Fix typo 2018-08-10 21:25:30 +00:00
tpm coreboot: Replace all IS_ENABLED(CONFIG_XXX) with CONFIG(XXX) 2019-03-08 08:33:24 +00:00
uart Remove unnecessary ENV_RAMSTAGE guard 2019-05-14 06:56:59 +00:00
usb src: Use 'include <string.h>' when appropriate 2019-03-20 20:27:51 +00:00
vpd src/driver/vpd: Update vpd_decode from upstream 2019-06-21 08:41:16 +00:00
xgi src/drivers/xgi: Move coreboot related includes to xgi_coreboot.h 2019-05-29 20:14:04 +00:00
xpowers/axp209 src/{device,drivers}: Add missing 'include <types.h>' 2019-05-29 20:27:52 +00:00