diff options
| author | Kevin Bowling <kbowling@FreeBSD.org> | 2026-09-13 14:57:16 +0000 |
|---|---|---|
| committer | Kevin Bowling <kbowling@FreeBSD.org> | 2026-09-13 19:05:07 +0000 |
| commit | a22eb754c4bb7e3adffdaa9b2c3ddf24eda89a9c (patch) | |
| tree | 1555484261df96712756fa68fd5821439894eb56 /sys/dev/acpica/acpi_spmc.c | |
| parent | a6b40d746b4b727b308f2437b41f8032b921a8e5 (diff) | |
The current interrupt path uses the IRQ resource value directly as the
LPC SIRQ selector in TPM_INT_VECTOR and already restricts it to 1 through
15. This is a driver limitation: a parent interrupt number need not equal
an LPC SIRQ channel, and SPI TPMs can use a separate parallel interrupt.
On the reported system with ACPI IRQ 45, the existing range check runs
after handler registration and returns before disabling firmware interrupt
delivery. This can leave a polling device with a handler on an asserted
source.
Disable and verify interrupt delivery before registering a handler or
starting common TPM services. Preserve the existing range policy, using
polling without registering a handler for routes rejected by that check,
and release their IRQ resources. Keep a failed setup's potentially stale
output cookie out of the device state; the interrupt framework may
already have removed that handler.
Cancel timed-out locality requests in the shared request helper, covering
both interrupt programming and commands. Permit attach after a locality
timeout if the enable register proves delivery is already off, allowing
later command recovery. If delivery remains enabled and cannot be
quiesced, fail attach instead of exposing a device node for possible later
recovery. Report this as a quiesce failure since locality acquisition as
well as register programming can fail.
On detach, publish dying and serialize with commands before quiescing TPM
interrupt delivery. Do this for polling devices too, since firmware may
have re-enabled delivery and resume-time quiescing may have failed. Quiesce
before common release destroys the command lock and before removing any
handler. Report hardware quiesce failure while completing software cleanup.
Reported by: adrian
Reviewed by: adrian, imp
MFC after: 2 weeks
Sponsored by: BBOX.io
Differential Revision: https://reviews.freebsd.org/D59645
Diffstat (limited to 'sys/dev/acpica/acpi_spmc.c')
0 files changed, 0 insertions, 0 deletions
