Cactus: cmd for mem share tests

Previously there was no cmd id for the mem share tests in
'cactus_test_cmds.h', the func id was being reused. For consistency
added the cmd id 'CACTUS_MEM_SEND_CMD'.

Signed-off-by: J-Alves <joao.alves@arm.com>
Change-Id: Ia2cee00d444d2b753855f2323578df0f9bcf4fb2
diff --git a/spm/cactus/cactus_main.c b/spm/cactus/cactus_main.c
index 3883fac..de1e555 100644
--- a/spm/cactus/cactus_main.c
+++ b/spm/cactus/cactus_main.c
@@ -87,12 +87,10 @@
 		cactus_cmd = CACTUS_GET_CMD(ffa_ret);
 
 		switch (cactus_cmd) {
-		case FFA_MEM_SHARE_SMC32:
-		case FFA_MEM_LEND_SMC32:
-		case FFA_MEM_DONATE_SMC32:
+		case CACTUS_MEM_SEND_CMD:
 			ffa_memory_management_test(
 					mb, vm_id, source,
-					CACTUS_GET_CMD(ffa_ret),
+					CACTUS_MEM_SEND_GET_FUNC(ffa_ret),
 					CACTUS_MEM_SEND_GET_HANDLE(ffa_ret));
 
 			/*
@@ -133,8 +131,8 @@
 			 */
 			expect(handle != FFA_MEMORY_HANDLE_INVALID, true);
 
-			ffa_ret = CACTUS_MEM_SEND_CMD(vm_id, receiver, mem_func,
-						      handle);
+			ffa_ret = CACTUS_MEM_SEND_CMD_SEND(vm_id, receiver,
+							   mem_func, handle);
 
 			if (ffa_ret.ret0 != FFA_MSG_SEND_DIRECT_RESP_SMC32) {
 				ERROR("Failed to send message. error: %lx\n",
diff --git a/spm/cactus/cactus_test_cmds.h b/spm/cactus/cactus_test_cmds.h
index 0a31783..7555b8b 100644
--- a/spm/cactus/cactus_test_cmds.h
+++ b/spm/cactus/cactus_test_cmds.h
@@ -96,11 +96,18 @@
 /**
  * Command to notify cactus of a memory management operation. The cmd value
  * should be the memory management smc function id.
+ *
+ * The id is the hex representation of the string "mem"
  */
-#define CACTUS_MEM_SEND_CMD(source, dest, mem_func, handle) 			\
-		CACTUS_SEND_CMD(source, dest, mem_func, handle, 0, 0, 0)
+#define CACTUS_MEM_SEND_CMD U(0x6d656d)
 
-#define CACTUS_MEM_SEND_GET_HANDLE(smc_ret) smc_ret.ret4
+#define CACTUS_MEM_SEND_CMD_SEND(source, dest, mem_func, handle) 	\
+		CACTUS_SEND_CMD(source, dest, CACTUS_MEM_SEND_CMD, 	\
+				mem_func, handle, 0, 0)
+
+#define CACTUS_MEM_SEND_GET_FUNC(smc_ret) smc_ret.ret4
+
+#define CACTUS_MEM_SEND_GET_HANDLE(smc_ret) smc_ret.ret5
 
 /**
  * Command to request a memory management operation. The 'mem_func' argument
@@ -111,8 +118,8 @@
  */
 #define CACTUS_REQ_MEM_SEND_CMD U(0x6d656d6f7279)
 
-#define CACTUS_REQ_MEM_SEND_SEND_CMD(source, dest, mem_func, receiver)		\
-	CACTUS_SEND_CMD(source, dest, CACTUS_REQ_MEM_SEND_CMD, mem_func,	\
+#define CACTUS_REQ_MEM_SEND_SEND_CMD(source, dest, mem_func, receiver)	\
+	CACTUS_SEND_CMD(source, dest, CACTUS_REQ_MEM_SEND_CMD, mem_func, \
 			receiver, 0, 0)
 
 #define CACTUS_REQ_MEM_SEND_GET_MEM_FUNC(smc_ret) smc_ret.ret4
diff --git a/tftf/tests/runtime_services/secure_service/test_ffa_memory_sharing.c b/tftf/tests/runtime_services/secure_service/test_ffa_memory_sharing.c
index a267b51..61f1aaa 100644
--- a/tftf/tests/runtime_services/secure_service/test_ffa_memory_sharing.c
+++ b/tftf/tests/runtime_services/secure_service/test_ffa_memory_sharing.c
@@ -77,7 +77,7 @@
 
 	ptr = (uint32_t *)constituents[0].address;
 
-	ret = CACTUS_MEM_SEND_CMD(SENDER, RECEIVER, mem_func, handle);
+	ret = CACTUS_MEM_SEND_CMD_SEND(SENDER, RECEIVER, mem_func, handle);
 
 	if (ret.ret0 != FFA_MSG_SEND_DIRECT_RESP_SMC32) {
 		ERROR("Failed to send message. error: %lx\n",