Commit 2a4b4b71 authored by Isla Mitchell's avatar Isla Mitchell
Browse files

Fix order of #includes



This fix modifies the order of system includes to meet the ARM TF coding
standard. There are some exceptions in order to retain header groupings,
minimise changes to imported headers, and where there are headers within
the #if and #ifndef statements.

Change-Id: I65085a142ba6a83792b26efb47df1329153f1624
Signed-off-by: default avatarIsla Mitchell <isla.mitchell@arm.com>
parent ca5ba394
......@@ -6,8 +6,8 @@
#include <arch.h>
#include <asm_macros.S>
#include <bl_common.h>
#include <bl1.h>
#include <bl_common.h>
#include <context.h>
/* -----------------------------------------------------------------------------
......
......@@ -4,8 +4,8 @@
* SPDX-License-Identifier: BSD-3-Clause
*/
#include <assert.h>
#include <arch_helpers.h>
#include <assert.h>
#include <auth_mod.h>
#include <bl1.h>
#include <bl_common.h>
......
......@@ -17,8 +17,8 @@
#include <platform_def.h>
#include <smcc_helpers.h>
#include <utils.h>
#include "bl1_private.h"
#include <uuid.h>
#include "bl1_private.h"
/* BL1 Service UUID */
DEFINE_SVC_UUID(bl1_svc_uid,
......
......@@ -8,8 +8,8 @@
#include <arch_helpers.h>
#include <assert.h>
#include <auth_mod.h>
#include <bl_common.h>
#include <bl1.h>
#include <bl_common.h>
#include <console.h>
#include <debug.h>
#include <platform.h>
......
......@@ -7,8 +7,8 @@
#include <arch.h>
#include <arch_helpers.h>
#include <assert.h>
#include <bl_common.h>
#include <bl31.h>
#include <bl_common.h>
#include <console.h>
#include <context_mgmt.h>
#include <debug.h>
......
......@@ -5,8 +5,8 @@
*/
#include <arch_helpers.h>
#include <crypto_mod.h>
#include <crypto_driver.h>
#include <crypto_mod.h>
#include <debug.h>
#include <mbedtls_common.h>
#include <platform_def.h>
......@@ -16,8 +16,8 @@
#include <secureboot_gen_defs.h>
#include <stddef.h>
#include <string.h>
#include <utils.h>
#include <util.h>
#include <utils.h>
#include <mbedtls/oid.h>
......
......@@ -4,7 +4,6 @@
* SPDX-License-Identifier: BSD-3-Clause
*/
#include <crypto_mod.h>
#include <debug.h>
#include <mbedtls_common.h>
......
......@@ -6,12 +6,14 @@
#include <auth_mod.h>
#include <platform_def.h>
#include <stddef.h>
#if USE_TBBR_DEFS
#include <tbbr_oid.h>
#else
#include <platform_oid.h>
#endif
#include <stddef.h>
/*
* Maximum key and hash sizes (in DER format)
......
......@@ -6,8 +6,8 @@
#include <assert.h>
#include <debug.h>
#include <io_storage.h>
#include <gpt.h>
#include <io_storage.h>
#include <mbr.h>
#include <partition.h>
#include <platform.h>
......
......@@ -11,8 +11,8 @@
#define _CC_PAL_TYPES_PLAT_H
/* Host specific types for standard (ISO-C99) compilant platforms */
#include <stdint.h>
#include <stddef.h>
#include <stdint.h>
typedef uint32_t CCStatus;
......
......@@ -13,8 +13,8 @@ extern "C"
#endif
#include "cc_crypto_boot_defs.h"
#include "cc_sec_defs.h"
#include "cc_pal_types.h"
#include "cc_sec_defs.h"
/*------------------------------------
DEFINES
......
......@@ -69,12 +69,12 @@
#define MBEDTLS_MPI_WINDOW_SIZE 2
#define MBEDTLS_MPI_MAX_SIZE 256
/* System headers required to build mbed TLS with the current configuration */
#include <stdlib.h>
/* Memory buffer allocator options */
#define MBEDTLS_MEMORY_ALIGN_MULTIPLE 8
#include "mbedtls/check_config.h"
/* System headers required to build mbed TLS with the current configuration */
#include <stdlib.h>
#endif /* __MBEDTLS_CONFIG_H__ */
......@@ -12,8 +12,8 @@
#include <bl_common.h>
#include <platform.h>
#include <pmf.h>
#include <stdint.h>
#include <stddef.h>
#include <stdint.h>
/*
* Prototype for PMF service functions.
......
......@@ -4,10 +4,10 @@
* SPDX-License-Identifier: BSD-3-Clause
*/
#include <cortex_a55.h>
#include <arch.h>
#include <asm_macros.S>
#include <bl_common.h>
#include <cortex_a55.h>
#include <cpu_macros.S>
#include <plat_macros.S>
......
......@@ -8,8 +8,8 @@
#include <arch_helpers.h>
#include <assert.h>
#include <bl_common.h>
#include <debug.h>
#include <context_mgmt.h>
#include <debug.h>
#include <platform.h>
#include <stddef.h>
#include "psci_private.h"
......
......@@ -4,10 +4,10 @@
* SPDX-License-Identifier: BSD-3-Clause
*/
#include <assert.h>
#include <bl_common.h>
#include <arch.h>
#include <arch_helpers.h>
#include <assert.h>
#include <bl_common.h>
#include <context.h>
#include <context_mgmt.h>
#include <cpu_data.h>
......
......@@ -4,12 +4,12 @@
* SPDX-License-Identifier: BSD-3-Clause
*/
#include <stddef.h>
#include <arch_helpers.h>
#include <assert.h>
#include <console.h>
#include <debug.h>
#include <platform.h>
#include <stddef.h>
#include "psci_private.h"
void __dead2 psci_system_off(void)
......
......@@ -16,8 +16,8 @@
******************************************************************************/
#include <arch_helpers.h>
#include <assert.h>
#include <bl_common.h>
#include <bl31.h>
#include <bl_common.h>
#include <context_mgmt.h>
#include <debug.h>
#include <errno.h>
......@@ -26,8 +26,9 @@
#include <stddef.h>
#include <uuid.h>
#include "opteed_private.h"
#include "teesmc_opteed_macros.h"
#include "teesmc_opteed.h"
#include "teesmc_opteed_macros.h"
/*******************************************************************************
* Address of the entrypoint vector table in OPTEE. It is
......
......@@ -15,8 +15,8 @@
******************************************************************************/
#include <arch_helpers.h>
#include <assert.h>
#include <bl_common.h>
#include <bl31.h>
#include <bl_common.h>
#include <context_mgmt.h>
#include <debug.h>
#include <errno.h>
......
......@@ -6,8 +6,8 @@
#include <arch_helpers.h>
#include <assert.h> /* for context_mgmt.h */
#include <bl_common.h>
#include <bl31.h>
#include <bl_common.h>
#include <context_mgmt.h>
#include <debug.h>
#include <interrupt_mgmt.h>
......@@ -15,8 +15,8 @@
#include <runtime_svc.h>
#include <string.h>
#include "smcall.h"
#include "sm_err.h"
#include "smcall.h"
/* macro to check if Hypervisor is enabled in the HCR_EL2 register */
#define HYP_ENABLE_FLAG 0x286001
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment