diff --git a/CMakeLists.txt b/CMakeLists.txt index bc122f5167..42e4ccb34d 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -373,6 +373,20 @@ foreach(target IN LISTS tf_psa_crypto_library_targets) endif() endforeach(target) +# +# TF-PSA-Crypto directories with internal headers that are currently still +# consumed by Mbed TLS. When we have finished cleaning up this list should be +# empty. +# +set(TF_PSA_CRYPTO_PRIVATE_INCLUDE_DIRS + ${CMAKE_CURRENT_SOURCE_DIR}/tf-psa-crypto/core + ${CMAKE_CURRENT_SOURCE_DIR}/tf-psa-crypto/dispatch + ${CMAKE_CURRENT_SOURCE_DIR}/tf-psa-crypto/drivers/builtin/src + ${CMAKE_CURRENT_SOURCE_DIR}/tf-psa-crypto/extras + ${CMAKE_CURRENT_SOURCE_DIR}/tf-psa-crypto/platform + ${CMAKE_CURRENT_SOURCE_DIR}/tf-psa-crypto/utilities +) + add_subdirectory(library) add_subdirectory(pkgconfig) @@ -416,16 +430,16 @@ if(ENABLE_TESTING OR ENABLE_PROGRAMS) endif() target_include_directories(mbedtls_test PRIVATE ${CMAKE_CURRENT_BINARY_DIR}/tests/include - PRIVATE ${MBEDTLS_FRAMEWORK_DIR}/tests/include - PRIVATE tests/include - PRIVATE include - PRIVATE tf-psa-crypto/include - PRIVATE tf-psa-crypto/drivers/builtin/include - PRIVATE tf-psa-crypto/drivers/everest/include - PRIVATE tf-psa-crypto/drivers/pqcp/include - PRIVATE library - PRIVATE tf-psa-crypto/core - PRIVATE tf-psa-crypto/drivers/builtin/src) + ${MBEDTLS_FRAMEWORK_DIR}/tests/include + tests/include + include + tf-psa-crypto/include + tf-psa-crypto/drivers/builtin/include + tf-psa-crypto/drivers/everest/include + tf-psa-crypto/drivers/pqcp/include + library + ${TF_PSA_CRYPTO_PRIVATE_INCLUDE_DIRS} + ) # Request C11, needed for memory poisoning tests set_target_properties(mbedtls_test PROPERTIES C_STANDARD 11) set_config_files_compile_definitions(mbedtls_test) @@ -453,16 +467,15 @@ if(ENABLE_TESTING OR ENABLE_PROGRAMS) endif() target_include_directories(mbedtls_test_helpers PRIVATE ${CMAKE_CURRENT_BINARY_DIR}/tests/include - PRIVATE ${MBEDTLS_FRAMEWORK_DIR}/tests/include - PRIVATE tests/include - PRIVATE include - PRIVATE tf-psa-crypto/include - PRIVATE tf-psa-crypto/drivers/builtin/include - PRIVATE library - PRIVATE tf-psa-crypto/core - PRIVATE tf-psa-crypto/drivers/builtin/src - PRIVATE tf-psa-crypto/drivers/everest/include - PRIVATE tf-psa-crypto/drivers/pqcp/include + ${MBEDTLS_FRAMEWORK_DIR}/tests/include + tests/include + include + tf-psa-crypto/include + tf-psa-crypto/drivers/builtin/include + library + tf-psa-crypto/drivers/everest/include + tf-psa-crypto/drivers/pqcp/include + ${TF_PSA_CRYPTO_PRIVATE_INCLUDE_DIRS} ) set_config_files_compile_definitions(mbedtls_test_helpers) diff --git a/framework b/framework index e07b6643e8..9b92164c47 160000 --- a/framework +++ b/framework @@ -1 +1 @@ -Subproject commit e07b6643e8db5fe2fdc20be288b91a2194316862 +Subproject commit 9b92164c47fdaecb2600b417733507e2a105c3a5 diff --git a/library/CMakeLists.txt b/library/CMakeLists.txt index 5474e2cacf..f1b7c74aba 100644 --- a/library/CMakeLists.txt +++ b/library/CMakeLists.txt @@ -236,15 +236,14 @@ foreach(target IN LISTS target_libraries) add_library(MbedTLS::${target} ALIAS ${target}) # add_subdirectory support # Include public header files from /include, /tf-psa-crypto/include/ and # tf-psa-crypto/drivers/builtin/include/. Include private header files - # from /library, tf-psa-crypto/core/ and tf-psa-crypto/drivers/builtin/src/. + # from /library and ${TF_PSA_CRYPTO_PRIVATE_INCLUDE_DIRS}. target_include_directories(${target} PUBLIC $ $ $ $ PRIVATE ${MBEDTLS_DIR}/library/ - ${MBEDTLS_DIR}/tf-psa-crypto/core - ${MBEDTLS_DIR}/tf-psa-crypto/drivers/builtin/src + ${TF_PSA_CRYPTO_PRIVATE_INCLUDE_DIRS} # needed for generated headers ${CMAKE_CURRENT_BINARY_DIR}) set_config_files_compile_definitions(${target}) diff --git a/programs/Makefile b/programs/Makefile index 36679dcb0f..846361d788 100644 --- a/programs/Makefile +++ b/programs/Makefile @@ -199,7 +199,7 @@ endif test/metatest$(EXEXT): $(FRAMEWORK)/tests/programs/metatest.c $(DEP) echo " CC $(FRAMEWORK)/tests/programs/metatest.c" - $(CC) $(LOCAL_CFLAGS) $(CFLAGS) -I../library -I../tf-psa-crypto/core -I../tf-psa-crypto/drivers/builtin/include -I../tf-psa-crypto/drivers/builtin/src $(FRAMEWORK)/tests/programs/metatest.c $(LOCAL_LDFLAGS) $(LDFLAGS) -o $@ + $(CC) $(LOCAL_CFLAGS) $(CFLAGS) -I../library -I../tf-psa-crypto/core -I../tf-psa-crypto/drivers/builtin/src -I../tf-psa-crypto/platform $(FRAMEWORK)/tests/programs/metatest.c $(LOCAL_LDFLAGS) $(LDFLAGS) -o $@ test/query_config.o: test/query_config.c $(FRAMEWORK)/tests/programs/query_config.h $(DEP) echo " CC test/query_config.c" diff --git a/programs/test/CMakeLists.txt b/programs/test/CMakeLists.txt index 8a5d6ba822..0de71a9b03 100644 --- a/programs/test/CMakeLists.txt +++ b/programs/test/CMakeLists.txt @@ -103,9 +103,9 @@ foreach(exe IN LISTS executables) endforeach() target_include_directories(metatest - PRIVATE ${CMAKE_CURRENT_SOURCE_DIR}/../../tf-psa-crypto/drivers/builtin/include - ${CMAKE_CURRENT_SOURCE_DIR}/../../tf-psa-crypto/drivers/builtin/src) - + PRIVATE ${CMAKE_CURRENT_SOURCE_DIR}/../../tf-psa-crypto/drivers/builtin/src + ${CMAKE_CURRENT_SOURCE_DIR}/../../tf-psa-crypto/platform +) install(TARGETS ${executables} DESTINATION "bin" PERMISSIONS OWNER_READ OWNER_WRITE OWNER_EXECUTE GROUP_READ GROUP_EXECUTE WORLD_READ WORLD_EXECUTE) diff --git a/scripts/legacy.make b/scripts/legacy.make index b22b8ef8bf..5726f9e82a 100644 --- a/scripts/legacy.make +++ b/scripts/legacy.make @@ -180,6 +180,10 @@ C_SOURCE_FILES = $(wildcard \ tf-psa-crypto/drivers/*/*/*.c \ tf-psa-crypto/drivers/*/*/*/*.c \ tf-psa-crypto/drivers/*/*/*/*/*.c \ + tf-psa-crypto/dispatch/*.[hc] \ + tf-psa-crypto/extras/*.[hc] \ + tf-psa-crypto/platform/*.[hc] \ + tf-psa-crypto/utilities/*.[hc] \ programs/*/*.[hc] \ framework/tests/include/*/*.h framework/tests/include/*/*/*.h \ framework/tests/src/*.c framework/tests/src/*/*.c \ @@ -200,5 +204,9 @@ cscope.in.out cscope.po.out cscope.out: $(C_SOURCE_FILES) cscope -bq -u -Iinclude -Ilibrary -Itf-psa-crypto/core \ -Itf-psa-crypto/include \ -Itf-psa-crypto/drivers/builtin/src \ + -Itf-psa-crypto/dispatch \ + -Itf-psa-crypto/extras \ + -Itf-psa-crypto/platform \ + -Itf-psa-crypto/utilities \ $(patsubst %,-I%,$(wildcard tf-psa-crypto/drivers/*/include)) -Iframework/tests/include $(C_SOURCE_FILES) .PHONY: cscope global diff --git a/tests/CMakeLists.txt b/tests/CMakeLists.txt index ec625234dc..09913b56e7 100644 --- a/tests/CMakeLists.txt +++ b/tests/CMakeLists.txt @@ -177,11 +177,11 @@ function(add_test_suite suite_name) # them as PUBLIC. target_include_directories(test_suite_${data_name} PRIVATE ${CMAKE_CURRENT_BINARY_DIR}/include - PRIVATE ${CMAKE_CURRENT_SOURCE_DIR}/include - PRIVATE ${CMAKE_CURRENT_SOURCE_DIR}/../framework/tests/include - PRIVATE ${CMAKE_CURRENT_SOURCE_DIR}/../library - PRIVATE ${CMAKE_CURRENT_SOURCE_DIR}/../tf-psa-crypto/core - PRIVATE ${CMAKE_CURRENT_SOURCE_DIR}/../tf-psa-crypto/drivers/builtin/src) + ${CMAKE_CURRENT_SOURCE_DIR}/include + ${PROJECT_SOURCE_DIR}/framework/tests/include + ${PROJECT_SOURCE_DIR}/library + ${TF_PSA_CRYPTO_PRIVATE_INCLUDE_DIRS} + ) # Request C11, which is needed for memory poisoning tests set_target_properties(test_suite_${data_name} PROPERTIES C_STANDARD 11) diff --git a/tests/Makefile b/tests/Makefile index 745a09d240..62a7b82e61 100644 --- a/tests/Makefile +++ b/tests/Makefile @@ -252,7 +252,19 @@ libtestdriver1.a: cp -Rf ../scripts ./libtestdriver1 cp -Rf ../tf-psa-crypto/core ./libtestdriver1/tf-psa-crypto cp -Rf ../tf-psa-crypto/include ./libtestdriver1/tf-psa-crypto - cp -Rf ../tf-psa-crypto/drivers/builtin ./libtestdriver1/tf-psa-crypto/drivers + cp -Rf ../tf-psa-crypto/drivers/builtin ./libtestdriver1/tf-psa-crypto/drivers/builtin + if [ -d ../tf-psa-crypto/dispatch ]; then \ + cp -Rf ../tf-psa-crypto/dispatch ./libtestdriver1/tf-psa-crypto/dispatch; \ + fi + if [ -d ../tf-psa-crypto/extras ]; then \ + cp -Rf ../tf-psa-crypto/extras ./libtestdriver1/tf-psa-crypto/extras; \ + fi + if [ -d ../tf-psa-crypto/platform ]; then \ + cp -Rf ../tf-psa-crypto/platform ./libtestdriver1/tf-psa-crypto/platform; \ + fi + if [ -d ../tf-psa-crypto/utilities ]; then \ + cp -Rf ../tf-psa-crypto/utilities ./libtestdriver1/tf-psa-crypto/utilities; \ + fi cp -Rf ../tf-psa-crypto/scripts ./libtestdriver1/tf-psa-crypto # Set the test driver base (minimal) configuration. @@ -285,7 +297,18 @@ libtestdriver1.a: perl -i ./scripts/libtestdriver1_rewrite.pl ./libtestdriver1/tf-psa-crypto/drivers/builtin/include/*/*.h perl -i ./scripts/libtestdriver1_rewrite.pl ./libtestdriver1/tf-psa-crypto/drivers/builtin/include/*/*/*.h perl -i ./scripts/libtestdriver1_rewrite.pl ./libtestdriver1/tf-psa-crypto/drivers/builtin/src/*.[ch] - + if [ -d ../tf-psa-crypto/dispatch ]; then \ + perl -i ./scripts/libtestdriver1_rewrite.pl ./libtestdriver1/tf-psa-crypto/dispatch/*.[ch]; \ + fi + if [ -d ../tf-psa-crypto/extras ]; then \ + perl -i ./scripts/libtestdriver1_rewrite.pl ./libtestdriver1/tf-psa-crypto/extras/*.[ch]; \ + fi + if [ -d ../tf-psa-crypto/platform ]; then \ + perl -i ./scripts/libtestdriver1_rewrite.pl ./libtestdriver1/tf-psa-crypto/platform/*.[ch]; \ + fi + if [ -d ../tf-psa-crypto/utilities ]; then \ + perl -i ./scripts/libtestdriver1_rewrite.pl ./libtestdriver1/tf-psa-crypto/utilities/*.[ch]; \ + fi $(MAKE) -C ./libtestdriver1/library CFLAGS="-I../../ $(CFLAGS)" LDFLAGS="$(LDFLAGS)" libmbedcrypto.a cp ./libtestdriver1/library/libmbedcrypto.a ../library/libtestdriver1.a diff --git a/tests/scripts/components-basic-checks.sh b/tests/scripts/components-basic-checks.sh index 6a5bc3a1d7..1e480dd12b 100644 --- a/tests/scripts/components-basic-checks.sh +++ b/tests/scripts/components-basic-checks.sh @@ -12,8 +12,6 @@ component_check_recursion () { msg "Check: recursion.pl" # < 1s ./framework/scripts/recursion.pl library/*.c - ./framework/scripts/recursion.pl ${PSA_CORE_PATH}/*.c - ./framework/scripts/recursion.pl ${BUILTIN_SRC_PATH}/*.c } component_check_generated_files () { diff --git a/tests/scripts/components-configuration-crypto.sh b/tests/scripts/components-configuration-crypto.sh index baa59fb5f5..6a6b0a70de 100644 --- a/tests/scripts/components-configuration-crypto.sh +++ b/tests/scripts/components-configuration-crypto.sh @@ -10,6 +10,7 @@ ################################################################ CMAKE_BUILTIN_BUILD_DIR="tf-psa-crypto/drivers/builtin/CMakeFiles/builtin.dir/src" +CMAKE_EXTRAS_BUILD_DIR="tf-psa-crypto/extras/CMakeFiles/extras.dir" component_test_psa_crypto_key_id_encodes_owner () { msg "build: full config + PSA_CRYPTO_KEY_ID_ENCODES_OWNER, cmake, gcc, ASan" @@ -280,8 +281,13 @@ component_full_no_pkparse_pkwrite () { cmake --build . # Ensure that PK_[PARSE|WRITE]_C were not re-enabled accidentally (additive config). - not grep mbedtls_pk_parse_key ${CMAKE_BUILTIN_BUILD_DIR}/pkparse.c.o - not grep mbedtls_pk_write_key_der ${CMAKE_BUILTIN_BUILD_DIR}/pkwrite.c.o + if [ -f ${TF_PSA_CRYPTO_ROOT_DIR}/extras/pkparse.c ]; then + not grep mbedtls_pk_parse_key ${CMAKE_EXTRAS_BUILD_DIR}/pkparse.c.o + not grep mbedtls_pk_write_key_der ${CMAKE_EXTRAS_BUILD_DIR}/pkwrite.c.o + else + not grep mbedtls_pk_parse_key ${CMAKE_BUILTIN_BUILD_DIR}/pkparse.c.o + not grep mbedtls_pk_write_key_der ${CMAKE_BUILTIN_BUILD_DIR}/pkwrite.c.o + fi msg "test: full without pkparse and pkwrite" ctest @@ -302,7 +308,11 @@ component_full_no_pkwrite () { make # Ensure that PK_WRITE_C was not re-enabled accidentally (additive config). - not grep mbedtls_pk_write_key_der ${CMAKE_BUILTIN_BUILD_DIR}/pkwrite.c.o + if [ -f ${TF_PSA_CRYPTO_ROOT_DIR}/extras/pkwrite.c ]; then + not grep mbedtls_pk_write_key_der ${CMAKE_EXTRAS_BUILD_DIR}/pkwrite.c.o + else + not grep mbedtls_pk_write_key_der ${CMAKE_BUILTIN_BUILD_DIR}/pkwrite.c.o + fi msg "test: full without pkwrite" make test @@ -329,8 +339,13 @@ component_test_crypto_full_md_light_only () { cmake --build . # Make sure we don't have the HMAC functions, but the hashing functions - not grep mbedtls_md_hmac ${CMAKE_BUILTIN_BUILD_DIR}/md.c.o - grep mbedtls_md ${CMAKE_BUILTIN_BUILD_DIR}/md.c.o + if [ -f ${TF_PSA_CRYPTO_ROOT_DIR}/extras/md.c ]; then + not grep mbedtls_md_hmac ${CMAKE_EXTRAS_BUILD_DIR}/md.c.o + grep mbedtls_md ${CMAKE_EXTRAS_BUILD_DIR}/md.c.o + else + not grep mbedtls_md_hmac ${CMAKE_BUILTIN_BUILD_DIR}/md.c.o + grep mbedtls_md ${CMAKE_BUILTIN_BUILD_DIR}/md.c.o + fi msg "test: crypto_full with only the light subset of MD" ctest @@ -1668,7 +1683,11 @@ component_test_psa_crypto_config_accel_hmac () { helper_libtestdriver1_make_main "$loc_accel_list" # Ensure that built-in support for HMAC is disabled. - not grep mbedtls_md_hmac ${BUILTIN_SRC_PATH}/md.o + if [ -f ${TF_PSA_CRYPTO_ROOT_DIR}/extras/md.c ]; then + not grep mbedtls_md_hmac ${TF_PSA_CRYPTO_ROOT_DIR}/extras/md.o + else + not grep mbedtls_md_hmac ${BUILTIN_SRC_PATH}/md.o + fi # Run the tests # ------------- diff --git a/tests/scripts/components-platform.sh b/tests/scripts/components-platform.sh index d6eef6f781..b68a4aeafc 100644 --- a/tests/scripts/components-platform.sh +++ b/tests/scripts/components-platform.sh @@ -439,6 +439,18 @@ component_build_arm_none_eabi_gcc () { ${ARM_NONE_EABI_GCC_PREFIX}size -t library/*.o ${ARM_NONE_EABI_GCC_PREFIX}size -t ${PSA_CORE_PATH}/*.o ${ARM_NONE_EABI_GCC_PREFIX}size -t ${BUILTIN_SRC_PATH}/*.o + if compgen -G "${TF_PSA_CRYPTO_ROOT_DIR}/dispatch/*.o" > /dev/null; then + ${ARM_NONE_EABI_GCC_PREFIX}size -t ${TF_PSA_CRYPTO_ROOT_DIR}/dispatch/*.o + fi + if compgen -G "${TF_PSA_CRYPTO_ROOT_DIR}/extras/*.o" > /dev/null; then + ${ARM_NONE_EABI_GCC_PREFIX}size -t ${TF_PSA_CRYPTO_ROOT_DIR}/extras/*.o + fi + if compgen -G "${TF_PSA_CRYPTO_ROOT_DIR}/platform/*.o" > /dev/null; then + ${ARM_NONE_EABI_GCC_PREFIX}size -t ${TF_PSA_CRYPTO_ROOT_DIR}/platform/*.o + fi + if compgen -G "${TF_PSA_CRYPTO_ROOT_DIR}/utilities/*.o" > /dev/null; then + ${ARM_NONE_EABI_GCC_PREFIX}size -t ${TF_PSA_CRYPTO_ROOT_DIR}/utilities/*.o + fi } component_build_arm_linux_gnueabi_gcc_arm5vte () { @@ -455,6 +467,18 @@ component_build_arm_linux_gnueabi_gcc_arm5vte () { ${ARM_LINUX_GNUEABI_GCC_PREFIX}size -t library/*.o ${ARM_LINUX_GNUEABI_GCC_PREFIX}size -t ${PSA_CORE_PATH}/*.o ${ARM_LINUX_GNUEABI_GCC_PREFIX}size -t ${BUILTIN_SRC_PATH}/*.o + if compgen -G "${TF_PSA_CRYPTO_ROOT_DIR}/dispatch/*.o" > /dev/null; then + ${ARM_LINUX_GNUEABI_GCC_PREFIX}size -t ${TF_PSA_CRYPTO_ROOT_DIR}/dispatch/*.o + fi + if compgen -G "${TF_PSA_CRYPTO_ROOT_DIR}/extras/*.o" > /dev/null; then + ${ARM_LINUX_GNUEABI_GCC_PREFIX}size -t ${TF_PSA_CRYPTO_ROOT_DIR}/extras/*.o + fi + if compgen -G "${TF_PSA_CRYPTO_ROOT_DIR}/platform/*.o" > /dev/null; then + ${ARM_LINUX_GNUEABI_GCC_PREFIX}size -t ${TF_PSA_CRYPTO_ROOT_DIR}/platform/*.o + fi + if compgen -G "${TF_PSA_CRYPTO_ROOT_DIR}/utilities/*.o" > /dev/null; then + ${ARM_LINUX_GNUEABI_GCC_PREFIX}size -t ${TF_PSA_CRYPTO_ROOT_DIR}/utilities/*.o + fi } support_build_arm_linux_gnueabi_gcc_arm5vte () { @@ -473,6 +497,18 @@ component_build_arm_none_eabi_gcc_arm5vte () { ${ARM_NONE_EABI_GCC_PREFIX}size -t library/*.o ${ARM_NONE_EABI_GCC_PREFIX}size -t ${PSA_CORE_PATH}/*.o ${ARM_NONE_EABI_GCC_PREFIX}size -t ${BUILTIN_SRC_PATH}/*.o + if compgen -G "${TF_PSA_CRYPTO_ROOT_DIR}/dispatch/*.o" > /dev/null; then + ${ARM_NONE_EABI_GCC_PREFIX}size -t ${TF_PSA_CRYPTO_ROOT_DIR}/dispatch/*.o + fi + if compgen -G "${TF_PSA_CRYPTO_ROOT_DIR}/extras/*.o" > /dev/null; then + ${ARM_NONE_EABI_GCC_PREFIX}size -t ${TF_PSA_CRYPTO_ROOT_DIR}/extras/*.o + fi + if compgen -G "${TF_PSA_CRYPTO_ROOT_DIR}/platform/*.o" > /dev/null; then + ${ARM_NONE_EABI_GCC_PREFIX}size -t ${TF_PSA_CRYPTO_ROOT_DIR}/platform/*.o + fi + if compgen -G "${TF_PSA_CRYPTO_ROOT_DIR}/utilities/*.o" > /dev/null; then + ${ARM_NONE_EABI_GCC_PREFIX}size -t ${TF_PSA_CRYPTO_ROOT_DIR}/utilities/*.o + fi } component_build_arm_none_eabi_gcc_m0plus () { @@ -484,6 +520,18 @@ component_build_arm_none_eabi_gcc_m0plus () { ${ARM_NONE_EABI_GCC_PREFIX}size -t library/*.o ${ARM_NONE_EABI_GCC_PREFIX}size -t ${PSA_CORE_PATH}/*.o ${ARM_NONE_EABI_GCC_PREFIX}size -t ${BUILTIN_SRC_PATH}/*.o + if compgen -G "${TF_PSA_CRYPTO_ROOT_DIR}/dispatch/*.o" > /dev/null; then + ${ARM_NONE_EABI_GCC_PREFIX}size -t ${TF_PSA_CRYPTO_ROOT_DIR}/dispatch/*.o + fi + if compgen -G "${TF_PSA_CRYPTO_ROOT_DIR}/extras/*.o" > /dev/null; then + ${ARM_NONE_EABI_GCC_PREFIX}size -t ${TF_PSA_CRYPTO_ROOT_DIR}/extras/*.o + fi + if compgen -G "${TF_PSA_CRYPTO_ROOT_DIR}/platform/*.o" > /dev/null; then + ${ARM_NONE_EABI_GCC_PREFIX}size -t ${TF_PSA_CRYPTO_ROOT_DIR}/platform/*.o + fi + if compgen -G "${TF_PSA_CRYPTO_ROOT_DIR}/utilities/*.o" > /dev/null; then + ${ARM_NONE_EABI_GCC_PREFIX}size -t ${TF_PSA_CRYPTO_ROOT_DIR}/utilities/*.o + fi for lib in library/*.a; do echo "$lib:" ${ARM_NONE_EABI_GCC_PREFIX}size -t $lib | grep TOTALS @@ -499,6 +547,18 @@ component_build_arm_none_eabi_gcc_no_udbl_division () { not grep __aeabi_uldiv library/*.o not grep __aeabi_uldiv ${PSA_CORE_PATH}/*.o not grep __aeabi_uldiv ${BUILTIN_SRC_PATH}/*.o + if compgen -G "${TF_PSA_CRYPTO_ROOT_DIR}/dispatch/*.o" > /dev/null; then + not grep __aeabi_uldiv ${TF_PSA_CRYPTO_ROOT_DIR}/dispatch/*.o + fi + if compgen -G "${TF_PSA_CRYPTO_ROOT_DIR}/extras/*.o" > /dev/null; then + not grep __aeabi_uldiv ${TF_PSA_CRYPTO_ROOT_DIR}/extras/*.o + fi + if compgen -G "${TF_PSA_CRYPTO_ROOT_DIR}/platform/*.o" > /dev/null; then + not grep __aeabi_uldiv ${TF_PSA_CRYPTO_ROOT_DIR}/platform/*.o + fi + if compgen -G "${TF_PSA_CRYPTO_ROOT_DIR}/utilities/*.o" > /dev/null; then + not grep __aeabi_uldiv ${TF_PSA_CRYPTO_ROOT_DIR}/utilities/*.o + fi } component_build_arm_none_eabi_gcc_no_64bit_multiplication () { @@ -510,6 +570,18 @@ component_build_arm_none_eabi_gcc_no_64bit_multiplication () { not grep __aeabi_lmul library/*.o not grep __aeabi_lmul ${PSA_CORE_PATH}/*.o not grep __aeabi_lmul ${BUILTIN_SRC_PATH}/*.o + if compgen -G "${TF_PSA_CRYPTO_ROOT_DIR}/dispatch/*.o" > /dev/null; then + not grep __aeabi_lmul ${TF_PSA_CRYPTO_ROOT_DIR}/dispatch/*.o + fi + if compgen -G "${TF_PSA_CRYPTO_ROOT_DIR}/extras/*.o" > /dev/null; then + not grep __aeabi_lmul ${TF_PSA_CRYPTO_ROOT_DIR}/extras/*.o + fi + if compgen -G "${TF_PSA_CRYPTO_ROOT_DIR}/platform/*.o" > /dev/null; then + not grep __aeabi_lmul ${TF_PSA_CRYPTO_ROOT_DIR}/platform/*.o + fi + if compgen -G "${TF_PSA_CRYPTO_ROOT_DIR}/utilities/*.o" > /dev/null; then + not grep __aeabi_lmul ${TF_PSA_CRYPTO_ROOT_DIR}/utilities/*.o + fi } component_build_arm_clang_thumb () { diff --git a/tests/scripts/list_internal_identifiers.py b/tests/scripts/list_internal_identifiers.py index 2cbfdce8d5..445aeda352 100755 --- a/tests/scripts/list_internal_identifiers.py +++ b/tests/scripts/list_internal_identifiers.py @@ -37,7 +37,9 @@ def main(): "include/mbedtls/*_internal.h", "library/*.h", "tf-psa-crypto/core/*.h", - "tf-psa-crypto/drivers/builtin/src/*.h" + "tf-psa-crypto/drivers/builtin/src/*.h", + "tf-psa-crypto/platform/*.h", + "tf-psa-crypto/utilities/*.h", ])[0] result.sort(key=lambda x: x.name)