Library Model deprecation
-Remove TFM_PSA_API since Library Model is deprecated.
-Remove some obsolete test cases.
Signed-off-by: Summer Qin <summer.qin@arm.com>
Change-Id: I690e6b0887c4573783bf8c264178c47295a8f098
diff --git a/examples/corstone310_fvp_dma/dma350_ns/CMakeLists.txt b/examples/corstone310_fvp_dma/dma350_ns/CMakeLists.txt
index a8f1259..1facfec 100644
--- a/examples/corstone310_fvp_dma/dma350_ns/CMakeLists.txt
+++ b/examples/corstone310_fvp_dma/dma350_ns/CMakeLists.txt
@@ -46,11 +46,6 @@
tfm_partition_defs
)
-target_compile_definitions(tfm_ns_interface
- INTERFACE
- TFM_PSA_API
-)
-
############################# TFM NS app #######################################
add_executable(tfm_ns)
diff --git a/examples/corstone310_fvp_dma/triggering_example/CMakeLists.txt b/examples/corstone310_fvp_dma/triggering_example/CMakeLists.txt
index 0a2816c..9d5074b 100644
--- a/examples/corstone310_fvp_dma/triggering_example/CMakeLists.txt
+++ b/examples/corstone310_fvp_dma/triggering_example/CMakeLists.txt
@@ -34,11 +34,6 @@
tfm_partition_defs
)
-target_compile_definitions(tfm_ns_interface
- INTERFACE
- TFM_PSA_API
-)
-
############################# TFM NS app #######################################
add_executable(tfm_ns)
diff --git a/examples/vad_an552/ns_side/CMakeLists.txt b/examples/vad_an552/ns_side/CMakeLists.txt
index 9a78606..a3550f4 100644
--- a/examples/vad_an552/ns_side/CMakeLists.txt
+++ b/examples/vad_an552/ns_side/CMakeLists.txt
@@ -54,11 +54,6 @@
tfm_partition_defs
)
-target_compile_definitions(tfm_ns_interface
- INTERFACE
- TFM_PSA_API
-)
-
############################# TFM NS app #######################################
add_executable(tfm_ns)
diff --git a/partitions/dma350_unpriv_partition/CMakeLists.txt b/partitions/dma350_unpriv_partition/CMakeLists.txt
index ec94bea..a4718b0 100644
--- a/partitions/dma350_unpriv_partition/CMakeLists.txt
+++ b/partitions/dma350_unpriv_partition/CMakeLists.txt
@@ -21,13 +21,11 @@
tfm_dma350_example_partition.c
dma350_lib/dma350_lib_unprivileged.c
dma350_lib/dma350_privileged_config.c
- $<$<BOOL:${TFM_PSA_API}>:
- ${CMAKE_BINARY_DIR}/generated/auto_generated/intermedia_tfm_dma350_example_partition.c>
+ ${CMAKE_BINARY_DIR}/generated/auto_generated/intermedia_tfm_dma350_example_partition.c
)
target_sources(tfm_partitions
INTERFACE
- $<$<BOOL:${TFM_PSA_API}>:
- ${CMAKE_BINARY_DIR}/generated/auto_generated/load_info_tfm_dma350_example_partition.c>
+ ${CMAKE_BINARY_DIR}/generated/auto_generated/load_info_tfm_dma350_example_partition.c
)
target_include_directories(tfm_app_rot_partition_dma350_unpriv
diff --git a/partitions/external_trusted_secure_storage/docs/etss_readme.rst b/partitions/external_trusted_secure_storage/docs/etss_readme.rst
index 483b620..e46ae70 100755
--- a/partitions/external_trusted_secure_storage/docs/etss_readme.rst
+++ b/partitions/external_trusted_secure_storage/docs/etss_readme.rst
@@ -248,7 +248,6 @@
cd <TF-M base folder>
cmake -S . -B cmake_build -DTFM_PLATFORM=stm/stm32l562e_dk \
-DTFM_TOOLCHAIN_FILE=toolchain_GNUARM.cmake -DTEST_S=ON -DTEST_NS=ON \
- -DTFM_PSA_API=ON \
-DTFM_EXTRA_MANIFEST_LIST_FILES=<tf-m-extras-abs-path>/partitions/external_trusted_secure_storage/etss_manifest_list.yaml \
-DTFM_EXTRA_PARTITION_PATHS=<tf-m-extras-abs-path>/partitions/external_trusted_secure_storage/etss_partition \
-DTFM_PARTITION_EXTERNAL_TRUSTED_SECURE_STORAGE=ON -DTFM_ISOLATION_LEVEL=2
diff --git a/partitions/external_trusted_secure_storage/etss_partition/CMakeLists.txt b/partitions/external_trusted_secure_storage/etss_partition/CMakeLists.txt
index a0a978e..be0b9ad 100644
--- a/partitions/external_trusted_secure_storage/etss_partition/CMakeLists.txt
+++ b/partitions/external_trusted_secure_storage/etss_partition/CMakeLists.txt
@@ -43,13 +43,11 @@
# The generated sources
target_sources(tfm_psa_rot_partition_etss
PRIVATE
- $<$<BOOL:${TFM_PSA_API}>:
- ${CMAKE_BINARY_DIR}/generated/secure_fw/partitions/external_trusted_secure_storage/auto_generated/intermedia_etss.c>
+ ${CMAKE_BINARY_DIR}/generated/secure_fw/partitions/external_trusted_secure_storage/auto_generated/intermedia_etss.c
)
target_sources(tfm_partitions
INTERFACE
- $<$<BOOL:${TFM_PSA_API}>:
- ${CMAKE_BINARY_DIR}/generated/secure_fw/partitions/external_trusted_secure_storage/auto_generated/load_info_etss.c>
+ ${CMAKE_BINARY_DIR}/generated/secure_fw/partitions/external_trusted_secure_storage/auto_generated/load_info_etss.c
)
target_link_libraries(tfm_psa_rot_partition_etss
diff --git a/partitions/external_trusted_secure_storage/suites/etss/secure/etss_s_interface_testsuite.c b/partitions/external_trusted_secure_storage/suites/etss/secure/etss_s_interface_testsuite.c
index 4071aa2..8aa0efb 100644
--- a/partitions/external_trusted_secure_storage/suites/etss/secure/etss_s_interface_testsuite.c
+++ b/partitions/external_trusted_secure_storage/suites/etss/secure/etss_s_interface_testsuite.c
@@ -51,7 +51,6 @@
static void tfm_etss_test_2001(struct test_result_t *ret);
static void tfm_etss_test_2002(struct test_result_t *ret);
static void tfm_etss_test_2003(struct test_result_t *ret);
-static void tfm_etss_test_2004(struct test_result_t *ret);
static void tfm_etss_test_2005(struct test_result_t *ret);
static void tfm_etss_test_2006(struct test_result_t *ret);
static void tfm_etss_test_2007(struct test_result_t *ret);
@@ -61,7 +60,6 @@
static void tfm_etss_test_2011(struct test_result_t *ret);
static void tfm_etss_test_2012(struct test_result_t *ret);
static void tfm_etss_test_2013(struct test_result_t *ret);
-static void tfm_etss_test_2014(struct test_result_t *ret);
static void tfm_etss_test_2015(struct test_result_t *ret);
static void tfm_etss_test_2016(struct test_result_t *ret);
static void tfm_etss_test_2017(struct test_result_t *ret);
@@ -78,8 +76,6 @@
"Set interface with create flags"},
{&tfm_etss_test_2003, "TFM_ETSS_TEST_2003",
"Set interface with NULL data pointer"},
- {&tfm_etss_test_2004, "TFM_ETSS_TEST_2004",
- "Set interface with invalid data length"},
{&tfm_etss_test_2005, "TFM_ETSS_TEST_2005",
"Set interface with write once UID"},
{&tfm_etss_test_2006, "TFM_ETSS_TEST_2006",
@@ -98,8 +94,6 @@
"Get info interface with valid UID"},
{&tfm_etss_test_2013, "TFM_ETSS_TEST_2013",
"Get info interface with invalid UIDs"},
- {&tfm_etss_test_2014, "TFM_ETSS_TEST_2014",
- "Get info interface with NULL info pointer"},
{&tfm_etss_test_2015, "TFM_ETSS_TEST_2015",
"Remove interface with valid UID"},
{&tfm_etss_test_2016, "TFM_ETSS_TEST_2016",
@@ -249,37 +243,6 @@
/**
* \brief Tests set function with:
- * - Data length longer than maximum permitted
- */
-static void tfm_etss_test_2004(struct test_result_t *ret)
-{
-#ifndef TFM_PSA_API
- etss_err_t err;
- const psa_storage_uid_t uid = TEST_UID_1;
- const psa_storage_create_flags_t flags = PSA_STORAGE_FLAG_NONE;
- const uint32_t data_len = INVALID_DATA_LEN;
- const uint8_t write_data[] = WRITE_DATA;
-
- /* A parameter with a buffer pointer where its data length is longer than
- * maximum permitted, it is treated as a secure violation.
- * TF-M framework rejects the request with a proper error code.
- * The ETSS secure PSA ETSS implementation returns
- * ETSS_ERR_INVALID_ARGUMENT in that case.
- */
-
- /* Set with data length longer than the maximum supported */
- err = tfm_etss_set(uid, data_len, write_data, flags);
- if (err != ETSS_ERR_INVALID_ARGUMENT) {
- TEST_FAIL("Set should not succeed with invalid data length");
- return;
- }
-
-#endif
- ret->val = TEST_PASSED;
-}
-
-/**
- * \brief Tests set function with:
* - Write once UID that has already been created
*/
static void tfm_etss_test_2005(struct test_result_t *ret)
@@ -512,7 +475,6 @@
* - Offset greater than UID length
* - Data length greater than UID length
* - Data length + offset greater than UID length
- * - Invalid data len and offset
*/
static void tfm_etss_test_2009(struct test_result_t *ret)
{
@@ -601,35 +563,6 @@
return;
}
-#ifndef TFM_PSA_API
- /* Get with data length and offset set to invalid values */
- read_len = INVALID_DATA_LEN;
- offset = INVALID_OFFSET;
-
- /* Reset read_data to original READ_DATA */
- tfm_memcpy(read_data, READ_DATA, sizeof(read_data));
-
- /* A parameter with a buffer pointer where its data length is longer than
- * maximum permitted, it is treated as a secure violation.
- * TF-M framework rejects the request with a proper error code.
- * The ETSS secure PSA ETSS implementation returns
- * ETSS_ERR_INVALID_ARGUMENT in that case.
- */
-
- err = tfm_etss_get(uid, offset, read_len, read_data + HALF_PADDING_SIZE,
- &read_data_len);
- if (err != ETSS_ERR_INVALID_ARGUMENT) {
- TEST_FAIL("Get should not succeed with invalid arguments");
- return;
- }
-
- /* Check that the read data is unchanged */
- if (tfm_memcmp(read_data, READ_DATA, sizeof(read_data)) != 0) {
- TEST_FAIL("Read data should be equal to original read data");
- return;
- }
-#endif
-
/* Call remove to clean up storage for the next test */
err = tfm_etss_remove(uid);
if (err != ETSS_SUCCESS) {
@@ -811,49 +744,6 @@
}
/**
- * \brief Tests get info function with:
- * - NULL info pointer
- */
-static void tfm_etss_test_2014(struct test_result_t *ret)
-{
- etss_err_t err;
- const psa_storage_uid_t uid = TEST_UID_3;
- const psa_storage_create_flags_t flags = PSA_STORAGE_FLAG_NONE;
- const uint32_t data_len = WRITE_DATA_SIZE;
- const uint8_t write_data[] = WRITE_DATA;
-
- err = tfm_etss_set(uid, data_len, write_data, flags);
- if (err != ETSS_SUCCESS) {
- TEST_FAIL("Set should not fail");
- return;
- }
-
- /* A parameter with a null pointer is treated as a secure violation.
- * TF-M framework rejects the request with a proper error code.
- * The ETSS secure PSA ETSS implementation returns
- * ETSS_ERR_GENERIC_ERROR in that case.
- */
-
- /* Get info with NULL info pointer */
-#ifndef TFM_PSA_API
- err = tfm_etss_get_info(uid, NULL);
- if (err != ETSS_ERR_INVALID_ARGUMENT) {
- TEST_FAIL("Get info should not succeed with NULL info pointer");
- return;
- }
-#endif
-
- /* Call remove to clean up storage for the next test */
- err = tfm_etss_remove(uid);
- if (err != ETSS_SUCCESS) {
- TEST_FAIL("Remove should not fail with valid UID");
- return;
- }
-
- ret->val = TEST_PASSED;
-}
-
-/**
* \brief Tests remove function with:
* - Valid UID
*/
diff --git a/partitions/measured_boot/CMakeLists.txt b/partitions/measured_boot/CMakeLists.txt
index 29cb0ed..747cd8d 100644
--- a/partitions/measured_boot/CMakeLists.txt
+++ b/partitions/measured_boot/CMakeLists.txt
@@ -27,13 +27,11 @@
# The generated sources
target_sources(tfm_psa_rot_partition_measured_boot
PRIVATE
- $<$<BOOL:${TFM_PSA_API}>:
- ${CMAKE_BINARY_DIR}/generated/secure_fw/partitions/measured_boot/auto_generated/intermedia_tfm_measured_boot.c>
+ ${CMAKE_BINARY_DIR}/generated/secure_fw/partitions/measured_boot/auto_generated/intermedia_tfm_measured_boot.c
)
target_sources(tfm_partitions
INTERFACE
- $<$<BOOL:${TFM_PSA_API}>:
- ${CMAKE_BINARY_DIR}/generated/secure_fw/partitions/measured_boot/auto_generated/load_info_tfm_measured_boot.c>
+ ${CMAKE_BINARY_DIR}/generated/secure_fw/partitions/measured_boot/auto_generated/load_info_tfm_measured_boot.c
)
# Set include directory