FF-A: Check FF-A return is a valid direct response

Added a helper function to check if return of FFA_MSG_SEND_DIRECT_REQ
is FFA_MSG_SEND_DIRECT_RESP.
This is intended to make it easier to maintain cactus test commands
framework.

Signed-off-by: J-Alves <joao.alves@arm.com>
Change-Id: Ia43e88908aa3cbdd529a8835bffe43dee3e04a76
diff --git a/include/runtime_services/ffa_helpers.h b/include/runtime_services/ffa_helpers.h
index 2422abb..17587b3 100644
--- a/include/runtime_services/ffa_helpers.h
+++ b/include/runtime_services/ffa_helpers.h
@@ -396,6 +396,12 @@
 						uint64_t arg3,
 						uint64_t arg4);
 
+static inline bool is_ffa_direct_response(smc_ret_values ret)
+{
+	return (ffa_func_id(ret) == FFA_MSG_SEND_DIRECT_RESP_SMC32) ||
+	       (ffa_func_id(ret) == FFA_MSG_SEND_DIRECT_RESP_SMC64);
+}
+
 smc_ret_values ffa_run(uint32_t dest_id, uint32_t vcpu_id);
 smc_ret_values ffa_version(uint32_t input_version);
 smc_ret_values ffa_id_get(void);