feat(ff-a): FFA_MSG_SEND2 helper with sender ID
Signed-off-by: J-Alves <joao.alves@arm.com>
Change-Id: Idaf866a342f2127172b46f7a7a44a599723db7cf
diff --git a/include/runtime_services/ffa_helpers.h b/include/runtime_services/ffa_helpers.h
index c34384d..08befd0 100644
--- a/include/runtime_services/ffa_helpers.h
+++ b/include/runtime_services/ffa_helpers.h
@@ -872,6 +872,7 @@
struct ffa_value ffa_rxtx_map(uintptr_t send, uintptr_t recv, uint32_t pages);
struct ffa_value ffa_rxtx_unmap_with_id(uint32_t id);
struct ffa_value ffa_rxtx_unmap(void);
+struct ffa_value ffa_msg_send2_with_id(uint32_t flags, ffa_id_t sender);
struct ffa_value ffa_msg_send2(uint32_t flags);
struct ffa_value ffa_mem_donate(uint32_t descriptor_length,
uint32_t fragment_length);
diff --git a/tftf/tests/runtime_services/secure_service/ffa_helpers.c b/tftf/tests/runtime_services/secure_service/ffa_helpers.c
index 6fe8905..b5bb091 100644
--- a/tftf/tests/runtime_services/secure_service/ffa_helpers.c
+++ b/tftf/tests/runtime_services/secure_service/ffa_helpers.c
@@ -533,11 +533,11 @@
* - DENIED: receiver is not in a state to handle the request or doesn't
* support indirect messages.
*/
-struct ffa_value ffa_msg_send2(uint32_t flags)
+struct ffa_value ffa_msg_send2_with_id(uint32_t flags, ffa_id_t sender)
{
struct ffa_value args = {
.fid = FFA_MSG_SEND2,
- .arg1 = 0,
+ .arg1 = sender << 16,
.arg2 = flags,
.arg3 = FFA_PARAM_MBZ,
.arg4 = FFA_PARAM_MBZ,
@@ -549,6 +549,11 @@
return ffa_service_call(&args);
}
+struct ffa_value ffa_msg_send2(uint32_t flags)
+{
+ return ffa_msg_send2_with_id(flags, 0);
+}
+
/* Donate memory to another partition */
struct ffa_value ffa_mem_donate(uint32_t descriptor_length,
uint32_t fragment_length)