aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJamie Fox <jamie.fox@arm.com>2020-06-12 18:21:25 +0100
committerJamie Fox <jamie.fox@arm.com>2020-06-23 15:22:26 +0100
commitf58bd227e66b399ade789f1a29c263a25e884cd1 (patch)
tree0413389ac2b1394a4bdf6d1f2b971be23445584b
parent48e632b2ec2b94841d28882a06a9d7cc1488b253 (diff)
downloadtrusted-firmware-m-f58bd227e66b399ade789f1a29c263a25e884cd1.tar.gz
Build: Disable RAM FS by default
Changes the common configuration to disable the ITS and PS RAM FS by default, even when running the regression tests. Testing with persistent storage allows for greater coverage of scenarios such as initialisation with existing storage and correct erasing of flash before overwriting. The setting can still be overridden in the platform CMake config, or by providing it on the command line if flash wear is a concern. Change-Id: If950e13d5f89ff164b47ed8d6602cdef5d4d6b5e Signed-off-by: Jamie Fox <jamie.fox@arm.com>
-rw-r--r--CommonConfig.cmake12
-rw-r--r--configs/ConfigRegressionProfileS.cmake2
-rw-r--r--docs/design_documents/tfm_profile_small.rst3
-rw-r--r--docs/reference/services/tfm_its_integration_guide.rst20
-rw-r--r--docs/reference/services/tfm_ps_integration_guide.rst20
-rw-r--r--platform/ext/Mps2AN519.cmake2
-rw-r--r--platform/ext/Mps2AN521.cmake2
-rw-r--r--platform/ext/Mps2AN539.cmake2
-rw-r--r--platform/ext/Mps3AN524.cmake2
-rw-r--r--platform/ext/SSE-200_AWS.cmake2
-rw-r--r--platform/ext/fvp_sse300_mps2.cmake2
11 files changed, 22 insertions, 47 deletions
diff --git a/CommonConfig.cmake b/CommonConfig.cmake
index 62a6dc1d1..e1d8f1ad3 100644
--- a/CommonConfig.cmake
+++ b/CommonConfig.cmake
@@ -456,11 +456,7 @@ if (NOT DEFINED PS_VALIDATE_METADATA_FROM_FLASH)
endif()
if (NOT DEFINED PS_RAM_FS)
- if (REGRESSION)
- set (PS_RAM_FS ON)
- else()
- set (PS_RAM_FS OFF)
- endif()
+ set (PS_RAM_FS OFF)
endif()
if (NOT DEFINED PS_TEST_NV_COUNTERS)
@@ -488,11 +484,7 @@ if (NOT DEFINED ITS_VALIDATE_METADATA_FROM_FLASH)
endif()
if (NOT DEFINED ITS_RAM_FS)
- if (REGRESSION)
- set (ITS_RAM_FS ON)
- else()
- set (ITS_RAM_FS OFF)
- endif()
+ set (ITS_RAM_FS OFF)
endif()
if (NOT DEFINED MBEDCRYPTO_DEBUG)
diff --git a/configs/ConfigRegressionProfileS.cmake b/configs/ConfigRegressionProfileS.cmake
index 824d88613..af90b926e 100644
--- a/configs/ConfigRegressionProfileS.cmake
+++ b/configs/ConfigRegressionProfileS.cmake
@@ -45,8 +45,6 @@ endif()
# Enable Internal Trusted Storage service
set(TFM_PARTITION_INTERNAL_TRUSTED_STORAGE ON)
-# Use the real Flash for Internal Trusted Storage
-set(ITS_RAM_FS OFF)
# Decrease the transient internal buffer size to 32 bytes
set(ITS_BUF_SIZE 32)
diff --git a/docs/design_documents/tfm_profile_small.rst b/docs/design_documents/tfm_profile_small.rst
index 67f677985..051dd3d55 100644
--- a/docs/design_documents/tfm_profile_small.rst
+++ b/docs/design_documents/tfm_profile_small.rst
@@ -410,9 +410,6 @@ The details will be covered in each module in `Implementation details`_.
* - ``TFM_PARTITION_INTERNAL_TRUSTED_STORAGE``
- ``ON``
- Enable ITS SP
- * - ``ITS_RAM_FS``
- - ``OFF``
- - Stop using RAM to simulate Flash
* - ``ITS_BUF_SIZE``
- ``32``
- ITS internal transient buffer size
diff --git a/docs/reference/services/tfm_its_integration_guide.rst b/docs/reference/services/tfm_its_integration_guide.rst
index f6b2dec40..230117edf 100644
--- a/docs/reference/services/tfm_its_integration_guide.rst
+++ b/docs/reference/services/tfm_its_integration_guide.rst
@@ -277,18 +277,18 @@ needs. The list of ITS services flags are:
enable/disable the validation mechanism to check the metadata store in flash
every time the flash data is read from flash. This validation is required
if the flash is not hardware protected against data corruption.
-- ``ITS_RAM_FS``- this flag allows to enable/disable the use of RAM
- instead of the flash to store the FS in internal trusted storage service. This
- flag is set by default in the regression tests, if it is not defined by the
- platform. The ITS regression tests reduce the life of the flash memory
- as they write/erase multiple times in the memory.
+- ``ITS_RAM_FS``- setting this flag to ``ON`` enables the use of RAM instead of
+ the persistent storage device to store the FS in the Internal Trusted Storage
+ service. This flag is ``OFF`` by default. The ITS regression tests write/erase
+ storage multiple time, so enabling this flag can increase the life of flash
+ memory when testing.
.. Note::
- If this flag is manually disabled when running the regression tests,
- then the storage flash area should also be erased before running the tests
- to ensure they run successfully. The type of storage flash area is platform
- specific (QSPI, eFlash, etc.) and it is described in corresponding
- flash_layout.h
+ If this flag is disabled when running the regression tests, then it is
+ recommended that the persistent storage area is erased before running the
+ tests to ensure that all tests can run to completion. The type of persistent
+ storage area is platform specific (eFlash, MRAM, etc.) and it is described
+ in corresponding flash_layout.h
--------------
diff --git a/docs/reference/services/tfm_ps_integration_guide.rst b/docs/reference/services/tfm_ps_integration_guide.rst
index 4da23a5e2..342011a71 100644
--- a/docs/reference/services/tfm_ps_integration_guide.rst
+++ b/docs/reference/services/tfm_ps_integration_guide.rst
@@ -327,18 +327,18 @@ needs. The list of PS services flags are:
- ``PS_ROLLBACK_PROTECTION``- this flag allows to enable/disable
rollback protection in protected storage service. This flag takes effect only
if the target has non-volatile counters and ``PS_ENCRYPTION`` flag is on.
-- ``PS_RAM_FS``- this flag allows to enable/disable the use of RAM
- instead of the flash to store the FS in protected storage service. This flag
- is set by default in the regression tests, if it is not defined by the
- platform. The PS regression tests reduce the life of the flash memory
- as they write/erase multiple times in the memory.
+- ``PS_RAM_FS``- setting this flag to ``ON`` enables the use of RAM instead of
+ the persistent storage device to store the FS in the Protected Storage
+ service. This flag is ``OFF`` by default. The PS regression tests write/erase
+ storage multiple time, so enabling this flag can increase the life of flash
+ memory when testing.
.. Note::
- If this flag is manually disabled when running the regression tests,
- then the storage flash area should also be erased before running the tests
- to ensure they run successfully. The type of storage flash area is platform
- specific (QSPI, eFlash, etc.) and it is described in corresponding
- flash_layout.h
+ If this flag is disabled when running the regression tests, then it is
+ recommended that the persistent storage area is erased before running the
+ tests to ensure that all tests can run to completion. The type of persistent
+ storage area is platform specific (eFlash, MRAM, etc.) and it is described
+ in corresponding flash_layout.h
- ``PS_TEST_NV_COUNTERS``- this flag enables the virtual
implementation of the PS NV counters interface in
diff --git a/platform/ext/Mps2AN519.cmake b/platform/ext/Mps2AN519.cmake
index ef2e5ca71..1e61d3aa2 100644
--- a/platform/ext/Mps2AN519.cmake
+++ b/platform/ext/Mps2AN519.cmake
@@ -205,8 +205,6 @@ elseif(BUILD_FLASH)
# to be sure the PS service knows that when it starts the PS area does not contain any
# valid PS flash layout and it needs to create one. The same for ITS.
set(PS_CREATE_FLASH_LAYOUT ON)
- set(PS_RAM_FS OFF)
set(ITS_CREATE_FLASH_LAYOUT ON)
- set(ITS_RAM_FS OFF)
embedded_include_directories(PATH "${PLATFORM_DIR}/target/mps2/an519/cmsis_drivers" ABSOLUTE)
endif()
diff --git a/platform/ext/Mps2AN521.cmake b/platform/ext/Mps2AN521.cmake
index 9afdf0ee8..fa72061f3 100644
--- a/platform/ext/Mps2AN521.cmake
+++ b/platform/ext/Mps2AN521.cmake
@@ -206,8 +206,6 @@ elseif(BUILD_FLASH)
# to be sure the PS service knows that when it starts the PS area does not contain any
# valid PS flash layout and it needs to create one. The same for ITS.
set(PS_CREATE_FLASH_LAYOUT ON)
- set(PS_RAM_FS OFF)
set(ITS_CREATE_FLASH_LAYOUT ON)
- set(ITS_RAM_FS OFF)
embedded_include_directories(PATH "${PLATFORM_DIR}/target/mps2/an521/cmsis_drivers" ABSOLUTE)
endif()
diff --git a/platform/ext/Mps2AN539.cmake b/platform/ext/Mps2AN539.cmake
index b0b64dc56..eb4cb4f10 100644
--- a/platform/ext/Mps2AN539.cmake
+++ b/platform/ext/Mps2AN539.cmake
@@ -209,9 +209,7 @@ elseif(BUILD_FLASH)
# to be sure the PS service knows that when it starts the PS area does not contain any
# valid PS flash layout and it needs to create one. The same for ITS.
set(PS_CREATE_FLASH_LAYOUT ON)
- set(PS_RAM_FS OFF)
set(ITS_CREATE_FLASH_LAYOUT ON)
- set(ITS_RAM_FS OFF)
embedded_include_directories(PATH "${AN539_DIR}/cmsis_drivers" ABSOLUTE)
embedded_include_directories(PATH "${PLATFORM_DIR}/driver" ABSOLUTE)
endif()
diff --git a/platform/ext/Mps3AN524.cmake b/platform/ext/Mps3AN524.cmake
index 1a4cf17f9..1e5fad971 100644
--- a/platform/ext/Mps3AN524.cmake
+++ b/platform/ext/Mps3AN524.cmake
@@ -211,9 +211,7 @@ elseif(BUILD_FLASH)
# to be sure the PS service knows that when it starts the PS area does not contain any
# valid PS flash layout and it needs to create one. The same for ITS.
set(PS_CREATE_FLASH_LAYOUT ON)
- set(PS_RAM_FS OFF)
set(ITS_CREATE_FLASH_LAYOUT ON)
- set(ITS_RAM_FS OFF)
embedded_include_directories(PATH "${AN524_DIR}/cmsis_drivers" ABSOLUTE)
embedded_include_directories(PATH "${PLATFORM_DIR}/driver" ABSOLUTE)
endif()
diff --git a/platform/ext/SSE-200_AWS.cmake b/platform/ext/SSE-200_AWS.cmake
index db5135373..0c55730d9 100644
--- a/platform/ext/SSE-200_AWS.cmake
+++ b/platform/ext/SSE-200_AWS.cmake
@@ -208,8 +208,6 @@ elseif(BUILD_FLASH)
# to be sure the PS service knows that when it starts the PS area does not contain any
# valid PS flash layout and it needs to create one. The same for ITS.
set(PS_CREATE_FLASH_LAYOUT ON)
- set(PS_RAM_FS OFF)
set(ITS_CREATE_FLASH_LAYOUT ON)
- set(ITS_RAM_FS OFF)
embedded_include_directories(PATH "${PLATFORM_DIR}/target/sse-200_aws/cmsis_drivers" ABSOLUTE)
endif()
diff --git a/platform/ext/fvp_sse300_mps2.cmake b/platform/ext/fvp_sse300_mps2.cmake
index 3c730c4e5..907f94609 100644
--- a/platform/ext/fvp_sse300_mps2.cmake
+++ b/platform/ext/fvp_sse300_mps2.cmake
@@ -188,9 +188,7 @@ elseif(BUILD_FLASH)
# to be sure the PS service knows that when it starts the PS area does not contain any
# valid PS flash layout and it needs to create one. The same for ITS.
set(PS_CREATE_FLASH_LAYOUT ON)
- set(PS_RAM_FS OFF)
set(ITS_CREATE_FLASH_LAYOUT ON)
- set(ITS_RAM_FS OFF)
embedded_include_directories(PATH "${FVP_SSE300_DIR}/cmsis_drivers" ABSOLUTE)
embedded_include_directories(PATH "${PLATFORM_DIR}/driver" ABSOLUTE)
endif()