1*1b076113Slaurenw-arm# Copyright (c) 2022-2023, Arm Limited. All rights reserved. 225dd2172SMate Toth-Pal# 325dd2172SMate Toth-Pal# SPDX-License-Identifier: BSD-3-Clause 425dd2172SMate Toth-Pal# 525dd2172SMate Toth-Pal 6*1b076113Slaurenw-armifeq (${PLATFORM_TEST},tfm-testsuite) 725dd2172SMate Toth-Pal 825dd2172SMate Toth-Pal # The variables need to be set to compile the platform test: 925dd2172SMate Toth-Pal ifeq (${TF_M_TESTS_PATH},) 1025dd2172SMate Toth-Pal # Example: ../rss/tf-m-tests 1125dd2172SMate Toth-Pal $(error Error: TF_M_TESTS_PATH not set) 1225dd2172SMate Toth-Pal endif 1325dd2172SMate Toth-Pal ifeq (${TF_M_EXTRAS_PATH},) 1425dd2172SMate Toth-Pal # Example: ../rss/tf-m-extras 1525dd2172SMate Toth-Pal $(error Error: TF_M_EXTRAS_PATH not set) 1625dd2172SMate Toth-Pal endif 1725dd2172SMate Toth-Pal ifeq (${MEASUREMENT_VALUE_SIZE},) 1825dd2172SMate Toth-Pal MEASUREMENT_VALUE_SIZE := 32 1925dd2172SMate Toth-Pal endif 2025dd2172SMate Toth-Pal ifeq (${MEASURED_BOOT_HASH_ALG},) 2125dd2172SMate Toth-Pal MEASURED_BOOT_HASH_ALG := "PSA_ALG_SHA_256" 2225dd2172SMate Toth-Pal endif 2325dd2172SMate Toth-Pal 2425dd2172SMate Toth-Pal DELEGATED_ATTEST_TESTS_PATH = $(TF_M_EXTRAS_PATH)/partitions/delegated_attestation/test 2525dd2172SMate Toth-Pal MEASURED_BOOT_TESTS_PATH = $(TF_M_EXTRAS_PATH)/partitions/measured_boot/test 2625dd2172SMate Toth-Pal 2725dd2172SMate Toth-Pal MBEDTLS_CONFIG_FILE = "<plat_tc_mbedtls_config.h>" 2825dd2172SMate Toth-Pal 2925dd2172SMate Toth-Pal LIBMBEDTLS_SRCS += $(addprefix ${MBEDTLS_DIR}/library/, \ 3025dd2172SMate Toth-Pal entropy.c \ 3125dd2172SMate Toth-Pal entropy_poll.c \ 3225dd2172SMate Toth-Pal hmac_drbg.c \ 3325dd2172SMate Toth-Pal psa_crypto.c \ 3425dd2172SMate Toth-Pal psa_crypto_client.c \ 3525dd2172SMate Toth-Pal psa_crypto_driver_wrappers.c \ 3625dd2172SMate Toth-Pal psa_crypto_hash.c \ 3725dd2172SMate Toth-Pal psa_crypto_rsa.c \ 3825dd2172SMate Toth-Pal psa_crypto_ecp.c \ 3925dd2172SMate Toth-Pal psa_crypto_slot_management.c \ 4025dd2172SMate Toth-Pal ) 4125dd2172SMate Toth-Pal 4225dd2172SMate Toth-Pal BL31_SOURCES += ${RSS_COMMS_SOURCES} \ 4325dd2172SMate Toth-Pal plat/arm/common/arm_dyn_cfg.c \ 4425dd2172SMate Toth-Pal ${TC_BASE}/rss_ap_tests.c \ 4525dd2172SMate Toth-Pal ${TC_BASE}/rss_ap_testsuites.c \ 4625dd2172SMate Toth-Pal ${TC_BASE}/rss_ap_test_stubs.c \ 4725dd2172SMate Toth-Pal $(TF_M_TESTS_PATH)/test/framework/test_framework.c \ 4825dd2172SMate Toth-Pal $(MEASURED_BOOT_TESTS_PATH)/measured_boot_common.c \ 4925dd2172SMate Toth-Pal $(MEASURED_BOOT_TESTS_PATH)/measured_boot_tests_common.c \ 5025dd2172SMate Toth-Pal $(DELEGATED_ATTEST_TESTS_PATH)/delegated_attest_test.c \ 5125dd2172SMate Toth-Pal drivers/auth/mbedtls/mbedtls_common.c \ 5225dd2172SMate Toth-Pal lib/psa/measured_boot.c \ 5325dd2172SMate Toth-Pal lib/psa/delegated_attestation.c 5425dd2172SMate Toth-Pal 5525dd2172SMate Toth-Pal PLAT_INCLUDES += -I$(TF_M_EXTRAS_PATH)/partitions/measured_boot/interface/include \ 5625dd2172SMate Toth-Pal -I$(TF_M_EXTRAS_PATH)/partitions/delegated_attestation/interface/include \ 5725dd2172SMate Toth-Pal -I$(TF_M_TESTS_PATH)/test/framework \ 5825dd2172SMate Toth-Pal -I$(TF_M_TESTS_PATH)/log \ 5925dd2172SMate Toth-Pal -I$(TF_M_TESTS_PATH)/test/secure_fw/suites/extra \ 6025dd2172SMate Toth-Pal -I$(MEASURED_BOOT_TESTS_PATH)/non_secure \ 6125dd2172SMate Toth-Pal -I$(DELEGATED_ATTEST_TESTS_PATH) \ 6225dd2172SMate Toth-Pal -I$(DELEGATED_ATTEST_TESTS_PATH)/non_secure \ 6325dd2172SMate Toth-Pal -Iplat/arm/board/tc \ 6425dd2172SMate Toth-Pal -Iinclude/drivers/auth/mbedtls \ 6525dd2172SMate Toth-Pal -Iinclude/drivers/arm 6625dd2172SMate Toth-Pal 6725dd2172SMate Toth-Pal # Some of the PSA functions are declared in multiple header files, that 6825dd2172SMate Toth-Pal # triggers this warning. 6925dd2172SMate Toth-Pal TF_CFLAGS += -Wno-error=redundant-decls 7025dd2172SMate Toth-Pal 7125dd2172SMate Toth-Pal # TODO: Created patch for warning in tf-m-tests 7225dd2172SMate Toth-Pal TF_CFLAGS += -Wno-error=return-type 7325dd2172SMate Toth-Pal 7425dd2172SMate Toth-Pal # Define macros that are used by the code coming from the tf-m-extras repo. 7525dd2172SMate Toth-Pal $(eval $(call add_define,MEASUREMENT_VALUE_SIZE)) 7625dd2172SMate Toth-Pal $(eval $(call add_define,MEASURED_BOOT_HASH_ALG)) 7725dd2172SMate Toth-Pal $(eval $(call add_define,DELEG_ATTEST_DUMP_TOKEN_AND_KEY)) 7825dd2172SMate Toth-Pal 7925dd2172SMate Toth-Pal $(eval $(call add_define,PLATFORM_TEST)) 8025dd2172SMate Toth-Palendif 81