U-Boot Archive on lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH v5 00/22] arm64: FF-A runtime transport for EFI variables
@ 2026-09-14 11:00 Harsimran Singh Tungal
  2026-09-14 11:00 ` [PATCH v5 01/22] efi_loader: add runtime memset helper Harsimran Singh Tungal
                   ` (21 more replies)
  0 siblings, 22 replies; 35+ messages in thread
From: Harsimran Singh Tungal @ 2026-09-14 11:00 UTC (permalink / raw)
  To: u-boot
  Cc: Abdellatif El Khlifi, Tom Rini, Ilias Apalodimas,
	Heinrich Schuchardt, Simon Glass, Devaraj Ranganna,
	Harsimran Singh Tungal

Hi all,

This series adds FF-A runtime transport support so EFI variable runtime
services can communicate with the secure world after ExitBootServices().
It also extends tests, documentation, and Corstone-1000 configuration to
validate the runtime path and keep boot-time behavior aligned with the
runtime flow.

Changes in this series:
- Add EFI runtime-safe memset helper and FF-A runtime transport support.
- Add runtime-safe FF-A direct-message handling and ExitBootServices setup.
- Implement FF-A runtime communication in the EFI variable TEE backend.
- Enable EFI runtime SetVariable(), GetVariable(), GetNextVariableName(),
  and QueryVariableInfo() over the FF-A transport.
- Add sandbox FF-A runtime transport tests.
- Extend EFI selftests for runtime variables and enable bootefi selftest
  on Corstone-1000.
- Document the FF-A runtime transport and runtime-variable selftest flow.

Testing:

Tested on Corstone-1000 FVP with the Trusted Services SMM Gateway SP.
The instructions to build and run the Corstone-1000 FVP are available at:

  https://corstone1000.docs.arm.com/en/corstone1000-2026.05/user-guide.html

The SMM Gateway SP provides the MM variable service and exposes the MM
Communicate endpoint over FF-A direct messages.

The EFI runtime variable selftest was run in two phases. The setup phase
creates a non-volatile runtime variable before reset. On the U-Boot
prompt:

  corstone1000# setenv efi_selftest 'variables at runtime setup'
  corstone1000# bootefi selftest

Then reset the Corstone-1000 FVP and run the verify phase. The verify
phase checks that the variable is available after reset, then exercises
the runtime get/set/append/delete paths. On the U-Boot prompt after
reset:

  corstone1000# setenv efi_selftest 'variables at runtime verify'
  corstone1000# bootefi selftest

Both phases completed with Summary: 0 failures.

Changes in v5:

Address Ilias Apalodimas's review comments:
- Limit arm64 cache runtime annotations to CONFIG_ARM_FFA_RT_MODE.
- Include MM_SUCCESS in the MM SP response map.
- Guard FF-A shared-buffer references for OP-TEE-only builds.
- Add Corstone-1000 FVP build and test information to the cover letter.

Link to v4:
https://www.mail-archive.com/u-boot@lists.u-boot-project.org/msg01127.html

Link to v3: 
https://lore.kernel.org/u-boot/20260627144421.2067410-1-harsimransingh.tun...@arm.com/

Link to v2: 
https://lore.kernel.org/u-boot/20260514124924.1804332-1-harsimransingh.tun...@arm.com/

Link to v1: 
https://lore.kernel.org/u-boot/20260424173151.371134-1-harsimransingh.tun...@arm.com/

Harsimran Singh Tungal (22):
  efi_loader: add runtime memset helper
  arm-ffa: store boot-discovered runtime data separately
  arm-ffa: add runtime-safe FF-A SMC wrapper
  arm-ffa: add runtime direct-message support
  arm-ffa: reuse direct-message helper at boot time
  arm-ffa: enable runtime context at ExitBootServices
  arm: cache: keep range maintenance available at EFI runtime
  efi_loader: add MM SP status mapping for FF-A variables
  efi_loader: make MM transport selection runtime-safe
  efi_loader: make FF-A MM SP notification runtime-safe
  efi_loader: make FF-A MM communication runtime-safe
  efi_loader: reserve FF-A shared buffer for runtime variables
  efi_loader: enable TEE runtime SetVariable() over FF-A
  efi_loader: enable TEE runtime GetVariable() over FF-A
  efi_loader: enable TEE runtime GetNextVariableName() over FF-A
  efi_loader: enable TEE runtime QueryVariableInfo() over FF-A
  charset: mark u16_strsize() as __efi_runtime
  corstone1000: enable bootefi selftest
  efi: selftest: add runtime variable tests with non-volatile storage
  test: dm: add sandbox FF-A runtime transport tests
  doc: arm64: document FF-A runtime path for EFI variables
  doc: bootefi: note two-phase runtime variables selftest

 arch/arm/cpu/armv8/cache.S                    |   8 +
 arch/arm/cpu/armv8/cache_v8.c                 |  20 +-
 arch/sandbox/include/asm/sandbox_arm_ffa.h    |  16 +-
 configs/corstone1000_defconfig                |   3 +
 doc/arch/arm64.ffa.rst                        |  88 +-
 doc/usage/cmd/armffa.rst                      |  11 +
 doc/usage/cmd/bootefi.rst                     |  31 +
 drivers/firmware/arm-ffa/Kconfig              |  11 +
 drivers/firmware/arm-ffa/Makefile             |   4 +-
 drivers/firmware/arm-ffa/arm-ffa-runtime.c    | 294 +++++++
 drivers/firmware/arm-ffa/arm-ffa-uclass.c     | 114 +--
 drivers/firmware/arm-ffa/arm-ffa.c            |  16 +-
 drivers/firmware/arm-ffa/ffa-emul-uclass.c    |  49 +-
 include/arm_ffa.h                             |  16 +-
 include/arm_ffa_priv.h                        |  22 +-
 include/arm_ffa_runtime.h                     | 191 +++++
 include/efi_loader.h                          |   3 +
 lib/charset.c                                 |   2 +-
 lib/efi_loader/Kconfig                        |   4 +
 lib/efi_loader/efi_runtime.c                  |  20 +
 lib/efi_loader/efi_variable_tee.c             | 751 +++++++++++++++---
 .../efi_selftest_variables_runtime.c          | 715 +++++++++++------
 test/dm/Makefile                              |   3 +-
 test/dm/ffa.c                                 |   6 +-
 test/dm/ffa_runtime.c                         | 123 +++
 25 files changed, 2023 insertions(+), 498 deletions(-)
 create mode 100644 drivers/firmware/arm-ffa/arm-ffa-runtime.c
 create mode 100644 include/arm_ffa_runtime.h
 create mode 100644 test/dm/ffa_runtime.c

