Reduce deep nesting of header files

Reduce the number of header files included from other header
files as much as possible without splitting the files. Use forward
declarations where possible. This allows removal of some unnecessary
"#ifndef __ASSEMBLY__" statements.

Also, review the .c and .S files for which header files really need
including and reorder the #include statements alphabetically.

Fixes ARM-software/tf-issues#31

Change-Id: Iec92fb976334c77453e010b60bcf56f3be72bd3e
This commit is contained in:
Dan Handley 2014-04-09 13:14:54 +01:00
parent fb037bfb7c
commit 97043ac98e
89 changed files with 258 additions and 294 deletions

View File

@ -28,9 +28,8 @@
* POSSIBILITY OF SUCH DAMAGE.
*/
#include <arch.h>
#include <arch_helpers.h>
#include <platform.h>
#include <assert.h>
/*******************************************************************************
* Function that does the first bit of architectural setup that affects

View File

@ -29,11 +29,9 @@
*/
#include <arch.h>
#include <bl_common.h>
#include <bl1.h>
#include <platform.h>
#include <runtime_svc.h>
#include <asm_macros.S>
#include <bl_common.h>
#include <runtime_svc.h>
.globl bl1_exceptions

View File

@ -28,13 +28,13 @@
* POSSIBILITY OF SUCH DAMAGE.
*/
#include <stdio.h>
#include <string.h>
#include <assert.h>
#include <arch.h>
#include <arch_helpers.h>
#include <platform.h>
#include <semihosting.h>
#include <assert.h>
#include <bl_common.h>
#include <bl1.h>
#include <platform.h>
#include <stdio.h>
#include "bl1_private.h"
/*******************************************************************************

View File

@ -28,8 +28,8 @@
* POSSIBILITY OF SUCH DAMAGE.
*/
#include <arch.h>
#include <arch_helpers.h>
#include <platform.h>
/*******************************************************************************
* Place holder function to perform any S-EL1 specific architectural setup. At

View File

@ -28,9 +28,9 @@
* POSSIBILITY OF SUCH DAMAGE.
*/
#include <bl_common.h>
#include <arch.h>
#include <asm_macros.S>
#include <bl_common.h>
.globl bl2_entrypoint

View File

@ -28,16 +28,14 @@
* POSSIBILITY OF SUCH DAMAGE.
*/
#include <stdio.h>
#include <string.h>
#include <assert.h>
#include <arch.h>
#include <arch_helpers.h>
#include <console.h>
#include <platform.h>
#include <semihosting.h>
#include <assert.h>
#include <bl_common.h>
#include <bl2.h>
#include <debug.h>
#include <platform.h>
#include <stdio.h>
#include "bl2_private.h"
/*******************************************************************************

View File

@ -28,9 +28,12 @@
* POSSIBILITY OF SUCH DAMAGE.
*/
#include <arch.h>
#include <arch_helpers.h>
#include <platform.h>
#include <assert.h>
#include <bl_common.h>
#include <bl31.h>
#include <platform.h>
/*******************************************************************************
* This duplicates what the primary cpu did after a cold boot in BL1. The same

View File

@ -28,10 +28,9 @@
* POSSIBILITY OF SUCH DAMAGE.
*/
#include <bl_common.h>
#include <platform.h>
#include <arch.h>
#include <asm_macros.S>
#include <bl_common.h>
#include <cm_macros.S>

View File

@ -28,8 +28,9 @@
* POSSIBILITY OF SUCH DAMAGE.
*/
#include <context.h>
#include <arch.h>
#include <asm_macros.S>
#include <context.h>
/* -----------------------------------------------------
* The following function strictly follows the AArch64

View File

@ -29,11 +29,11 @@
*/
#include <arch.h>
#include <runtime_svc.h>
#include <platform.h>
#include <context.h>
#include <asm_macros.S>
#include <cm_macros.S>
#include <context.h>
#include <platform.h>
#include <runtime_svc.h>
.globl runtime_exceptions
.globl el3_exit

View File

@ -28,17 +28,14 @@
* POSSIBILITY OF SUCH DAMAGE.
*/
#include <stdio.h>
#include <string.h>
#include <assert.h>
#include <arch.h>
#include <arch_helpers.h>
#include <console.h>
#include <platform.h>
#include <semihosting.h>
#include <assert.h>
#include <bl_common.h>
#include <bl31.h>
#include <runtime_svc.h>
#include <context_mgmt.h>
#include <runtime_svc.h>
#include <stdio.h>
/*******************************************************************************

View File

@ -28,15 +28,13 @@
* POSSIBILITY OF SUCH DAMAGE.
*/
#include <stdio.h>
#include <errno.h>
#include <string.h>
#include <assert.h>
#include <arch_helpers.h>
#include <platform.h>
#include <assert.h>
#include <bl_common.h>
#include <runtime_svc.h>
#include <context.h>
#include <context_mgmt.h>
#include <platform.h>
#include <runtime_svc.h>
/*******************************************************************************
* Data structure which holds the pointers to non-secure and secure security

View File

@ -28,20 +28,10 @@
* POSSIBILITY OF SUCH DAMAGE.
*/
#include <stdio.h>
#include <string.h>
#include <errno.h>
#include <assert.h>
#include <arch_helpers.h>
#include <console.h>
#include <platform.h>
#include <semihosting.h>
#include <bl_common.h>
#include <psci.h>
#include <runtime_svc.h>
#include <context.h>
#include <debug.h>
#include <context_mgmt.h>
#include <errno.h>
#include <runtime_svc.h>
#include <string.h>
/*******************************************************************************
* The 'rt_svc_descs' array holds the runtime service descriptors exported by

View File

@ -28,10 +28,9 @@
* POSSIBILITY OF SUCH DAMAGE.
*/
#include <bl_common.h>
#include <arch.h>
#include <tsp.h>
#include <asm_macros.S>
#include <tsp.h>
.globl tsp_entrypoint

