feat(cactus): ability to send indirect messages
Add cactus test command for it to send indirect message
via FFA_MSG_SEND2 to a designated target FF-A endpoint.
Signed-off-by: J-Alves <joao.alves@arm.com>
Change-Id: If519c19dd0ff86252fdd1d749baa2308bf64b936
diff --git a/include/runtime_services/cactus_test_cmds.h b/include/runtime_services/cactus_test_cmds.h
index 3938c2f..0630753 100644
--- a/include/runtime_services/cactus_test_cmds.h
+++ b/include/runtime_services/cactus_test_cmds.h
@@ -654,4 +654,34 @@
return (uint64_t)ret.arg4;
}
+/**
+ * Request SP to send indirect message to FF-A endpoint.
+ *
+ * Command ID is string: MSGREQ.
+ */
+#define CACTUS_REQ_MSG_SEND_CMD U(0x4d5347524551a)
+
+static inline struct ffa_value cactus_req_ind_msg_send_cmd(
+ ffa_id_t source, ffa_id_t dest, ffa_id_t receiver,
+ ffa_id_t sender, uint32_t flags)
+{
+ return cactus_send_cmd(source, dest, CACTUS_REQ_MSG_SEND_CMD,
+ flags, receiver, sender, 0);
+}
+
+static inline ffa_id_t cactus_msg_send_receiver(struct ffa_value ret)
+{
+ return (ffa_id_t)ret.arg5;
+}
+
+static inline ffa_id_t cactus_msg_send_sender(struct ffa_value ret)
+{
+ return (ffa_id_t)ret.arg6;
+}
+
+static inline uint64_t cactus_msg_send_flags(struct ffa_value ret)
+{
+ return (uint64_t)ret.arg4;
+}
+
#endif