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>
This commit is contained in:
Michał Żygowski 2020-03-20 15:41:44 +01:00
parent 2f399b7d5b
commit 7b28801223
1 changed files with 9 additions and 4 deletions

View File

@ -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");
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");
acpigen_write_name("_CID");
acpigen_emit_eisaid("PNP0C31");
}
acpi_device_write_uid(dev);