Skip to content

RFC Arm LFA: Improvements and interrupt support

Vedashree Vidwans linux-arm-kernel linux-coco lkml 1 version In review

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 RFC Latest3 patches 10 repliesIn review

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/3firmware: smccc: LFA: use smcc 1.2drivers/firmware/smccc/lfa_fw.c+56 -242 replies
2/3firmware: smccc: LFA: refactor, add device node supportdrivers/firmware/smccc/lfa_fw.c+262 -378 replies
3/3firmware: smccc: LFA: modify activation approachdrivers/firmware/smccc/lfa_fw.c+66 -80 replies

Reviews trailers per patch

No Reviewed-by, Acked-by or Tested-by trailers for v1 yet.

Read the v1 thread

Cover letter [RFC PATCH 0/3] Arm LFA: Improvements and interrupt support

Hello,

These patches update the proposed Arm Live Firmware Activation (LFA) kernel driver [2] introducing several enhancements and improvements as outlined below:

SMCCC version 1.2 or later;
As per the specification [1], use SMC 1.2 to invoke ABI implemented by the LFA Agent.

Interrupt-Based Enablement Support:
The patch extends the proposed LFA kernel driver to support interrupt-based enablement, as described in the specification [1]. An interrupt thread function will query available firmware details and trigger activation of qualified firmware components. This approach allows the driver to respond more efficiently to hardware events and improves overall firmware management.

Mutex Synchronization:
To prevent concurrent firmware updates by interrupt and sysfs interfaces, mutex synchronization methods have been implemented. This ensures that firmware operations are serialized, maintaining data integrity and preventing race conditions during the update process.

Polling and Timeout Enhancements in PRIME / ACTIVATE Stages:
The patch introduces polling mechanisms and timeout controls during the PRIME / ACTIVATE stages of firmware activation. The driver now periodically polls with a delay to check the status. Additionally, overall timeouts for PRIME / ACTIVATE have been implemented to guarantee that the process completes within expected time limits. The initial timeout values are deliberately set to be generous, and further tuning will be performed after thorough testing.

PRIME / ACTIVATE FW components:
Interrupt-based LFA allows OS to trigger LFA for all activable FW components. Initially, FW components are primed then activated successively. The later patch modifies the PRIME / ACTIVATE stage to prime all activable FW components followed by activation of each FW component. This minimizes the time with combination of old and new FW components co-exist.

Thank you,
Veda

[1] https://developer.arm.com/documentation/den0147/latest/
[2] https://lore.kernel.org/lkml/[email protected]/

Vedashree Vidwans (3):
firmware: smccc: LFA: use smcc 1.2
firmware: smccc: LFA: refactor, add device node support
firmware: smccc: LFA: modify activation approach

 drivers/firmware/smccc/lfa_fw.c | 429 +++++++++++++++++++++++++++-----
 1 file changed, 372 insertions(+), 57 deletions(-)
Signature · 1 line
2.25.1