Refactor SPs to use the TS RPC UUID as FF-A UUID

Change all SPs to use the same RPC UUID as their FF-A UUID. The SPs will
keep their SP UUID as the name of the binary but the UUID stored in the
SP manifest will be the protocol UUID. This means all clients will
discover TS SPs build with this option with the same UUID.

Signed-off-by: Jelle Sels <jelle.sels@arm.com>
Signed-off-by: Imre Kis <imre.kis@arm.com>
Signed-off-by: Gyorgy Szing <Gyorgy.Szing@arm.com>
Change-Id: I662b6209cd9526b058016a907308a880c1944e7d
diff --git a/deployments/sfs-demo/opteesp/CMakeLists.txt b/deployments/sfs-demo/opteesp/CMakeLists.txt
index 22b624c..b283b79 100644
--- a/deployments/sfs-demo/opteesp/CMakeLists.txt
+++ b/deployments/sfs-demo/opteesp/CMakeLists.txt
@@ -16,7 +16,9 @@
 include(${TS_ROOT}/environments/opteesp/env.cmake)
 project(trusted-services LANGUAGES C ASM)
 add_executable(sfs-demo)
-set(SP_UUID_CANON "01109cf8-e5ca-446f-9b55-f3cdc65110c8")
+set(SP_BIN_UUID_CANON "01109cf8-e5ca-446f-9b55-f3cdc65110c8")
+set(SP_FFA_UUID_CANON "${TS_RPC_UUID_CANON}")
+
 set(SP_HEAP_SIZE "32 * 1024" CACHE STRING "SP heap size in bytes")
 set(TRACE_PREFIX "SFSDEMO" CACHE STRING "Trace prefix")
 
@@ -54,7 +56,8 @@
 
 include(${TS_ROOT}/tools/cmake/common/ExportSp.cmake)
 export_sp(
-	SP_UUID_CANON ${SP_UUID_CANON}
+	SP_FFA_UUID_CANON ${SP_FFA_UUID_CANON}
+	SP_BIN_UUID_CANON ${SP_BIN_UUID_CANON}
 	SP_NAME "sfs-demo"
 	MK_IN ${TS_ROOT}/environments/opteesp/sp.mk.in
 	DTS_IN ${CMAKE_CURRENT_LIST_DIR}/default_sfs-demo.dts.in
diff --git a/deployments/sfs-demo/sp/CMakeLists.txt b/deployments/sfs-demo/sp/CMakeLists.txt
index ba68f5a..897be09 100644
--- a/deployments/sfs-demo/sp/CMakeLists.txt
+++ b/deployments/sfs-demo/sp/CMakeLists.txt
@@ -20,7 +20,8 @@
 add_executable(sfs-demo)
 target_include_directories(sfs-demo PRIVATE "${TOP_LEVEL_INCLUDE_DIRS}")
 set(SP_NAME "sfs-demo")
-set(SP_UUID_CANON "01109cf8-e5ca-446f-9b55-f3cdc65110c8")
+set(SP_BIN_UUID_CANON "01109cf8-e5ca-446f-9b55-f3cdc65110c8")
+set(SP_FFA_UUID_CANON "${TS_RPC_UUID_CANON}")
 set(TRACE_PREFIX "SFSDEMO" CACHE STRING "Trace prefix")
 set(SP_STACK_SIZE "64 * 1024" CACHE STRING "Stack size")
 set(SP_HEAP_SIZE "32 * 1024" CACHE STRING "Heap size")
@@ -44,11 +45,11 @@
 
 endif()
 
-compiler_generate_binary_output(TARGET sfs-demo NAME "${SP_UUID_CANON}.bin" SP_BINARY)
-install(FILES ${CMAKE_CURRENT_BINARY_DIR}/${SP_UUID_CANON}.bin DESTINATION ${TS_ENV}/bin)
+compiler_generate_binary_output(TARGET sfs-demo NAME "${SP_BIN_UUID_CANON}.bin" SP_BINARY)
+install(FILES ${CMAKE_CURRENT_BINARY_DIR}/${SP_BIN_UUID_CANON}.bin DESTINATION ${TS_ENV}/bin)
 
 include(${TS_ROOT}/tools/cmake/common/ExportMemoryRegionsToManifest.cmake REQUIRED)
-export_memory_regions_to_manifest(TARGET sfs-demo NAME "${SP_UUID_CANON}_memory_regions.dtsi" RES EXPORT_MEMORY_REGIONS_DTSI)
+export_memory_regions_to_manifest(TARGET sfs-demo NAME "${SP_BIN_UUID_CANON}_memory_regions.dtsi" RES EXPORT_MEMORY_REGIONS_DTSI)
 
 ######################################## install
 if (CMAKE_INSTALL_PREFIX_INITIALIZED_TO_DEFAULT)
@@ -61,9 +62,10 @@
 
 include(${TS_ROOT}/tools/cmake/common/ExportSp.cmake REQUIRED)
 export_sp(
-	SP_UUID_CANON ${SP_UUID_CANON}
+	SP_FFA_UUID_CANON ${SP_FFA_UUID_CANON}
+	SP_BIN_UUID_CANON ${SP_BIN_UUID_CANON}
 	SP_NAME ${SP_NAME}
 	DTS_IN ${CMAKE_CURRENT_LIST_DIR}/default_${SP_NAME}.dts.in
-	DTS_MEM_REGIONS ${SP_UUID_CANON}_memory_regions.dtsi
+	DTS_MEM_REGIONS ${SP_BIN_UUID_CANON}_memory_regions.dtsi
 	JSON_IN ${TS_ROOT}/environments/sp/sp_pkg.json.in
 )