summaryrefslogtreecommitdiff
path: root/src/drivers/pc80/tpm
diff options
context:
space:
mode:
authorMichał Żygowski <michal.zygowski@3mdeb.com>2020-03-20 15:41:44 +0100
committerMichał Żygowski <michal.zygowski@3mdeb.com>2020-04-07 09:50:22 +0000
commit7b288012230cdcd381d6e406ebbe2cb9f334f635 (patch)
tree2653874d4fceb3fde7485013f1bc42044a0d09df /src/drivers/pc80/tpm
parent2f399b7d5bcfc28a808e61cf203900cfbdacf2b5 (diff)
downloadcoreboot-7b288012230cdcd381d6e406ebbe2cb9f334f635.tar.xz
drivers/pc80/tpm/tis.c: change the _HID and _CID for TPM2 device
According TCG PC Client Platform Firmware Profile Specification Revision 1.04 Chapter 8.1 the TPM device object should have the _CID and _HID values set to MSFT0101 for TPM2. FreeBSD also detects TPM2 device using MSFT0101 _HID and _CID only. TEST=boot FreeBSD 12.1 on PC Engines apu2 and check in dmesg that TPM2.0 is detected Signed-off-by: Michał Żygowski <michal.zygowski@3mdeb.com> Change-Id: I45123f272038e664b834cabd9d8525baca0eb583 Reviewed-on: https://review.coreboot.org/c/coreboot/+/39699 Reviewed-by: Patrick Rudolph <siro@das-labor.org> Reviewed-by: Philipp Deppenwiese <zaolin.daisuki@gmail.com> Reviewed-by: Angel Pons <th3fanbus@gmail.com> Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Diffstat (limited to 'src/drivers/pc80/tpm')
-rw-r--r--src/drivers/pc80/tpm/tis.c15
1 files changed, 10 insertions, 5 deletions
diff --git a/src/drivers/pc80/tpm/tis.c b/src/drivers/pc80/tpm/tis.c
index 98d31c0a82..1081410011 100644
--- a/src/drivers/pc80/tpm/tis.c
+++ b/src/drivers/pc80/tpm/tis.c
@@ -886,11 +886,16 @@ static void lpc_tpm_fill_ssdt(struct device *dev)
acpigen_write_scope(path);
acpigen_write_device(acpi_device_name(dev));
- acpigen_write_name("_HID");
- acpigen_emit_eisaid("PNP0C31");
-
- acpigen_write_name("_CID");
- acpigen_emit_eisaid("PNP0C31");
+ if (CONFIG(TPM2)) {
+ acpigen_write_name_string("_HID", "MSFT0101");
+ acpigen_write_name_string("_CID", "MSFT0101");
+ } else {
+ acpigen_write_name("_HID");
+ acpigen_emit_eisaid("PNP0C31");
+
+ acpigen_write_name("_CID");
+ acpigen_emit_eisaid("PNP0C31");
+ }
acpi_device_write_uid(dev);