diff options
| author | Kevin Bowling <kbowling@FreeBSD.org> | 2026-08-26 10:33:38 +0000 |
|---|---|---|
| committer | Kevin Bowling <kbowling@FreeBSD.org> | 2026-09-01 18:19:50 +0000 |
| commit | 96ed6005082fc63d633408ba3ad697e8757e80f9 (patch) | |
| tree | 293e1a9c055c6b2b25a002aee159f210681f6707 /source/Target/ThreadPlanPython.cpp | |
| parent | c0356f4cd02255419a4d4309f393998185c8de2d (diff) | |
tpm: Restore TPM 1.2 TIS state after resume
Firmware restores the state saved by TPM_ORD_SaveState, but the TIS
interrupt, locality, and command FIFO state are not guaranteed to
survive S3. The legacy driver previously treated resume as a no-op.
Revalidate the interface and device identity, disable and acknowledge
stale interrupts, restore the configured interrupt vector, reacquire
locality zero, and return the FIFO to command-ready state. Also disable
TIS interrupts during initial setup when the device uses polling so
firmware settings cannot leave an unhandled interrupt enabled.
TIS 1.3 Table 22 makes the interrupt control registers locality
protected. Acquire locality before disabling or programming them during
initial setup and resume rather than relying on probe retaining
locality.
Keep TPM self-test outside the resume critical path. It can take
minutes on some TPM 1.2 devices and is not required to restore the
transport state.
The two-commit suspend and resume series completed two consecutive S3
cycles on a ThinkPad T440p with its STMicro TPM 1.2 Security Chip
enabled. PCR 0 was readable with the same value before and after each
cycle, and no SaveState or TIS restoration errors were logged.
The locality ordering completed another two consecutive S3 cycles on a
ThinkPad T430 with the same STMicro TPM in polling mode. PCR 0 again
remained stable, and TPM access recovered without errors after each
resume.
PR: 291067
Reviewed by: kevans
Sponsored by: BBOX.io
MFC after: 2 weeks
Differential Revision: https://reviews.freebsd.org/D59193
Diffstat (limited to 'source/Target/ThreadPlanPython.cpp')
0 files changed, 0 insertions, 0 deletions
