summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--plat/arm/fvp/include/platform_def.h2
-rw-r--r--spm/cactus/cactus_tests/cactus_test_memory_sharing.c5
-rw-r--r--tftf/tests/runtime_services/secure_service/test_ffa_memory_sharing.c20
-rw-r--r--tftf/tests/tests-spm.xml2
4 files changed, 18 insertions, 11 deletions
diff --git a/plat/arm/fvp/include/platform_def.h b/plat/arm/fvp/include/platform_def.h
index 2a12fde..b8871c4 100644
--- a/plat/arm/fvp/include/platform_def.h
+++ b/plat/arm/fvp/include/platform_def.h
@@ -253,7 +253,7 @@
#define MAX_MMAP_REGIONS 50
#else
#if IMAGE_CACTUS
-#define MAX_XLAT_TABLES 8
+#define MAX_XLAT_TABLES 9
#else
#define MAX_XLAT_TABLES 5
#endif
diff --git a/spm/cactus/cactus_tests/cactus_test_memory_sharing.c b/spm/cactus/cactus_tests/cactus_test_memory_sharing.c
index d5e43d8..715433e 100644
--- a/spm/cactus/cactus_tests/cactus_test_memory_sharing.c
+++ b/spm/cactus/cactus_tests/cactus_test_memory_sharing.c
@@ -204,8 +204,11 @@ CACTUS_CMD_HANDLER(req_mem_send_cmd, CACTUS_REQ_MEM_SEND_CMD)
VERBOSE("Sharing at 0x%llx\n", (uint64_t)constituents[0].address);
mem_attrs = MT_RW_DATA;
- if (non_secure)
+
+ if (non_secure) {
mem_attrs |= MT_NS;
+ }
+
ret = mmap_add_dynamic_region(
(uint64_t)constituents[0].address,
(uint64_t)constituents[0].address,
diff --git a/tftf/tests/runtime_services/secure_service/test_ffa_memory_sharing.c b/tftf/tests/runtime_services/secure_service/test_ffa_memory_sharing.c
index b4d58b2..ed2c7fe 100644
--- a/tftf/tests/runtime_services/secure_service/test_ffa_memory_sharing.c
+++ b/tftf/tests/runtime_services/secure_service/test_ffa_memory_sharing.c
@@ -211,17 +211,21 @@ test_result_t test_req_mem_share_sp_to_sp(void)
test_result_t test_req_ns_mem_share_sp_to_sp(void)
{
- /* Added this peprocessor condition because the test fails when RME is
- * enabled, because the model has PA_SIZE=48, but still doesn't have
- * allocated RAM allocatable there nor the itnerconnect support 48bit
- * addresses. */
-#if PA_SIZE == 48
+ /*
+ * Skip the test when RME is enabled (for test setup reasons).
+ * For RME tests, the model specifies 48b physical address size
+ * at the PE, but misses allocating RAM and increasing the PA at
+ * the interconnect level.
+ */
+ if (get_armv9_2_feat_rme_support() != 0U) {
+ return TEST_RESULT_SKIPPED;
+ }
+
+ /* This test requires 48b physical address size capability. */
SKIP_TEST_IF_PA_SIZE_LESS_THAN(48);
+
return test_req_mem_send_sp_to_sp(FFA_MEM_SHARE_SMC32, SP_ID(3),
SP_ID(2), true);
-#else
- return TEST_RESULT_SKIPPED;
-#endif
}
test_result_t test_req_mem_lend_sp_to_sp(void)
diff --git a/tftf/tests/tests-spm.xml b/tftf/tests/tests-spm.xml
index 878bec6..19033b7 100644
--- a/tftf/tests/tests-spm.xml
+++ b/tftf/tests/tests-spm.xml
@@ -90,7 +90,7 @@
function="test_req_mem_lend_sp_to_sp" />
<testcase name="Request Donate Memory SP-to-SP"
function="test_req_mem_donate_sp_to_sp" />
- <testcase name="Request Share NS Memory SP-to-SP"
+ <testcase name="Request Share NS Memory (large PA) SP-to-SP"
function="test_req_ns_mem_share_sp_to_sp" />
<testcase name="Request Share Memory SP-to-VM"
function="test_req_mem_share_sp_to_vm" />