FF-A: Accessors for arguments from FF-A calls

Defined some accessors for arguments from FF-A calls, namely for
func id, error code, and direct message destination/source.
This should help make consistent how they were being handled,
enforcing also adequate type checking.
Replace the accesses to those FF-A arguments with respective wrapper
calls.

Change-Id: I99d8e77f3b24728c30eafa3e76a830246790ec5f
Signed-off-by: J-Alves <joao.alves@arm.com>
diff --git a/include/runtime_services/ffa_helpers.h b/include/runtime_services/ffa_helpers.h
index caeaa9e..02a956e 100644
--- a/include/runtime_services/ffa_helpers.h
+++ b/include/runtime_services/ffa_helpers.h
@@ -39,6 +39,14 @@
 	uint32_t properties;
 };
 
+static inline uint32_t ffa_func_id(smc_ret_values val) {
+	return (uint32_t) val.ret0;
+}
+
+static inline int32_t ffa_error_code(smc_ret_values val) {
+	return (int32_t) val.ret2;
+}
+
 enum ffa_data_access {
 	FFA_DATA_ACCESS_NOT_SPECIFIED,
 	FFA_DATA_ACCESS_RO,
@@ -366,8 +374,15 @@
 	const struct ffa_memory_region_constituent* constituents,
 	uint32_t constituents_count, uint32_t mem_func);
 
+static inline ffa_vm_id_t ffa_dir_msg_dest(smc_ret_values val) {
+	return (ffa_vm_id_t)val.ret1 & U(0xFFFF);
+}
+
+static inline ffa_vm_id_t ffa_dir_msg_source(smc_ret_values val) {
+	return (ffa_vm_id_t)(val.ret1 >> 16U);
+}
+
 smc_ret_values ffa_msg_send_direct_req(uint32_t source_id, uint32_t dest_id, uint32_t message);
-smc_ret_values ffa_msg_send_direct_req64(uint32_t source_id, uint32_t dest_id, uint64_t message);
 smc_ret_values ffa_msg_send_direct_req64_5args(uint32_t source_id, uint32_t dest_id,
 					   uint64_t arg0, uint64_t arg1,
 					   uint64_t arg2, uint64_t arg3,