Bug 282582 - fix for TPM2.0 CRB driver with acpi start method not being supported
Summary: fix for TPM2.0 CRB driver with acpi start method not being supported
Status: Open
Alias: None
Product: Base System
Classification: Unclassified
Component: kern (show other bugs)
Version: 14.1-STABLE
Hardware: amd64 Any
: --- Affects Many People
Assignee: freebsd-acpi (Nobody)
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2024-11-06 10:19 UTC by Christian Nuber-Bertram
Modified: 2025-11-17 18:43 UTC (History)
4 users (show)

See Also:


Attachments
modified tpm_crb driver (17.85 KB, text/plain)
2024-11-06 10:19 UTC, Christian Nuber-Bertram
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Christian Nuber-Bertram 2024-11-06 10:19:17 UTC
Created attachment 254980 [details]
modified tpm_crb driver

I'm using a system with TPM2.0 and acpi start method (2)

  TPM2: Length=56, Revision=3, Checksum=73,
        OEMID=INSYDE, OEM Table ID=Dibbler, OEM Revision=0x2,
        Creator ID=ACPI, Creator Revision=0x40000
                ControlArea=fea10510
                StartMethod=2

this not yet supported in freebsd.

I've adapted tpm_crb driver to support it. I've tested only on my HW but previous implementation for TPM2_START_METHOD_CRB (7) should still work.
Comment 1 Justin Hibbits freebsd_committer freebsd_triage 2025-05-07 14:27:14 UTC
TPM 2.0 is supported via ACPI for TIS, but CRB might need some work.  I don't have a CRB setup, but can review the driver.  Can you post a diff against main, instead of a full driver?
Comment 2 Lars Herschke 2025-09-15 19:16:59 UTC
StartMethod=2 (TPM2_START_METHOD_ACPI) is not implemented in tpm_tis.c either.
Comment 3 Kyle Evans freebsd_committer freebsd_triage 2025-11-14 20:54:33 UTC
Looking at the Linux driver, what exactly is the difference between start method=2 and start method=8?  Is it just that the ControlArea of the former is mapped outside of the memory region?
Comment 4 Christian Nuber-Bertram 2025-11-17 08:41:11 UTC
it' not only the mapping of the control-area, start method is using different method to activate tpm, only a subset of crb  control registers are used.
you could find all difference if you search in my code where crb_sc->acpi_startmethod is used
Comment 5 Kyle Evans freebsd_committer freebsd_triage 2025-11-17 18:43:05 UTC
(In reply to Christian Nuber-Bertram from comment #4)

Right, searching your code didn't help because we don't currently support startmethod=8 -- I'm trying to understand what the difference is between the startmethods labelled "ACPI Start" and "CRB with ACPI Start" since the Linux driver handles them both nearly identically in their CRB driver, AFAICT.