devicetree.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH v9 0/7] Introduction of a remoteproc tee to load signed firmware
@ 2024-08-30  9:51 Arnaud Pouliquen
  2024-08-30  9:51 ` [PATCH v9 1/7] remoteproc: core: Introduce rproc_pa_to_va helper Arnaud Pouliquen
                   ` (6 more replies)
  0 siblings, 7 replies; 25+ messages in thread
From: Arnaud Pouliquen @ 2024-08-30  9:51 UTC (permalink / raw)
  To: Bjorn Andersson, Mathieu Poirier, Jens Wiklander, Rob Herring,
	Krzysztof Kozlowski, Conor Dooley
  Cc: linux-stm32, linux-arm-kernel, linux-remoteproc, linux-kernel,
	op-tee, devicetree, Arnaud Pouliquen

Main updates from version V8[1]:

Add support for tee_rproc_release_fw(), which allows releasing firmware
that has been loaded. This service is used if an error occurs between
the loading of the firmware image and the start of the remote processor.
It is also called on remote processor shutdown.

Associated with this series, an update has been sent to OP-TEE for the
support of the TA_RPROC_CMD_RELEASE_FW TEE command [2].

[1] https://lore.kernel.org/linux-arm-kernel/20240621143759.547793-4-arnaud.pouliquen@foss.st.com/T/
[2]https://github.com/OP-TEE/optee_os/pull/7019

Tested-on: commit 5be63fc19fca ("Linux 6.11-rc5")

Description of the feature:
--------------------------
This series proposes the implementation of a remoteproc tee driver to
communicate with a TEE trusted application responsible for authenticating
and loading the remoteproc firmware image in an Arm secure context.

1) Principle:

The remoteproc tee driver provides services to communicate with the OP-TEE
trusted application running on the Trusted Execution Context (TEE).
The trusted application in TEE manages the remote processor lifecycle:

- authenticating and loading firmware images,
- isolating and securing the remote processor memories,
- supporting multi-firmware (e.g., TF-M + Zephyr on a Cortex-M33),
- managing the start and stop of the firmware by the TEE.

2) Format of the signed image:

Refer to:
https://github.com/OP-TEE/optee_os/blob/master/ta/remoteproc/src/remoteproc_core.c#L18-L57

3) OP-TEE trusted application API:

Refer to:
https://github.com/OP-TEE/optee_os/blob/master/ta/remoteproc/include/ta_remoteproc.h

4) OP-TEE signature script

Refer to:
https://github.com/OP-TEE/optee_os/blob/master/scripts/sign_rproc_fw.py

Example of usage:
sign_rproc_fw.py --in <fw1.elf> --in <fw2.elf> --out <signed_fw.sign> --key ${OP-TEE_PATH}/keys/default.pem


5) Impact on User space Application

No sysfs impact.the user only needs to provide the signed firmware image
instead of the ELF image.


For more information about the implementation, a presentation is available here
(note that the format of the signed image has evolved between the presentation
and the integration in OP-TEE).

https://resources.linaro.org/en/resource/6c5bGvZwUAjX56fvxthxds

Arnaud Pouliquen (7):
  remoteproc: core: Introduce rproc_pa_to_va helper
  remoteproc: Add TEE support
  remoteproc: core: Refactor resource table cleanup into
    rproc_release_fw
  remoteproc: core: Add TEE interface support for firmware release
  dt-bindings: remoteproc: Add compatibility for TEE support
  remoteproc: stm32: Create sub-functions to request shutdown and
    release
  remoteproc: stm32: Add support of an OP-TEE TA to load the firmware

 .../bindings/remoteproc/st,stm32-rproc.yaml   |  58 ++-
 drivers/remoteproc/Kconfig                    |  10 +
 drivers/remoteproc/Makefile                   |   1 +
 drivers/remoteproc/remoteproc_core.c          |  77 ++-
 drivers/remoteproc/remoteproc_tee.c           | 486 ++++++++++++++++++
 drivers/remoteproc/stm32_rproc.c              | 147 ++++--
 include/linux/remoteproc.h                    |   5 +
 include/linux/remoteproc_tee.h                | 109 ++++
 8 files changed, 836 insertions(+), 57 deletions(-)
 create mode 100644 drivers/remoteproc/remoteproc_tee.c
 create mode 100644 include/linux/remoteproc_tee.h


base-commit: 5be63fc19fcaa4c236b307420483578a56986a37
-- 
2.25.1


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

end of thread, other threads:[~2024-09-27 10:03 UTC | newest]

Thread overview: 25+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-08-30  9:51 [PATCH v9 0/7] Introduction of a remoteproc tee to load signed firmware Arnaud Pouliquen
2024-08-30  9:51 ` [PATCH v9 1/7] remoteproc: core: Introduce rproc_pa_to_va helper Arnaud Pouliquen
2024-08-30  9:51 ` [PATCH v9 2/7] remoteproc: Add TEE support Arnaud Pouliquen
2024-09-11 15:17   ` Mathieu Poirier
2024-09-11 15:25   ` Mathieu Poirier
2024-09-13 16:01   ` Mathieu Poirier
2024-08-30  9:51 ` [PATCH v9 3/7] remoteproc: core: Refactor resource table cleanup into rproc_release_fw Arnaud Pouliquen
2024-09-11 15:20   ` Mathieu Poirier
2024-08-30  9:51 ` [PATCH v9 4/7] remoteproc: core: Add TEE interface support for firmware release Arnaud Pouliquen
2024-08-31 16:43   ` kernel test robot
2024-09-02  7:18     ` Arnaud POULIQUEN
2024-09-11 15:56   ` Mathieu Poirier
2024-09-12 15:26   ` Mathieu Poirier
2024-09-17 16:56     ` Arnaud POULIQUEN
2024-09-23 14:53       ` Mathieu Poirier
2024-09-18 14:43   ` Arnaud POULIQUEN
2024-09-23 15:13     ` Mathieu Poirier
2024-09-26  3:51   ` Bjorn Andersson
2024-09-27 10:01     ` Arnaud POULIQUEN
2024-08-30  9:51 ` [PATCH v9 5/7] dt-bindings: remoteproc: Add compatibility for TEE support Arnaud Pouliquen
2024-08-30  9:51 ` [PATCH v9 6/7] remoteproc: stm32: Create sub-functions to request shutdown and release Arnaud Pouliquen
2024-09-12 15:41   ` Mathieu Poirier
2024-08-30  9:51 ` [PATCH v9 7/7] remoteproc: stm32: Add support of an OP-TEE TA to load the firmware Arnaud Pouliquen
2024-09-13 16:03   ` Mathieu Poirier
2024-09-16 14:08     ` Arnaud POULIQUEN

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).