spm_test: allow configuring mem-region base addr.
Allow platform specific configuration of the base address of the memory
region used to test manifest handling of the SPMC.
The default platform specific value can optionally be overridden from
the command line using -DCFG_TEST_MEM_REGION_ADDRESS=<value>.
Change-Id: I08d0e419e453cdb7944d52395228b4d973f9e31a
Signed-off-by: Gyorgy Szing <gyorgy.szing@arm.com>
diff --git a/components/service/spm_test/spm_test.cmake b/components/service/spm_test/spm_test.cmake
index ed81d5f..b99bf10 100644
--- a/components/service/spm_test/spm_test.cmake
+++ b/components/service/spm_test/spm_test.cmake
@@ -61,6 +61,15 @@
RUNTIME DESTINATION ${TS_ENV}/bin
)
+
+# Convert the base address used for memory region testing for the manifest file. The manifest template will use
+# MEM_REG_LO and MEM_REG_HI.
+# This value is either defined in platform.cmake or on the command line.
+if (NOT DEFINED CFG_TEST_MEM_REGION_ADDRESS)
+ message(FATAL_ERROR "Mandatory variable CFG_TEST_MEM_REGION_ADDRESS is not defined.")
+endif()
+uint64_split(VALUE ${CFG_TEST_MEM_REGION_ADDRESS} OUT_PREFIX MEM_REG)
+
include(${TS_ROOT}/tools/cmake/common/ExportSp.cmake)
export_sp(
SP_FFA_UUID_CANON ${SP_FFA_UUID_CANON}