[tpm2] Re: Installing on FreeBSD?

Tadeusz Struk <tstruk at gmail.com> Mon, 04 Apr 2022 07:42:10 -0700
Newsgroups dev.linux.lists.tpm2
Message-ID <[email protected]>
On 4/4/22 03:50, John Connett wrote:
> I have built a debug kernel and am attempting to debug the tpm module. However, 
> the tpm dtrace probes and symbols are not available until 
> "kldload tpm" has run by which time the ENXIO error has occurred.
> 
> I could pepper the tpm driver code with kernel printf calls but was 
> wondering if there is an eaier way?

There are only two spots where I would suspect it to fail and return ENXIO
from attach. One is on tpmcrb_request_locality():
https://github.com/freebsd/freebsd-src/blob/main/sys/dev/tpm/tpm_crb.c#L171
and the other is AcpiWalkResources():
https://github.com/freebsd/freebsd-src/blob/main/sys/dev/tpm/tpm_crb.c#L203

I would just add some debug printfs there.
Thanks,
Tadeusz