Hello TsungHo Wu,
I'd like you to do a code review. Please visit
https://review.coreboot.org/c/coreboot/+/33301
to review the following change.
Change subject: drivers/pc80/tpm: add support for TPM emulator SwTPM 2.0 module ......................................................................
drivers/pc80/tpm: add support for TPM emulator SwTPM 2.0 module
Add software TPM 2.0 emulator to tpm 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/ .
Change-Id: I960fb64cf95a30f43b3455116a673e219f491611 Signed-off-by: Tsung Ho Wu tsungho.wu@gmail.com --- M src/drivers/pc80/tpm/tis.c 1 file changed, 8 insertions(+), 0 deletions(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/01/33301/1
diff --git a/src/drivers/pc80/tpm/tis.c b/src/drivers/pc80/tpm/tis.c old mode 100644 new mode 100755 index e10332b..a274cd4 --- a/src/drivers/pc80/tpm/tis.c +++ b/src/drivers/pc80/tpm/tis.c @@ -146,10 +146,18 @@ {0xffff} };
+static const struct device_name swtpm_devices[] = { +#if CONFIG(TPM2) + {0x0001, "SwTPM 2.0" }, +#endif + {0xffff} +}; + static const struct vendor_name vendor_names[] = { {0x1114, "Atmel", atmel_devices}, {0x15d1, "Infineon", infineon_devices}, {0x1050, "Nuvoton", nuvoton_devices}, + {0x1014, "TPM Emulator", swtpm_devices}, {0x104a, "ST Microelectronics", stmicro_devices}, };
build bot (Jenkins) has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/33301 )
Change subject: drivers/pc80/tpm: add support for TPM emulator SwTPM 2.0 module ......................................................................
Patch Set 1:
(3 comments)
https://review.coreboot.org/#/c/33301/1/src/drivers/pc80/tpm/tis.c File src/drivers/pc80/tpm/tis.c:
https://review.coreboot.org/#/c/33301/1/src/drivers/pc80/tpm/tis.c@151 PS1, Line 151: {0x0001, "SwTPM 2.0" }, please, no spaces at the start of a line
https://review.coreboot.org/#/c/33301/1/src/drivers/pc80/tpm/tis.c@153 PS1, Line 153: {0xffff} please, no spaces at the start of a line
https://review.coreboot.org/#/c/33301/1/src/drivers/pc80/tpm/tis.c@160 PS1, Line 160: {0x1014, "TPM Emulator", swtpm_devices}, please, no spaces at the start of a line
Peter Tsung Ho Wu has abandoned this change. ( https://review.coreboot.org/c/coreboot/+/33301 )
Change subject: drivers/pc80/tpm: add support for TPM emulator SwTPM 2.0 module ......................................................................
Abandoned
Accidentally changed the permission of the file.