From: Sudeep Holla <sudeep.holla@kernel.org>
To: linux-acpi@vger.kernel.org, linux-arm-kernel@lists.infradead.org
Cc: Sudeep Holla <sudeep.holla@kernel.org>,
Jamie Nguyen <jamien@nvidia.com>,
Lorenzo Pieralisi <lpieralisi@kernel.org>,
Hanjun Guo <guohanjun@huawei.com>,
Catalin Marinas <catalin.marinas@arm.com>,
Will Deacon <will@kernel.org>, Dat Mach <dmach@nvidia.com>
Subject: [PATCH v2 0/3] ACPI: Arm FFH: Add support for OpRegion Offset 2 (FF-A DIRECT_REQ2)
Date: Thu, 12 Nov 2026 11:14:05 +0000 [thread overview]
Message-ID: <20261112-acpi_ffh_ffa-v2-0-575a9dbed22b@kernel.org> (raw)
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@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
next reply other threads:[~2026-11-12 11:14 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-11-12 11:14 Sudeep Holla [this message]
2026-11-12 11:14 ` [PATCH v2 1/3] firmware: arm_ffa: Share FF-A register field definitions Sudeep Holla
2026-11-12 11:14 ` [PATCH v2 2/3] ACPI: FFH: Support FF-A direct request 2 calls Sudeep Holla
2026-11-12 11:14 ` [PATCH v2 3/3] firmware: arm_ffa: Share FF-A version negotiation Sudeep Holla
2026-11-12 16:30 ` Jamie Nguyen
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20261112-acpi_ffh_ffa-v2-0-575a9dbed22b@kernel.org \
--to=sudeep.holla@kernel.org \
--cc=catalin.marinas@arm.com \
--cc=dmach@nvidia.com \
--cc=guohanjun@huawei.com \
--cc=jamien@nvidia.com \
--cc=linux-acpi@vger.kernel.org \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=lpieralisi@kernel.org \
--cc=will@kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox