diff --git a/drivers/auth/cca/cot.c b/drivers/auth/cca/cot.c index d3f3087b9..e8f4d9cae 100644 --- a/drivers/auth/cca/cot.c +++ b/drivers/auth/cca/cot.c @@ -1,13 +1,15 @@ /* - * Copyright (c) 2022, Arm Limited. All rights reserved. + * Copyright (c) 2022-2023, Arm Limited. All rights reserved. * * SPDX-License-Identifier: BSD-3-Clause */ #include +#include + +#include #include -#include MBEDTLS_CONFIG_FILE #include #include diff --git a/drivers/auth/dualroot/cot.c b/drivers/auth/dualroot/cot.c index 836850361..c89930c1e 100644 --- a/drivers/auth/dualroot/cot.c +++ b/drivers/auth/dualroot/cot.c @@ -1,17 +1,20 @@ /* - * Copyright (c) 2020-2022, Arm Limited. All rights reserved. + * Copyright (c) 2020-2023, Arm Limited. All rights reserved. * * SPDX-License-Identifier: BSD-3-Clause */ #include -#include +#include -#include MBEDTLS_CONFIG_FILE +#include #include + #include +#include + /* * Allocate static buffers to store the authentication parameters extracted from * the certificates. diff --git a/drivers/auth/mbedtls/mbedtls_common.c b/drivers/auth/mbedtls/mbedtls_common.c index a12e49c6a..4f30d8277 100644 --- a/drivers/auth/mbedtls/mbedtls_common.c +++ b/drivers/auth/mbedtls/mbedtls_common.c @@ -1,5 +1,5 @@ /* - * Copyright (c) 2015-2022, Arm Limited and Contributors. All rights reserved. + * Copyright (c) 2015-2023, Arm Limited and Contributors. All rights reserved. * * SPDX-License-Identifier: BSD-3-Clause */ @@ -10,10 +10,11 @@ /* mbed TLS headers */ #include #include +#include #include #include -#include MBEDTLS_CONFIG_FILE + #include static void cleanup(void) diff --git a/drivers/auth/mbedtls/mbedtls_crypto.c b/drivers/auth/mbedtls/mbedtls_crypto.c index 42a09255d..b13a460b4 100644 --- a/drivers/auth/mbedtls/mbedtls_crypto.c +++ b/drivers/auth/mbedtls/mbedtls_crypto.c @@ -1,5 +1,5 @@ /* - * Copyright (c) 2015-2022, Arm Limited and Contributors. All rights reserved. + * Copyright (c) 2015-2023, Arm Limited and Contributors. All rights reserved. * * SPDX-License-Identifier: BSD-3-Clause */ @@ -14,12 +14,13 @@ #include #include #include +#include #include #include #include #include -#include + #include #define LIB_NAME "mbed TLS" diff --git a/drivers/auth/tbbr/tbbr_cot_bl1.c b/drivers/auth/tbbr/tbbr_cot_bl1.c index 44f86384f..21942b494 100644 --- a/drivers/auth/tbbr/tbbr_cot_bl1.c +++ b/drivers/auth/tbbr/tbbr_cot_bl1.c @@ -1,22 +1,24 @@ /* - * Copyright (c) 2015-2022, Arm Limited and Contributors. All rights reserved. + * Copyright (c) 2015-2023, Arm Limited and Contributors. All rights reserved. * * SPDX-License-Identifier: BSD-3-Clause */ #include -#include -#include MBEDTLS_CONFIG_FILE +#include #include #include + #if USE_TBBR_DEFS #include #else #include #endif +#include + static auth_param_type_desc_t scp_bl2u_hash = AUTH_PARAM_TYPE_DESC( AUTH_PARAM_HASH, SCP_FWU_CFG_HASH_OID); static auth_param_type_desc_t bl2u_hash = AUTH_PARAM_TYPE_DESC( diff --git a/drivers/auth/tbbr/tbbr_cot_bl1_r64.c b/drivers/auth/tbbr/tbbr_cot_bl1_r64.c index 78e38f6bb..236823a4b 100644 --- a/drivers/auth/tbbr/tbbr_cot_bl1_r64.c +++ b/drivers/auth/tbbr/tbbr_cot_bl1_r64.c @@ -1,13 +1,14 @@ /* - * Copyright (c) 2021-2022, Arm Limited and Contributors. All rights reserved. + * Copyright (c) 2021-2023, Arm Limited and Contributors. All rights reserved. * * SPDX-License-Identifier: BSD-3-Clause */ #include +#include + #include -#include MBEDTLS_CONFIG_FILE #include #if USE_TBBR_DEFS @@ -15,8 +16,8 @@ #else #include #endif -#include +#include static unsigned char trusted_world_pk_buf[PK_DER_LEN]; static unsigned char non_trusted_world_pk_buf[PK_DER_LEN]; diff --git a/drivers/auth/tbbr/tbbr_cot_bl2.c b/drivers/auth/tbbr/tbbr_cot_bl2.c index 11e2f4678..ce2aa7e24 100644 --- a/drivers/auth/tbbr/tbbr_cot_bl2.c +++ b/drivers/auth/tbbr/tbbr_cot_bl2.c @@ -1,22 +1,24 @@ /* - * Copyright (c) 2015-2022, Arm Limited and Contributors. All rights reserved. + * Copyright (c) 2015-2023, Arm Limited and Contributors. All rights reserved. * * SPDX-License-Identifier: BSD-3-Clause */ #include -#include -#include MBEDTLS_CONFIG_FILE +#include #include #include + #if USE_TBBR_DEFS #include #else #include #endif +#include + static unsigned char soc_fw_hash_buf[HASH_DER_LEN]; static unsigned char tos_fw_hash_buf[HASH_DER_LEN]; static unsigned char tos_fw_extra1_hash_buf[HASH_DER_LEN]; diff --git a/drivers/auth/tbbr/tbbr_cot_common.c b/drivers/auth/tbbr/tbbr_cot_common.c index 0983d4219..8c3724880 100644 --- a/drivers/auth/tbbr/tbbr_cot_common.c +++ b/drivers/auth/tbbr/tbbr_cot_common.c @@ -1,22 +1,23 @@ /* - * Copyright (c) 2015-2022, Arm Limited and Contributors. All rights reserved. + * Copyright (c) 2015-2023, Arm Limited and Contributors. All rights reserved. * * SPDX-License-Identifier: BSD-3-Clause */ #include -#include -#include MBEDTLS_CONFIG_FILE +#include #include #include + #if USE_TBBR_DEFS #include #else #include #endif +#include /* * The platform must allocate buffers to store the authentication parameters * extracted from the certificates. In this case, because of the way the CoT is diff --git a/include/common/tbbr/cot_def.h b/include/common/tbbr/cot_def.h index 60dfb8a3c..7823ff3ec 100644 --- a/include/common/tbbr/cot_def.h +++ b/include/common/tbbr/cot_def.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 2015-2022, ARM Limited and Contributors. All rights reserved. + * Copyright (c) 2015-2023, ARM Limited and Contributors. All rights reserved. * * SPDX-License-Identifier: BSD-3-Clause */ @@ -7,9 +7,7 @@ #ifndef COT_DEF_H #define COT_DEF_H -#ifdef MBEDTLS_CONFIG_FILE -#include MBEDTLS_CONFIG_FILE -#endif +#include /* TBBR CoT definitions */ #if defined(SPD_spmd) diff --git a/include/drivers/auth/auth_mod.h b/include/drivers/auth/auth_mod.h index 94537f61a..28aa40784 100644 --- a/include/drivers/auth/auth_mod.h +++ b/include/drivers/auth/auth_mod.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 2015-2022, ARM Limited and Contributors. All rights reserved. + * Copyright (c) 2015-2023, ARM Limited and Contributors. All rights reserved. * * SPDX-License-Identifier: BSD-3-Clause */ @@ -7,7 +7,6 @@ #ifndef AUTH_MOD_H #define AUTH_MOD_H -#include #include #include #include diff --git a/include/drivers/auth/tbbr_cot_common.h b/include/drivers/auth/tbbr_cot_common.h index a51faee1a..b4f2d220f 100644 --- a/include/drivers/auth/tbbr_cot_common.h +++ b/include/drivers/auth/tbbr_cot_common.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 2020, ARM Limited and Contributors. All rights reserved. + * Copyright (c) 2020,2023, ARM Limited and Contributors. All rights reserved. * * SPDX-License-Identifier: BSD-3-Clause */ @@ -7,6 +7,7 @@ #ifndef TBBR_COT_COMMON_H #define TBBR_COT_COMMON_H +#include #include extern unsigned char tb_fw_hash_buf[HASH_DER_LEN]; diff --git a/lib/fconf/fconf_cot_getter.c b/lib/fconf/fconf_cot_getter.c index ae59d8c96..1033018d3 100644 --- a/lib/fconf/fconf_cot_getter.c +++ b/lib/fconf/fconf_cot_getter.c @@ -1,5 +1,5 @@ /* - * Copyright (c) 2020-2022, Arm Limited. All rights reserved. + * Copyright (c) 2020-2023, Arm Limited. All rights reserved. * * SPDX-License-Identifier: BSD-3-Clause */ @@ -7,8 +7,10 @@ #include #include +#include + #include -#include MBEDTLS_CONFIG_FILE +#include #include #include #include diff --git a/plat/arm/common/arm_dyn_cfg.c b/plat/arm/common/arm_dyn_cfg.c index c88621e37..067109b9d 100644 --- a/plat/arm/common/arm_dyn_cfg.c +++ b/plat/arm/common/arm_dyn_cfg.c @@ -1,5 +1,5 @@ /* - * Copyright (c) 2018-2022, Arm Limited and Contributors. All rights reserved. + * Copyright (c) 2018-2023, Arm Limited and Contributors. All rights reserved. * * SPDX-License-Identifier: BSD-3-Clause */ @@ -8,20 +8,20 @@ #include #include -#include +#if CRYPTO_SUPPORT +#include +#endif /* CRYPTO_SUPPORT */ #include #include #include -#if CRYPTO_SUPPORT -#include MBEDTLS_CONFIG_FILE -#endif /* CRYPTO_SUPPORT */ #include #include #include #include #include +#include #if CRYPTO_SUPPORT diff --git a/tools/marvell/doimage/doimage.c b/tools/marvell/doimage/doimage.c index e08b82072..513f33f32 100644 --- a/tools/marvell/doimage/doimage.c +++ b/tools/marvell/doimage/doimage.c @@ -17,12 +17,6 @@ #ifdef CONFIG_MVEBU_SECURE_BOOT #include /* for parsing config file */ -#if !defined(MBEDTLS_CONFIG_FILE) -#include "mbedtls/config.h" -#else -#include MBEDTLS_CONFIG_FILE -#endif - /* mbedTLS stuff */ #if defined(MBEDTLS_BIGNUM_C) && defined(MBEDTLS_ENTROPY_C) && \ defined(MBEDTLS_SHA256_C) && \ @@ -34,6 +28,7 @@ #include #include #include +#include #include #else #error "Bad mbedTLS configuration!"