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/attestation/config/default-opteesp/CMakeLists.txt b/deployments/attestation/config/default-opteesp/CMakeLists.txt
index 58ecb34..7e13465 100644
--- a/deployments/attestation/config/default-opteesp/CMakeLists.txt
+++ b/deployments/attestation/config/default-opteesp/CMakeLists.txt
@@ -23,6 +23,7 @@
 set(SP_BIN_UUID_CANON "a1baf155-8876-4695-8f7c-54955e8db974")
 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 "5")
 set(TRACE_PREFIX "ATT" CACHE STRING "Trace prefix")
 
 target_include_directories(attestation PRIVATE
@@ -90,6 +91,7 @@
 export_sp(
 	SP_FFA_UUID_CANON ${SP_FFA_UUID_CANON}
 	SP_BIN_UUID_CANON ${SP_BIN_UUID_CANON}
+	SP_BOOT_ORDER ${SP_BOOT_ORDER}
 	SP_NAME "attestation"
 	MK_IN ${TS_ROOT}/environments/opteesp/sp.mk.in
 	DTS_IN ${CMAKE_CURRENT_LIST_DIR}/default_attestation.dts.in
diff --git a/deployments/attestation/config/default-opteesp/default_attestation.dts.in b/deployments/attestation/config/default-opteesp/default_attestation.dts.in
index 3a2ac76..e310cc6 100644
--- a/deployments/attestation/config/default-opteesp/default_attestation.dts.in
+++ b/deployments/attestation/config/default-opteesp/default_attestation.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>;