[PATCH 0/8] arm_ffa: Add FFA_MEM_SHARE and FFA_MEM_RECLAIM support

abdellatif.elkhlifi
2024-11-01T14:20:39Z

Add to the FF-A bus FFA_MEM_SHARE and FFA_MEM_RECLAIM ABIs.

These FF-A ABIs are for memory management. They are used for sharing
memory between U-Boot and secure world.

FFA_MEM_SHARE starts a transaction to grant access to a memory region
to one or more Borrowers (aka Secure Partitions or endpoints).
FFA_MEM_RECLAIM restores exclusive access to a memory region back to
its Owner (U-Boot).

For more details about these ABIs please refer to the FF-A v1.0
specification [1]. For more details about FF-A in U-Boot please
refer to the readme [2].

This work is based on the implementation in Linux kernel [3].

This work is provided with sandbox support (emulation and test cases).

[1]: https://developer.arm.com/documentation/den0077/a/?lang=en
[2]: doc/arch/arm64.ffa.rst
[3]: commit cc2195fe536c28e192df5d07e6dd277af36814b4
Files: drivers/firmware/arm_ffa/driver.c , include/linux/arm_ffa.h

Cc: Tom Rini <trini@konsulko.com>
Cc: Simon Glass <sjg@chromium.org>
Cc: Ilias Apalodimas <ilias.apalodimas@linaro.org>
Cc: Jens Wiklander <jens.wiklander@linaro.org>
Cc: Achin Gupta <achin.gupta@arm.com>
Cc: Drew Reed <Drew.Reed@arm.com>
Cc: Hugues Kamba Mpiana <Hugues.KambaMpiana@arm.com>

Cheers,
Abdellatif

Abdellatif El Khlifi (8):
arm_ffa: Add NULL pointer check to the driver operations
arm_ffa: Add FFA_MEM_SHARE support
arm_ffa: Add FFA_MEM_RECLAIM support
arm_ffa: sandbox: Replace the emulator error log with debug log
arm_ffa: sandbox: Add FFA_MEM_SHARE emulation
arm_ffa: sandbox: Add FFA_MEM_SHARE tests
arm_ffa: sandbox: Add FFA_MEM_RECLAIM emulation
arm_ffa: sandbox: Add FFA_MEM_RECLAIM tests

.../include/asm/sandbox_arm_ffa_priv.h | 5 +-
doc/arch/arm64.ffa.rst | 4 +
drivers/firmware/arm-ffa/arm-ffa-uclass.c | 286 +++++++++++++++++-
drivers/firmware/arm-ffa/arm-ffa.c | 4 +-
drivers/firmware/arm-ffa/ffa-emul-uclass.c | 92 +++++-
drivers/firmware/arm-ffa/sandbox_ffa.c | 4 +-
include/arm_ffa.h | 111 ++++++-
include/arm_ffa_priv.h | 143 ++++++++-
test/dm/ffa.c | 73 ++++-
9 files changed, 707 insertions(+), 15 deletions(-)

base-commit: 28dc47038edc4e93f32d75a357131bcf01a18d85
--
2.25.1