test(tftf): prevent root region access from Realm world

This change adds a TFTF test attempting an access to a memory region
marked Root in the GPT from a Realm world.
rmm catch the GPF and return a proper code error which is used in
TFTF to assert the test result accordingly .

Signed-off-by: Nabil Kahlouche <nabil.kahlouche@arm.com>
Change-Id: I6f4cfdec4777879d75924bb55b9b77182a3dcea6
diff --git a/tftf/tests/misc_tests/test_invalid_access.c b/tftf/tests/misc_tests/test_invalid_access.c
index 8722afa..8b79caf 100644
--- a/tftf/tests/misc_tests/test_invalid_access.c
+++ b/tftf/tests/misc_tests/test_invalid_access.c
@@ -353,6 +353,12 @@
 	return memory_cannot_be_accessed_in_rl(params);
 }
 
+test_result_t rt_memory_cannot_be_accessed_in_rl(void)
+{
+	u_register_t params = (u_register_t)EL3_MEMORY_ACCESS_ADDR;
+	return memory_cannot_be_accessed_in_rl(params);
+}
+
 #else
 
 test_result_t el3_memory_cannot_be_accessed_in_ns(void)
@@ -379,4 +385,10 @@
 	return TEST_RESULT_SKIPPED;
 }
 
+test_result_t rt_memory_cannot_be_accessed_in_rl(void)
+{
+	tftf_testcase_printf("Test not ported to AArch32\n");
+	return TEST_RESULT_SKIPPED;
+}
+
 #endif /* __aarch64__ */
diff --git a/tftf/tests/tests-invalid-access.xml b/tftf/tests/tests-invalid-access.xml
index 7694b05..60d9a2b 100644
--- a/tftf/tests/tests-invalid-access.xml
+++ b/tftf/tests/tests-invalid-access.xml
@@ -18,5 +18,7 @@
                 function="s_memory_cannot_be_accessed_in_rl" />
       <testcase name="Access from a SP to a Root region"
                 function="rt_memory_cannot_be_accessed_in_s" />
+      <testcase name="Access Root memory from Realm world"
+                function="rt_memory_cannot_be_accessed_in_rl" />
   </testsuite>
 </testsuites>