Added use_polling hint check in tpm tis driver attach routine
to skip TPM IRQ configuration and to use TPM poll method
to get TPM operation status
Details
We tested this change in following manner:
- Build os-kernel image with this change and load it on the device which has AMD64 based Amston lake CPU and TPM ASIC( compliant with TPM 2.0 specification) is on SPI bus. SPI controller is part of SoC and TPM vendor is Infineon SLB 9672XU2.0.
We did not find any issue while loading TPM driver and it attach successfully with TPM device.
Here is snippet from boot log:
tpmtis0: <Trusted Platform Module 2.0, FIFO mode> iomem 0xfed40000-0xfed44fff irq 78 on acpi0
tpmtis0: Using poll method to get TPM operation status
There is no TPM interrupt line get register in kernel ISR framework with our change as we have hint(hint.tpm.0.use_polling="1") in our platform specific file:
root@:RE:0% vmstat -ia | grep tpm
root@:RE:0%
This change is avoid high tpm interrupt count and to keep cpu cycle free in case there is spurious interrupt due to any bios misconfiguration.
User still can still rely existing TPM driver interrupt mechanism either via not having hint(hint.tpm.0.use_polling=) in their boot environment or set it to "0".
We check cpu utlization as well with this change to confirm polling method is not keeping cpu busy.
Same we change we tested on another device which has same TPM chip but on different AMD64 based SoC(Denverton CPU).
Diff Detail
- Repository
- rG FreeBSD src repository
- Lint
Lint Not Applicable - Unit
Tests Not Applicable
Event Timeline
I think it's OK, but could you upload a context diff with -U999999 so we can see the full context.