Page MenuHomeFreeBSD

TPM: Add hint check to skip TPM IRQ configuration
ClosedPublic

Authored by amitgu_juniper.net on Aug 20 2025, 3:25 PM.
Tags
None
Referenced Files
Unknown Object (File)
Sun, Oct 12, 1:40 PM
Unknown Object (File)
Sat, Oct 11, 10:40 PM
Unknown Object (File)
Sat, Oct 11, 10:40 PM
Unknown Object (File)
Sat, Oct 11, 10:40 PM
Unknown Object (File)
Sat, Oct 11, 10:40 PM
Unknown Object (File)
Sat, Oct 11, 1:21 PM
Unknown Object (File)
Fri, Oct 3, 9:20 AM
Unknown Object (File)
Thu, Oct 2, 3:50 AM
Subscribers

Details

Summary

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

Test Plan

We tested this change in following manner:

  1. 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