Devicetree
 help / color / mirror / Atom feed
* [PATCH RFC 00/10] firmware: riscv: add RPMI TEE service group transport
@ 2026-09-29  3:16 Amirreza Zarrabi
  2026-09-29  3:16 ` [PATCH RFC 01/10] mailbox: add direct synchronous send support Amirreza Zarrabi
                   ` (9 more replies)
  0 siblings, 10 replies; 18+ messages in thread
From: Amirreza Zarrabi @ 2026-09-29  3:16 UTC (permalink / raw)
  To: Jassi Brar, Paul Walmsley, Palmer Dabbelt, Albert Ou,
	Alexandre Ghiti, Rahul Pathak, Anup Patel, Rob Herring,
	Krzysztof Kozlowski, Conor Dooley, Amirreza Zarrabi,
	Jens Wiklander, Sumit Garg
  Cc: linux-arm-msm, linux-kernel, linux-riscv, op-tee, devicetree,
	Amirreza Zarrabi

This RFC series adds the RISC-V RPMI TEE service group transport [1],
which provides RISC-V systems a mechanism for Linux to communicate
with TEE endpoints. Linux and a TEE act as endpoints of the RPMI TEE
service group, while the RPMI framework in machine-mode firmware
mediates communication between them over an SBI MPXY [2] mailbox
channel.

The series is layered as follows:

 - Two mailbox patches add a direct synchronous send mode
   (mbox_send_message_sync()) and its implementation for RPMI MPXY
   channels, needed because RPMI TEE requests must complete
   synchronously in the calling context.

 - The RPMI TEE bus registers one device per discovered TEE endpoint
   and service UUID pair, following the device-per-service model,
   so individual service drivers can bind independently.

 - The RPMI TEE transport core binds to the mailbox channel and
   validates the RPMI and TEE service-group versions before any
   discovery or service traffic is attempted.

 - System-information parsing and discovery walk the firmware-provided
   descriptor tables to find physical TEE endpoints and the services
   they expose, registering a bus device for each.

 - Memory parcel operations (lend, share, reclaim) let a consumer
   driver share memory with a TEE endpoint. Linux creates a parcel and
   the parcel identifier is then used by the consumer's own protocol to
   refer to that memory.

 - Signal buses let a consumer driver exchange asynchronous
   notifications with its TEE endpoint in both directions.

This series only establishes the transport, bus, and discovery layer.
A consumer driver - an OP-TEE backend mapped onto these services,
analogous to drivers/tee/optee/ffa_abi.c — is intended to follow in a
later series once this transport is reviewed.

Feedback on the overall architecture, the bus/device model, and the
memory-parcel and signal-bus abstractions is especially welcome at
this stage in this RFC series.

[1] https://github.com/riscv-non-isa/riscv-rpmi/commits/main/src/srvgrp-tee.adoc
[2] https://github.com/riscv-non-isa/riscv-sbi-doc/releases

Signed-off-by: Amirreza Zarrabi <amirreza.zarrabi@oss.qualcomm.com>
---
Amirreza Zarrabi (10):
      mailbox: add direct synchronous send support
      mailbox: mpxy: add direct synchronous send
      firmware: add RPMI TEE bus support
      dt-bindings: firmware: add RISC-V RPMI TEE transport
      firmware: add RPMI TEE transport core
      firmware: riscv: rpmi-tee: parse system information tables
      firmware: riscv: rpmi-tee: discover TEE services
      firmware: riscv: rpmi-tee: cache TEE capabilities
      firmware: riscv: rpmi-tee: add memory parcel operations
      firmware: riscv: rpmi-tee: add signal bus support

 .../bindings/firmware/riscv,rpmi-tee.yaml          |   35 +
 drivers/firmware/Kconfig                           |    2 +
 drivers/firmware/Makefile                          |    1 +
 drivers/firmware/riscv_rpmi_tee/Kconfig            |    8 +
 drivers/firmware/riscv_rpmi_tee/Makefile           |    8 +
 drivers/firmware/riscv_rpmi_tee/bus.c              |  202 +++
 drivers/firmware/riscv_rpmi_tee/driver.c           | 1816 ++++++++++++++++++++
 drivers/firmware/riscv_rpmi_tee/sysinfo.c          |  385 +++++
 drivers/firmware/riscv_rpmi_tee/sysinfo.h          |  244 +++
 drivers/mailbox/mailbox.c                          |   72 +-
 drivers/mailbox/riscv-sbi-mpxy-mbox.c              |  196 ++-
 include/linux/mailbox/riscv-rpmi-message.h         |   13 +
 include/linux/mailbox_client.h                     |    3 +
 include/linux/mailbox_controller.h                 |   10 +
 include/linux/rpmi_tee.h                           |  175 ++
 15 files changed, 3098 insertions(+), 72 deletions(-)
---
base-commit: 6375e61c01e93e35ee7acd336a689ac1fae4b509
change-id: 20260928-riscv-rpmi-tee-abi-603e9a3b4399

Best regards,
-- 
Amirreza Zarrabi <amirreza.zarrabi@oss.qualcomm.com>


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

end of thread, other threads:[~2026-09-29  3:31 UTC | newest]

Thread overview: 18+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-09-29  3:16 [PATCH RFC 00/10] firmware: riscv: add RPMI TEE service group transport Amirreza Zarrabi
2026-09-29  3:16 ` [PATCH RFC 01/10] mailbox: add direct synchronous send support Amirreza Zarrabi
2026-09-29  3:31   ` sashiko-bot
2026-09-29  3:16 ` [PATCH RFC 02/10] mailbox: mpxy: add direct synchronous send Amirreza Zarrabi
2026-09-29  3:31   ` sashiko-bot
2026-09-29  3:16 ` [PATCH RFC 03/10] firmware: add RPMI TEE bus support Amirreza Zarrabi
2026-09-29  3:29   ` sashiko-bot
2026-09-29  3:16 ` [PATCH RFC 04/10] dt-bindings: firmware: add RISC-V RPMI TEE transport Amirreza Zarrabi
2026-09-29  3:16 ` [PATCH RFC 05/10] firmware: add RPMI TEE transport core Amirreza Zarrabi
2026-09-29  3:16 ` [PATCH RFC 06/10] firmware: riscv: rpmi-tee: parse system information tables Amirreza Zarrabi
2026-09-29  3:26   ` sashiko-bot
2026-09-29  3:16 ` [PATCH RFC 07/10] firmware: riscv: rpmi-tee: discover TEE services Amirreza Zarrabi
2026-09-29  3:26   ` sashiko-bot
2026-09-29  3:16 ` [PATCH RFC 08/10] firmware: riscv: rpmi-tee: cache TEE capabilities Amirreza Zarrabi
2026-09-29  3:17 ` [PATCH RFC 09/10] firmware: riscv: rpmi-tee: add memory parcel operations Amirreza Zarrabi
2026-09-29  3:29   ` sashiko-bot
2026-09-29  3:17 ` [PATCH RFC 10/10] firmware: riscv: rpmi-tee: add signal bus support Amirreza Zarrabi
2026-09-29  3:29   ` sashiko-bot

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