Read CPU IDs from FDT in tests, so they work under FVP.

Bug: 117551008
Change-Id: I14e24e86631f9e7c16ad69decf676b343ac9f252
diff --git a/test/hftest/inc/hftest.h b/test/hftest/inc/hftest.h
index d22cadf..bcffe5c 100644
--- a/test/hftest/inc/hftest.h
+++ b/test/hftest/inc/hftest.h
@@ -90,5 +90,7 @@
  */
 #define HFTEST_LOG_INDENT "    "
 
+uintptr_t hftest_get_cpu_id(size_t index);
+
 /* Above this point is the public API. Now include the implementation. */
 #include <hftest_impl.h>
diff --git a/test/hftest/inc/hftest_common.h b/test/hftest/inc/hftest_common.h
index fa35aab..d141076 100644
--- a/test/hftest/inc/hftest_common.h
+++ b/test/hftest/inc/hftest_common.h
@@ -14,6 +14,7 @@
  * limitations under the License.
  */
 
+#include "hf/fdt.h"
 #include "hf/memiter.h"
 
 #include "hftest_impl.h"
@@ -22,5 +23,6 @@
 void hftest_use_list(struct hftest_test list[], size_t count);
 
 void hftest_json(void);
-void hftest_run(struct memiter suite_name, struct memiter test_name);
+void hftest_run(struct memiter suite_name, struct memiter test_name,
+		const struct fdt_header *fdt);
 void hftest_help(void);
diff --git a/test/hftest/inc/hftest_impl.h b/test/hftest/inc/hftest_impl.h
index 13b49f1..64eeac4 100644
--- a/test/hftest/inc/hftest_impl.h
+++ b/test/hftest/inc/hftest_impl.h
@@ -18,6 +18,7 @@
 
 #include <stdnoreturn.h>
 
+#include "hf/fdt.h"
 #include "hf/spci.h"
 #include "hf/std.h"
 
@@ -133,6 +134,9 @@
 	uint32_t failures;
 	noreturn void (*abort)(void);
 
+	/* These are used in primary VMs. */
+	const struct fdt_header *fdt;
+
 	/* These are used in services. */
 	struct spci_message *send;
 	struct spci_message *recv;