Page MenuHomeFreeBSD

Use TPM2 ACPI table to distinguish CRB and TIS.

Authored by takawata on Jan 24 2019, 2:42 AM.



TPM 2.0 device has some different method in same CID MSFT0101.
These method is distinguished by TPM2.0 header per TCG ACPI Specification 2.0.
Accessing actual device in probe is not work for me
and try to attach CRB though my device is TIS.

This patch solve this.

Diff Detail

rS FreeBSD src repository
Automatic diff as part of commit; lint not applicable.
Automatic diff as part of commit; unit tests not applicable.

Event Timeline

takawata created this revision.Jan 24 2019, 2:42 AM
takawata added a reviewer: mw.Jan 24 2019, 2:43 AM
takawata updated this revision to Diff 53145.Jan 24 2019, 8:25 AM

Oops,I have mistake to remove device_set_desc() call.

Looks good to me. By the way could you tell me which TPM chip didn't work with the previous version of probe?

This revision is now accepted and ready to land.Jan 25 2019, 12:08 PM

The dmesg is as follows:
tpmcrb0: <Trusted Platform Module 2.0, CRB mode> iomem 0xfed40000-0xfed44fff on acpi0
device_attach: tpmcrb0 attach returned 6
tpmtis0: <Trusted Platform Module 2.0, FIFO mode> iomem 0xfed40000-0xfed44fff on acpi0

And the device is

tpmtis0 pnpinfo _HID=STM7304 _UID=0 at handle=\_SB_.TPM_
    I/O memory addresses:
This revision was automatically updated to reflect the committed changes.