SST: Update CMakeLists.inc and documentation
This patch updates CMakeLists.inc to print out information
about the SST flags selected in cmake execution phase.
It also adds a missing check for SST_ENABLE_PARTIAL_ASSET_RW
and updates the SST integration guide to document
SST_ENABLE_PARTIAL_ASSET_RW flag.
Change-Id: I5dd71d37380da2365daa3c8295c3c4d00cd2c09a
Signed-off-by: Marc Moreno <marc.morenoberengue@arm.com>
diff --git a/CommonConfig.cmake b/CommonConfig.cmake
index 954fce8..0aaf3ff 100755
--- a/CommonConfig.cmake
+++ b/CommonConfig.cmake
@@ -184,6 +184,7 @@
#Default TF-M secure storage flags.
#These flags values can be overwritten by setting them in platform/ext/<TARGET_NAME>.cmake
+#Documentation about these flags can be found in docs/user_guides/services/tfm_sst_integration_guide.md
if (NOT DEFINED ENABLE_SECURE_STORAGE)
set (ENABLE_SECURE_STORAGE ON)
diff --git a/docs/user_guides/services/tfm_sst_integration_guide.md b/docs/user_guides/services/tfm_sst_integration_guide.md
index 774d3df..900323c 100644
--- a/docs/user_guides/services/tfm_sst_integration_guide.md
+++ b/docs/user_guides/services/tfm_sst_integration_guide.md
@@ -399,6 +399,9 @@
not hardware protected against malicious writes. In case the flash is
protected against malicious writes (i.e embedded flash, etc), this validation
can be disabled in order to reduce the validation overhead.
+ - `SST_ENABLE_PARTIAL_ASSET_RW`: this flag allows to enable/disable the
+ partial asset RW manipulation at compile time. The partial asset
+ manipulation is allowed by default.
--------------
diff --git a/secure_fw/services/secure_storage/CMakeLists.inc b/secure_fw/services/secure_storage/CMakeLists.inc
index 735c078..fa443bc 100644
--- a/secure_fw/services/secure_storage/CMakeLists.inc
+++ b/secure_fw/services/secure_storage/CMakeLists.inc
@@ -47,6 +47,10 @@
message(FATAL_ERROR "Incomplete build configuration: SST_VALIDATE_METADATA_FROM_FLASH is undefined. ")
endif()
+ if (NOT DEFINED SST_ENABLE_PARTIAL_ASSET_RW)
+ message(FATAL_ERROR "Incomplete build configuration: SST_ENABLE_PARTIAL_ASSET_RW is undefined. ")
+ endif()
+
set (SECURE_STORAGE_C_SRC
"${SECURE_STORAGE_DIR}/tfm_sst_secure_api.c"
"${SECURE_STORAGE_DIR}/sst_asset_management.c"
@@ -83,6 +87,13 @@
list(APPEND ALL_SRC_C ${SECURE_STORAGE_C_SRC})
unset(SECURE_STORAGE_C_SRC)
+ #Inform the user about SST service features selected based on the SST service cmake flags
+ message("The SST service compile configuration is as follows:")
+ message("- SST_ENCRYPTION: " ${SST_ENCRYPTION})
+ message("- SST_VALIDATE_METADATA_FROM_FLASH: " ${SST_VALIDATE_METADATA_FROM_FLASH})
+ message("- SST_CREATE_FLASH_LAYOUT: " ${SST_CREATE_FLASH_LAYOUT})
+ message("- SST_ENABLE_PARTIAL_ASSET_RW: " ${SST_ENABLE_PARTIAL_ASSET_RW})
+
#Setting include directories
embedded_include_directories(PATH ${TFM_ROOT_DIR} ABSOLUTE)
embedded_include_directories(PATH ${TFM_ROOT_DIR}/interface/include ABSOLUTE)