View File

@ -28,8 +28,8 @@
* POSSIBILITY OF SUCH DAMAGE.
*/
#include <tsp.h>
#include <asm_macros.S>
#include <tsp.h>
.globl tsp_get_magic

View File

@ -28,13 +28,14 @@
* POSSIBILITY OF SUCH DAMAGE.
*/
#include <bl32.h>
#include <tsp.h>
#include <arch_helpers.h>
#include <stdio.h>
#include <platform.h>
#include <bl_common.h>
#include <bl32.h>
#include <debug.h>
#include <platform.h>
#include <spinlock.h>
#include <stdio.h>
#include <tsp.h>
/*******************************************************************************
* Lock to control access to the console

View File

@ -28,11 +28,8 @@
* POSSIBILITY OF SUCH DAMAGE.
*/
#include <arch.h>
#include <bl_common.h>
#include <platform.h>
#include <runtime_svc.h>
#include <asm_macros.S>
#include <runtime_svc.h>
.globl early_exceptions

View File

@ -28,17 +28,14 @@
* POSSIBILITY OF SUCH DAMAGE.
*/
#include <stdio.h>
#include <string.h>
#include <errno.h>
#include <assert.h>
#include <arch.h>
#include <arch_helpers.h>
#include <console.h>
#include <platform.h>
#include <semihosting.h>
#include <assert.h>
#include <bl_common.h>
#include <io_storage.h>
#include <debug.h>
#include <io_storage.h>
#include <platform.h>
#include <stdio.h>
unsigned long page_align(unsigned long value, unsigned dir)
{

View File

@ -28,9 +28,9 @@
* POSSIBILITY OF SUCH DAMAGE.
*/
#include <assert.h>
#include <platform.h>
#include <cci400.h>
#include <mmio.h>
#include <platform.h>
static inline unsigned long get_slave_iface_base(unsigned long mpidr)
{

View File

@ -28,11 +28,9 @@
* POSSIBILITY OF SUCH DAMAGE.
*/
#include <stdint.h>
#include <arch.h>
#include <platform.h>
#include <gic_v3.h>
#include <debug.h>
#include <gic_v3.h>
uintptr_t gicv3_get_rdist(uintptr_t gicr_base, uint64_t mpidr)
{

View File

@ -28,9 +28,9 @@
* POSSIBILITY OF SUCH DAMAGE.
*/
#include <assert.h>
#include <platform.h>
#include <pl011.h>
#include <assert.h>
void pl011_setbaudrate(unsigned long base_addr, unsigned int baudrate)
{

View File

@ -28,10 +28,10 @@
* POSSIBILITY OF SUCH DAMAGE.
*/
#include <assert.h>
#include <console.h>
#include <platform.h>
#include <pl011.h>
#include <assert.h>
static unsigned long uart_base;

View File

@ -29,10 +29,10 @@
*/
#include <assert.h>
#include <arch_helpers.h>
#include <tzc400.h>
#include <mmio.h>
#include <debug.h>
#include <mmio.h>
#include <stddef.h>
#include <tzc400.h>
static uint32_t tzc_read_build_config(uint64_t base)
{

View File

@ -28,17 +28,17 @@
* POSSIBILITY OF SUCH DAMAGE.
*/
#include <stdint.h>
#include <uuid.h>
#include <errno.h>
#include <string.h>
#include <assert.h>
#include <platform.h>
#include <debug.h>
#include <errno.h>
#include <firmware_image_package.h>
#include <io_storage.h>
#include <io_driver.h>
#include <io_fip.h>
#include <debug.h>
#include <io_storage.h>
#include <platform.h>
#include <stdint.h>
#include <string.h>
#include <uuid.h>
/* Useful for printing UUIDs when debugging.*/
#define PRINT_UUID2(x) \

View File

@ -29,10 +29,10 @@
*/
#include <assert.h>
#include <string.h>
#include <io_storage.h>
#include <io_driver.h>
#include <debug.h>
#include <io_driver.h>
#include <io_storage.h>
#include <string.h>
/* As we need to be able to keep state for seek, only one file can be open
* at a time. Make this a structure and point to the entity->info. When we

View File

@ -29,8 +29,8 @@
*/
#include <assert.h>
#include <io_storage.h>
#include <io_driver.h>
#include <io_storage.h>
#include <semihosting.h>

View File

@ -31,16 +31,16 @@
#ifndef __BL1_H__
#define __BL1_H__
#include <bl_common.h>
#ifndef __ASSEMBLY__
/******************************************
* Forward declarations
*****************************************/
struct meminfo;
/******************************************
* Function prototypes
*****************************************/
extern void bl1_platform_setup(void);
extern meminfo_t *bl1_plat_sec_mem_layout(void);
#endif /*__ASSEMBLY__*/
extern struct meminfo *bl1_plat_sec_mem_layout(void);
#endif /* __BL1_H__ */

View File

@ -31,18 +31,22 @@
#ifndef __BL2_H__
#define __BL2_H__
#include <bl_common.h>
/******************************************
* Data declarations
*****************************************/
extern unsigned long long bl2_entrypoint;
/******************************************
* Forward declarations
*****************************************/
struct meminfo;
struct bl31_args;
/******************************************
* Function prototypes
*****************************************/
extern void bl2_platform_setup(void);
extern meminfo_t *bl2_plat_sec_mem_layout(void);
extern bl31_args_t *bl2_get_bl31_args_ptr(void);
extern struct meminfo *bl2_plat_sec_mem_layout(void);
extern struct bl31_args *bl2_get_bl31_args_ptr(void);
#endif /* __BL2_H__ */

View File

@ -31,13 +31,19 @@
#ifndef __BL31_H__
#define __BL31_H__
#include <bl_common.h>
#include <stdint.h>
/*******************************************************************************
* Data declarations
******************************************************************************/
extern unsigned long bl31_entrypoint;
/******************************************
* Forward declarations
*****************************************/
struct meminfo;
struct el_change_info;
/*******************************************************************************
* Function prototypes
******************************************************************************/
@ -46,9 +52,10 @@ extern void bl31_next_el_arch_setup(uint32_t security_state);
extern void bl31_set_next_image_type(uint32_t type);
extern uint32_t bl31_get_next_image_type(void);
extern void bl31_prepare_next_image_entry();
extern el_change_info_t *bl31_get_next_image_info(uint32_t type);
extern struct el_change_info *bl31_get_next_image_info(uint32_t type);
extern void bl31_platform_setup(void);
extern meminfo_t *bl31_plat_get_bl32_mem_layout(void);
extern meminfo_t *bl31_plat_sec_mem_layout(void);
extern void bl31_register_bl32_init(int32_t (*)(meminfo_t *));
extern struct meminfo *bl31_plat_get_bl32_mem_layout(void);
extern struct meminfo *bl31_plat_sec_mem_layout(void);
extern void bl31_register_bl32_init(int32_t (*)(struct meminfo *));
#endif /* __BL31_H__ */

View File

@ -27,6 +27,11 @@
* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
* POSSIBILITY OF SUCH DAMAGE.
*/
#include <arch.h>
#include <context.h>
/* ---------------------------------------------
* Zero out the callee saved register to prevent
* leakage of secure state into the normal world

View File

@ -31,9 +31,6 @@
#ifndef __CONTEXT_H__
#define __CONTEXT_H__
#include <arch.h>
#include <cassert.h>
/*******************************************************************************
* Constants that allow assembler code to access members of and the 'gp_regs'
* structure at their correct offsets.
@ -171,6 +168,9 @@
#ifndef __ASSEMBLY__
#include <cassert.h>
#include <stdint.h>
/*
* Common constants to help define the 'cpu_context' structure and its
* members below.

View File

@ -31,9 +31,8 @@
#ifndef __CM_H__
#define __CM_H__
#include <context.h>
#include <stdint.h>
#ifndef __ASSEMBLY__
/*******************************************************************************
* Function & variable prototypes
******************************************************************************/
@ -51,5 +50,5 @@ extern void cm_set_el3_eret_context(uint32_t security_state, uint64_t entrypoint
extern void cm_set_el3_elr(uint32_t security_state, uint64_t entrypoint);
extern void cm_set_next_eret_context(uint32_t security_state);
extern void cm_init_exception_stack(uint64_t mpidr, uint32_t security_state);
#endif /*__ASSEMBLY__*/
#endif /* __CM_H__ */

View File

@ -30,8 +30,6 @@
#ifndef __RUNTIME_SVC_H__
#define __RUNTIME_SVC_H__
#include <psci.h>
#include <cassert.h>
/*******************************************************************************
* Bit definitions inside the function id as per the SMC calling convention
@ -122,6 +120,10 @@
#ifndef __ASSEMBLY__
#include <cassert.h>
#include <context.h>
#include <stdint.h>
/* Various flags passed to SMC handlers */
#define SMC_FROM_SECURE (0 << 0)
#define SMC_FROM_NON_SECURE (1 << 0)

View File

@ -31,6 +31,7 @@
#ifndef __PSCI_H__
#define __PSCI_H__
/*******************************************************************************
* Defines for runtime services func ids
******************************************************************************/
@ -131,6 +132,10 @@
#define PSCI_NUM_AFFS 32ull
#ifndef __ASSEMBLY__
#include <stdint.h>
/*******************************************************************************
* Structure populated by platform specific code to export routines which
* perform common low level pm functions

View File

@ -31,15 +31,18 @@
#ifndef __BL32_H__
#define __BL32_H__
#ifndef __ASSEMBLY__
#include <stdint.h>
#include <bl_common.h>
/******************************************
* Forward declarations
*****************************************/
struct meminfo;
/******************************************
* Function prototypes
*****************************************/
extern void bl32_platform_setup(void);
extern meminfo_t *bl32_plat_sec_mem_layout(void);
extern struct meminfo *bl32_plat_sec_mem_layout(void);
extern uint64_t bl32_main(void);
#endif /* __ASSEMBLY__ */
#endif /* __BL32_H__ */

View File

@ -31,9 +31,6 @@
#ifndef __TSP_H__
#define __TSP_H__
#include <platform.h>
#include <cassert.h>
/*
* SMC function IDs that TSP uses to signal various forms of completions
* to the secure payload dispatcher.
@ -86,6 +83,9 @@
#define TSP_ARGS_END 0x40
#ifndef __ASSEMBLY__
#include <cassert.h>
#include <platform.h> /* For CACHE_WRITEBACK_GRANULE */
#include <stdint.h>
typedef void (*tsp_generic_fptr_t)(uint64_t arg0,

View File

@ -28,6 +28,9 @@
* POSSIBILITY OF SUCH DAMAGE.
*/
#include <arch.h>
.macro func_prologue
stp x29, x30, [sp, #-0x10]!
mov x29,sp

View File

@ -58,7 +58,8 @@
#ifndef __ASSEMBLY__
#include <stdio.h>
#include <cdefs.h> /* For __dead2 */
/*******************************************************************************
* Structure used for telling the next BL how much of a particular type of

View File

@ -31,9 +31,6 @@
#ifndef __DEBUG_H__
#define __DEBUG_H__
/* Do not try to call this from ASM code. */
#ifndef __ASSEMBLY__
#include <stdio.h>
/* If building the project with DEBUG disabled the INFO and WARN macros
@ -66,5 +63,4 @@ static inline void __attribute__((noreturn)) panic(void)
;
}
#endif /* __ASSEMBLY__ */
#endif /* __DEBUG_H__ */

View File

@ -31,6 +31,9 @@
#ifndef __PL011_H__
#define __PL011_H__
#include <mmio.h>
/* PL011 Registers */
#define UARTDR 0x000
#define UARTRSR 0x004

View File

@ -147,8 +147,6 @@
/* Filters are bit mapped 0 to 3. */
#define TZC400_COMPONENT_ID 0xb105f00d
#ifndef __ASSEMBLY__
/*******************************************************************************
* Function & variable prototypes
******************************************************************************/
@ -205,6 +203,5 @@ void tzc_enable_filters(const tzc_instance_t *controller);
void tzc_disable_filters(const tzc_instance_t *controller);
void tzc_set_action(const tzc_instance_t *controller, tzc_action_t action);
#endif /*__ASSEMBLY__*/
#endif /* __TZC400__ */

View File

@ -31,7 +31,9 @@
#ifndef __IO_DRIVER_H__
#define __IO_DRIVER_H__
#include <io_storage.h>
#include <platform.h> /* For MAX_IO_DEVICES */
#include <stdint.h>
/* Generic IO entity structure,representing an accessible IO construct on the

View File

@ -31,6 +31,8 @@
#ifndef __IO_FIP_H__
#define __IO_FIP_H__
struct io_dev_connector;
int register_io_dev_fip(struct io_dev_connector **dev_con);
#endif /* __IO_FIP_H__ */

View File

@ -31,6 +31,8 @@
#ifndef __IO_MEMMAP_H__
#define __IO_MEMMAP_H__
struct io_dev_connector;
int register_io_dev_memmap(struct io_dev_connector **dev_con);
#endif /* __IO_MEMMAP_H__ */

View File

@ -31,6 +31,8 @@
#ifndef __IO_SH_H__
#define __IO_SH_H__
struct io_dev_connector;
int register_io_dev_sh(struct io_dev_connector **dev_con);
#endif /* __IO_SH_H__ */

View File

@ -31,7 +31,6 @@
#ifndef __ARCH_H__
#define __ARCH_H__
#include <bl_common.h>
/*******************************************************************************
* MIDR bit definitions

View File

@ -31,10 +31,8 @@
#ifndef __ARCH_HELPERS_H__
#define __ARCH_HELPERS_H__
#include <arch.h>
#include <cdefs.h> /* For __dead2 */
#ifndef __ASSEMBLY__
#include <stdio.h>
/*******************************************************************************
* Aarch64 translation tables manipulation helper prototypes
@ -268,6 +266,5 @@ extern void write_cpuectlr(unsigned long);
extern void write_cptr_el2(unsigned long);
extern void write_cptr_el3(unsigned long);
#endif /*__ASSEMBLY__*/
#endif /* __ARCH_HELPERS_H__ */

View File

@ -35,7 +35,6 @@
#define BAKERY_LOCK_MAX_CPUS PLATFORM_CORE_COUNT
#ifndef __ASSEMBLY__
typedef struct bakery_lock {
int owner;
volatile char entering[BAKERY_LOCK_MAX_CPUS];
@ -48,6 +47,5 @@ void bakery_lock_init(bakery_lock_t *bakery);
void bakery_lock_get(unsigned long mpidr, bakery_lock_t *bakery);
void bakery_lock_release(unsigned long mpidr, bakery_lock_t *bakery);
int bakery_lock_try(unsigned long mpidr, bakery_lock_t *bakery);
#endif /*__ASSEMBLY__*/
#endif /* __BAKERY_LOCK_H__ */

View File

@ -31,10 +31,7 @@
#ifndef __IO_H__
#define __IO_H__
#ifndef __ASSEMBLY__
#include <stdint.h>
#include <stdio.h> /* For ssize_t */
#include <stdio.h> /* For ssize_t */
/* Device type which can be used to enable policy decisions about which device
@ -128,5 +125,4 @@ int io_write(io_handle handle, const void *buffer, size_t length,
int io_close(io_handle handle);
#endif /* __ASSEMBLY__ */
#endif /* __IO_H__ */

View File

@ -31,8 +31,6 @@
#ifndef __MMIO_H__
#define __MMIO_H__
#ifndef __ASSEMBLY__
#include <stdint.h>
extern void mmio_write_8(uintptr_t addr, uint8_t value);
@ -44,6 +42,4 @@ extern uint32_t mmio_read_32(uintptr_t addr);
extern void mmio_write_64(uintptr_t addr, uint64_t value);
extern uint64_t mmio_read_64(uintptr_t addr);
#endif /*__ASSEMBLY__*/
#endif /* __MMIO_H__ */

View File

@ -31,6 +31,9 @@
#ifndef __SEMIHOSTING_H__
#define __SEMIHOSTING_H__
#include <stdio.h> /* For ssize_t */
#define SEMIHOSTING_SYS_OPEN 0x01
#define SEMIHOSTING_SYS_CLOSE 0x02
#define SEMIHOSTING_SYS_WRITE0 0x04

View File

@ -28,7 +28,7 @@
* POSSIBILITY OF SUCH DAMAGE.
*/
#include <arch_helpers.h>
#include <arch.h>
#include <asm_macros.S>
.globl dcisw

View File

@ -28,8 +28,7 @@
* POSSIBILITY OF SUCH DAMAGE.
*/
#include <arch_helpers.h>
#include <runtime_svc.h>
#include <arch.h>
#include <asm_macros.S>
.globl enable_irq

View File

@ -28,7 +28,7 @@
* POSSIBILITY OF SUCH DAMAGE.
*/
#include <arch_helpers.h>
#include <arch.h>
#include <asm_macros.S>
.globl read_vbar_el1

View File

@ -28,7 +28,6 @@
* POSSIBILITY OF SUCH DAMAGE.
*/
#include <arch_helpers.h>
#include <asm_macros.S>
.globl tlbialle1

View File

@ -28,9 +28,8 @@
* POSSIBILITY OF SUCH DAMAGE.
*/
#include <string.h>
#include <assert.h>
#include <arch.h>
#include <assert.h>
/*******************************************************************************
* Helper to create a level 1/2 table descriptor which points to a level 2/3

View File

@ -28,11 +28,10 @@
* POSSIBILITY OF SUCH DAMAGE.
*/
#include <stddef.h>
#include <assert.h>
#include <io_storage.h>
#include <io_driver.h>
#include <io_storage.h>
#include <stddef.h>
#define MAX_DEVICES(plat_data) \

View File

@ -28,11 +28,10 @@
* POSSIBILITY OF SUCH DAMAGE.
*/
#include <assert.h>
#include <string.h>
#include <bakery_lock.h>
#include <arch_helpers.h>
#include <assert.h>
#include <bakery_lock.h>
#include <string.h>
/*
* Functions in this file implement Bakery Algorithm for mutual exclusion.

View File

@ -29,10 +29,9 @@
*/
#include <assert.h>
#include <string.h>
#include <errno.h>
#include <stdio.h>
#include <semihosting.h>
#include <string.h>
#ifndef SEMIHOSTING_SUPPORTED
#define SEMIHOSTING_SUPPORTED 1

View File

@ -29,8 +29,8 @@
*/
#include <arch.h>
#include <platform.h>
#include <asm_macros.S>
#include <platform.h>
.weak platform_get_core_pos

View File

@ -29,8 +29,8 @@
*/
#include <arch.h>
#include <platform.h>
#include <asm_macros.S>
#include <platform.h>
.local pcpu_dv_mem_stack

View File

@ -29,8 +29,8 @@
*/
#include <arch.h>
#include <platform.h>
#include <asm_macros.S>
#include <platform.h>
.local pcpu_dv_mem_stack

View File

@ -29,9 +29,9 @@
*/
#include <arch.h>
#include <platform.h>
#include <gic_v2.h>
#include <asm_macros.S>
#include <gic_v2.h>
#include <platform.h>
#include "../drivers/pwrc/fvp_pwrc.h"
.globl platform_get_entrypoint

View File

@ -28,9 +28,12 @@
* POSSIBILITY OF SUCH DAMAGE.
*/
#include <assert.h>
#include <arch.h>
#include <arch_helpers.h>
#include <assert.h>
#include <bl_common.h>
#include <debug.h>
#include <mmio.h>
#include <platform.h>
#include <xlat_tables.h>

View File

@ -29,8 +29,9 @@
*/
#include <arch.h>
#include <platform.h>
#include <asm_macros.S>
#include <bl_common.h>
#include <platform.h>
.globl plat_report_exception

View File

@ -28,12 +28,14 @@
* POSSIBILITY OF SUCH DAMAGE.
*/
#include <assert.h>
#include <arch_helpers.h>
#include <platform.h>
#include <assert.h>
#include <bl_common.h>
#include <bl1.h>
#include <console.h>
#include <cci400.h>
#include <mmio.h>
#include <platform.h>
/*******************************************************************************
* Declarations of linker defined symbols which will help us find the layout

View File

@ -28,12 +28,12 @@
* POSSIBILITY OF SUCH DAMAGE.
*/
#include <assert.h>
#include <arch_helpers.h>
#include <platform.h>
#include <bl2.h>
#include <assert.h>
#include <bl_common.h>
#include <bl2.h>
#include <console.h>
#include <platform.h>
/*******************************************************************************
* Declarations of linker defined symbols which will help us find the layout

View File

@ -28,9 +28,13 @@
* POSSIBILITY OF SUCH DAMAGE.
*/
#include <platform.h>
#include <arch.h>
#include <bl_common.h>
#include <bl31.h>
#include <console.h>
#include <mmio.h>
#include <platform.h>
#include <stddef.h>
#include "drivers/pwrc/fvp_pwrc.h"
/*******************************************************************************

View File

@ -28,13 +28,11 @@
* POSSIBILITY OF SUCH DAMAGE.
*/
#include <string.h>
#include <assert.h>
#include <arch_helpers.h>
#include <platform.h>
#include <bl32.h>
#include <bl_common.h>
#include <bl32.h>
#include <console.h>
#include <platform.h>
/*******************************************************************************
* Declarations of linker defined symbols which will help us find the layout

View File

@ -28,13 +28,8 @@
* POSSIBILITY OF SUCH DAMAGE.
*/
#include <string.h>
#include <stdio.h>
#include <errno.h>
#include <assert.h>
#include <arch_helpers.h>
#include <platform.h>
#include <bakery_lock.h>
#include <mmio.h>
#include "fvp_pwrc.h"
/*

View File

@ -28,12 +28,12 @@
* POSSIBILITY OF SUCH DAMAGE.
*/
#include <stdint.h>
#include <arch_helpers.h>
#include <platform.h>
#include <debug.h>
#include <gic_v2.h>
#include <gic_v3.h>
#include <debug.h>
#include <platform.h>
#include <stdint.h>
/*******************************************************************************

View File

@ -29,15 +29,15 @@
*/
#include <assert.h>
#include <string.h>
#include <platform.h>
#include <io_storage.h>
#include <debug.h>
#include <io_driver.h>
#include <io_semihosting.h>
#include <semihosting.h> /* For FOPEN_MODE_... */
#include <io_fip.h>
#include <io_memmap.h>
#include <debug.h>
#include <io_storage.h>
#include <io_semihosting.h>
#include <platform.h>
#include <semihosting.h> /* For FOPEN_MODE_... */
#include <string.h>
/* IO devices */
static io_plat_data_t io_data;

View File

@ -28,18 +28,12 @@
* POSSIBILITY OF SUCH DAMAGE.
*/
#include <stdio.h>
#include <string.h>
#include <assert.h>
#include <arch_helpers.h>
#include <console.h>
#include <platform.h>
#include <bl_common.h>
#include <bl31.h>
#include <assert.h>
#include <bakery_lock.h>
#include <cci400.h>
#include <gic_v2.h>
/* Only included for error codes */
#include <mmio.h>
#include <platform.h>
#include <psci.h>
#include "drivers/pwrc/fvp_pwrc.h"

View File

@ -28,7 +28,6 @@
* POSSIBILITY OF SUCH DAMAGE.
*/
#include <string.h>
#include <assert.h>
#include <platform.h>
/* TODO: Reusing psci error codes & state information. Get our own! */

View File

@ -32,10 +32,6 @@
#define __PLATFORM_H__
#include <arch.h>
#include <mmio.h>
#include <psci.h>
#include <bl_common.h>
#include <io_storage.h>
/*******************************************************************************
@ -340,11 +336,21 @@
#ifndef __ASSEMBLY__
#include <stdint.h>
typedef volatile struct mailbox {
unsigned long value
__attribute__((__aligned__(CACHE_WRITEBACK_GRANULE)));
} mailbox_t;
/*******************************************************************************
* Forward declarations
******************************************************************************/
struct plat_pm_ops;
struct meminfo;
struct io_dev_info;
/*******************************************************************************
* Function and variable prototypes
******************************************************************************/
@ -364,11 +370,11 @@ extern unsigned long warm_boot_entrypoint;
extern void bl1_plat_arch_setup(void);
extern void bl2_plat_arch_setup(void);
extern void bl31_plat_arch_setup(void);
extern int platform_setup_pm(plat_pm_ops_t **);
extern int platform_setup_pm(struct plat_pm_ops **);
extern unsigned int platform_get_core_pos(unsigned long mpidr);
extern void disable_mmu(void);
extern void enable_mmu(void);
extern void configure_mmu(meminfo_t *,
extern void configure_mmu(struct meminfo *,
unsigned long,
unsigned long,
unsigned long,
@ -395,7 +401,7 @@ extern unsigned int plat_get_aff_state(unsigned int, unsigned long);
/* Declarations for plat_io_storage.c */
extern void io_setup(void);
extern int plat_get_image_source(const char *image_name,
io_dev_handle *dev_handle, void **image_spec);
struct io_dev_info **dev_handle, void **image_spec);
/* Declarations for plat_security.c */
extern void plat_security_setup(void);

View File

@ -28,15 +28,12 @@
* POSSIBILITY OF SUCH DAMAGE.
*/
#include <stdio.h>
#include <errno.h>
#include <string.h>
#include <assert.h>
#include <arch_helpers.h>
#include <platform.h>
#include <assert.h>
#include <bl_common.h>
#include <runtime_svc.h>
#include <context_mgmt.h>
#include <platform.h>
#include <string.h>
#include "tspd_private.h"
/*******************************************************************************

View File

@ -28,9 +28,7 @@
* POSSIBILITY OF SUCH DAMAGE.
*/
#include <context.h>
#include <asm_macros.S>
#include <cm_macros.S>
#include "tspd_private.h"
.global tspd_enter_sp

View File

@ -38,18 +38,14 @@
* handle the request locally or delegate it to the Secure Payload. It is also
* responsible for initialising and maintaining communication with the SP.
******************************************************************************/
#include <stdio.h>
#include <string.h>
#include <assert.h>
#include <arch_helpers.h>
#include <console.h>
#include <platform.h>
#include <assert.h>
#include <bl_common.h>
#include <bl31.h>
#include <context_mgmt.h>
#include <runtime_svc.h>
#include <bl31.h>
#include <stddef.h>
#include <tsp.h>
#include <psci.h>
#include <debug.h>
#include <uuid.h>
#include "tspd_private.h"

View File

@ -28,18 +28,12 @@
* POSSIBILITY OF SUCH DAMAGE.
*/
#include <stdio.h>
#include <string.h>
#include <assert.h>
#include <arch_helpers.h>
#include <console.h>
#include <platform.h>
#include <assert.h>
#include <bl_common.h>
#include <context_mgmt.h>
#include <runtime_svc.h>
#include <bl31.h>
#include <bl32.h>
#include <psci.h>
#include <debug.h>
#include <tsp.h>
#include "tspd_private.h"
/*******************************************************************************

View File

@ -28,14 +28,13 @@
* POSSIBILITY OF SUCH DAMAGE.
*/
#ifndef __SPD_PRIVATE_H__
#define __SPD_PRIVATE_H__
#ifndef __TSPD_PRIVATE_H__
#define __TSPD_PRIVATE_H__
#include <context.h>
#include <arch.h>
#include <context.h>
#include <platform.h>
#include <psci.h>
#include <tsp.h>
#include <cassert.h>
/*******************************************************************************
* Secure Payload PM state information e.g. SP is suspended, uninitialised etc
@ -91,6 +90,9 @@
#ifndef __ASSEMBLY__
#include <cassert.h>
#include <stdint.h>
/* AArch64 callee saved general purpose register context structure. */
DEFINE_REG_STRUCT(c_rt_regs, TSPD_C_RT_CTX_ENTRIES);
@ -120,6 +122,11 @@ typedef struct tsp_context {
/* TSPD power management handlers */
extern const spd_pm_ops_t tspd_pm;
/*******************************************************************************
* Forward declarations
******************************************************************************/
struct entry_info;
/*******************************************************************************
* Function & Data prototypes
******************************************************************************/
@ -132,7 +139,7 @@ extern int32_t tspd_init_secure_context(uint64_t entrypoint,
uint64_t mpidr,
tsp_context_t *tsp_ctx);
extern tsp_context_t tspd_sp_context[TSPD_CORE_COUNT];
extern entry_info_t *tsp_entry_info;
extern struct entry_info *tsp_entry_info;
#endif /*__ASSEMBLY__*/
#endif /* __SPD_PRIVATE_H__ */
#endif /* __TSPD_PRIVATE_H__ */

View File

@ -28,14 +28,10 @@
* POSSIBILITY OF SUCH DAMAGE.
*/
#include <stdio.h>
#include <string.h>
#include <assert.h>
#include <debug.h>
#include <arch.h>
#include <arch_helpers.h>
#include <console.h>
#include <platform.h>
#include <psci.h>
#include <assert.h>
#include <string.h>
#include "psci_private.h"
typedef int (*afflvl_off_handler_t)(unsigned long, aff_map_node_t *);

View File

@ -28,18 +28,14 @@
* POSSIBILITY OF SUCH DAMAGE.
*/
#include <stdio.h>
#include <stdint.h>
#include <string.h>
#include <assert.h>
#include <bl31.h>
#include <debug.h>
#include <arch.h>
#include <arch_helpers.h>
#include <console.h>
#include <platform.h>
#include <psci.h>
#include <assert.h>
#include <bl_common.h>
#include <bl31.h>
#include <context_mgmt.h>
#include <runtime_svc.h>
#include <stddef.h>
#include "psci_private.h"
typedef int (*afflvl_on_handler_t)(unsigned long,

View File

@ -28,16 +28,14 @@
* POSSIBILITY OF SUCH DAMAGE.
*/
#include <stdio.h>
#include <string.h>
#include <assert.h>
#include <debug.h>
#include <bl_common.h>
#include <arch.h>
#include <arch_helpers.h>
#include <console.h>
#include <platform.h>
#include <psci.h>
#include <context.h>
#include <context_mgmt.h>
#include <runtime_svc.h>
#include <stddef.h>
#include "psci_private.h"
typedef int (*afflvl_suspend_handler_t)(unsigned long,

View File

@ -28,15 +28,12 @@
* POSSIBILITY OF SUCH DAMAGE.
*/
#include <stdio.h>
#include <string.h>
#include <assert.h>
#include <arch.h>
#include <arch_helpers.h>
#include <console.h>
#include <platform.h>
#include <psci.h>
#include <assert.h>
#include <bl_common.h>
#include <context.h>
#include <context_mgmt.h>
#include <runtime_svc.h>
#include <debug.h>
#include "psci_private.h"

View File

@ -29,11 +29,9 @@
*/
#include <arch.h>
#include <platform.h>
#include <runtime_svc.h>
#include <asm_macros.S>
#include <cm_macros.S>
#include "psci_private.h"
#include <psci.h>
.globl psci_aff_on_finish_entry
.globl psci_aff_suspend_finish_entry

View File

@ -28,15 +28,11 @@
* POSSIBILITY OF SUCH DAMAGE.
*/
#include <stdio.h>
#include <string.h>
#include <assert.h>
#include <arch.h>
#include <arch_helpers.h>
#include <console.h>
#include <platform.h>
#include <assert.h>
#include <runtime_svc.h>
#include <debug.h>
#include <context_mgmt.h>
#include "psci_private.h"
/*******************************************************************************

View File

@ -33,8 +33,8 @@
#include <arch.h>
#include <bakery_lock.h>
#include <psci.h>
#ifndef __ASSEMBLY__
/*******************************************************************************
* The following two data structures hold the generic information to bringup
* a suspended/hotplugged out cpu
@ -156,6 +156,5 @@ extern int psci_afflvl_suspend(unsigned long,
int);
extern unsigned int psci_afflvl_suspend_finish(unsigned long, int, int);
#endif /*__ASSEMBLY__*/
#endif /* __PSCI_PRIVATE_H__ */

View File

@ -28,14 +28,14 @@
* POSSIBILITY OF SUCH DAMAGE.
*/
#include <stdio.h>
#include <string.h>
#include <assert.h>
#include <arch.h>
#include <arch_helpers.h>
#include <console.h>
#include <platform.h>
#include <assert.h>
#include <bl_common.h>
#include <context.h>
#include <context_mgmt.h>
#include <runtime_svc.h>
#include <platform.h>
#include <stddef.h>
#include "psci_private.h"
/*******************************************************************************

View File

@ -28,13 +28,12 @@
* POSSIBILITY OF SUCH DAMAGE.
*/
#include <stdint.h>
#include <uuid.h>
#include <context_mgmt.h>
#include <debug.h>
#include <psci.h>
#include <runtime_svc.h>
#include <std_svc.h>
#include <psci.h>
#include <debug.h>
#include <stdint.h>
#include <uuid.h>
/* Standard Service UUID */
DEFINE_SVC_UUID(arm_svc_uid,