Replace TFM_CONFIG_USE_TRUSTZONE with CONFIG_TFM_USE_TRUSTZONE
For consistency with others with both prefixes
Signed-off-by: Chris Brand <chris.brand@cypress.com>
Change-Id: I0c9f17362dc5f19c534900d60c0b8d61ff012768
diff --git a/cmake/install.cmake b/cmake/install.cmake
index 6bbf6ac..6f45df6 100644
--- a/cmake/install.cmake
+++ b/cmake/install.cmake
@@ -19,7 +19,7 @@
set(INSTALL_INTERFACE_LIB_DIR ${TFM_INSTALL_PATH}/interface/lib)
# export veneer lib
-if (TFM_CONFIG_USE_TRUSTZONE)
+if (CONFIG_TFM_USE_TRUSTZONE)
install(FILES ${CMAKE_BINARY_DIR}/secure_fw/s_veneers.o
DESTINATION ${INSTALL_INTERFACE_LIB_DIR})
endif()
diff --git a/config/check_config.cmake b/config/check_config.cmake
index 58e0f2f..7438aa9 100644
--- a/config/check_config.cmake
+++ b/config/check_config.cmake
@@ -24,7 +24,7 @@
set (TFM_L3_PLATFORM_LISTS arm/mps2/an521 arm/musca_b1/sse_200 stm/stm32l562e_dk)
set (VALID_ISOLATION_LEVELS 1 2 3)
-tfm_invalid_config(TFM_LIB_MODEL AND NOT TFM_CONFIG_USE_TRUSTZONE)
+tfm_invalid_config(TFM_LIB_MODEL AND NOT CONFIG_TFM_USE_TRUSTZONE)
tfm_invalid_config(TFM_LIB_MODEL AND TFM_PSA_API)
tfm_invalid_config(NOT TFM_LIB_MODEL AND NOT TFM_PSA_API)
tfm_invalid_config(NOT TFM_ISOLATION_LEVEL IN_LIST VALID_ISOLATION_LEVELS)
diff --git a/config/config_default.cmake b/config/config_default.cmake
index a4bc99b..dce78a3 100755
--- a/config/config_default.cmake
+++ b/config/config_default.cmake
@@ -24,7 +24,7 @@
# TFM_LIB_MODEL is the only user configuration for Library Model selection.
# TFM_PSA_API becomes an internal variable. Please do NOT use it in build command line.
set(TFM_LIB_MODEL OFF CACHE BOOL "Use secure library model instead of PSA API (IPC model)")
-set(TFM_CONFIG_USE_TRUSTZONE ON CACHE BOOL "Enable use of TrustZone to transition between NSPE and SPE")
+set(CONFIG_TFM_USE_TRUSTZONE ON CACHE BOOL "Enable use of TrustZone to transition between NSPE and SPE")
set(TFM_ISOLATION_LEVEL 1 CACHE STRING "Isolation level")
set(PSA_FRAMEWORK_HAS_MM_IOVEC OFF CACHE BOOL "Enable MM-IOVEC")
set(TFM_PROFILE "" CACHE STRING "Profile to use")
diff --git a/interface/CMakeLists.txt b/interface/CMakeLists.txt
index b02cc11..2d061b8 100644
--- a/interface/CMakeLists.txt
+++ b/interface/CMakeLists.txt
@@ -48,7 +48,7 @@
$<$<BOOL:${TFM_PSA_API}>:TFM_PSA_API>
$<$<BOOL:${CONFIG_TFM_ENABLE_CTX_MGMT}>:CONFIG_TFM_ENABLE_CTX_MGMT>
$<$<BOOL:${TFM_ISOLATION_LEVEL}>:TFM_LVL=${TFM_ISOLATION_LEVEL}>
- $<$<BOOL:${TFM_CONFIG_USE_TRUSTZONE}>:TFM_CONFIG_USE_TRUSTZONE>
+ $<$<BOOL:${CONFIG_TFM_USE_TRUSTZONE}>:CONFIG_TFM_USE_TRUSTZONE>
$<$<BOOL:${TFM_MULTI_CORE_TOPOLOGY}>:TFM_MULTI_CORE_TOPOLOGY>
$<$<BOOL:${FORWARD_PROT_MSG}>:FORWARD_PROT_MSG=${FORWARD_PROT_MSG}>
$<$<BOOL:${CONFIG_TFM_PARTITION_META}>:CONFIG_TFM_PARTITION_META>
diff --git a/lib/ext/CMSIS_5/CMakeLists.txt b/lib/ext/CMSIS_5/CMakeLists.txt
index 54ff2b0..08dd3ca 100644
--- a/lib/ext/CMSIS_5/CMakeLists.txt
+++ b/lib/ext/CMSIS_5/CMakeLists.txt
@@ -29,7 +29,7 @@
set_target_properties(CMSIS_5_RTX_V8MMFN PROPERTIES IMPORTED_LOCATION ${CMSIS_5_PATH}/RTOS2/RTX/Library/IAR/RTX_V8MMFN.a)
set_target_properties(CMSIS_5_RTX_V8MBN PROPERTIES IMPORTED_LOCATION ${CMSIS_5_PATH}/RTOS2/RTX/Library/IAR/RTX_V8MBN.a)
set_target_properties(CMSIS_5_RTX_CM3 PROPERTIES IMPORTED_LOCATION ${CMSIS_5_PATH}/RTOS2/RTX/Library/IAR/RTX_CM3.a)
- if (TFM_CONFIG_USE_TRUSTZONE)
+ if (CONFIG_TFM_USE_TRUSTZONE)
target_link_libraries(CMSIS_5_RTX_V81MMN
INTERFACE
tfm_s_veneers
@@ -39,7 +39,7 @@
message(FATAL_ERROR "${CMAKE_C_COMPILER_ID} does not have CMSIS RTX static libraries set up")
endif()
-if (TFM_CONFIG_USE_TRUSTZONE)
+if (CONFIG_TFM_USE_TRUSTZONE)
target_link_libraries(CMSIS_5_RTX_V8MMN
INTERFACE
tfm_s_veneers
diff --git a/platform/ext/common/armclang/tfm_common_s.sct b/platform/ext/common/armclang/tfm_common_s.sct
index 2987963..3d937a7 100644
--- a/platform/ext/common/armclang/tfm_common_s.sct
+++ b/platform/ext/common/armclang/tfm_common_s.sct
@@ -24,7 +24,7 @@
ER_VECTORS S_CODE_START S_CODE_VECTOR_TABLE_SIZE {
*.o (RESET +First)
}
-#ifdef TFM_CONFIG_USE_TRUSTZONE
+#ifdef CONFIG_TFM_USE_TRUSTZONE
ER_VECTORS_FILL +0 EMPTY (S_CODE_VECTOR_TABLE_SIZE - ImageLength(ER_VECTORS)) {
}
/*
diff --git a/platform/ext/common/armclang/tfm_isolation_l3.sct.template b/platform/ext/common/armclang/tfm_isolation_l3.sct.template
index ea45165..40e8c9f 100644
--- a/platform/ext/common/armclang/tfm_isolation_l3.sct.template
+++ b/platform/ext/common/armclang/tfm_isolation_l3.sct.template
@@ -39,7 +39,7 @@
ER_VECTORS +0 ALIGN 32 S_CODE_VECTOR_TABLE_SIZE {
*.o (RESET +First)
}
-#ifdef TFM_CONFIG_USE_TRUSTZONE
+#ifdef CONFIG_TFM_USE_TRUSTZONE
ER_VECTORS_FILL +0 EMPTY (S_CODE_VECTOR_TABLE_SIZE - ImageLength(ER_VECTORS)) {
}
diff --git a/platform/ext/common/gcc/tfm_common_s.ld b/platform/ext/common/gcc/tfm_common_s.ld
index 1540ba0..194f4fe 100644
--- a/platform/ext/common/gcc/tfm_common_s.ld
+++ b/platform/ext/common/gcc/tfm_common_s.ld
@@ -57,7 +57,7 @@
__vectors_end__ = .;
} > FLASH
-#ifdef TFM_CONFIG_USE_TRUSTZONE
+#ifdef CONFIG_TFM_USE_TRUSTZONE
ASSERT(. <= ADDR(.TFM_VECTORS) + S_CODE_VECTOR_TABLE_SIZE, ".TFM_VECTORS section size overflow.")
. = ADDR(.TFM_VECTORS) + S_CODE_VECTOR_TABLE_SIZE;
/*
diff --git a/platform/ext/common/gcc/tfm_isolation_l3.ld.template b/platform/ext/common/gcc/tfm_isolation_l3.ld.template
index 7ab806d..bc790d9 100644
--- a/platform/ext/common/gcc/tfm_isolation_l3.ld.template
+++ b/platform/ext/common/gcc/tfm_isolation_l3.ld.template
@@ -55,7 +55,7 @@
. = ALIGN(4);
} > FLASH
-#ifdef TFM_CONFIG_USE_TRUSTZONE
+#ifdef CONFIG_TFM_USE_TRUSTZONE
ASSERT(. <= ADDR(.TFM_VECTORS) + S_CODE_VECTOR_TABLE_SIZE, ".TFM_VECTORS section size overflow.")
. = ADDR(.TFM_VECTORS) + S_CODE_VECTOR_TABLE_SIZE;
/*
diff --git a/platform/ext/common/iar/tfm_common_s.icf b/platform/ext/common/iar/tfm_common_s.icf
index 9e4dc1a..a644933 100644
--- a/platform/ext/common/iar/tfm_common_s.icf
+++ b/platform/ext/common/iar/tfm_common_s.icf
@@ -25,7 +25,7 @@
readonly section .intvec
};
-#ifdef TFM_CONFIG_USE_TRUSTZONE
+#ifdef CONFIG_TFM_USE_TRUSTZONE
/*
* Place the CMSE Veneers (containing the SG instruction) in a separate
* 32 bytes aligned region so that the SAU can be programmed to
@@ -246,7 +246,7 @@
define block LR_CODE with fixed order, maximum size = S_CODE_SIZE {
block ER_VECTORS,
-#ifdef TFM_CONFIG_USE_TRUSTZONE
+#ifdef CONFIG_TFM_USE_TRUSTZONE
block ER_VENEER,
block VENEER_ALIGN,
#endif
diff --git a/platform/ext/common/iar/tfm_isolation_l3.icf.template b/platform/ext/common/iar/tfm_isolation_l3.icf.template
index 20fdd99..4191c3a 100644
--- a/platform/ext/common/iar/tfm_isolation_l3.icf.template
+++ b/platform/ext/common/iar/tfm_isolation_l3.icf.template
@@ -37,7 +37,7 @@
readonly section .intvec
};
-#ifdef TFM_CONFIG_USE_TRUSTZONE
+#ifdef CONFIG_TFM_USE_TRUSTZONE
/*
* Place the CMSE Veneers (containing the SG instruction) in a separate
* 32 bytes aligned region so that the SAU can be programmed to
@@ -212,7 +212,7 @@
/* Define Flash content */
define block LR_CODE with fixed order {
block ER_VECTORS,
-#ifdef TFM_CONFIG_USE_TRUSTZONE
+#ifdef CONFIG_TFM_USE_TRUSTZONE
block ER_VENEER,
block VENEER_ALIGN,
#endif
diff --git a/platform/ext/target/arm/corstone1000/config.cmake b/platform/ext/target/arm/corstone1000/config.cmake
index 8294251..6070b0d 100644
--- a/platform/ext/target/arm/corstone1000/config.cmake
+++ b/platform/ext/target/arm/corstone1000/config.cmake
@@ -24,7 +24,7 @@
set(TFM_ISOLATION_LEVEL 2 CACHE STRING "Isolation level")
endif()
-set(TFM_CONFIG_USE_TRUSTZONE OFF CACHE BOOL "Enable use of TrustZone to transition between NSPE and SPE")
+set(CONFIG_TFM_USE_TRUSTZONE OFF CACHE BOOL "Enable use of TrustZone to transition between NSPE and SPE")
set(TFM_MULTI_CORE_TOPOLOGY ON CACHE BOOL "Whether to build for a dual-cpu architecture")
set(TFM_PLAT_SPECIFIC_MULTI_CORE_COMM ON CACHE BOOL "Whether to use a platform specific inter core communication instead of mailbox in dual-cpu topology")
set(CRYPTO_HW_ACCELERATOR ON CACHE BOOL "Whether to enable the crypto hardware accelerator on supported platforms")
diff --git a/platform/ext/target/arm/musca_b1/secure_enclave/config.cmake b/platform/ext/target/arm/musca_b1/secure_enclave/config.cmake
index c563742..b605871 100644
--- a/platform/ext/target/arm/musca_b1/secure_enclave/config.cmake
+++ b/platform/ext/target/arm/musca_b1/secure_enclave/config.cmake
@@ -9,7 +9,7 @@
set(BL2_TRAILER_SIZE 0x800 CACHE STRING "Trailer size")
# Configuration values forced due to the Secure Enclave topology
-set(TFM_CONFIG_USE_TRUSTZONE OFF CACHE BOOL "Enable use of TrustZone to transition between NSPE and SPE")
+set(CONFIG_TFM_USE_TRUSTZONE OFF CACHE BOOL "Enable use of TrustZone to transition between NSPE and SPE")
set(TFM_MULTI_CORE_TOPOLOGY ON CACHE BOOL "Whether to build for a dual-cpu architecture" FORCE)
set(NS FALSE CACHE BOOL "Whether to build NS app" FORCE)
set(TEST_NS OFF CACHE BOOL "Whether to build NS regression tests" FORCE)
diff --git a/platform/ext/target/arm/rss/config.cmake b/platform/ext/target/arm/rss/config.cmake
index 7af9810..90c135d 100644
--- a/platform/ext/target/arm/rss/config.cmake
+++ b/platform/ext/target/arm/rss/config.cmake
@@ -31,7 +31,7 @@
set(TFM_MANIFEST_LIST ${CMAKE_CURRENT_LIST_DIR}/manifest/tfm_manifest_list.yaml CACHE FILEPATH "TF-M native Secure Partition manifests list file")
set(TFM_MBEDCRYPTO_PLATFORM_EXTRA_CONFIG_PATH ${CMAKE_CURRENT_LIST_DIR}/mbedtls_extra_config.h CACHE PATH "Config to append to standard Mbed Crypto config, used by platforms to cnfigure feature support")
-set(TFM_CONFIG_USE_TRUSTZONE OFF CACHE BOOL "Enable use of TrustZone to transition between NSPE and SPE")
+set(CONFIG_TFM_USE_TRUSTZONE OFF CACHE BOOL "Enable use of TrustZone to transition between NSPE and SPE")
set(TFM_MULTI_CORE_TOPOLOGY ON CACHE BOOL "Whether to build for a dual-cpu architecture")
set(TFM_PLAT_SPECIFIC_MULTI_CORE_COMM ON CACHE BOOL "Whether to use a platform specific inter-core communication instead of mailbox in dual-cpu topology")
set(TEST_NS_MULTI_CORE OFF CACHE BOOL "Whether to build NS regression multi-core tests")
diff --git a/platform/ext/target/cypress/psoc64/config.cmake b/platform/ext/target/cypress/psoc64/config.cmake
index 7061060..847ca92 100644
--- a/platform/ext/target/cypress/psoc64/config.cmake
+++ b/platform/ext/target/cypress/psoc64/config.cmake
@@ -15,7 +15,7 @@
add_definitions(-DCYB0644ABZI_S2D44)
-set(TFM_CONFIG_USE_TRUSTZONE OFF CACHE BOOL "Enable use of TrustZone to transition between NSPE and SPE")
+set(CONFIG_TFM_USE_TRUSTZONE OFF CACHE BOOL "Enable use of TrustZone to transition between NSPE and SPE")
set(TFM_MULTI_CORE_TOPOLOGY ON CACHE BOOL "Whether to build for a dual-cpu architecture")
set(NUM_MAILBOX_QUEUE_SLOT 4 CACHE BOOL "Number of mailbox queue slots")
set(PLATFORM_SLIH_IRQ_TEST_SUPPORT ON CACHE BOOL "Platform supports SLIH IRQ tests")
diff --git a/secure_fw/CMakeLists.txt b/secure_fw/CMakeLists.txt
index 8aff0d5..7a6a38f 100644
--- a/secure_fw/CMakeLists.txt
+++ b/secure_fw/CMakeLists.txt
@@ -99,7 +99,7 @@
############################# Secure veneers ###################################
-if(TFM_CONFIG_USE_TRUSTZONE)
+if(CONFIG_TFM_USE_TRUSTZONE)
add_library(tfm_s_veneers STATIC)
target_sources(tfm_s_veneers
diff --git a/secure_fw/partitions/ns_agent_tz/CMakeLists.txt b/secure_fw/partitions/ns_agent_tz/CMakeLists.txt
index 3813a6a..9f22bbe 100644
--- a/secure_fw/partitions/ns_agent_tz/CMakeLists.txt
+++ b/secure_fw/partitions/ns_agent_tz/CMakeLists.txt
@@ -7,7 +7,7 @@
#
#-------------------------------------------------------------------------------
-if (NOT TFM_CONFIG_USE_TRUSTZONE)
+if (NOT CONFIG_TFM_USE_TRUSTZONE)
return()
endif()
diff --git a/secure_fw/spm/CMakeLists.txt b/secure_fw/spm/CMakeLists.txt
index 9279fe7..379dc38 100755
--- a/secure_fw/spm/CMakeLists.txt
+++ b/secure_fw/spm/CMakeLists.txt
@@ -158,7 +158,7 @@
############################# Secure veneers ###################################
-if(TFM_CONFIG_USE_TRUSTZONE)
+if(CONFIG_TFM_USE_TRUSTZONE)
# If this is added to the spm, it is discarded as it is not used. Since the
# spm is a static library it can't generate veneers under all compilers so
# instead this single file is added to the tfm_s target.
diff --git a/secure_fw/spm/include/tfm_nspm.h b/secure_fw/spm/include/tfm_nspm.h
index fe1069d..1cd1aae 100644
--- a/secure_fw/spm/include/tfm_nspm.h
+++ b/secure_fw/spm/include/tfm_nspm.h
@@ -14,7 +14,7 @@
#define TFM_NS_CLIENT_INVALID_ID ((int32_t)0)
-#ifdef TFM_CONFIG_USE_TRUSTZONE
+#ifdef CONFIG_TFM_USE_TRUSTZONE
/*
* The macro cmse_nsfptr_create defined in the gcc library uses the non-standard
* gcc C lanuage extension 'typeof'. TF-M is built with '-std=c99' so typeof
@@ -40,7 +40,7 @@
#define __tfm_nspm_secure_gateway_attributes__ \
__attribute__((cmse_nonsecure_entry))
#endif /* !__ARMCC_VERSION */
-#endif /* TFM_CONFIG_USE_TRUSTZONE */
+#endif /* CONFIG_TFM_USE_TRUSTZONE */
/**
* \brief initialise the NS context database
diff --git a/secure_fw/spm/include/tfm_secure_api.h b/secure_fw/spm/include/tfm_secure_api.h
index 4b5e453..96c809a 100644
--- a/secure_fw/spm/include/tfm_secure_api.h
+++ b/secure_fw/spm/include/tfm_secure_api.h
@@ -10,7 +10,7 @@
#ifndef __TFM_SECURE_API_H__
#define __TFM_SECURE_API_H__
-#ifdef TFM_CONFIG_USE_TRUSTZONE
+#ifdef CONFIG_TFM_USE_TRUSTZONE
#include <arm_cmse.h>
#endif
#include "tfm_arch.h"