[PATCH v6 0/3] MPXY interdomain bridge driver

Pawandeep Oza pawandeep.oza at oss.qualcomm.com
Mon Oct 26 09:14:45 PDT 2026


From: Oza Pawandeep <pawandeep.oza at oss.qualcomm.com>

This series introduces two new capabilities to OpenSBI:

  1. A domain registration notifier mechanism
  2. RPMI REQUEST_FORWARD Service Group definations
  3. An FDT-configured MPXY bridge driver for inter-domain message passing

--- Motivation ---

Modern SBI deployments increasingly require cooperation between multiple
domains sharing the same physical hart — for example a trusted bare-metal
domain and an untrusted domain running on a single
core. While OpenSBI's domain context switching infrastructure provides the
mechanism for hart multiplexing between domains, there was no existing
facility for domains to exchange messages across domain boundaries.

This series addresses that gap by implementing a bridge over the MPXY
(Message Proxy) extension that uses domain context switching as its
transport.

the series also adds source driver where various protocols over RPMI can
exist. e.g. management mode or tee mode drivers.

the DT bindings are as following. which defines both multiple sources
and single destination.

bridge0: untrusted-to-trusted-bridge {
                compatible = "opensbi,rpmi-mpxy-reqfwd-bridge";
                riscv,domain = <&tdomain>;
                riscv,sbi-mpxy-channel-id = <0x2>;
                source0 {
                    compatible =
                        "opensbi,rpmi-mpxy-reqfwd-mm";
                    riscv,domain = <&udomain>;
                    riscv,sbi-mpxy-channel-id = <0x1>;
                };

                source1 {
                    compatible =
                        "opensbi,rpmi-mpxy-reqfwd-tee";
                    riscv,domain = <&udomain>;
                    riscv,sbi-mpxy-channel-id = <0x3>;
                };
            };

--- Testing ---

The series was tested on QEMU SiFive Unleashed (sifive_u) with the
above device tree configuration. The test setup consists of:

  - hart1 shared between trusted-domain and untrusted-domain
  - trusted-domain: bare-metal application loaded at 0x80100000
    booting in S-mode via the domain's next-addr
  - untrusted-domain: Linux kernel with a kernel thread sending
    periodic MPXY messages via FID#5 (SEND_MSG_WITH_RESPONSE)
    and FID#6 (SEND_MSG_NO_RESPONSE) on MPXY channel 0x1
  - A separate bare-metal telnet console application polling
    MPXY channel 0x2 using REQFWD_RETRIEVE_CURRENT_MESSAGE
    and REQFWD_COMPLETE_CURRENT_MESSAGE

The Linux kernel thread sends a test payload ("MPXY-HELLO seq=N") every
30 seconds alternating between FID#5 (expecting a response) and FID#6
(fire-and-forget). The bare-metal application retrieves the forwarded
message via the REQFWD service group and echoes it back as the
COMPLETE response. The Linux driver verifies receipt of the echoed
response.

Both FID#5 and FID#6 paths were exercised and verified end-to-end
across the domain boundary on a single shared hart without requiring
any dedicated inter-processor communication hardware.

Changes since v1:
deconfig selects CONFIG_FDT_MPXY_BRIDGE

Changes since v2:
supports multiple source domain towards single destination. (many:one)

Changes since v4:
cosmetic changes, and some modular changes

Changes since v5:
added concept of source driver

Changes since v6:
cover letter changes only

Oza Pawandeep (3):
  sbi_utils: mailbox: add RPMI REQUEST_FORWARD service group definitions
  sbi_utils: mpxy: add FDT-based MPXY bridge driver
  mpxy: Add MM source driver

 include/sbi_utils/mailbox/rpmi_msgprot.h |   21 +
 include/sbi_utils/mpxy/fdt_mpxy_bridge.h |   61 ++
 lib/utils/mpxy/Kconfig                   |    4 +
 lib/utils/mpxy/fdt_mpxy_bridge.c         | 1003 ++++++++++++++++++++++
 lib/utils/mpxy/mpxy_source_mm.c          |  208 +++++
 lib/utils/mpxy/objects.mk                |    3 +
 platform/generic/configs/defconfig       |    2 +
 7 files changed, 1302 insertions(+)
 create mode 100644 include/sbi_utils/mpxy/fdt_mpxy_bridge.h
 create mode 100644 lib/utils/mpxy/fdt_mpxy_bridge.c
 create mode 100644 lib/utils/mpxy/mpxy_source_mm.c

-- 
2.43.0




More information about the opensbi mailing list