Sanitise includes across codebase

Enforce full include path for includes. Deprecate old paths.

The following folders inside include/lib have been left unchanged:

- include/lib/cpus/${ARCH}
- include/lib/el3_runtime/${ARCH}

The reason for this change is that having a global namespace for
includes isn't a good idea. It defeats one of the advantages of having
folders and it introduces problems that are sometimes subtle (because
you may not know the header you are actually including if there are two
of them).

For example, this patch had to be created because two headers were
called the same way: e0ea0928d5 ("Fix gpio includes of mt8173 platform
to avoid collision."). More recently, this patch has had similar
problems: 46f9b2c3a2 ("drivers: add tzc380 support").

This problem was introduced in commit 4ecca33988 ("Move include and
source files to logical locations"). At that time, there weren't too
many headers so it wasn't a real issue. However, time has shown that
this creates problems.

Platforms that want to preserve the way they include headers may add the
removed paths to PLAT_INCLUDES, but this is discouraged.

Change-Id: I39dc53ed98f9e297a5966e723d1936d6ccf2fc8f
Signed-off-by: Antonio Nino Diaz <antonio.ninodiaz@arm.com>
This commit is contained in:
Antonio Nino Diaz 2018-12-14 00:18:21 +00:00
parent f5478dedf9
commit 09d40e0e08
995 changed files with 4801 additions and 3559 deletions

View File

@ -271,11 +271,16 @@ endif
INCLUDES += -Iinclude \
-Iinclude/arch/${ARCH} \
-Iinclude/bl1 \
-Iinclude/lib/cpus/${ARCH} \
-Iinclude/lib/el3_runtime/${ARCH} \
${PLAT_INCLUDES} \
${SPD_INCLUDES}
ifeq (${ERROR_DEPRECATED},0)
INCLUDES += -Iinclude/bl1 \
-Iinclude/bl2 \
-Iinclude/bl2u \
-Iinclude/bl31 \
-Iinclude/common \
-Iinclude/drivers \
-Iinclude/drivers/arm \
-Iinclude/drivers/auth \
@ -283,18 +288,15 @@ INCLUDES += -Iinclude \
-Iinclude/drivers/ti/uart \
-Iinclude/lib \
-Iinclude/lib/cpus \
-Iinclude/lib/cpus/${ARCH} \
-Iinclude/lib/el3_runtime \
-Iinclude/lib/el3_runtime/${ARCH} \
-Iinclude/lib/extensions \
-Iinclude/lib/pmf \
-Iinclude/lib/psci \
-Iinclude/lib/xlat_tables \
-Iinclude/plat/common \
-Iinclude/services \
${PLAT_INCLUDES} \
${SPD_INCLUDES} \
-Iinclude/tools_share
endif
include common/backtrace/backtrace.mk

View File

@ -4,13 +4,15 @@
* SPDX-License-Identifier: BSD-3-Clause
*/
#include <arch_helpers.h>
#include <assert.h>
#include <arch_helpers.h>
#include <context.h>
#include <context_mgmt.h>
#include <debug.h>
#include <platform.h>
#include <common/debug.h>
#include <lib/el3_runtime/context_mgmt.h>
#include <plat/common/platform.h>
#include <smccc_helpers.h>
#include "../bl1_private.h"
/*

View File

@ -6,7 +6,7 @@
#include <arch.h>
#include <asm_macros.S>
#include <bl_common.h>
#include <common/bl_common.h>
#include <context.h>
#include <el3_common_macros.S>
#include <smccc_helpers.h>

View File

@ -6,12 +6,12 @@
#include <arch.h>
#include <asm_macros.S>
#include <bl1.h>
#include <bl_common.h>
#include <bl1/bl1.h>
#include <common/bl_common.h>
#include <context.h>
#include <lib/xlat_tables/xlat_tables.h>
#include <smccc_helpers.h>
#include <smccc_macros.S>
#include <xlat_tables.h>
.globl bl1_aarch32_smc_handler

View File

@ -4,12 +4,14 @@
* SPDX-License-Identifier: BSD-3-Clause
*/
#include <arch_helpers.h>
#include <assert.h>
#include <arch_helpers.h>
#include <context.h>
#include <context_mgmt.h>
#include <debug.h>
#include <platform.h>
#include <common/debug.h>
#include <lib/el3_runtime/context_mgmt.h>
#include <plat/common/platform.h>
#include "../bl1_private.h"
/*

View File

@ -6,8 +6,8 @@
#include <arch.h>
#include <asm_macros.S>
#include <bl1.h>
#include <bl_common.h>
#include <bl1/bl1.h>
#include <common/bl_common.h>
#include <context.h>
/* -----------------------------------------------------------------------------

View File

@ -5,7 +5,8 @@
*/
#include <platform_def.h>
#include <xlat_tables_defs.h>
#include <lib/xlat_tables/xlat_tables_defs.h>
OUTPUT_FORMAT(PLATFORM_LINKER_FORMAT)
OUTPUT_ARCH(PLATFORM_LINKER_ARCH)

View File

@ -4,20 +4,23 @@
* SPDX-License-Identifier: BSD-3-Clause
*/
#include <arch_helpers.h>
#include <assert.h>
#include <auth_mod.h>
#include <bl1.h>
#include <bl_common.h>
#include <context.h>
#include <context_mgmt.h>
#include <debug.h>
#include <errno.h>
#include <platform.h>
#include <platform_def.h>
#include <smccc_helpers.h>
#include <string.h>
#include <utils.h>
#include <platform_def.h>
#include <arch_helpers.h>
#include <bl1/bl1.h>
#include <common/bl_common.h>
#include <common/debug.h>
#include <context.h>
#include <drivers/auth/auth_mod.h>
#include <lib/el3_runtime/context_mgmt.h>
#include <lib/utils.h>
#include <plat/common/platform.h>
#include <smccc_helpers.h>
#include "bl1_private.h"
/*

View File

@ -4,20 +4,23 @@
* SPDX-License-Identifier: BSD-3-Clause
*/
#include <assert.h>
#include <platform_def.h>
#include <arch.h>
#include <arch_helpers.h>
#include <assert.h>
#include <auth_mod.h>
#include <bl1.h>
#include <bl_common.h>
#include <console.h>
#include <debug.h>
#include <errata_report.h>
#include <platform.h>
#include <platform_def.h>
#include <bl1/bl1.h>
#include <common/bl_common.h>
#include <common/debug.h>
#include <drivers/auth/auth_mod.h>
#include <drivers/console.h>
#include <lib/cpus/errata_report.h>
#include <lib/utils.h>
#include <plat/common/platform.h>
#include <smccc_helpers.h>
#include <utils.h>
#include <uuid.h>
#include <tools_share/uuid.h>
#include "bl1_private.h"
/* BL1 Service UUID */

View File

@ -8,7 +8,8 @@
#define BL1_PRIVATE_H
#include <stdint.h>
#include <utils_def.h>
#include <lib/utils_def.h>
/*******************************************************************************
* Declarations of linker defined symbols which will tell us where BL1 lives

View File

@ -4,10 +4,11 @@
* SPDX-License-Identifier: BSD-3-Clause
*/
#include <bl1.h>
#include <bl_common.h>
#include <platform_def.h>
#include <tbbr/tbbr_img_desc.h>
#include <bl1/bl1.h>
#include <bl1/tbbr/tbbr_img_desc.h>
#include <common/bl_common.h>
image_desc_t bl1_tbbr_image_descs[] = {
{

View File

@ -6,10 +6,9 @@
#include <arch.h>
#include <asm_macros.S>
#include <bl_common.h>
#include <common/bl_common.h>
#include <el3_common_macros.S>
.globl bl2_entrypoint
.globl bl2_run_next_image

View File

@ -6,7 +6,7 @@
#include <arch.h>
#include <asm_macros.S>
#include <bl_common.h>
#include <common/bl_common.h>
.globl bl2_vector_table

View File

@ -6,8 +6,7 @@
#include <arch.h>
#include <asm_macros.S>
#include <bl_common.h>
#include <common/bl_common.h>
.globl bl2_vector_table
.globl bl2_entrypoint

View File

@ -6,7 +6,7 @@
#include <arch.h>
#include <asm_macros.S>
#include <bl_common.h>
#include <common/bl_common.h>
#include <el3_common_macros.S>
.globl bl2_entrypoint

View File

@ -6,8 +6,8 @@
#include <arch.h>
#include <asm_macros.S>
#include <bl1.h>
#include <bl_common.h>
#include <bl1/bl1.h>
#include <common/bl_common.h>
#include <context.h>
/* -----------------------------------------------------------------------------

View File

@ -6,7 +6,7 @@
#include <arch.h>
#include <asm_macros.S>
#include <bl_common.h>
#include <common/bl_common.h>
.globl bl2_entrypoint

View File

@ -5,7 +5,8 @@
*/
#include <platform_def.h>
#include <xlat_tables_defs.h>
#include <lib/xlat_tables/xlat_tables_defs.h>
OUTPUT_FORMAT(PLATFORM_LINKER_FORMAT)
OUTPUT_ARCH(PLATFORM_LINKER_ARCH)

View File

@ -5,7 +5,8 @@
*/
#include <platform_def.h>
#include <xlat_tables_defs.h>
#include <lib/xlat_tables/xlat_tables_defs.h>
OUTPUT_FORMAT(PLATFORM_LINKER_FORMAT)
OUTPUT_ARCH(PLATFORM_LINKER_ARCH)

View File

@ -4,18 +4,20 @@
* SPDX-License-Identifier: BSD-3-Clause
*/
#include <assert.h>
#include <stdint.h>
#include <platform_def.h>
#include <arch.h>
#include <arch_helpers.h>
#include <assert.h>
#include <auth_mod.h>
#include <bl_common.h>
#include <debug.h>
#include <desc_image_load.h>
#include <platform.h>
#include <platform_def.h>
#include <stdint.h>
#include "bl2_private.h"
#include <common/bl_common.h>
#include <common/debug.h>
#include <common/desc_image_load.h>
#include <drivers/auth/auth_mod.h>
#include <plat/common/platform.h>
#include "bl2_private.h"
/*******************************************************************************
* This function loads SCP_BL2/BL3x images and returns the ep_info for

View File

@ -5,13 +5,14 @@
*/
#include <arch_helpers.h>
#include <auth_mod.h>
#include <bl1.h>
#include <bl2.h>
#include <bl_common.h>
#include <console.h>
#include <debug.h>
#include <platform.h>
#include <bl1/bl1.h>
#include <bl2/bl2.h>
#include <common/bl_common.h>
#include <common/debug.h>
#include <drivers/auth/auth_mod.h>
#include <drivers/console.h>
#include <plat/common/platform.h>
#include "bl2_private.h"
#ifdef AARCH32

View File

@ -6,8 +6,7 @@
#include <arch.h>
#include <asm_macros.S>
#include <bl_common.h>
#include <common/bl_common.h>
.globl bl2u_vector_table
.globl bl2u_entrypoint

View File

@ -6,8 +6,7 @@
#include <arch.h>
#include <asm_macros.S>
#include <bl_common.h>
#include <common/bl_common.h>
.globl bl2u_entrypoint

View File

@ -5,7 +5,8 @@
*/
#include <platform_def.h>
#include <xlat_tables_defs.h>
#include <lib/xlat_tables/xlat_tables_defs.h>
OUTPUT_FORMAT(PLATFORM_LINKER_FORMAT)
OUTPUT_ARCH(PLATFORM_LINKER_ARCH)

View File

@ -4,19 +4,20 @@
* SPDX-License-Identifier: BSD-3-Clause
*/
#include <arch.h>
#include <arch_helpers.h>
#include <assert.h>
#include <auth_mod.h>
#include <bl1.h>
#include <bl2u.h>
#include <bl_common.h>
#include <console.h>
#include <debug.h>
#include <platform.h>
#include <platform_def.h>
#include <stdint.h>
#include <platform_def.h>
#include <arch.h>
#include <arch_helpers.h>
#include <bl1/bl1.h>
#include <bl2u/bl2u.h>
#include <common/bl_common.h>
#include <common/debug.h>
#include <drivers/auth/auth_mod.h>
#include <drivers/console.h>
#include <plat/common/platform.h>
/*******************************************************************************
* This function is responsible to:

View File

@ -4,13 +4,14 @@
* SPDX-License-Identifier: BSD-3-Clause
*/
#include <arch.h>
#include <bl_common.h>
#include <el3_common_macros.S>
#include <platform_def.h>
#include <pmf_asm_macros.S>
#include <runtime_instr.h>
#include <xlat_mmu_helpers.h>
#include <arch.h>
#include <common/bl_common.h>
#include <el3_common_macros.S>
#include <lib/pmf/pmf_asm_macros.S>
#include <lib/runtime_instr.h>
#include <lib/xlat_tables/xlat_mmu_helpers.h>
.globl bl31_entrypoint
.globl bl31_warm_entrypoint

View File

@ -3,13 +3,15 @@
*
* SPDX-License-Identifier: BSD-3-Clause
*/
#include <plat_macros.S>
#include <platform_def.h>
#include <arch.h>
#include <asm_macros.S>
#include <context.h>
#include <cpu_data.h>
#include <plat_macros.S>
#include <platform_def.h>
#include <utils_def.h>
#include <lib/el3_runtime/cpu_data.h>
#include <lib/utils_def.h>
.globl report_unhandled_exception
.globl report_unhandled_interrupt

View File

@ -8,9 +8,9 @@
#include <assert_macros.S>
#include <asm_macros.S>
#include <assert_macros.S>
#include <bl31/ea_handle.h>
#include <context.h>
#include <ea_handle.h>
#include <ras_arch.h>
#include <lib/extensions/ras_arch.h>
.globl handle_lower_el_ea_esb

View File

@ -4,15 +4,16 @@
* SPDX-License-Identifier: BSD-3-Clause
*/
#include <platform_def.h>
#include <arch.h>
#include <asm_macros.S>
#include <bl31/ea_handle.h>
#include <bl31/interrupt_mgmt.h>
#include <common/runtime_svc.h>
#include <context.h>
#include <cpu_data.h>
#include <ea_handle.h>
#include <interrupt_mgmt.h>
#include <platform_def.h>
#include <runtime_svc.h>
#include <smccc.h>
#include <lib/el3_runtime/cpu_data.h>
#include <lib/smccc.h>
.globl runtime_exceptions

View File

@ -5,7 +5,8 @@
*/
#include <platform_def.h>
#include <xlat_tables_defs.h>
#include <lib/xlat_tables/xlat_tables_defs.h>
OUTPUT_FORMAT(PLATFORM_LINKER_FORMAT)
OUTPUT_ARCH(PLATFORM_LINKER_ARCH)
@ -77,7 +78,7 @@ SECTIONS
/* Place pubsub sections for events */
. = ALIGN(8);
#include <pubsub_events.h>
#include <lib/el3_runtime/pubsub_events.h>
. = ALIGN(PAGE_SIZE);
__RODATA_END__ = .;
@ -124,7 +125,7 @@ SECTIONS
/* Place pubsub sections for events */
. = ALIGN(8);
#include <pubsub_events.h>
#include <lib/el3_runtime/pubsub_events.h>
*(.vectors)
__RO_END_UNALIGNED__ = .;

View File

@ -5,13 +5,13 @@
*/
#include <assert.h>
#include <bl31.h>
#include <bl_common.h>
#include <context.h>
#include <context_mgmt.h>
#include <cpu_data.h>
#include <platform.h>
#include <bl31/bl31.h>
#include <common/bl_common.h>
#include <context.h>
#include <lib/el3_runtime/context_mgmt.h>
#include <lib/el3_runtime/cpu_data.h>
#include <plat/common/platform.h>
/*******************************************************************************
* This function returns a pointer to the most recent 'cpu_context' structure

View File

@ -4,21 +4,22 @@
* SPDX-License-Identifier: BSD-3-Clause
*/
#include <assert.h>
#include <string.h>
#include <arch.h>
#include <arch_helpers.h>
#include <assert.h>
#include <bl31.h>
#include <bl_common.h>
#include <console.h>
#include <context_mgmt.h>
#include <debug.h>
#include <ehf.h>
#include <platform.h>
#include <pmf.h>
#include <runtime_instr.h>
#include <runtime_svc.h>
#include <std_svc.h>
#include <string.h>
#include <bl31/bl31.h>
#include <bl31/ehf.h>
#include <common/bl_common.h>
#include <common/debug.h>
#include <common/runtime_svc.h>
#include <drivers/console.h>
#include <lib/el3_runtime/context_mgmt.h>
#include <lib/pmf/pmf.h>
#include <lib/runtime_instr.h>
#include <plat/common/platform.h>
#include <services/std_svc.h>
#if ENABLE_RUNTIME_INSTRUMENTATION
PMF_REGISTER_SERVICE_SMC(rt_instr_svc, PMF_RT_INSTR_SVC_ID,

View File

@ -9,17 +9,18 @@
*/
#include <assert.h>
#include <context.h>
#include <context_mgmt.h>
#include <cpu_data.h>
#include <debug.h>
#include <ehf.h>
#include <gic_common.h>
#include <interrupt_mgmt.h>
#include <platform.h>
#include <pubsub_events.h>
#include <stdbool.h>
#include <bl31/ehf.h>
#include <bl31/interrupt_mgmt.h>
#include <context.h>
#include <common/debug.h>
#include <drivers/arm/gic_common.h>
#include <lib/el3_runtime/context_mgmt.h>
#include <lib/el3_runtime/cpu_data.h>
#include <lib/el3_runtime/pubsub_events.h>
#include <plat/common/platform.h>
/* Output EHF logs as verbose */
#define EHF_LOG(...) VERBOSE("EHF: " __VA_ARGS__)

View File

@ -5,11 +5,12 @@
*/
#include <assert.h>
#include <bl_common.h>
#include <context_mgmt.h>
#include <errno.h>
#include <interrupt_mgmt.h>
#include <platform.h>
#include <common/bl_common.h>
#include <bl31/interrupt_mgmt.h>
#include <lib/el3_runtime/context_mgmt.h>
#include <plat/common/platform.h>
/*******************************************************************************
* Local structure and corresponding array to keep track of the state of the

View File

@ -6,13 +6,13 @@
#include <arch.h>
#include <asm_macros.S>
#include <bl_common.h>
#include <common/bl_common.h>
#include <common/runtime_svc.h>
#include <context.h>
#include <el3_common_macros.S>
#include <runtime_svc.h>
#include <lib/xlat_tables/xlat_tables_defs.h>
#include <smccc_helpers.h>
#include <smccc_macros.S>
#include <xlat_tables_defs.h>
.globl sp_min_vector_table
.globl sp_min_entrypoint

View File

@ -5,7 +5,8 @@
*/
#include <platform_def.h>
#include <xlat_tables_defs.h>
#include <lib/xlat_tables/xlat_tables_defs.h>
OUTPUT_FORMAT(elf32-littlearm)
OUTPUT_ARCH(arm)
@ -62,7 +63,7 @@ SECTIONS
/* Place pubsub sections for events */
. = ALIGN(8);
#include <pubsub_events.h>
#include <lib/el3_runtime/pubsub_events.h>
. = ALIGN(PAGE_SIZE);
__RODATA_END__ = .;
@ -91,7 +92,7 @@ SECTIONS
/* Place pubsub sections for events */
. = ALIGN(8);
#include <pubsub_events.h>
#include <lib/el3_runtime/pubsub_events.h>
*(.vectors)
__RO_END_UNALIGNED__ = .;

View File

@ -4,26 +4,28 @@
* SPDX-License-Identifier: BSD-3-Clause
*/
#include <arch.h>
#include <arch_helpers.h>
#include <assert.h>
#include <bl_common.h>
#include <console.h>
#include <context.h>
#include <context_mgmt.h>
#include <debug.h>
#include <platform.h>
#include <platform_def.h>
#include <platform_sp_min.h>
#include <psci.h>
#include <runtime_svc.h>
#include <smccc_helpers.h>
#include <stddef.h>
#include <stdint.h>
#include <std_svc.h>
#include <stdint.h>
#include <string.h>
#include <utils.h>
#include <platform_def.h>
#include <arch.h>
#include <arch_helpers.h>
#include <common/bl_common.h>
#include <common/debug.h>
#include <common/runtime_svc.h>
#include <context.h>
#include <drivers/console.h>
#include <lib/el3_runtime/context_mgmt.h>
#include <lib/psci/psci.h>
#include <lib/utils.h>
#include <plat/common/platform.h>
#include <platform_sp_min.h>
#include <services/std_svc.h>
#include <smccc_helpers.h>
#include "sp_min_private.h"
/* Pointers to per-core cpu contexts */

View File

@ -6,8 +6,9 @@
#include <arch.h>
#include <asm_macros.S>
#include <tsp.h>
#include <xlat_tables_defs.h>
#include <bl32/tsp/tsp.h>
#include <lib/xlat_tables/xlat_tables_defs.h>
#include "../tsp_private.h"

View File

@ -6,9 +6,8 @@
#include <arch.h>
#include <asm_macros.S>
#include <bl_common.h>
#include <tsp.h>
#include <bl32/tsp/tsp.h>
#include <common/bl_common.h>
/* ----------------------------------------------------
* The caller-saved registers x0-x18 and LR are saved

View File

@ -5,7 +5,7 @@
*/
#include <asm_macros.S>
#include <tsp.h>
#include <bl32/tsp/tsp.h>
.globl tsp_get_magic

View File

@ -4,8 +4,8 @@
* SPDX-License-Identifier: BSD-3-Clause
*/
#include <lib/xlat_tables/xlat_tables_defs.h>
#include <platform_def.h>
#include <xlat_tables_defs.h>
OUTPUT_FORMAT(PLATFORM_LINKER_FORMAT)
OUTPUT_ARCH(PLATFORM_LINKER_ARCH)

View File

@ -4,12 +4,15 @@
* SPDX-License-Identifier: BSD-3-Clause
*/
#include <arch_helpers.h>
#include <assert.h>
#include <debug.h>
#include <platform.h>
#include <platform_def.h>
#include <tsp.h>
#include <arch_helpers.h>
#include <bl32/tsp/tsp.h>
#include <common/debug.h>
#include <plat/common/platform.h>
#include "tsp_private.h"
/*******************************************************************************

View File

@ -4,14 +4,16 @@
* SPDX-License-Identifier: BSD-3-Clause
*/
#include <arch_helpers.h>
#include <bl_common.h>
#include <debug.h>
#include <platform.h>
#include <platform_def.h>
#include <arch_helpers.h>
#include <bl32/tsp/tsp.h>
#include <common/bl_common.h>
#include <common/debug.h>
#include <lib/spinlock.h>
#include <plat/common/platform.h>
#include <platform_tsp.h>
#include <spinlock.h>
#include <tsp.h>
#include "tsp_private.h"

View File

@ -22,12 +22,13 @@
#ifndef __ASSEMBLY__
#include <cassert.h>
#include <platform_def.h> /* For CACHE_WRITEBACK_GRANULE */
#include <spinlock.h>
#include <stdint.h>
#include <tsp.h>
#include <platform_def.h> /* For CACHE_WRITEBACK_GRANULE */
#include <bl32/tsp/tsp.h>
#include <lib/cassert.h>
#include <lib/spinlock.h>
typedef struct work_statistics {
/* Number of s-el1 interrupts on this cpu */

View File

@ -3,9 +3,12 @@
*
* SPDX-License-Identifier: BSD-3-Clause
*/
#include <arch_helpers.h>
#include <assert.h>
#include <platform.h>
#include <arch_helpers.h>
#include <plat/common/platform.h>
#include "tsp_private.h"
/*******************************************************************************

View File

@ -6,7 +6,7 @@
#include <arch.h>
#include <asm_macros.S>
#include <debug.h>
#include <common/debug.h>
.globl asm_print_str
.globl asm_print_hex

View File

@ -5,7 +5,7 @@
*/
#include <asm_macros.S>
#include <bl_common.h>
#include <common/bl_common.h>
/* -----------------------------------------------------------------------------
* Very simple stackless exception handlers used by BL2 and BL31 stages.

View File

@ -4,13 +4,14 @@
* SPDX-License-Identifier: BSD-3-Clause
*/
#include <arch_helpers.h>
#include <assert.h>
#include <console.h>
#include <debug.h>
#include <stdbool.h>
#include <stdint.h>
#include <arch_helpers.h>
#include <common/debug.h>
#include <drivers/console.h>
/* Maximum number of entries in the backtrace to display */
#define UNWIND_LIMIT 20U

View File

@ -4,18 +4,19 @@
* SPDX-License-Identifier: BSD-3-Clause
*/
#include <assert.h>
#include <errno.h>
#include <string.h>
#include <arch.h>
#include <arch_helpers.h>
#include <assert.h>
#include <auth_mod.h>
#include <bl_common.h>
#include <debug.h>
#include <errno.h>
#include <io_storage.h>
#include <platform.h>
#include <string.h>
#include <utils.h>
#include <xlat_tables_defs.h>
#include <common/bl_common.h>
#include <common/debug.h>
#include <drivers/auth/auth_mod.h>
#include <drivers/io/io_storage.h>
#include <lib/utils.h>
#include <lib/xlat_tables/xlat_tables_defs.h>
#include <plat/common/platform.h>
#if TRUSTED_BOARD_BOOT
# ifdef DYN_DISABLE_AUTH

View File

@ -4,12 +4,11 @@
* SPDX-License-Identifier: BSD-3-Clause
*/
#include <arch_helpers.h>
#include <assert.h>
#include <bl_common.h>
#include <desc_image_load.h>
#include <arch_helpers.h>
#include <common/bl_common.h>
#include <common/desc_image_load.h>
static bl_load_info_t bl_load_info;
static bl_params_t next_bl_params;

View File

@ -7,11 +7,13 @@
/* Helper functions to offer easier navigation of Device Tree Blob */
#include <assert.h>
#include <debug.h>
#include <fdt_wrappers.h>
#include <libfdt.h>
#include <string.h>
#include <libfdt.h>
#include <common/debug.h>
#include <common/fdt_wrappers.h>
/*
* Read cells from a given property of the given node. At most 2 cells of the
* property are read, and pointer is updated. Returns 0 on success, and -1 upon

View File

@ -4,13 +4,14 @@
* SPDX-License-Identifier: BSD-3-Clause
*/
#include <arch_helpers.h>
#include <assert.h>
#include <bl_common.h>
#include <debug.h>
#include <image_decompress.h>
#include <stdint.h>
#include <arch_helpers.h>
#include <common/bl_common.h>
#include <common/debug.h>
#include <common/image_decompress.h>
static uintptr_t decompressor_buf_base;
static uint32_t decompressor_buf_size;
static decompressor_t *decompressor;

View File

@ -5,11 +5,12 @@
*/
#include <assert.h>
#include <debug.h>
#include <errno.h>
#include <runtime_svc.h>
#include <string.h>
#include <common/debug.h>
#include <common/runtime_svc.h>
/*******************************************************************************
* The 'rt_svc_descs' array holds the runtime service descriptors exported by
* services by placing them in the 'rt_svc_descs' linker section.

View File

@ -4,9 +4,12 @@
* SPDX-License-Identifier: BSD-3-Clause
*/
#include <stdarg.h>
#include <assert.h>
#include <debug.h>
#include <platform.h>
#include <stdio.h>
#include <common/debug.h>
#include <plat/common/platform.h>
/* Set the default maximum log level to the `LOG_LEVEL` build flag */
static unsigned int max_log_level = LOG_LEVEL;

View File

@ -308,9 +308,9 @@ assign interrupts to fictitious dispatchers:
.. code:: c
#include <common/interrupt_props.h>
#include <drivers/arm/gic_common.h>
#include <exception_mgmt.h>
#include <gic_common.h>
#include <interrupt_props.h>
...

View File

@ -4,10 +4,12 @@
* SPDX-License-Identifier: BSD-3-Clause
*/
#include <debug.h>
#include <delay_timer.h>
#include <errno.h>
#include <mmio.h>
#include <common/debug.h>
#include <drivers/delay_timer.h>
#include <lib/mmio.h>
#include <sunxi_mmap.h>
#define RSB_CTRL 0x00

View File

@ -4,15 +4,16 @@
* SPDX-License-Identifier: BSD-3-Clause
*/
#include <arch.h>
#include <arch_helpers.h>
#include <assert.h>
#include <cci.h>
#include <debug.h>
#include <mmio.h>
#include <stdbool.h>
#include <stdint.h>
#include <arch.h>
#include <arch_helpers.h>
#include <common/debug.h>
#include <drivers/arm/cci.h>
#include <lib/mmio.h>
#define MAKE_CCI_PART_NUMBER(hi, lo) (((hi) << 8) | (lo))
#define CCI_PART_LO_MASK U(0xff)
#define CCI_PART_HI_MASK U(0xf)

View File

@ -4,14 +4,16 @@
* SPDX-License-Identifier: BSD-3-Clause
*/
#include <arch.h>
#include <assert.h>
#include <bakery_lock.h>
#include <ccn.h>
#include <debug.h>
#include <errno.h>
#include <mmio.h>
#include <stdbool.h>
#include <arch.h>
#include <common/debug.h>
#include <drivers/arm/ccn.h>
#include <lib/bakery_lock.h>
#include <lib/mmio.h>
#include "ccn_private.h"
static const ccn_desc_t *ccn_plat_desc;

View File

@ -5,8 +5,10 @@
*/
#include <assert.h>
#include <gic_common.h>
#include <mmio.h>
#include <drivers/arm/gic_common.h>
#include <lib/mmio.h>
#include "gic_common_private.h"
/*******************************************************************************

View File

@ -7,10 +7,11 @@
#ifndef GIC_COMMON_PRIVATE_H
#define GIC_COMMON_PRIVATE_H
#include <gic_common.h>
#include <mmio.h>
#include <stdint.h>
#include <drivers/arm/gic_common.h>
#include <lib/mmio.h>
/*******************************************************************************
* GIC Distributor interface register accessors that are common to GICv3 & GICv2
******************************************************************************/

View File

@ -4,13 +4,15 @@
* SPDX-License-Identifier: BSD-3-Clause
*/
#include <assert.h>
#include <arch.h>
#include <arch_helpers.h>
#include <assert.h>
#include <debug.h>
#include <gic_common.h>
#include <gicv2.h>
#include <interrupt_props.h>
#include <common/debug.h>
#include <common/interrupt_props.h>
#include <drivers/arm/gic_common.h>
#include <drivers/arm/gicv2.h>
#include "../common/gic_common_private.h"
#include "gicv2_private.h"

View File

@ -4,15 +4,16 @@
* SPDX-License-Identifier: BSD-3-Clause
*/
#include <assert.h>
#include <stdbool.h>
#include <arch.h>
#include <arch_helpers.h>
#include <assert.h>
#include <debug.h>
#include <gic_common.h>
#include <gicv2.h>
#include <interrupt_props.h>
#include <spinlock.h>
#include <stdbool.h>
#include <common/debug.h>
#include <common/interrupt_props.h>
#include <drivers/arm/gic_common.h>
#include <drivers/arm/gicv2.h>
#include <lib/spinlock.h>
#include "../common/gic_common_private.h"
#include "gicv2_private.h"

View File

@ -7,10 +7,11 @@
#ifndef GICV2_PRIVATE_H
#define GICV2_PRIVATE_H
#include <gicv2.h>
#include <mmio.h>
#include <stdint.h>
#include <drivers/arm/gicv2.h>
#include <lib/mmio.h>
/*******************************************************************************
* Private function prototypes
******************************************************************************/

View File

@ -10,12 +10,13 @@
* APIs that are different to those generic ones in GICv3 driver.
*/
#include <arch_helpers.h>
#include <assert.h>
#include <gicv3.h>
#include <arch_helpers.h>
#include <drivers/arm/arm_gicv3_common.h>
#include <drivers/arm/gicv3.h>
#include "gicv3_private.h"
#include "arm_gicv3_common.h"
/*
* Flush the internal GIC cache of the LPIs pending tables to memory before

View File

@ -11,9 +11,10 @@
* GIC600 supports independently power-gating redistributor interface.
*/
#include <arch_helpers.h>
#include <assert.h>
#include <gicv3.h>
#include <arch_helpers.h>
#include <drivers/arm/gicv3.h>
#include "gicv3_private.h"

View File

@ -4,12 +4,14 @@
* SPDX-License-Identifier: BSD-3-Clause
*/
#include <assert.h>
#include <arch.h>
#include <arch_helpers.h>
#include <assert.h>
#include <debug.h>
#include <gic_common.h>
#include <interrupt_props.h>
#include <common/debug.h>
#include <common/interrupt_props.h>
#include <drivers/arm/gic_common.h>
#include "../common/gic_common_private.h"
#include "gicv3_private.h"

View File

@ -4,13 +4,15 @@
* SPDX-License-Identifier: BSD-3-Clause
*/
#include <assert.h>
#include <arch.h>
#include <arch_helpers.h>
#include <assert.h>
#include <debug.h>
#include <gicv3.h>
#include <interrupt_props.h>
#include <spinlock.h>
#include <common/debug.h>
#include <common/interrupt_props.h>
#include <drivers/arm/gicv3.h>
#include <lib/spinlock.h>
#include "gicv3_private.h"
const gicv3_driver_data_t *gicv3_driver_data;

View File

@ -8,10 +8,12 @@
#define GICV3_PRIVATE_H
#include <assert.h>
#include <gic_common.h>
#include <gicv3.h>
#include <mmio.h>
#include <stdint.h>
#include <drivers/arm/gic_common.h>
#include <drivers/arm/gicv3.h>
#include <lib/mmio.h>
#include "../common/gic_common_private.h"
/*******************************************************************************

View File

@ -8,7 +8,7 @@
#include <assert_macros.S>
#define USE_FINISH_CONSOLE_REG_2
#include <console_macros.S>
#include <pl011.h>
#include <drivers/arm/pl011.h>
#if !MULTI_CONSOLE_API
/*

View File

@ -8,7 +8,7 @@
#include <assert_macros.S>
#define USE_FINISH_CONSOLE_REG_2
#include <console_macros.S>
#include <pl011.h>
#include <drivers/arm/pl011.h>
#if !MULTI_CONSOLE_API
/*

View File

@ -9,13 +9,14 @@
*/
#include <assert.h>
#include <cassert.h>
#include <debug.h>
#include <errno.h>
#include <gpio.h>
#include <mmio.h>
#include <pl061_gpio.h>
#include <utils.h>
#include <common/debug.h>
#include <drivers/arm/pl061_gpio.h>
#include <drivers/gpio.h>
#include <lib/cassert.h>
#include <lib/mmio.h>
#include <lib/utils.h>
#if !PLAT_PL061_MAX_GPIOS
# define PLAT_PL061_MAX_GPIOS 32

View File

@ -5,10 +5,11 @@
*/
#include <cdefs.h>
#include <mmio.h>
#include <smmu_v3.h>
#include <stdbool.h>
#include <drivers/arm/smmu_v3.h>
#include <lib/mmio.h>
static inline uint32_t __init smmuv3_read_s_idr1(uintptr_t base)
{
return mmio_read_32(base + SMMU_S_IDR1);

View File

@ -5,8 +5,9 @@
*/
#include <assert.h>
#include <delay_timer.h>
#include <mmio.h>
#include <drivers/delay_timer.h>
#include <lib/mmio.h>
uintptr_t sp804_base_addr;

View File

@ -4,10 +4,11 @@
* SPDX-License-Identifier: BSD-3-Clause
*/
#include <mmio.h>
#include <sp805.h>
#include <stdint.h>
#include <drivers/arm/sp805.h>
#include <lib/mmio.h>
/* Inline register access functions */
static inline void sp805_write_wdog_load(uintptr_t base, uint32_t value)

View File

@ -5,10 +5,11 @@
*/
#include <assert.h>
#include <debug.h>
#include <mmio.h>
#include <stddef.h>
#include <tzc380.h>
#include <common/debug.h>
#include <drivers/arm/tzc380.h>
#include <lib/mmio.h>
struct tzc380_instance {
uintptr_t base;

View File

@ -5,10 +5,12 @@
*/
#include <assert.h>
#include <debug.h>
#include <mmio.h>
#include <stddef.h>
#include <tzc400.h>
#include <common/debug.h>
#include <drivers/arm/tzc400.h>
#include <lib/mmio.h>
#include "tzc_common_private.h"
/*

View File

@ -9,8 +9,8 @@
#include <arch.h>
#include <arch_helpers.h>
#include <mmio.h>
#include <tzc_common.h>
#include <drivers/arm/tzc_common.h>
#include <lib/mmio.h>
#define DEFINE_TZC_COMMON_WRITE_ACTION(fn_name, macro_name) \
static inline void _tzc##fn_name##_write_action( \

View File

@ -5,10 +5,12 @@
*/
#include <assert.h>
#include <debug.h>
#include <mmio.h>
#include <tzc_dmc500.h>
#include "tzc_common.h"
#include <common/debug.h>
#include <drivers/arm/tzc_dmc500.h>
#include <drivers/arm/tzc_common.h>
#include <lib/mmio.h>
#include "tzc_common_private.h"
/*

View File

@ -5,9 +5,10 @@
*/
#include <assert.h>
#include <debug.h>
#include <mmio.h>
#include <tzc_dmc620.h>
#include <common/debug.h>
#include <drivers/arm/tzc_dmc620.h>
#include <lib/mmio.h>
/* Mask to extract bit 31 to 16 */
#define MASK_31_16 UINT64_C(0x0000ffff0000)

View File

@ -5,17 +5,19 @@
*/
#include <assert.h>
#include <auth_common.h>
#include <auth_mod.h>
#include <cot_def.h>
#include <crypto_mod.h>
#include <debug.h>
#include <img_parser_mod.h>
#include <platform.h>
#include <platform_def.h>
#include <stdint.h>
#include <string.h>
#include <platform_def.h>
#include <common/debug.h>
#include <common/tbbr/cot_def.h>
#include <drivers/auth/auth_common.h>
#include <drivers/auth/auth_mod.h>
#include <drivers/auth/crypto_mod.h>
#include <drivers/auth/img_parser_mod.h>
#include <plat/common/platform.h>
/* ASN.1 tags */
#define ASN1_INTEGER 0x02

View File

@ -5,8 +5,9 @@
*/
#include <assert.h>
#include <crypto_mod.h>
#include <debug.h>
#include <common/debug.h>
#include <drivers/auth/crypto_mod.h>
/* Variable exported by the crypto library through REGISTER_CRYPTO_LIB() */

View File

@ -4,20 +4,22 @@
* SPDX-License-Identifier: BSD-3-Clause
*/
#include <arch_helpers.h>
#include <crypto_driver.h>
#include <crypto_mod.h>
#include <debug.h>
#include <mbedtls_common.h>
#include <platform_def.h>
#include <rsa.h>
#include <sbrom_bsv_api.h>
#include <secureboot_base_func.h>
#include <secureboot_gen_defs.h>
#include <stddef.h>
#include <string.h>
#include <util.h>
#include <utils.h>
#include <platform_def.h>
#include <arch_helpers.h>
#include <common/debug.h>
#include <drivers/arm/cryptocell/crypto_driver.h>
#include <drivers/arm/cryptocell/rsa.h>
#include <drivers/arm/cryptocell/sbrom_bsv_api.h>
#include <drivers/arm/cryptocell/secureboot_base_func.h>
#include <drivers/arm/cryptocell/secureboot_gen_defs.h>
#include <drivers/arm/cryptocell/util.h>
#include <drivers/auth/crypto_mod.h>
#include <drivers/auth/mbedtls/mbedtls_common.h>
#include <lib/utils.h>
#include <mbedtls/oid.h>

View File

@ -20,9 +20,7 @@ endif
TF_LDFLAGS += -L$(CCSBROM_LIB_PATH)
LDLIBS += -lcc_712sbromx509
INCLUDES += -Iinclude/drivers/arm/cryptocell
CRYPTOCELL_SOURCES := drivers/auth/cryptocell/cryptocell_crypto.c
BL1_SOURCES += ${CRYPTOCELL_SOURCES}
BL2_SOURCES += ${CRYPTOCELL_SOURCES}
BL2_SOURCES += ${CRYPTOCELL_SOURCES}

View File

@ -5,14 +5,15 @@
*/
#include <assert.h>
#include <auth_common.h>
#include <debug.h>
#include <errno.h>
#include <img_parser_mod.h>
#include <limits.h>
#include <stdint.h>
#include <string.h>
#include <utils_def.h>
#include <common/debug.h>
#include <drivers/auth/auth_common.h>
#include <drivers/auth/img_parser_mod.h>
#include <lib/utils_def.h>
IMPORT_SYM(uintptr_t, __PARSER_LIB_DESCS_START__, PARSER_LIB_DESCS_START);
IMPORT_SYM(uintptr_t, __PARSER_LIB_DESCS_END__, PARSER_LIB_DESCS_END);

View File

@ -5,14 +5,16 @@
*/
#include <assert.h>
#include <debug.h>
#include <stddef.h>
/* mbed TLS headers */
#include <mbedtls/memory_buffer_alloc.h>
#include <mbedtls/platform.h>
#include <mbedtls_common.h>
#include <mbedtls_config.h>
#include <platform.h>
#include <stddef.h>
#include <common/debug.h>
#include <drivers/auth/mbedtls/mbedtls_common.h>
#include <drivers/auth/mbedtls/mbedtls_config.h>
#include <plat/common/platform.h>
static void cleanup(void)
{

View File

@ -14,10 +14,9 @@ ifeq (${MBEDTLS_DIR},)
endif
MBEDTLS_INC = -I${MBEDTLS_DIR}/include
INCLUDES += -Iinclude/drivers/auth/mbedtls
# Specify mbed TLS configuration file
MBEDTLS_CONFIG_FILE := "<mbedtls_config.h>"
MBEDTLS_CONFIG_FILE := "<drivers/auth/mbedtls/mbedtls_config.h>"
$(eval $(call add_define,MBEDTLS_CONFIG_FILE))
MBEDTLS_SOURCES += drivers/auth/mbedtls/mbedtls_common.c

View File

@ -4,10 +4,6 @@
* SPDX-License-Identifier: BSD-3-Clause
*/
#include <crypto_mod.h>
#include <debug.h>
#include <mbedtls_common.h>
#include <mbedtls_config.h>
#include <stddef.h>
#include <string.h>
@ -17,6 +13,11 @@
#include <mbedtls/oid.h>
#include <mbedtls/platform.h>
#include <common/debug.h>
#include <drivers/auth/crypto_mod.h>
#include <drivers/auth/mbedtls/mbedtls_common.h>
#include <drivers/auth/mbedtls/mbedtls_config.h>
#define LIB_NAME "mbed TLS"
/*

View File

@ -12,20 +12,21 @@
* extensions field, such as an image hash or a public key.
*/
#include <arch_helpers.h>
#include <assert.h>
#include <img_parser_mod.h>
#include <mbedtls_common.h>
#include <stddef.h>
#include <stdint.h>
#include <string.h>
#include <utils.h>
/* mbed TLS headers */
#include <mbedtls/asn1.h>
#include <mbedtls/oid.h>
#include <mbedtls/platform.h>
#include <arch_helpers.h>
#include <drivers/auth/img_parser_mod.h>
#include <drivers/auth/mbedtls/mbedtls_common.h>
#include <lib/utils.h>
/* Maximum OID string length ("a.b.c.d.e.f ...") */
#define MAX_OID_STR_LEN 64

View File

@ -4,12 +4,13 @@
* SPDX-License-Identifier: BSD-3-Clause
*/
#include <auth_mod.h>
#include <platform_def.h>
#include <stddef.h>
#include <platform_def.h>
#include <drivers/auth/auth_mod.h>
#if USE_TBBR_DEFS
#include <tbbr_oid.h>
#include <tools_share/tbbr_oid.h>
#else
#include <platform_oid.h>
#endif

View File

@ -6,9 +6,9 @@
#include <arch.h>
#include <asm_macros.S>
#include <assert_macros.S>
#include <cadence/cdns_uart.h>
#define USE_FINISH_CONSOLE_REG_2
#include <console_macros.S>
#include <drivers/cadence/cdns_uart.h>
/*
* "core" functions are low-level implementations that don't require

View File

@ -5,8 +5,9 @@
*/
#include <errno.h>
#include <mmio.h>
#include <v2m_flash.h>
#include <drivers/cfi/v2m_flash.h>
#include <lib/mmio.h>
/*
* This file supplies a low level interface to the vexpress NOR flash

View File

@ -7,6 +7,7 @@
#if MULTI_CONSOLE_API
#include <assert.h>
#include <drivers/console.h>
console_t *console_list;

View File

@ -5,9 +5,9 @@
*/
#include <asm_macros.S>
#include <cbmem_console.h>
#define USE_FINISH_CONSOLE_REG_2
#include <console_macros.S>
#include <drivers/coreboot/cbmem_console.h>
/*
* This driver implements access to coreboot's in-memory console

View File

@ -5,9 +5,11 @@
*/
#include <assert.h>
#include <delay_timer.h>
#include <platform_def.h>
#include <utils_def.h>
#include <drivers/delay_timer.h>
#include <lib/utils_def.h>
/***********************************************************
* The delay timer implementation

View File

@ -4,13 +4,14 @@
* SPDX-License-Identifier: BSD-3-Clause
*/
#include <arch_helpers.h>
#include <assert.h>
#include <bl_common.h>
#include <debug.h>
#include <delay_timer.h>
#include <generic_delay_timer.h>
#include <platform.h>
#include <arch_helpers.h>
#include <common/bl_common.h>
#include <common/debug.h>
#include <drivers/delay_timer.h>
#include <drivers/generic_delay_timer.h>
#include <plat/common/platform.h>
/* Ticks elapsed in one second by a signal of 1 MHz */
#define MHZ_TICKS_PER_SEC 1000000

View File

@ -11,7 +11,8 @@
#include <assert.h>
#include <errno.h>
#include <gpio.h>
#include <drivers/gpio.h>
/*
* The gpio implementation

View File

@ -5,8 +5,10 @@
*/
#include <assert.h>
#include <delay_timer.h>
#include <mmio.h>
#include <drivers/delay_timer.h>
#include <lib/mmio.h>
#include <imx_gpt.h>
#define GPTCR_SWR BIT(15) /* Software reset */

View File

@ -3,10 +3,14 @@
*
* SPDX-License-Identifier: BSD-3-Clause
*/
#include <arch.h>
#include <stdint.h>
#include <mmio.h>
#include <platform_def.h>
#include <arch.h>
#include <lib/mmio.h>
#include <imx_uart.h>
/* TX/RX FIFO threshold */

View File

@ -4,16 +4,18 @@
* SPDX-License-Identifier: BSD-3-Clause
*/
#include <assert.h>
#include <errno.h>
#include <string.h>
#include <arch.h>
#include <arch_helpers.h>
#include <assert.h>
#include <debug.h>
#include <delay_timer.h>
#include <common/debug.h>
#include <drivers/delay_timer.h>
#include <drivers/mmc.h>
#include <lib/mmio.h>
#include <imx_usdhc.h>
#include <mmc.h>
#include <errno.h>
#include <mmio.h>
#include <string.h>
static void imx_usdhc_initialize(void);
static int imx_usdhc_send_cmd(struct mmc_cmd *cmd);

View File

@ -7,7 +7,7 @@
#ifndef IMX_USDHC_H
#define IMX_USDHC_H
#include <mmc.h>
#include <drivers/mmc.h>
typedef struct imx_usdhc_params {
uintptr_t reg_base;

Some files were not shown because too many files have changed in this diff Show More