[PATCH v5 00/10] introduce Arm FF-A support

Abdellatif El Khlifi
2022-09-26T14:08:48Z

Moving the changelogs in each commit to the changes section.

No code change in v5.

Changelog of the major changes:
===========================

v5:

* move changelogs in each commit to the changes section

v4: [4]

* add FF-A support README (doc/README.ffa.drv)
* improving error handling by mapping the FF-A errors to standard errors
and logs
* replacing panics with an error log
* align sandbox driver and tests with the new FF-A driver interfaces
and new way of error handling
* use the new FF-A driver interfaces for MM communication
* discover MM partitions at runtime
* copy FF-A driver private data to EFI runtime section at
ExitBootServices()
* moving the FF-A driver work to drivers/firmware/arm-ffa
* improving features discovery in FFA_FEATURES
* add remove/bind functions to the FF-A core device
* improve how the driver behaves when bus discovery is done more than
once
* move clearing x0-x17 registers code into a new macro like done in
the linux kernel
* enable EFI MM communication for the Corstone1000 platform

v3: [3]

* port x0-x17 registers support from linux kernel as defined by
SMCCCv1.2
* align the interfaces of the u-boot FF-A driver with those in the linux
FF-A driver
* remove the FF-A helper layer
* make the u-boot FF-A driver independent from EFI
* provide an optional config that enables copying the driver data to
EFI runtime section at ExitBootServices service
* use 64-bit version of FFA_RXTX_MAP, FFA_MSG_SEND_DIRECT_{REQ, RESP}
* update armffa command with the new driver interfaces

v2 [2]:

* make FF-A bus discoverable using device_{bind, probe} APIs
* remove device tree support

v1 [1]:

* introduce FF-A bus driver with device tree support
* introduce armffa command
* introduce FF-A Sandbox driver
* add FF-A Sandbox test cases
* introduce FF-A MM communication

Cheers,
Abdellatif

[1]: https://lore.kernel.org/all/20220329151659.16894-1-abdellatif.elkhlifi@arm.com/
[2]: https://lore.kernel.org/all/20220415122803.16666-1-abdellatif.elkhlifi@arm.com/
[3]: https://lore.kernel.org/all/20220801172053.20163-1-abdellatif.elkhlifi@arm.com/
[4]: https://lore.kernel.org/all/20220926101723.9965-1-abdellatif.elkhlifi@arm.com/

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: Vishnu Banavath <vishnu.banavath@arm.com>
Cc: Xueliang Zhong <Xueliang.Zhong@arm.com>

Abdellatif El Khlifi (10):
arm64: smccc: add support for SMCCCv1.2 x0-x17 registers
arm64: smccc: clear the Xn registers after SMC calls
lib: uuid: introduce be_uuid_str_to_le_bin function
arm_ffa: introduce Arm FF-A low-level driver
arm_ffa: introduce armffa command
arm_ffa: introduce the FF-A Sandbox driver
arm_ffa: introduce Sandbox test cases for UCLASS_FFA
arm_ffa: introduce armffa command Sandbox test
arm_ffa: introduce FF-A MM communication
arm_ffa: corstone1000: enable EFI MM communication

MAINTAINERS | 11 +
arch/arm/cpu/armv8/cache.S | 19 +
arch/arm/cpu/armv8/cache_v8.c | 6 +-
arch/arm/cpu/armv8/smccc-call.S | 62 +
arch/arm/lib/asm-offsets.c | 14 +
cmd/Kconfig | 10 +
cmd/Makefile | 2 +
cmd/armffa.c | 242 +++
common/board_r.c | 9 +
configs/corstone1000_defconfig | 4 +
configs/sandbox64_defconfig | 2 +
configs/sandbox_defconfig | 2 +
doc/README.ffa.drv | 160 ++
doc/arch/sandbox.rst | 1 +
drivers/Kconfig | 2 +
drivers/Makefile | 1 +
drivers/firmware/arm-ffa/Kconfig | 46 +
drivers/firmware/arm-ffa/Makefile | 8 +
drivers/firmware/arm-ffa/arm-ffa-uclass.c | 16 +
drivers/firmware/arm-ffa/arm_ffa_prv.h | 201 +++
drivers/firmware/arm-ffa/core.c | 1358 +++++++++++++++++
.../arm-ffa/efi_ffa_runtime_data_mgr.c | 94 ++
drivers/firmware/arm-ffa/sandbox.c | 659 ++++++++
.../firmware/arm-ffa/sandbox_arm_ffa_prv.h | 144 ++
include/arm_ffa.h | 127 ++
include/configs/corstone1000.h | 9 +
include/dm/uclass-id.h | 4 +
include/linux/arm-smccc.h | 43 +
include/mm_communication.h | 9 +-
include/sandbox_arm_ffa.h | 91 ++
include/uuid.h | 8 +
lib/efi_loader/Kconfig | 14 +-
lib/efi_loader/efi_boottime.c | 22 +
lib/efi_loader/efi_variable_tee.c | 263 +++-
lib/uuid.c | 64 +
test/cmd/Makefile | 2 +
test/cmd/armffa.c | 40 +
test/dm/Makefile | 2 +
test/dm/ffa.c | 394 +++++
39 files changed, 4156 insertions(+), 9 deletions(-)
create mode 100644 cmd/armffa.c
create mode 100644 doc/README.ffa.drv
create mode 100644 drivers/firmware/arm-ffa/Kconfig
create mode 100644 drivers/firmware/arm-ffa/Makefile
create mode 100644 drivers/firmware/arm-ffa/arm-ffa-uclass.c
create mode 100644 drivers/firmware/arm-ffa/arm_ffa_prv.h
create mode 100644 drivers/firmware/arm-ffa/core.c
create mode 100644 drivers/firmware/arm-ffa/efi_ffa_runtime_data_mgr.c
create mode 100644 drivers/firmware/arm-ffa/sandbox.c
create mode 100644 drivers/firmware/arm-ffa/sandbox_arm_ffa_prv.h
create mode 100644 include/arm_ffa.h
create mode 100644 include/sandbox_arm_ffa.h
create mode 100644 test/cmd/armffa.c
create mode 100644 test/dm/ffa.c

--
2.17.1