-- 
2.34.1


^ permalink raw reply	[flat|nested] 35+ messages in thread

end of thread, other threads:[~2026-10-09 13:42 UTC | newest]

Thread overview: 35+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-09-14 11:00 [PATCH v5 00/22] arm64: FF-A runtime transport for EFI variables Harsimran Singh Tungal
2026-09-14 11:00 ` [PATCH v5 01/22] efi_loader: add runtime memset helper Harsimran Singh Tungal
2026-09-14 11:00 ` [PATCH v5 02/22] arm-ffa: store boot-discovered runtime data separately Harsimran Singh Tungal
2026-09-14 11:00 ` [PATCH v5 03/22] arm-ffa: add runtime-safe FF-A SMC wrapper Harsimran Singh Tungal
2026-09-14 11:00 ` [PATCH v5 04/22] arm-ffa: add runtime direct-message support Harsimran Singh Tungal
2026-09-14 11:00 ` [PATCH v5 05/22] arm-ffa: reuse direct-message helper at boot time Harsimran Singh Tungal
2026-09-14 11:00 ` [PATCH v5 06/22] arm-ffa: enable runtime context at ExitBootServices Harsimran Singh Tungal
2026-09-14 11:00 ` [PATCH v5 07/22] arm: cache: keep range maintenance available at EFI runtime Harsimran Singh Tungal
2026-09-14 11:00 ` [PATCH v5 08/22] efi_loader: add MM SP status mapping for FF-A variables Harsimran Singh Tungal
2026-09-18 17:19   ` Ilias Apalodimas
2026-09-14 11:00 ` [PATCH v5 09/22] efi_loader: make MM transport selection runtime-safe Harsimran Singh Tungal
2026-09-14 11:00 ` [PATCH v5 10/22] efi_loader: make FF-A MM SP notification runtime-safe Harsimran Singh Tungal
2026-09-14 11:00 ` [PATCH v5 11/22] efi_loader: make FF-A MM communication runtime-safe Harsimran Singh Tungal
2026-09-14 11:00 ` [PATCH v5 12/22] efi_loader: reserve FF-A shared buffer for runtime variables Harsimran Singh Tungal
2026-09-18 18:30   ` Ilias Apalodimas
2026-10-05 11:12     ` Harsimran Singh Tungal
2026-10-05 11:51       ` Ilias Apalodimas
2026-09-14 11:00 ` [PATCH v5 13/22] efi_loader: enable TEE runtime SetVariable() over FF-A Harsimran Singh Tungal
2026-09-18 18:20   ` Ilias Apalodimas
2026-10-05 13:06     ` Harsimran Singh Tungal
2026-10-05 13:15       ` Ilias Apalodimas
2026-10-08 17:32         ` Harsimran Singh Tungal
2026-10-09  8:19           ` Ilias Apalodimas
2026-10-09 11:08             ` Harsimran Singh Tungal
2026-10-09 11:15               ` Ilias Apalodimas
2026-10-09 13:25                 ` Harsimran Singh Tungal
2026-09-14 11:00 ` [PATCH v5 14/22] efi_loader: enable TEE runtime GetVariable() " Harsimran Singh Tungal
2026-09-14 11:00 ` [PATCH v5 15/22] efi_loader: enable TEE runtime GetNextVariableName() " Harsimran Singh Tungal
2026-09-14 11:01 ` [PATCH v5 16/22] efi_loader: enable TEE runtime QueryVariableInfo() " Harsimran Singh Tungal
2026-09-14 11:01 ` [PATCH v5 17/22] charset: mark u16_strsize() as __efi_runtime Harsimran Singh Tungal
2026-09-14 11:01 ` [PATCH v5 18/22] corstone1000: enable bootefi selftest Harsimran Singh Tungal
2026-09-14 11:01 ` [PATCH v5 19/22] efi: selftest: add runtime variable tests with non-volatile storage Harsimran Singh Tungal
2026-09-14 11:01 ` [PATCH v5 20/22] test: dm: add sandbox FF-A runtime transport tests Harsimran Singh Tungal
2026-09-14 11:01 ` [PATCH v5 21/22] doc: arm64: document FF-A runtime path for EFI variables Harsimran Singh Tungal
2026-09-14 11:01 ` [PATCH v5 22/22] doc: bootefi: note two-phase runtime variables selftest Harsimran Singh Tungal

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox