From 7b288012230cdcd381d6e406ebbe2cb9f334f635 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Micha=C5=82=20=C5=BBygowski?= Date: Fri, 20 Mar 2020 15:41:44 +0100 Subject: drivers/pc80/tpm/tis.c: change the _HID and _CID for TPM2 device MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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 Change-Id: I45123f272038e664b834cabd9d8525baca0eb583 Reviewed-on: https://review.coreboot.org/c/coreboot/+/39699 Reviewed-by: Patrick Rudolph Reviewed-by: Philipp Deppenwiese Reviewed-by: Angel Pons Tested-by: build bot (Jenkins) --- src/drivers/pc80/tpm/tis.c | 15 ++++++++++----- 1 file changed, 10 insertions(+), 5 deletions(-) (limited to 'src/drivers') 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); -- cgit v1.2.3