[RFC PATCH v1 4/6] mailbox: riscv-rpmi-message: add TEE service group definitions
From: marouene . boubakri
Date: Wed Sep 09 2026 - 21:08:57 EST
From: Marouene Boubakri <marouene.boubakri@xxxxxxxxxxx>
The RPMI specification v2.0, currently in development on the main
branch of the specification repository, adds a TEE service group
(SERVICEGROUP_ID 0x0010) which lets a client in a Rich Execution
Environment invoke services in a Trusted Execution Environment through
the M-mode firmware or hypervisor implementing the group. Its TEE_CALL
service is a synchronous request whose target TEE executes on the hart
of the caller until a response is returned.
Add the service group ID and the service IDs, as defined in the
specification draft, so that TEE drivers can use them together with the
SBI MPXY mailbox driver.
Signed-off-by: Marouene Boubakri <marouene.boubakri@xxxxxxxxxxx>
---
include/linux/mailbox/riscv-rpmi-message.h | 25 ++++++++++++++++++++++
1 file changed, 25 insertions(+)
diff --git a/include/linux/mailbox/riscv-rpmi-message.h b/include/linux/mailbox/riscv-rpmi-message.h
index e135c6564..0530e1ddd 100644
--- a/include/linux/mailbox/riscv-rpmi-message.h
+++ b/include/linux/mailbox/riscv-rpmi-message.h
@@ -93,6 +93,7 @@ static inline int rpmi_to_linux_error(int rpmi_error)
/* RPMI service group IDs */
#define RPMI_SRVGRP_SYSTEM_MSI 0x00002
#define RPMI_SRVGRP_CLOCK 0x00008
+#define RPMI_SRVGRP_TEE 0x00010
/* RPMI clock service IDs */
enum rpmi_clock_service_id {
@@ -119,6 +120,30 @@ enum rpmi_sysmsi_service_id {
RPMI_SYSMSI_SRV_ID_MAX_COUNT
};
+/* RPMI TEE service IDs */
+enum rpmi_tee_service_id {
+ RPMI_TEE_SRV_ENABLE_NOTIFICATION = 0x01,
+ RPMI_TEE_SRV_PROBE_FEATURES = 0x02,
+ RPMI_TEE_SRV_PROBE_SYSTEM = 0x03,
+ RPMI_TEE_SRV_EXIT = 0x04,
+ RPMI_TEE_SRV_SIGNAL_BUS_SETUP = 0x05,
+ RPMI_TEE_SRV_SIGNAL_BUS_TEARDOWN = 0x06,
+ RPMI_TEE_SRV_SIGNAL_RAISE = 0x07,
+ RPMI_TEE_SRV_SIGNAL_RETRIEVE = 0x08,
+ RPMI_TEE_SRV_MEMORY_PARCEL_CREATE = 0x09,
+ RPMI_TEE_SRV_MEMORY_PARCEL_ACCEPT = 0x0a,
+ RPMI_TEE_SRV_MEMORY_PARCEL_RELEASE = 0x0b,
+ RPMI_TEE_SRV_MEMORY_PARCEL_RECLAIM = 0x0c,
+ RPMI_TEE_SRV_MEMORY_SEGMENT_SEND = 0x0d,
+ RPMI_TEE_SRV_MEMORY_SEGMENT_RECEIVE = 0x0e,
+ RPMI_TEE_SRV_REGISTER_FOR_LIFECYCLE_INFO = 0x0f,
+ RPMI_TEE_SRV_ON_START_INFO = 0x10,
+ RPMI_TEE_SRV_ON_SHUTDOWN_INFO = 0x11,
+ RPMI_TEE_SRV_ON_CHANGED_INFO = 0x12,
+ RPMI_TEE_SRV_CALL = 0x13,
+ RPMI_TEE_SRV_ID_MAX_COUNT
+};
+
/* RPMI Linux mailbox attribute IDs */
enum rpmi_mbox_attribute_id {
RPMI_MBOX_ATTR_SPEC_VERSION,
--
2.43.0