Add boot-order property to SP manifests

Capture the boot-order in the SP manifest files for each SP to help
portability. The legacy way to set the boot order is integration
system, packaging method and SPMC implementation specific.

The boot order of SP is dictated by service dependency and relative
boot order of TS SPs should be as follows:
0 - logging
1 - block-storage
1 - se-proxy (corstone1000-opteesp)
2 - se-proxy (default-opteesp or default-sp)
2 - internal-trusted-storage
3 - protected-storage
4 - crypto
5 - attestation
6 - se-proxy
7 - fwu
8 - smm-gateway

Signed-off-by: Gabor Toth <gabor.toth2@arm.com>
Change-Id: I4b93015c68e7261fdc87434a6c7f4ec86965af54
diff --git a/deployments/logging/config/default-opteesp/CMakeLists.txt b/deployments/logging/config/default-opteesp/CMakeLists.txt
index dfe6e1c..7801eba 100644
--- a/deployments/logging/config/default-opteesp/CMakeLists.txt
+++ b/deployments/logging/config/default-opteesp/CMakeLists.txt
@@ -25,6 +25,7 @@
 set(SP_BIN_UUID_CANON "da9dffbd-d590-40ed-975f-19c65a3d52d3")
 set(SP_FFA_UUID_CANON "${TS_RPC_UUID_CANON}")
 set(SP_HEAP_SIZE "32 * 1024" CACHE STRING "SP heap size in bytes")
+set(SP_BOOT_ORDER "0")
 set(TRACE_PREFIX "LOGGING" CACHE STRING "Trace prefix")
 
 target_include_directories(logging PRIVATE
@@ -88,6 +89,7 @@
 	SP_FFA_UUID_CANON ${SP_FFA_UUID_CANON}
 	SP_BIN_UUID_CANON ${SP_BIN_UUID_CANON}
 	SP_UUID_LE ${SP_UUID_LE}
+	SP_BOOT_ORDER ${SP_BOOT_ORDER}
 	SP_NAME "logging"
 	MK_IN ${TS_ROOT}/environments/opteesp/sp.mk.in
 	DTS_IN ${CMAKE_CURRENT_LIST_DIR}/default_logging.dts.in
diff --git a/deployments/logging/config/default-opteesp/default_logging.dts.in b/deployments/logging/config/default-opteesp/default_logging.dts.in
index 8eaf795..ca21f8f 100644
--- a/deployments/logging/config/default-opteesp/default_logging.dts.in
+++ b/deployments/logging/config/default-opteesp/default_logging.dts.in
@@ -15,6 +15,7 @@
 	exception-level = <1>; /* S-EL0 */
 	execution-state = <0>; /* AArch64 */
 	xlat-granule = <0>; /* 4KiB */
+	boot-order = /bits/ 16 <@EXPORT_SP_BOOT_ORDER@>;
 	messaging-method = <3>; /* Direct messaging only */
 	ns-interrupts-action = <2>; /* Non-secure interrupts are signaled */
 	elf-format = <1>;
diff --git a/deployments/logging/config/default-sp/CMakeLists.txt b/deployments/logging/config/default-sp/CMakeLists.txt
index 95da442..e685d73 100644
--- a/deployments/logging/config/default-sp/CMakeLists.txt
+++ b/deployments/logging/config/default-sp/CMakeLists.txt
@@ -29,6 +29,7 @@
 set(SP_FFA_UUID_CANON "${TS_RPC_UUID_CANON}")
 set(SP_HEAP_SIZE "32 * 1024" CACHE STRING "SP heap size in bytes")
 set(SP_STACK_SIZE "64 * 1024" CACHE STRING "Stack size")
+set(SP_BOOT_ORDER "0")
 set(TRACE_PREFIX "LOGGING" CACHE STRING "Trace prefix")
 
 target_include_directories(logging PRIVATE
@@ -99,6 +100,7 @@
 	SP_FFA_UUID_CANON ${SP_FFA_UUID_CANON}
 	SP_BIN_UUID_CANON ${SP_BIN_UUID_CANON}
 	SP_UUID_LE ${SP_UUID_LE}
+	SP_BOOT_ORDER ${SP_BOOT_ORDER}
 	SP_NAME ${SP_NAME}
 	DTS_IN ${CMAKE_CURRENT_LIST_DIR}/default_${SP_NAME}.dts.in
 	DTS_MEM_REGIONS ${SP_BIN_UUID_CANON}_memory_regions.dtsi
diff --git a/deployments/logging/config/default-sp/default_logging.dts.in b/deployments/logging/config/default-sp/default_logging.dts.in
index 165ea2d..1d73164 100644
--- a/deployments/logging/config/default-sp/default_logging.dts.in
+++ b/deployments/logging/config/default-sp/default_logging.dts.in
@@ -15,6 +15,7 @@
 	exception-level = <1>; /* S-EL0 */
 	execution-state = <0>; /* AArch64 */
 	xlat-granule = <0>; /* 4KiB */
+	boot-order = /bits/ 16 <@EXPORT_SP_BOOT_ORDER@>;
 	messaging-method = <3>; /* Direct messaging only */
 	ns-interrupts-action = <2>; /* Non-secure interrupts are signaled */