fix(hftest): MP tests and S-EL0 partition

Introducing an S-EL0 partition into the 'ffa_secure_partitions' test has
broken the tests that run a MP setup.
Added function to fetch the information of the FF-A partitions in the
system. Using the UUID to determine the target of a test command, thus
helping to make an S-EL1 partition and an S-EL0 partition
interchangeable. Another S-EL1 partition was made the first to boot,
given it is an MP partition.
Power management tests validate that all SPs are running as expected.

Change-Id: If36378d93be4593bbfd1bedb7473c713e6426473
Signed-off-by: J-Alves <joao.alves@arm.com>
diff --git a/test/vmapi/common/ffa.c b/test/vmapi/common/ffa.c
index 62f5d51..8d48bad 100644
--- a/test/vmapi/common/ffa.c
+++ b/test/vmapi/common/ffa.c
@@ -8,6 +8,7 @@
 
 #include "hf/ffa.h"
 
+#include "hf/check.h"
 #include "hf/mm.h"
 #include "hf/static_assert.h"
 
@@ -326,3 +327,34 @@
 
 	return sender;
 }
+
+ffa_vm_count_t get_ffa_partition_info(struct ffa_uuid *uuid,
+				      struct ffa_partition_info *info,
+				      size_t info_size)
+{
+	struct ffa_value ret;
+	struct ffa_partition_info *ret_info = set_up_mailbox().recv;
+
+	CHECK(uuid != NULL);
+	CHECK(info != NULL);
+
+	ffa_version(MAKE_FFA_VERSION(1, 1));
+
+	ret = ffa_partition_info_get(uuid, 0);
+
+	if (ffa_func_id(ret) != FFA_SUCCESS_32) {
+		return 0;
+	}
+
+	if (ret.arg2 != 0) {
+		size_t src_size = ret.arg2 * sizeof(struct ffa_partition_info);
+		size_t dest_size =
+			info_size * sizeof(struct ffa_partition_info);
+
+		memcpy_s(info, dest_size, ret_info, src_size);
+	}
+
+	ffa_rx_release();
+
+	return ret.arg2;
+}