fix(realm): make PCIe tests default for testing

This patch moves the PCIe DOE test to the default realm world
testsuite.

Also fixes some build issues and hardens the PCIe functions.

Note that FVP_Base_RevC model needs to have the following
options enabled for the PCIe tests to work :

    -C pci.pcie_rc.ahci0.endpoint.doe_supported=1
    -C pci.pcie_rc.ahci0.endpoint.ide_supported=1


Change-Id: Icfd6b68799b0bacb44299c6a3cf99a3c425f833d
Signed-off-by: Soby Mathew <soby.mathew@arm.com>
diff --git a/tftf/tests/doe_tests/test_doe.c b/tftf/tests/doe_tests/test_doe.c
index 6eb5079..cc852fa 100644
--- a/tftf/tests/doe_tests/test_doe.c
+++ b/tftf/tests/doe_tests/test_doe.c
@@ -10,6 +10,13 @@
 
 #define SKIP_TEST_IF_DOE_NOT_SUPPORTED()					\
 	do {									\
+		/* Test PCIe DOE only for RME */				\
+		if (!get_armv9_2_feat_rme_support()) {				\
+			tftf_testcase_printf("FEAT_RME not supported\n");	\
+			return TEST_RESULT_SKIPPED;				\
+		}								\
+										\
+		pcie_init();							\
 		if (find_doe_device(&bdf, &doe_cap_base) != 0) {		\
 			tftf_testcase_printf("PCIe DOE not supported\n");	\
 			return TEST_RESULT_SKIPPED;				\
@@ -21,8 +28,6 @@
 	uint32_t bdf, doe_cap_base;
 	int ret;
 
-	pcie_init();
-
 	SKIP_TEST_IF_DOE_NOT_SUPPORTED();
 
 	ret = doe_discovery(bdf, doe_cap_base);