diff --git a/scripts/check-doxy-blocks.pl b/scripts/check-doxy-blocks.pl index 8c4ecd741..ae86166a6 100755 --- a/scripts/check-doxy-blocks.pl +++ b/scripts/check-doxy-blocks.pl @@ -21,6 +21,7 @@ include/mbedtls drivers/builtin/include/mbedtls drivers/builtin/src core dispatch + dispatch/include/psa doxygen/input extras platform utilities); # very naive pattern to find directives: diff --git a/scripts/check_names.py b/scripts/check_names.py index 9bc8ebc9e..ff7d8a33a 100755 --- a/scripts/check_names.py +++ b/scripts/check_names.py @@ -778,6 +778,7 @@ def __init__(self, log: logging.Logger) -> None: H_PUBLIC = [ "include/**/*.h", + "dispatch/include/**/*.h", "drivers/*/include/**/*.h", ] H_PUBLIC_EXCLUDE = [ @@ -830,7 +831,7 @@ def comprehensive_parse(self) -> ParseResult: self.H_PUBLIC_EXCLUDE + ["drivers/p256-m/p256-m/p256-m.h"]) mbed_psa_words = self.parse_mbed_psa_words( self.H_PUBLIC + self.H_INTERNAL + self.C_INTERNAL, - self.H_PUBLIC_EXCLUDE + ["core/psa_crypto_driver_wrappers.h"]) + self.H_PUBLIC_EXCLUDE) symbols = self.parse_symbols() return self._parse(all_macros, enum_consts, identifiers, @@ -963,7 +964,7 @@ def comprehensive_parse(self) -> ParseResult: "library/*.c", "3rdparty/everest/library/everest.c", "3rdparty/everest/library/x25519.c" - ], ["library/psa_crypto_driver_wrappers.h"]) + ]) else: all_macros = {"public": [], "internal": [], "private":[]} all_macros["public"] = self.parse_macros([ diff --git a/scripts/make_generated_files.py b/scripts/make_generated_files.py index ad8c5b8a9..e8d94c1e9 100755 --- a/scripts/make_generated_files.py +++ b/scripts/make_generated_files.py @@ -22,11 +22,15 @@ ] if build_tree.looks_like_tf_psa_crypto_root("."): + if (Path.cwd() / "dispatch" / "CMakeLists.txt").exists(): + DISPATCH_PREFIX = Path("dispatch") + else: + DISPATCH_PREFIX = Path("core") TF_PSA_CRYPTO_GENERATION_SCRIPTS = [ GenerationScript( Path("scripts/generate_driver_wrappers.py"), - [Path("core/psa_crypto_driver_wrappers.h"), - Path("core/psa_crypto_driver_wrappers_no_static.c")], + [DISPATCH_PREFIX / "psa_crypto_driver_wrappers.h", + DISPATCH_PREFIX / "psa_crypto_driver_wrappers_no_static.c"], "", None ), GenerationScript( diff --git a/scripts/mbedtls_framework/psa_storage.py b/scripts/mbedtls_framework/psa_storage.py index 22d981c05..9ccbbb58f 100644 --- a/scripts/mbedtls_framework/psa_storage.py +++ b/scripts/mbedtls_framework/psa_storage.py @@ -48,12 +48,14 @@ def update_cache(self) -> None: if build_tree.looks_like_root('.'): includes = ['include'] if build_tree.looks_like_tf_psa_crypto_root('.'): + includes.append('dispatch/include') includes.append('drivers/builtin/include') includes.append('drivers/everest/include') includes.append('drivers/everest/include/tf-psa-crypto/private/') includes.append('drivers/pqcp/include') elif not build_tree.is_mbedtls_3_6(): includes.append('tf-psa-crypto/include') + includes.append('tf-psa-crypto/dispatch/include') includes.append('tf-psa-crypto/drivers/builtin/include') includes.append('tf-psa-crypto/drivers/everest/include') includes.append('tf-psa-crypto/drivers/everest/include/tf-psa-crypto/private/') diff --git a/scripts/test_psa_constant_names.py b/scripts/test_psa_constant_names.py index a74104781..f155fabdb 100755 --- a/scripts/test_psa_constant_names.py +++ b/scripts/test_psa_constant_names.py @@ -171,6 +171,7 @@ def main(): else: parser.add_argument('--include', '-I', action='append', default=['tf-psa-crypto/include', + 'tf-psa-crypto/dispatch/include', 'tf-psa-crypto/drivers/builtin/include', 'tf-psa-crypto/drivers/everest/include', 'tf-psa-crypto/drivers/everest/include/' +