Build: Improve condition of including ps_nv_counters.c
Roll-back protection test cases are only selected in PS secure
regression test suites. Remove the dependency of TEST_NS from
condition of including ps_nv_counters.c in PS secure partition.
Update the comment and the document accordingly.
Change-Id: I443748dffd1e920329a0d4478b57d19163c707db
Signed-off-by: David Hu <david.hu@arm.com>
diff --git a/docs/reference/services/tfm_ps_integration_guide.rst b/docs/reference/services/tfm_ps_integration_guide.rst
index 0138bc0..01d2b51 100644
--- a/docs/reference/services/tfm_ps_integration_guide.rst
+++ b/docs/reference/services/tfm_ps_integration_guide.rst
@@ -355,7 +355,7 @@
``tf-m-tests`` repo, which emulates NV counters in
RAM, and disables the hardware implementation of NV counters provided by
the secure service. This flag is enabled by default, but has no effect when
- the regression tests are disabled. This flag can be
+ the secure regression test is disabled. This flag can be
overridden to ``OFF`` when building the regression tests. In this case,
the PS rollback protection test suite will not be built, as it relies
on extra functionality provided by the virtual NV counters to simulate
diff --git a/secure_fw/partitions/protected_storage/CMakeLists.txt b/secure_fw/partitions/protected_storage/CMakeLists.txt
index 120b927..a8bd061 100644
--- a/secure_fw/partitions/protected_storage/CMakeLists.txt
+++ b/secure_fw/partitions/protected_storage/CMakeLists.txt
@@ -30,9 +30,9 @@
ps_utils.c
$<$<BOOL:${PS_ENCRYPTION}>:crypto/ps_crypto_interface.c>
$<$<BOOL:${PS_ENCRYPTION}>:ps_encrypted_object.c>
- # The test_ps_nv_counters.c will be used instead, when either NS and S
- # test is ON and PS_TEST_NV_COUNTERS ON
- $<$<NOT:$<AND:$<OR:$<BOOL:${TEST_NS}>,$<BOOL:${TEST_S}>>,$<BOOL:${PS_TEST_NV_COUNTERS}>>>:nv_counters/ps_nv_counters.c>
+ # The test_ps_nv_counters.c will be used instead, when secure test is ON
+ # and PS_TEST_NV_COUNTERS ON
+ $<$<NOT:$<AND:$<BOOL:${TEST_S}>,$<BOOL:${PS_TEST_NV_COUNTERS}>>>:nv_counters/ps_nv_counters.c>
)
target_link_libraries(tfm_partition_ps