Linux-remoteproc Archive mirror
 help / color / mirror / Atom feed
* [PATCH v10 0/7] Introduction of a remoteproc tee to load signed firmware
@ 2024-10-07 13:16 Arnaud Pouliquen
  2024-10-07 13:16 ` [PATCH v10 1/7] remoteproc: core: Introduce rproc_pa_to_va helper Arnaud Pouliquen
                   ` (6 more replies)
  0 siblings, 7 replies; 12+ messages in thread
From: Arnaud Pouliquen @ 2024-10-07 13:16 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 V9[1]:

- Introduce release_fw remoteproc ops to avoid direct call of
  tee_rproc_release_fw() in remoteproc_core.c:
  - allow to remove link between remoteproc and remoteproc_tee
  - allow to build the remoteproc_tee as a module

[1] https://lore.kernel.org/linux-arm-kernel/ZuMIEp4cVrp1hWa7@p14s/T/

Tested-on: commit 9852d85ec9d4 ("Linux 6.12-rc1")

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: Introduce release_fw optional operation
  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                    |  11 +
 drivers/remoteproc/Makefile                   |   1 +
 drivers/remoteproc/remoteproc_core.c          |  72 ++-
 drivers/remoteproc/remoteproc_tee.c           | 506 ++++++++++++++++++
 drivers/remoteproc/stm32_rproc.c              | 145 +++--
 include/linux/remoteproc.h                    |   8 +
 include/linux/remoteproc_tee.h                | 107 ++++
 8 files changed, 853 insertions(+), 55 deletions(-)
 create mode 100644 drivers/remoteproc/remoteproc_tee.c
 create mode 100644 include/linux/remoteproc_tee.h


base-commit: 9852d85ec9d492ebef56dc5f229416c925758edc
-- 
2.25.1


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

end of thread, other threads:[~2024-10-08 18:28 UTC | newest]

Thread overview: 12+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-10-07 13:16 [PATCH v10 0/7] Introduction of a remoteproc tee to load signed firmware Arnaud Pouliquen
2024-10-07 13:16 ` [PATCH v10 1/7] remoteproc: core: Introduce rproc_pa_to_va helper Arnaud Pouliquen
2024-10-07 13:16 ` [PATCH v10 2/7] remoteproc: Add TEE support Arnaud Pouliquen
2024-10-07 13:16 ` [PATCH v10 3/7] remoteproc: core: Refactor resource table cleanup into rproc_release_fw Arnaud Pouliquen
2024-10-07 13:16 ` [PATCH v10 4/7] remoteproc: Introduce release_fw optional operation Arnaud Pouliquen
2024-10-07 13:16 ` [PATCH v10 5/7] dt-bindings: remoteproc: Add compatibility for TEE support Arnaud Pouliquen
2024-10-07 13:16 ` [PATCH v10 6/7] remoteproc: stm32: Create sub-functions to request shutdown and release Arnaud Pouliquen
2024-10-07 13:16 ` [PATCH v10 7/7] remoteproc: stm32: Add support of an OP-TEE TA to load the firmware Arnaud Pouliquen
2024-10-08  9:55   ` kernel test robot
2024-10-08 11:07   ` kernel test robot
2024-10-08 14:23     ` Mathieu Poirier
2024-10-08 18:27   ` kernel test robot

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 read-only IMAP folder(s) and NNTP newsgroup(s).