[PATCH v2 0/3] ACPI: Arm FFH: Add support for OpRegion Offset 2 (FF-A DIRECT_REQ2)
Sudeep Holla
sudeep.holla at kernel.org
Thu Nov 12 03:14:05 PST 2026
Hi,
This patch series extends the existing Linux kernel ACPI Functional Fixed
Hardware (FFH) Operation Region support to accommodate FFH Operation Region
Offset 2, as introduced in the Arm Functional Fixed Hardware Specification
v1.3.
Background
----------
The Arm FFH Specification v1.3 adds support for FFH Operation Region Offset 2.
An OpRegion declared with an offset of 2 triggers an FFA_MSG_SEND_DIRECT_REQ2
call instead of using legacy SMC/HVC or standard DIRECT_REQ variants.
This mechanism allows the platform's ACPI firmware to interact directly
with secure partitions by evaluating a service UUID.
Implementation
--------------
- Upgrades the arm64 low-level FFH handler beyond generic SMCCC calls to
natively support the FF-A protocol. It negotiates FF-A v1.2, identifies
sender endpoints via FFA_ID_GET, translates ACPI ToUUID properties to
register formats, handles interrupted/yielded calls via FFA_RUN, and
returns standard FFH status codes to AML.
- Leverages register-based endpoint discovery (FFA_PARTITION_INFO_GET_REGS)
to resolve unique receivers from service UUIDs. This approach completely
avoids RX/TX memory buffer ownership complexities, keeping the low-level
ACPI FFH subsystem cleanly decoupled from the main Arm FF-A transport
driver.
Signed-off-by: Sudeep Holla <sudeep.holla at kernel.org>
---
Changes in v2:
- Share FF-A version negotiation between ACPI FF-A and FF-A driver. I am
keeping it seperate intentionally as I haven't analysed how this would
change and work with FF-A v1.3
- Adopted guard(mutex) framework from <linux/cleanup.h> to manage
acpi_ffh_ffa_lock, ensuring automatic lock release, eliminating
error-exit labels (goto out) and replacing goto jumps with direct
return statements.
- Simplified state tracking by removing the redundant
acpi_ffh_ffa_version_negotiated global tracking flag.
- Introduced acpi_ffh_ffa_partition_info_regs static boolean to
track partition information register support.
- Fixed a raw pointer offset in acpi_ffh_ffa_direct_req2() by switching
the memcpy destination from an address-of-member expression (&args.a4)
to an explicit offsetof(struct arm_smccc_1_2_regs, a4) calculation.
- Link to v1: https://patch.msgid.link/20261103173907.1996118-1-sudeep.holla@kernel.org
---
Sudeep Holla (3):
firmware: arm_ffa: Share FF-A register field definitions
ACPI: FFH: Support FF-A direct request 2 calls
firmware: arm_ffa: Share FF-A version negotiation
drivers/acpi/arm64/ffh.c | 218 +++++++++++++++++++++++++++++++++++++
drivers/firmware/arm_ffa/Kconfig | 5 +
drivers/firmware/arm_ffa/Makefile | 3 +-
drivers/firmware/arm_ffa/driver.c | 79 ++++++--------
drivers/firmware/arm_ffa/version.c | 39 +++++++
include/linux/arm_ffa.h | 31 ++++++
6 files changed, 329 insertions(+), 46 deletions(-)
---
base-commit: 7475ea8b58616b33c04afb976cf0fbaad9dd63fb
change-id: 20261104-acpi_ffh_ffa-14beb61ed905
--
Regards,
Sudeep
More information about the linux-arm-kernel
mailing list