diff options
author | shejia01 <jianliang.shen@arm.com> | 2021-06-03 13:31:51 +0800 |
---|---|---|
committer | shejia01 <jianliang.shen@arm.com> | 2021-08-20 11:05:46 +0800 |
commit | bfd3712273b96c0d7880117f6b475e6dfccce0d4 (patch) | |
tree | ca4549bef595d9aae9c59928f70f7157f204aefc /platform | |
parent | eaf16c42e15d067429fb021d6397ce63620b426c (diff) | |
download | trusted-firmware-m-bfd3712273b96c0d7880117f6b475e6dfccce0d4.tar.gz |
Build: Control single test without TEST_S/TEST_NS [TF-M repo]
To decrease the size of TF-M image so that it can work on a platform
with limited resource, the build configure should allow developers
to select one or more single test suites. The tf-m-test repo has
added some build control flags. These flags can be controlled with
"-D<FLAG>=ON" to turn on the related test suites' build. With the
build control flags are added in tf-m-tests repo, the cmake build
logic need to be refined. To make it easier to start single test
suite without TEST_NS or TEST_S, more conditions need to be added to
link tf-m-tests repo. Moreover, some test services should also
depend on the new single test flags.
By this patch, when TEST_S or TEST_NS is ON, all the secure or
non-secure test suites will run either. When single test configuration
like TEST_NS_XXX or TEST_S_XXX is ON, the single test suite will run
if its dependencies are configurated.
Signed-off-by: Jianliang Shen <jianliang.shen@arm.com>
Change-Id: I2ca5b400ddfee2832e0eaae49da529f1c2d70c98
Diffstat (limited to 'platform')
22 files changed, 67 insertions, 67 deletions
diff --git a/platform/CMakeLists.txt b/platform/CMakeLists.txt index cab72c0e16..a42baf2071 100755 --- a/platform/CMakeLists.txt +++ b/platform/CMakeLists.txt @@ -50,7 +50,7 @@ target_sources(platform_s $<$<BOOL:${PLATFORM_DUMMY_CRYPTO_KEYS}>:ext/common/template/crypto_keys.c> $<$<BOOL:${PLATFORM_DUMMY_ROTPK}>:ext/common/template/tfm_rotpk.c> $<$<BOOL:${PLATFORM_DUMMY_IAK}>:ext/common/template/tfm_initial_attestation_key_material.c> - $<$<AND:$<NOT:$<BOOL:${ATTEST_TEST_GET_PUBLIC_KEY}>>,$<NOT:$<BOOL:${SYMMETRIC_INITIAL_ATTESTATION}>>,$<BOOL:${PLATFORM_DUMMY_IAK}>,$<BOOL:${TEST_S}>>:ext/common/template/tfm_initial_attest_pub_key.c> + $<$<AND:$<NOT:$<BOOL:${ATTEST_TEST_GET_PUBLIC_KEY}>>,$<NOT:$<BOOL:${SYMMETRIC_INITIAL_ATTESTATION}>>,$<BOOL:${PLATFORM_DUMMY_IAK}>,$<BOOL:${TEST_S_ATTESTATION}>>:ext/common/template/tfm_initial_attest_pub_key.c> ) target_link_libraries(platform_s @@ -87,7 +87,7 @@ target_include_directories(platform_ns target_sources(platform_ns PRIVATE $<$<BOOL:${PLATFORM_DEFAULT_UART_STDOUT}>:${CMAKE_CURRENT_SOURCE_DIR}/ext/common/uart_stdout.c> - $<$<AND:$<NOT:$<BOOL:${ATTEST_TEST_GET_PUBLIC_KEY}>>,$<NOT:$<BOOL:${SYMMETRIC_INITIAL_ATTESTATION}>>,$<BOOL:${PLATFORM_DUMMY_IAK}>,$<BOOL:${TEST_NS}>>:${CMAKE_CURRENT_SOURCE_DIR}/ext/common/template/tfm_initial_attest_pub_key.c> + $<$<AND:$<NOT:$<BOOL:${ATTEST_TEST_GET_PUBLIC_KEY}>>,$<NOT:$<BOOL:${SYMMETRIC_INITIAL_ATTESTATION}>>,$<BOOL:${PLATFORM_DUMMY_IAK}>,$<BOOL:${TEST_NS_ATTESTATION}>>:${CMAKE_CURRENT_SOURCE_DIR}/ext/common/template/tfm_initial_attest_pub_key.c> ) target_link_libraries(platform_ns @@ -98,7 +98,7 @@ target_link_libraries(platform_ns target_compile_definitions(platform_ns PRIVATE - $<$<BOOL:${TFM_ENABLE_SLIH_TEST}>:TFM_ENABLE_SLIH_TEST> + $<$<BOOL:${TEST_NS_SLIH_IRQ}>:TEST_NS_SLIH_IRQ> $<$<BOOL:${TFM_PERIPH_ACCESS_TEST}>:TFM_ENABLE_PERIPH_ACCESS_TEST> ) diff --git a/platform/ext/target/arm/mps2/an519/CMakeLists.txt b/platform/ext/target/arm/mps2/an519/CMakeLists.txt index 2ddbae89ba..4f165a20f3 100644 --- a/platform/ext/target/arm/mps2/an519/CMakeLists.txt +++ b/platform/ext/target/arm/mps2/an519/CMakeLists.txt @@ -92,9 +92,9 @@ target_sources(platform_s target_cfg.c native_drivers/ppc_sse200_drv.c native_drivers/arm_uart_drv.c - $<$<AND:$<NOT:$<BOOL:${TFM_ENABLE_SLIH_TEST}>>,$<NOT:$<BOOL:${TFM_ENABLE_FLIH_TEST}>>>:${CMAKE_CURRENT_SOURCE_DIR}/native_drivers/timer_cmsdk/timer_cmsdk.c> + $<$<AND:$<NOT:$<BOOL:${TEST_NS_SLIH_IRQ}>>,$<NOT:$<BOOL:${TEST_NS_FLIH_IRQ}>>>:${CMAKE_CURRENT_SOURCE_DIR}/native_drivers/timer_cmsdk/timer_cmsdk.c> ${CMAKE_SOURCE_DIR}/platform/ext/common/tfm_hal_isolation_mpu_v8m.c - $<$<OR:$<BOOL:${TEST_NS}>,$<BOOL:${TEST_S}>>:${CMAKE_CURRENT_SOURCE_DIR}/plat_test.c> + $<$<BOOL:${TFM_TEST}>:${CMAKE_CURRENT_SOURCE_DIR}/plat_test.c> $<$<BOOL:${TFM_PARTITION_PLATFORM}>:${CMAKE_CURRENT_SOURCE_DIR}/services/src/tfm_platform_system.c> ) @@ -107,7 +107,7 @@ target_sources(tfm_sprt PRIVATE # SLIH test Partition and FLIH test Partition access the timer as ARoT Partitions. # Put the driver to SPRT so that both SLIH and FLIH tests can access it. - $<$<OR:$<BOOL:${TFM_ENABLE_SLIH_TEST}>,$<BOOL:${TFM_ENABLE_FLIH_TEST}>>:${CMAKE_CURRENT_SOURCE_DIR}/native_drivers/timer_cmsdk/timer_cmsdk.c> + $<$<OR:$<BOOL:${TEST_NS_SLIH_IRQ}>,$<BOOL:${TEST_NS_FLIH_IRQ}>>:${CMAKE_CURRENT_SOURCE_DIR}/native_drivers/timer_cmsdk/timer_cmsdk.c> ) #========================= Platform Non-Secure ================================# diff --git a/platform/ext/target/arm/mps2/an519/retarget/platform_retarget_dev.c b/platform/ext/target/arm/mps2/an519/retarget/platform_retarget_dev.c index 44cd13542b..b732b95165 100644 --- a/platform/ext/target/arm/mps2/an519/retarget/platform_retarget_dev.c +++ b/platform/ext/target/arm/mps2/an519/retarget/platform_retarget_dev.c @@ -302,24 +302,24 @@ struct ppc_sse200_dev_t APB_PPCEXP3_DEV_S = { /* CMSDK Timer driver structures */ #ifdef CMSDK_TIMER0_S static const struct cmsdk_timer_dev_cfg_t CMSDK_TIMER0_DEV_CFG_S -#ifdef TFM_ENABLE_SLIH_TEST +#ifdef TEST_NS_SLIH_IRQ TFM_LINK_SET_RO_IN_PARTITION_SECTION("TFM_SP_SLIH_TEST", "APP-ROT") -#elif defined(TFM_ENABLE_FLIH_TEST) +#elif defined(TEST_NS_FLIH_IRQ) TFM_LINK_SET_RO_IN_PARTITION_SECTION("TFM_SP_FLIH_TEST", "APP-ROT") #endif = {.base = CMSDK_TIMER0_BASE_S}; static struct cmsdk_timer_dev_data_t CMSDK_TIMER0_DEV_DATA_S -#ifdef TFM_ENABLE_SLIH_TEST +#ifdef TEST_NS_SLIH_IRQ TFM_LINK_SET_RW_IN_PARTITION_SECTION("TFM_SP_SLIH_TEST", "APP-ROT") -#elif defined(TFM_ENABLE_FLIH_TEST) +#elif defined(TEST_NS_FLIH_IRQ) TFM_LINK_SET_RW_IN_PARTITION_SECTION("TFM_SP_FLIH_TEST", "APP-ROT") #endif = {.is_initialized = 0}; struct cmsdk_timer_dev_t CMSDK_TIMER0_DEV_S -#ifdef TFM_ENABLE_SLIH_TEST +#ifdef TEST_NS_SLIH_IRQ TFM_LINK_SET_RW_IN_PARTITION_SECTION("TFM_SP_SLIH_TEST", "APP-ROT") -#elif defined(TFM_ENABLE_FLIH_TEST) +#elif defined(TEST_NS_FLIH_IRQ) TFM_LINK_SET_RW_IN_PARTITION_SECTION("TFM_SP_FLIH_TEST", "APP-ROT") #endif = {&(CMSDK_TIMER0_DEV_CFG_S), &(CMSDK_TIMER0_DEV_DATA_S)}; diff --git a/platform/ext/target/arm/mps2/an521/CMakeLists.txt b/platform/ext/target/arm/mps2/an521/CMakeLists.txt index c6e0e6f3db..851eed6209 100644 --- a/platform/ext/target/arm/mps2/an521/CMakeLists.txt +++ b/platform/ext/target/arm/mps2/an521/CMakeLists.txt @@ -98,9 +98,9 @@ target_sources(platform_s target_cfg.c native_drivers/ppc_sse200_drv.c native_drivers/arm_uart_drv.c - $<$<AND:$<NOT:$<BOOL:${TFM_ENABLE_SLIH_TEST}>>,$<NOT:$<BOOL:${TFM_ENABLE_FLIH_TEST}>>>:${CMAKE_CURRENT_SOURCE_DIR}/native_drivers/timer_cmsdk/timer_cmsdk.c> + $<$<AND:$<NOT:$<BOOL:${TEST_NS_SLIH_IRQ}>>,$<NOT:$<BOOL:${TEST_NS_FLIH_IRQ}>>>:${CMAKE_CURRENT_SOURCE_DIR}/native_drivers/timer_cmsdk/timer_cmsdk.c> ${CMAKE_SOURCE_DIR}/platform/ext/common/tfm_hal_isolation_mpu_v8m.c - $<$<OR:$<BOOL:${TEST_NS}>,$<BOOL:${TEST_S}>>:${CMAKE_CURRENT_SOURCE_DIR}/plat_test.c> + $<$<BOOL:${TFM_TEST}>:${CMAKE_CURRENT_SOURCE_DIR}/plat_test.c> $<$<BOOL:${TFM_PARTITION_PLATFORM}>:${CMAKE_CURRENT_SOURCE_DIR}/services/src/tfm_platform_system.c> ) @@ -108,7 +108,7 @@ target_sources(tfm_sprt PRIVATE # SLIH test Partition and FLIH test Partition access the timer as ARoT Partitions. # Put the driver to SPRT so that both SLIH and FLIH tests can access it. - $<$<OR:$<BOOL:${TFM_ENABLE_SLIH_TEST}>,$<BOOL:${TFM_ENABLE_FLIH_TEST}>>:${CMAKE_CURRENT_SOURCE_DIR}/native_drivers/timer_cmsdk/timer_cmsdk.c> + $<$<OR:$<BOOL:${TEST_NS_SLIH_IRQ}>,$<BOOL:${TEST_NS_FLIH_IRQ}>>:${CMAKE_CURRENT_SOURCE_DIR}/native_drivers/timer_cmsdk/timer_cmsdk.c> ) target_compile_options(platform_s diff --git a/platform/ext/target/arm/mps2/an521/config.cmake b/platform/ext/target/arm/mps2/an521/config.cmake index 4e15cf4f2d..d93f5bb8f4 100644 --- a/platform/ext/target/arm/mps2/an521/config.cmake +++ b/platform/ext/target/arm/mps2/an521/config.cmake @@ -8,8 +8,8 @@ set(TFM_EXTRA_GENERATED_FILE_LIST_PATH ${CMAKE_CURRENT_SOURCE_DIR}/platform/ext/target/arm/mps2/an521/generated_file_list.yaml CACHE PATH "Path to extra generated file list. Appended to stardard TFM generated file list." FORCE) if(TFM_PSA_API) - if (NOT TFM_ENABLE_SLIH_TEST) + if (NOT TEST_NS_SLIH_IRQ AND TEST_NS) # FLIH and SLIH testing can not be enabled at the same time - set(TFM_ENABLE_FLIH_TEST ON CACHE BOOL "Enable FLIH testing") + set(TEST_NS_FLIH_IRQ ON CACHE BOOL "Enable FLIH testing") endif() endif() diff --git a/platform/ext/target/arm/mps2/an521/retarget/platform_retarget_dev.c b/platform/ext/target/arm/mps2/an521/retarget/platform_retarget_dev.c index fa071dba05..bcbfd1830c 100644 --- a/platform/ext/target/arm/mps2/an521/retarget/platform_retarget_dev.c +++ b/platform/ext/target/arm/mps2/an521/retarget/platform_retarget_dev.c @@ -302,24 +302,24 @@ struct ppc_sse200_dev_t APB_PPCEXP3_DEV_S = { /* CMSDK Timer driver structures */ #ifdef CMSDK_TIMER0_S static const struct cmsdk_timer_dev_cfg_t CMSDK_TIMER0_DEV_CFG_S -#ifdef TFM_ENABLE_SLIH_TEST +#ifdef TEST_NS_SLIH_IRQ TFM_LINK_SET_RO_IN_PARTITION_SECTION("TFM_SP_SLIH_TEST", "APP-ROT") -#elif defined(TFM_ENABLE_FLIH_TEST) +#elif defined(TEST_NS_FLIH_IRQ) TFM_LINK_SET_RO_IN_PARTITION_SECTION("TFM_SP_FLIH_TEST", "APP-ROT") #endif = {.base = CMSDK_TIMER0_BASE_S}; static struct cmsdk_timer_dev_data_t CMSDK_TIMER0_DEV_DATA_S -#ifdef TFM_ENABLE_SLIH_TEST +#ifdef TEST_NS_SLIH_IRQ TFM_LINK_SET_RW_IN_PARTITION_SECTION("TFM_SP_SLIH_TEST", "APP-ROT") -#elif defined(TFM_ENABLE_FLIH_TEST) +#elif defined(TEST_NS_FLIH_IRQ) TFM_LINK_SET_RW_IN_PARTITION_SECTION("TFM_SP_FLIH_TEST", "APP-ROT") #endif = {.is_initialized = 0}; struct cmsdk_timer_dev_t CMSDK_TIMER0_DEV_S -#ifdef TFM_ENABLE_SLIH_TEST +#ifdef TEST_NS_SLIH_IRQ TFM_LINK_SET_RW_IN_PARTITION_SECTION("TFM_SP_SLIH_TEST", "APP-ROT") -#elif defined(TFM_ENABLE_FLIH_TEST) +#elif defined(TEST_NS_FLIH_IRQ) TFM_LINK_SET_RW_IN_PARTITION_SECTION("TFM_SP_FLIH_TEST", "APP-ROT") #endif = {&(CMSDK_TIMER0_DEV_CFG_S), &(CMSDK_TIMER0_DEV_DATA_S)}; diff --git a/platform/ext/target/arm/mps3/an524/device/source/device_definition.c b/platform/ext/target/arm/mps3/an524/device/source/device_definition.c index 0dda9e976c..40ca53b2d2 100644 --- a/platform/ext/target/arm/mps3/an524/device/source/device_definition.c +++ b/platform/ext/target/arm/mps3/an524/device/source/device_definition.c @@ -344,21 +344,21 @@ struct ppc_sse200_dev_t APB_PPCEXP2_DEV_S = { /* CMSDK Timer driver structures */ #ifdef CMSDK_TIMER0_S static const struct timer_cmsdk_dev_cfg_t CMSDK_TIMER0_DEV_CFG_S -#ifdef TFM_ENABLE_SLIH_TEST +#ifdef TEST_NS_SLIH_IRQ TFM_LINK_SET_RO_IN_PARTITION_SECTION("TFM_SP_SLIH_TEST", "APP-ROT") #endif = { .base = CMSDK_TIMER0_BASE_S }; static struct timer_cmsdk_dev_data_t CMSDK_TIMER0_DEV_DATA_S -#ifdef TFM_ENABLE_SLIH_TEST +#ifdef TEST_NS_SLIH_IRQ TFM_LINK_SET_RW_IN_PARTITION_SECTION("TFM_SP_SLIH_TEST", "APP-ROT") #endif = { .is_initialized = 0 }; struct timer_cmsdk_dev_t CMSDK_TIMER0_DEV_S -#ifdef TFM_ENABLE_SLIH_TEST +#ifdef TEST_NS_SLIH_IRQ TFM_LINK_SET_RW_IN_PARTITION_SECTION("TFM_SP_SLIH_TEST", "APP-ROT") #endif = { diff --git a/platform/ext/target/arm/musca_b1/sse_200/CMakeLists.txt b/platform/ext/target/arm/musca_b1/sse_200/CMakeLists.txt index c70a5954b1..e47bc35a39 100644 --- a/platform/ext/target/arm/musca_b1/sse_200/CMakeLists.txt +++ b/platform/ext/target/arm/musca_b1/sse_200/CMakeLists.txt @@ -114,9 +114,9 @@ target_sources(platform_s target_cfg.c Native_Driver/ppc_sse200_drv.c Native_Driver/uart_pl011_drv.c - $<$<NOT:$<BOOL:${TFM_ENABLE_SLIH_TEST}>>:${CMAKE_CURRENT_SOURCE_DIR}/Native_Driver/timer_cmsdk_drv.c> + $<$<NOT:$<BOOL:${TEST_NS_SLIH_IRQ}>>:${CMAKE_CURRENT_SOURCE_DIR}/Native_Driver/timer_cmsdk_drv.c> ${CMAKE_SOURCE_DIR}/platform/ext/common/tfm_hal_isolation_mpu_v8m.c - $<$<OR:$<BOOL:${TEST_NS}>,$<BOOL:${TEST_S}>>:${CMAKE_CURRENT_SOURCE_DIR}/plat_test.c> + $<$<BOOL:${TFM_TEST}>:${CMAKE_CURRENT_SOURCE_DIR}/plat_test.c> $<$<BOOL:${TFM_PARTITION_PLATFORM}>:${CMAKE_CURRENT_SOURCE_DIR}/services/src/tfm_platform_system.c> $<$<BOOL:${FORWARD_PROT_MSG}>:${CMAKE_CURRENT_SOURCE_DIR}/mailbox/platform_multicore.c> $<$<BOOL:${FORWARD_PROT_MSG}>:${CMAKE_CURRENT_SOURCE_DIR}/mailbox/platform_ns_mailbox.c> @@ -132,7 +132,7 @@ target_sources(tfm_sprt PRIVATE # The SLIH test Partition accesses the timer as ARoT Partitions. # Put the driver to SPRT so that the SLIH tests can access it. - $<$<BOOL:${TFM_ENABLE_SLIH_TEST}>:${CMAKE_CURRENT_SOURCE_DIR}/Native_Driver/timer_cmsdk_drv.c> + $<$<BOOL:${TEST_NS_SLIH_IRQ}>:${CMAKE_CURRENT_SOURCE_DIR}/Native_Driver/timer_cmsdk_drv.c> ) target_compile_definitions(platform_s diff --git a/platform/ext/target/arm/musca_b1/sse_200/Device/Source/device_definition.c b/platform/ext/target/arm/musca_b1/sse_200/Device/Source/device_definition.c index ec30705dcb..e0e1968df7 100644 --- a/platform/ext/target/arm/musca_b1/sse_200/Device/Source/device_definition.c +++ b/platform/ext/target/arm/musca_b1/sse_200/Device/Source/device_definition.c @@ -365,17 +365,17 @@ struct uart_pl011_dev_t UART1_PL011_DEV_NS = {&(UART1_PL011_DEV_CFG_NS), /** CMSDK Timers driver structures */ #ifdef CMSDK_TIMER0_S static const struct timer_cmsdk_dev_cfg_t CMSDK_TIMER0_DEV_CFG_S -#ifdef TFM_ENABLE_SLIH_TEST +#ifdef TEST_NS_SLIH_IRQ TFM_LINK_SET_RO_IN_PARTITION_SECTION("TFM_SP_SLIH_TEST", "APP-ROT") #endif = {.base = MUSCA_B1_CMSDK_TIMER0_S_BASE}; static struct timer_cmsdk_dev_data_t CMSDK_TIMER0_DEV_DATA_S -#ifdef TFM_ENABLE_SLIH_TEST +#ifdef TEST_NS_SLIH_IRQ TFM_LINK_SET_RW_IN_PARTITION_SECTION("TFM_SP_SLIH_TEST", "APP-ROT") #endif = {.is_initialized = 0}; struct timer_cmsdk_dev_t CMSDK_TIMER0_DEV_S -#ifdef TFM_ENABLE_SLIH_TEST +#ifdef TEST_NS_SLIH_IRQ TFM_LINK_SET_RW_IN_PARTITION_SECTION("TFM_SP_SLIH_TEST", "APP-ROT") #endif = {&(CMSDK_TIMER0_DEV_CFG_S), &(CMSDK_TIMER0_DEV_DATA_S)}; diff --git a/platform/ext/target/arm/musca_b1/sse_200/config.cmake b/platform/ext/target/arm/musca_b1/sse_200/config.cmake index 86c5c5cad8..940fab1408 100644 --- a/platform/ext/target/arm/musca_b1/sse_200/config.cmake +++ b/platform/ext/target/arm/musca_b1/sse_200/config.cmake @@ -47,9 +47,9 @@ set(TFM_EXTRA_GENERATED_FILE_LIST_PATH ${CMAKE_SOURCE_DIR}/platform/ext/target/ set(PSA_API_TEST_TARGET "musca_b1" CACHE STRING "Target to use when building the PSA API tests") if(TFM_PSA_API) - if (TFM_ENABLE_FLIH_TEST) + if (TEST_NS_FLIH_IRQ) message(FATAL_ERROR "FLIH testing has not been supported!") endif() - set(TFM_ENABLE_SLIH_TEST ON CACHE BOOL "Enable SLIH testing") + set(TEST_NS_SLIH_IRQ ON CACHE BOOL "Enable SLIH testing") endif() diff --git a/platform/ext/target/arm/musca_b1/sse_200/manifest_list_with_se.yaml b/platform/ext/target/arm/musca_b1/sse_200/manifest_list_with_se.yaml index 5b53486e0a..19e6634f35 100644 --- a/platform/ext/target/arm/musca_b1/sse_200/manifest_list_with_se.yaml +++ b/platform/ext/target/arm/musca_b1/sse_200/manifest_list_with_se.yaml @@ -165,7 +165,7 @@ "short_name": "TFM_SP_SLIH_TEST", "manifest": "${TFM_TEST_PATH}/test_services/tfm_slih_test_service/tfm_slih_test_service.yaml", "source_path": "${TFM_TEST_PATH}", - "conditional": "TFM_ENABLE_SLIH_TEST", + "conditional": "TEST_NS_SLIH_IRQ", "version_major": 0, "version_minor": 1, "linker_pattern": { @@ -179,7 +179,7 @@ "short_name": "TFM_SP_FLIH_TEST", "manifest": "${TFM_TEST_PATH}/test_services/tfm_flih_test_service/tfm_flih_test_service.yaml", "source_path": "${TFM_TEST_PATH}", - "conditional": "TFM_ENABLE_FLIH_TEST", + "conditional": "TEST_NS_FLIH_IRQ", "version_major": 0, "version_minor": 1, "linker_pattern": { diff --git a/platform/ext/target/cypress/psoc64/Device/Source/device_definition.c b/platform/ext/target/cypress/psoc64/Device/Source/device_definition.c index 15d01bc758..1ac1312b98 100644 --- a/platform/ext/target/cypress/psoc64/Device/Source/device_definition.c +++ b/platform/ext/target/cypress/psoc64/Device/Source/device_definition.c @@ -63,9 +63,9 @@ const cy_stc_scb_uart_config_t KITPROG_UART_config = /* TCPWM Timer driver structures */ #if defined(CY_TCPWM0_TIMER0_S) cy_stc_tcpwm_counter_config_t tcpwm_config_timer0 -#if defined(TFM_ENABLE_SLIH_TEST) +#if defined(TEST_NS_SLIH_IRQ) TFM_LINK_SET_RW_IN_PARTITION_SECTION("TFM_SP_SLIH_TEST", "APP-ROT") -#endif /* TFM_ENABLE_SLIH_TEST */ +#endif /* TEST_NS_SLIH_IRQ */ = { .period = TIMER0_MATCH, /* Upper limit (wrap around) */ .clockPrescaler = CY_TCPWM_COUNTER_PRESCALER_DIVBY_8, /* Clk_counter = Clk_input / 8 */ @@ -90,9 +90,9 @@ cy_stc_tcpwm_counter_config_t tcpwm_config_timer0 #if (CY_CPU_CORTEX_M0P) cy_stc_sysint_t CY_TCPWM_NVIC_CFG_S -#if defined(TFM_ENABLE_SLIH_TEST) +#if defined(TEST_NS_SLIH_IRQ) TFM_LINK_SET_RW_IN_PARTITION_SECTION("TFM_SP_SLIH_TEST", "APP-ROT") -#endif /* TFM_ENABLE_SLIH_TEST */ +#endif /* TEST_NS_SLIH_IRQ */ = { .intrSrc = TFM_TIMER0_IRQ, /* NVIC #3 */ .cm0pSrc = tcpwm_0_interrupts_0_IRQn, /* IRQ 123 */ @@ -100,9 +100,9 @@ cy_stc_sysint_t CY_TCPWM_NVIC_CFG_S }; #endif tfm_timer_irq_test_dev_t CY_TCPWM0_TIMER0_DEV_S -#if defined(TFM_ENABLE_SLIH_TEST) +#if defined(TEST_NS_SLIH_IRQ) TFM_LINK_SET_RW_IN_PARTITION_SECTION("TFM_SP_SLIH_TEST", "APP-ROT") -#endif /* TFM_ENABLE_SLIH_TEST */ +#endif /* TEST_NS_SLIH_IRQ */ = { .is_initialized = false, .tcpwm_base = TCPWM0, diff --git a/platform/ext/target/cypress/psoc64/target_cfg.c b/platform/ext/target/cypress/psoc64/target_cfg.c index f596b736c8..b0bcbe15cf 100755 --- a/platform/ext/target/cypress/psoc64/target_cfg.c +++ b/platform/ext/target/cypress/psoc64/target_cfg.c @@ -131,7 +131,7 @@ extern void Cy_Platform_Init(void); void platform_init(void) { cy_en_sysclk_status_t clk_rc; -#ifdef TFM_ENABLE_SLIH_TEST +#ifdef TEST_NS_SLIH_IRQ cy_en_sysint_status_t int_rc; #endif @@ -172,12 +172,12 @@ void platform_init(void) Cy_Platform_Init(); -#ifdef TFM_ENABLE_SLIH_TEST +#ifdef TEST_NS_SLIH_IRQ int_rc = Cy_SysInt_Init(&CY_TCPWM_NVIC_CFG_S, TFM_TIMER0_IRQ_Handler); if (int_rc != CY_SYSINT_SUCCESS) { SPMLOG_INFMSG("WARNING: Fail to initialize timer interrupt (IRQ TEST might fail)!\r\n"); } -#endif /* TFM_ENABLE_SLIH_TEST */ +#endif /* TEST_NS_SLIH_IRQ */ /* make sure CM4 is disabled */ if (CY_SYS_CM4_STATUS_ENABLED == Cy_SysGetCM4Status()) { diff --git a/platform/ext/target/lairdconnectivity/common/core/plat_test.c b/platform/ext/target/lairdconnectivity/common/core/plat_test.c index dbb3e171bb..ee669f0b9d 100644 --- a/platform/ext/target/lairdconnectivity/common/core/plat_test.c +++ b/platform/ext/target/lairdconnectivity/common/core/plat_test.c @@ -340,7 +340,7 @@ void pal_timer_stop_ns(void) timer_stop(NRF_TIMER1); } -#if !defined(TFM_ENABLE_SLIH_TEST) +#if !defined(TEST_NS_SLIH_IRQ) /* Watchdog timeout handler. */ void TIMER1_Handler(void) { diff --git a/platform/ext/target/nordic_nrf/common/core/plat_test.c b/platform/ext/target/nordic_nrf/common/core/plat_test.c index 7b8df3aedc..1b9eeb5974 100644 --- a/platform/ext/target/nordic_nrf/common/core/plat_test.c +++ b/platform/ext/target/nordic_nrf/common/core/plat_test.c @@ -139,7 +139,7 @@ void pal_timer_stop_ns(void) timer_stop(NRF_TIMER1); } -#if !defined(TFM_ENABLE_SLIH_TEST) +#if !defined(TEST_NS_SLIH_IRQ) /* Watchdog timeout handler. */ void TIMER1_Handler(void) { diff --git a/platform/ext/target/nuvoton/m2351/device/source/armclang/m2351_s.sct b/platform/ext/target/nuvoton/m2351/device/source/armclang/m2351_s.sct index 1567b8d402..fa3b57f935 100644 --- a/platform/ext/target/nuvoton/m2351/device/source/armclang/m2351_s.sct +++ b/platform/ext/target/nuvoton/m2351/device/source/armclang/m2351_s.sct @@ -149,13 +149,13 @@ LR_CODE S_CODE_START { } #endif /* TFM_PARTITION_TEST_CORE_IPC */ -#ifdef TFM_ENABLE_SLIH_TEST +#ifdef TEST_NS_SLIH_IRQ TFM_SLIH_TEST_LINKER +0 ALIGN 32 { *tfm_Slih_test_service.* (+RO) *timer_cmsdk* (+RO) *(TFM_SLIH_TEST_ATTR_FN) } -#endif /* TFM_ENABLE_SLIH_TEST */ +#endif /* TEST_NS_SLIH_IRQ */ #ifdef TFM_PARTITION_TEST_SECURE_SERVICES TFM_SP_SECURE_CLIENT_2_LINKER +0 ALIGN 32 { @@ -284,7 +284,7 @@ LR_CODE S_CODE_START { #endif #endif /* TFM_PARTITION_TEST_CORE_IPC */ -#ifdef TFM_ENABLE_SLIH_TEST +#ifdef TEST_NS_SLIH_IRQ TFM_SP_SLIH_TEST_LINKER_DATA +0 ALIGN 32 { *tfm_slih_test_service.* (+RW +ZI) *timer_cmsdk* (+RW +ZI) @@ -296,7 +296,7 @@ LR_CODE S_CODE_START { TFM_SP_SLIH_TEST_LINKER_STACK +0 ALIGN 128 EMPTY 0x0400 { } #endif -#endif /* TFM_ENABLE_SLIH_TEST */ +#endif /* TEST_NS_SLIH_IRQ */ #ifdef TFM_PARTITION_TEST_SECURE_SERVICES TFM_SP_SECURE_CLIENT_2_LINKER_DATA +0 ALIGN 32 { diff --git a/platform/ext/target/nuvoton/m2354/device/source/armclang/m2354_s.sct b/platform/ext/target/nuvoton/m2354/device/source/armclang/m2354_s.sct index 102ed12e91..86dd8cf26b 100644 --- a/platform/ext/target/nuvoton/m2354/device/source/armclang/m2354_s.sct +++ b/platform/ext/target/nuvoton/m2354/device/source/armclang/m2354_s.sct @@ -149,13 +149,13 @@ LR_CODE S_CODE_START { } #endif /* TFM_PARTITION_TEST_CORE_IPC */ -#ifdef TFM_ENABLE_SLIH_TEST +#ifdef TEST_NS_SLIH_IRQ TFM_SP_SLIH_TEST_LINKER +0 ALIGN 32 { *tfm_slih_test_service.* (+RO) *timer_cmsdk* (+RO) *(TFM_SP_SLIH_TEST_ATTR_FN) } -#endif /* TFM_ENABLE_SLIH_TEST */ +#endif /* TEST_NS_SLIH_IRQ */ #ifdef TFM_PARTITION_TEST_SECURE_SERVICES TFM_SP_SECURE_CLIENT_2_LINKER +0 ALIGN 32 { @@ -278,7 +278,7 @@ LR_CODE S_CODE_START { #endif #endif /* TFM_PARTITION_TEST_CORE_IPC */ -#ifdef TFM_ENABLE_SLIH_TEST +#ifdef TEST_NS_SLIH_IRQ TFM_SP_SLIH_TEST_LINKER_DATA +0 ALIGN 32 { *tfm_slih_test_service.* (+RW +ZI) *timer_cmsdk* (+RW +ZI) @@ -290,7 +290,7 @@ LR_CODE S_CODE_START { TFM_SP_SLIH_TEST_LINKER_STACK +0 ALIGN 128 EMPTY 0x0400 { } #endif -#endif /* TFM_ENABLE_SLIH_TEST */ +#endif /* TEST_NS_SLIH_IRQ */ #ifdef TFM_PARTITION_TEST_SECURE_SERVICES TFM_SP_SECURE_CLIENT_2_LINKER_DATA +0 ALIGN 32 { diff --git a/platform/ext/target/nxp/common/plat_test.c b/platform/ext/target/nxp/common/plat_test.c index 416b6d7440..66a40b2783 100644 --- a/platform/ext/target/nxp/common/plat_test.c +++ b/platform/ext/target/nxp/common/plat_test.c @@ -67,7 +67,7 @@ uint32_t tfm_plat_test_get_userled_mask(void) #endif /* TFM_ENABLE_PERIPH_ACCESS_TEST */ -#ifdef TFM_ENABLE_SLIH_TEST +#ifdef TEST_NS_SLIH_IRQ #if (__ARM_FEATURE_CMSE & 0x2) /* Secure */ @@ -154,4 +154,4 @@ void tfm_plat_test_non_secure_timer_stop(void) } #endif /* (__ARM_FEATURE_CMSE & 0x2) */ -#endif /* TFM_ENABLE_SLIH_TEST */ +#endif /* TEST_NS_SLIH_IRQ */ diff --git a/platform/ext/target/stm/common/stm32l5xx/CMakeLists.txt b/platform/ext/target/stm/common/stm32l5xx/CMakeLists.txt index 10dbce2761..bbbdc538f0 100644 --- a/platform/ext/target/stm/common/stm32l5xx/CMakeLists.txt +++ b/platform/ext/target/stm/common/stm32l5xx/CMakeLists.txt @@ -19,7 +19,7 @@ target_include_directories(platform_region_defs target_compile_definitions(platform_region_defs INTERFACE - $<$<OR:$<BOOL:${TEST_NS}>,$<BOOL:${TEST_S}>>:FLASH_LAYOUT_FOR_TEST> + $<$<BOOL:${TFM_TEST}>:FLASH_LAYOUT_FOR_TEST> ) #========================= Platform common defs ===============================# @@ -219,7 +219,7 @@ install(FILES ${CMAKE_CURRENT_SOURCE_DIR}/boards/scripts/regression.sh PERMISSIONS OWNER_EXECUTE OWNER_WRITE OWNER_READ DESTINATION ${CMAKE_BINARY_DIR} ) -if (${TEST_S} OR ${TEST_NS}) +if (${TFM_TEST}) #the define FLASH_LAYOUT_FOR_TEST #increase SECURE and NON SECURE IMAGE and modify the content of low_level_device.c from BL2 (low_level_flash.c) set(FLAGS_FOR_BL2_PREPROCESSING diff --git a/platform/ext/target/stm/nucleo_l552ze_q/include/flash_layout.h b/platform/ext/target/stm/nucleo_l552ze_q/include/flash_layout.h index 705e230ffd..7d29e645f3 100644 --- a/platform/ext/target/stm/nucleo_l552ze_q/include/flash_layout.h +++ b/platform/ext/target/stm/nucleo_l552ze_q/include/flash_layout.h @@ -76,7 +76,7 @@ #define FLASH_AREA_SCRATCH_OFFSET (FLASH_AREA_BL2_NOHDP_OFFSET+FLASH_AREA_BL2_NOHDP_SIZE) #define FLASH_AREA_SCRATCH_SIZE (0x2000) /* according to test flash layout can change */ -#if defined(FLASH_LAYOUT_FOR_TEST) || defined(TEST_FRAMEWORK_S) || defined(TEST_FRAMEWORK_NS) +#if defined(FLASH_LAYOUT_FOR_TEST) /* Non Volatile Counters definitions */ #define FLASH_NV_COUNTERS_SECTOR_SIZE (0x1000) /* fix me with overwrite scratch is not required */ diff --git a/platform/ext/target/stm/stm32l562e_dk/include/flash_layout.h b/platform/ext/target/stm/stm32l562e_dk/include/flash_layout.h index f02175a9c7..5318f0445a 100644 --- a/platform/ext/target/stm/stm32l562e_dk/include/flash_layout.h +++ b/platform/ext/target/stm/stm32l562e_dk/include/flash_layout.h @@ -109,7 +109,7 @@ #define FLASH_AREA_SCRATCH_OFFSET (FLASH_AREA_BL2_NOHDP_OFFSET+FLASH_AREA_BL2_NOHDP_SIZE) #define FLASH_AREA_SCRATCH_SIZE (0x2000) /* according to test flash layout can change */ -#if defined(FLASH_LAYOUT_FOR_TEST) || defined(TEST_FRAMEWORK_S) || defined(TEST_FRAMEWORK_NS) +#if defined(FLASH_LAYOUT_FOR_TEST) /* Non Volatile Counters definitions */ #define FLASH_NV_COUNTERS_SECTOR_SIZE (0x1000) #if defined(EXTERNAL_FLASH) diff --git a/platform/include/tfm_plat_test.h b/platform/include/tfm_plat_test.h index 013081d2cc..da41346152 100644 --- a/platform/include/tfm_plat_test.h +++ b/platform/include/tfm_plat_test.h @@ -54,9 +54,9 @@ uint32_t tfm_plat_test_get_userled_mask(void); * the timer should be long enough so that the test service can go to the state * where it starts waiting for the interrupt. */ -#ifdef TFM_ENABLE_SLIH_TEST +#ifdef TEST_NS_SLIH_IRQ TFM_LINK_SET_RO_IN_PARTITION_SECTION("TFM_SP_SLIH_TEST", "APP-ROT") -#elif defined(TFM_ENABLE_FLIH_TEST) +#elif defined(TEST_NS_FLIH_IRQ) TFM_LINK_SET_RO_IN_PARTITION_SECTION("TFM_SP_FLIH_TEST", "APP-ROT") #endif void tfm_plat_test_secure_timer_start(void); @@ -65,9 +65,9 @@ void tfm_plat_test_secure_timer_start(void); /** * \brief Clears Secure timer interrupt */ -#ifdef TFM_ENABLE_SLIH_TEST +#ifdef TEST_NS_SLIH_IRQ TFM_LINK_SET_RO_IN_PARTITION_SECTION("TFM_SP_SLIH_TEST", "APP-ROT") -#elif TFM_ENABLE_FLIH_TEST +#elif TEST_NS_FLIH_IRQ TFM_LINK_SET_RO_IN_PARTITION_SECTION("TFM_SP_FLIH_TEST", "APP-ROT") #endif void tfm_plat_test_secure_timer_clear_intr(void); @@ -75,9 +75,9 @@ void tfm_plat_test_secure_timer_clear_intr(void); /** * \brief Stops the Secure timer and clears the timer interrupt. */ -#ifdef TFM_ENABLE_SLIH_TEST +#ifdef TEST_NS_SLIH_IRQ TFM_LINK_SET_RO_IN_PARTITION_SECTION("TFM_SP_SLIH_TEST", "APP-ROT") -#elif defined(TFM_ENABLE_FLIH_TEST) +#elif defined(TEST_NS_FLIH_IRQ) TFM_LINK_SET_RO_IN_PARTITION_SECTION("TFM_SP_FLIH_TEST", "APP-ROT") #endif void tfm_plat_test_secure_timer_stop(void); |