refactor(ff-a): partition info test functions

Move common ffa_partition_info_get functions to the spm_common.
Secure test target now supports both sending and receiving direct
messages.
Changes in SP manifests to align with a new messaging method
representation in partition manifests.

Signed-off-by: Max Shvetsov <maksims.svecovs@arm.com>
Change-Id: I9f6f24d6b800283a07e84a2a27708c0313b68fdc
diff --git a/include/runtime_services/ffa_endpoints.h b/include/runtime_services/ffa_endpoints.h
index 7a6cd4f..06b5abc 100644
--- a/include/runtime_services/ffa_endpoints.h
+++ b/include/runtime_services/ffa_endpoints.h
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2020, Arm Limited. All rights reserved.
+ * Copyright (c) 2020-2021, Arm Limited. All rights reserved.
  *
  * SPDX-License-Identifier: BSD-3-Clause
  */
@@ -7,11 +7,19 @@
 #ifndef FFA_ENDPOINTS_H
 #define FFA_ENDPOINTS_H
 
+#include <platform_def.h>
+
 /* UUID of cactus SPs as defined in the respective manifests. */
 #define PRIMARY_UUID {0xb4b5671e, 0x4a904fe1, 0xb81ffb13, 0xdae1dacb}
 #define SECONDARY_UUID {0xd1582309, 0xf02347b9, 0x827c4464, 0xf5578fc8}
 #define TERTIARY_UUID {0x79b55c73, 0x1d8c44b9, 0x859361e1, 0x770ad8d2}
 
+/* vcpu_count of cactus SPs. */
+#define PRIMARY_EXEC_CTX_COUNT		PLATFORM_CORE_COUNT
+#define SECONDARY_EXEC_CTX_COUNT	PLATFORM_CORE_COUNT
+#define TERTIARY_EXEC_CTX_COUNT		(1)
+#define IVY_EXEC_CTX_COUNT		(1)
+
 /* UUID of OPTEE SP as defined in the respective manifest. */
 #define OPTEE_UUID {0x486178e0, 0xe7f811e3, 0xbc5e0002, 0xa5d5c51b}
 
diff --git a/include/runtime_services/ffa_helpers.h b/include/runtime_services/ffa_helpers.h
index 3ca9c82..a17f115 100644
--- a/include/runtime_services/ffa_helpers.h
+++ b/include/runtime_services/ffa_helpers.h
@@ -29,6 +29,15 @@
 
 #include <stdint.h>
 
+/** Partition property: partition supports receipt of direct requests. */
+#define FFA_PARTITION_DIRECT_REQ_RECV 0x1
+
+/** Partition property: partition can send direct requests. */
+#define FFA_PARTITION_DIRECT_REQ_SEND 0x2
+
+/** Partition property: partition can send and receive indirect messages. */
+#define FFA_PARTITION_INDIRECT_MSG 0x4
+
 struct ffa_partition_info {
 	/** The ID of the VM the information is about */
 	ffa_id_t id;
@@ -402,7 +411,7 @@
 smc_ret_values ffa_msg_wait(void);
 smc_ret_values ffa_error(int32_t error_code);
 smc_ret_values ffa_features(uint32_t feature);
-smc_ret_values ffa_partition_info_get(const uint32_t uuid[4]);
+smc_ret_values ffa_partition_info_get(const struct ffa_uuid uuid);
 smc_ret_values ffa_rx_release(void);
 smc_ret_values ffa_rxtx_map(uintptr_t send, uintptr_t recv, uint32_t pages);
 smc_ret_values ffa_mem_donate(uint32_t descriptor_length,
diff --git a/include/runtime_services/spm_common.h b/include/runtime_services/spm_common.h
index 5ccf395..ffe666f 100644
--- a/include/runtime_services/spm_common.h
+++ b/include/runtime_services/spm_common.h
@@ -137,4 +137,9 @@
 	const struct ffa_memory_region_constituent* constituents,
 	uint32_t constituents_count, uint32_t mem_func);
 
+bool ffa_partition_info_helper(struct mailbox_buffers *mb,
+			const struct ffa_uuid uuid,
+			const struct ffa_partition_info *expected,
+			const uint16_t expected_size);
+
 #endif /* SPM_COMMON_H */