mirror of
https://github.com/ARM-software/arm-trusted-firmware.git
synced 2025-04-19 02:54:24 +00:00
Move include and source files to logical locations
Move almost all system include files to a logical sub-directory under ./include. The only remaining system include directories not under ./include are specific to the platform. Move the corresponding source files to match the include directory structure. Also remove pm.h as it is no longer used. Change-Id: Ie5ea6368ec5fad459f3e8a802ad129135527f0b3
This commit is contained in:
parent
b495bdef19
commit
4ecca33988
61 changed files with 64 additions and 129 deletions
18
Makefile
18
Makefile
|
@ -132,14 +132,20 @@ endif
|
||||||
.SUFFIXES:
|
.SUFFIXES:
|
||||||
|
|
||||||
|
|
||||||
INCLUDES += -Ilib/include/ \
|
INCLUDES += -Iinclude/bl1 \
|
||||||
-Idrivers/io \
|
-Iinclude/bl2 \
|
||||||
-Iinclude/${ARCH}/ \
|
-Iinclude/bl31 \
|
||||||
-Iinclude/ \
|
-Iinclude/bl31/services \
|
||||||
-Iarch/system/gic \
|
-Iinclude/bl32 \
|
||||||
-Iservices/std_svc/psci \
|
-Iinclude/bl32/payloads \
|
||||||
|
-Iinclude/common \
|
||||||
|
-Iinclude/drivers \
|
||||||
|
-Iinclude/drivers/arm \
|
||||||
|
-Iinclude/lib \
|
||||||
|
-Iinclude/lib/aarch64 \
|
||||||
-Iinclude/stdlib \
|
-Iinclude/stdlib \
|
||||||
-Iinclude/stdlib/sys \
|
-Iinclude/stdlib/sys \
|
||||||
|
-Iservices/std_svc/psci \
|
||||||
-Iplat/${PLAT} \
|
-Iplat/${PLAT} \
|
||||||
${PLAT_INCLUDES} \
|
${PLAT_INCLUDES} \
|
||||||
${SPD_INCLUDES}
|
${SPD_INCLUDES}
|
||||||
|
|
|
@ -32,15 +32,12 @@ vpath %.c plat/${PLAT} \
|
||||||
plat/${PLAT}/${ARCH} \
|
plat/${PLAT}/${ARCH} \
|
||||||
common \
|
common \
|
||||||
lib \
|
lib \
|
||||||
arch/${ARCH} \
|
lib/${ARCH} \
|
||||||
lib/arch/${ARCH} \
|
|
||||||
${PLAT_BL1_C_VPATH}
|
${PLAT_BL1_C_VPATH}
|
||||||
|
|
||||||
vpath %.S arch/${ARCH}/cpu \
|
vpath %.S plat/common/${ARCH} \
|
||||||
plat/common/${ARCH} \
|
|
||||||
plat/${PLAT}/${ARCH} \
|
plat/${PLAT}/${ARCH} \
|
||||||
include \
|
lib/${ARCH} \
|
||||||
lib/arch/${ARCH} \
|
|
||||||
${PLAT_BL1_S_VPATH}
|
${PLAT_BL1_S_VPATH}
|
||||||
|
|
||||||
BL1_SOURCES += bl1_arch_setup.c \
|
BL1_SOURCES += bl1_arch_setup.c \
|
||||||
|
|
|
@ -32,12 +32,10 @@ vpath %.c common \
|
||||||
lib \
|
lib \
|
||||||
plat/${PLAT} \
|
plat/${PLAT} \
|
||||||
plat/${PLAT}/${ARCH} \
|
plat/${PLAT}/${ARCH} \
|
||||||
arch/${ARCH} \
|
|
||||||
${PLAT_BL2_C_VPATH}
|
${PLAT_BL2_C_VPATH}
|
||||||
|
|
||||||
vpath %.S lib/arch/${ARCH} \
|
vpath %.S lib/${ARCH} \
|
||||||
include \
|
lib/locks/exclusive \
|
||||||
lib/sync/locks/exclusive \
|
|
||||||
common/${ARCH} \
|
common/${ARCH} \
|
||||||
${PLAT_BL2_S_VPATH}
|
${PLAT_BL2_S_VPATH}
|
||||||
|
|
||||||
|
|
12
bl31/bl31.mk
12
bl31/bl31.mk
|
@ -30,23 +30,21 @@
|
||||||
|
|
||||||
vpath %.c common \
|
vpath %.c common \
|
||||||
lib \
|
lib \
|
||||||
arch/system/gic \
|
drivers/arm/gic \
|
||||||
plat/${PLAT} \
|
plat/${PLAT} \
|
||||||
arch/${ARCH} \
|
|
||||||
services/std_svc \
|
services/std_svc \
|
||||||
services/std_svc/psci \
|
services/std_svc/psci \
|
||||||
lib/sync/locks/bakery \
|
lib/locks/bakery \
|
||||||
plat/${PLAT}/${ARCH} \
|
plat/${PLAT}/${ARCH} \
|
||||||
${PLAT_BL31_C_VPATH}
|
${PLAT_BL31_C_VPATH}
|
||||||
|
|
||||||
vpath %.S lib/arch/${ARCH} \
|
vpath %.S lib/${ARCH} \
|
||||||
services/std_svc \
|
services/std_svc \
|
||||||
services/std_svc/psci \
|
services/std_svc/psci \
|
||||||
include \
|
|
||||||
plat/${PLAT}/${ARCH} \
|
plat/${PLAT}/${ARCH} \
|
||||||
lib/sync/locks/exclusive \
|
lib/locks/exclusive \
|
||||||
plat/common/${ARCH} \
|
plat/common/${ARCH} \
|
||||||
arch/system/gic/${ARCH} \
|
drivers/arm/gic/${ARCH} \
|
||||||
common/${ARCH} \
|
common/${ARCH} \
|
||||||
${PLAT_BL31_S_VPATH}
|
${PLAT_BL31_S_VPATH}
|
||||||
|
|
||||||
|
|
|
@ -32,11 +32,9 @@ vpath %.c common \
|
||||||
lib \
|
lib \
|
||||||
plat/${PLAT} \
|
plat/${PLAT} \
|
||||||
plat/${PLAT}/${ARCH} \
|
plat/${PLAT}/${ARCH} \
|
||||||
arch/${ARCH}
|
|
||||||
|
|
||||||
vpath %.S lib/arch/${ARCH} \
|
vpath %.S lib/${ARCH} \
|
||||||
include \
|
lib/locks/exclusive \
|
||||||
lib/sync/locks/exclusive \
|
|
||||||
common/${ARCH}
|
common/${ARCH}
|
||||||
|
|
||||||
BL32_SOURCES += tsp_entrypoint.S \
|
BL32_SOURCES += tsp_entrypoint.S \
|
||||||
|
|
|
@ -44,7 +44,8 @@ void cci_enable_coherency(unsigned long mpidr)
|
||||||
DVM_EN_BIT | SNOOP_EN_BIT);
|
DVM_EN_BIT | SNOOP_EN_BIT);
|
||||||
|
|
||||||
/* Wait for the dust to settle down */
|
/* Wait for the dust to settle down */
|
||||||
while (mmio_read_32(CCI400_BASE + STATUS_REG) & CHANGE_PENDING_BIT);
|
while (mmio_read_32(CCI400_BASE + STATUS_REG) & CHANGE_PENDING_BIT)
|
||||||
|
;
|
||||||
}
|
}
|
||||||
|
|
||||||
void cci_disable_coherency(unsigned long mpidr)
|
void cci_disable_coherency(unsigned long mpidr)
|
||||||
|
@ -54,6 +55,7 @@ void cci_disable_coherency(unsigned long mpidr)
|
||||||
~(DVM_EN_BIT | SNOOP_EN_BIT));
|
~(DVM_EN_BIT | SNOOP_EN_BIT));
|
||||||
|
|
||||||
/* Wait for the dust to settle down */
|
/* Wait for the dust to settle down */
|
||||||
while (mmio_read_32(CCI400_BASE + STATUS_REG) & CHANGE_PENDING_BIT);
|
while (mmio_read_32(CCI400_BASE + STATUS_REG) & CHANGE_PENDING_BIT)
|
||||||
|
;
|
||||||
}
|
}
|
||||||
|
|
|
@ -127,19 +127,22 @@ extern void __dead2 raise_el(aapcs64_params *);
|
||||||
extern void __dead2 change_el(el_change_info *);
|
extern void __dead2 change_el(el_change_info *);
|
||||||
extern unsigned long make_spsr(unsigned long, unsigned long, unsigned long);
|
extern unsigned long make_spsr(unsigned long, unsigned long, unsigned long);
|
||||||
extern void init_bl2_mem_layout(meminfo *,
|
extern void init_bl2_mem_layout(meminfo *,
|
||||||
meminfo *,
|
meminfo *,
|
||||||
unsigned int,
|
unsigned int,
|
||||||
unsigned long) __attribute__((weak));
|
unsigned long) __attribute__((weak));
|
||||||
extern void init_bl31_mem_layout(const meminfo *,
|
extern void init_bl31_mem_layout(const meminfo *,
|
||||||
meminfo *,
|
meminfo *,
|
||||||
unsigned int) __attribute__((weak));
|
unsigned int) __attribute__((weak));
|
||||||
extern unsigned long image_size(const char *);
|
extern unsigned long image_size(const char *);
|
||||||
extern unsigned long load_image(meminfo *, const char *, unsigned int, unsigned long);
|
extern unsigned long load_image(meminfo *,
|
||||||
|
const char *,
|
||||||
|
unsigned int,
|
||||||
|
unsigned long);
|
||||||
extern void __dead2 run_image(unsigned long entrypoint,
|
extern void __dead2 run_image(unsigned long entrypoint,
|
||||||
unsigned long spsr,
|
unsigned long spsr,
|
||||||
unsigned long security_state,
|
unsigned long security_state,
|
||||||
void *first_arg,
|
void *first_arg,
|
||||||
void *second_arg);
|
void *second_arg);
|
||||||
extern unsigned long *get_el_change_mem_ptr(void);
|
extern unsigned long *get_el_change_mem_ptr(void);
|
||||||
extern const char build_message[];
|
extern const char build_message[];
|
||||||
|
|
|
@ -44,10 +44,10 @@ typedef struct {
|
||||||
|
|
||||||
#define NO_OWNER (-1)
|
#define NO_OWNER (-1)
|
||||||
|
|
||||||
void bakery_lock_init(bakery_lock* bakery);
|
void bakery_lock_init(bakery_lock *bakery);
|
||||||
void bakery_lock_get(unsigned long mpidr, bakery_lock* bakery);
|
void bakery_lock_get(unsigned long mpidr, bakery_lock *bakery);
|
||||||
void bakery_lock_release(unsigned long mpidr, bakery_lock* bakery);
|
void bakery_lock_release(unsigned long mpidr, bakery_lock *bakery);
|
||||||
int bakery_lock_try(unsigned long mpidr, bakery_lock* bakery);
|
int bakery_lock_try(unsigned long mpidr, bakery_lock *bakery);
|
||||||
#endif /*__ASSEMBLY__*/
|
#endif /*__ASSEMBLY__*/
|
||||||
|
|
||||||
#endif /* __BAKERY_LOCK_H__ */
|
#endif /* __BAKERY_LOCK_H__ */
|
66
include/pm.h
66
include/pm.h
|
@ -1,66 +0,0 @@
|
||||||
/*
|
|
||||||
* Copyright (c) 2013-2014, ARM Limited and Contributors. All rights reserved.
|
|
||||||
*
|
|
||||||
* Redistribution and use in source and binary forms, with or without
|
|
||||||
* modification, are permitted provided that the following conditions are met:
|
|
||||||
*
|
|
||||||
* Redistributions of source code must retain the above copyright notice, this
|
|
||||||
* list of conditions and the following disclaimer.
|
|
||||||
*
|
|
||||||
* Redistributions in binary form must reproduce the above copyright notice,
|
|
||||||
* this list of conditions and the following disclaimer in the documentation
|
|
||||||
* and/or other materials provided with the distribution.
|
|
||||||
*
|
|
||||||
* Neither the name of ARM nor the names of its contributors may be used
|
|
||||||
* to endorse or promote products derived from this software without specific
|
|
||||||
* prior written permission.
|
|
||||||
*
|
|
||||||
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
|
|
||||||
* AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
|
||||||
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
|
|
||||||
* ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
|
|
||||||
* LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
|
|
||||||
* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
|
|
||||||
* SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
|
|
||||||
* INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
|
|
||||||
* CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
|
|
||||||
* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
|
|
||||||
* POSSIBILITY OF SUCH DAMAGE.
|
|
||||||
*/
|
|
||||||
|
|
||||||
#ifndef __PM_H__
|
|
||||||
#define __PM_H__
|
|
||||||
|
|
||||||
#ifndef __ASSEMBLY__
|
|
||||||
|
|
||||||
/*******************************************************************************
|
|
||||||
* Structure populated by platform specific code to export routines which
|
|
||||||
* perform common low level pm functions
|
|
||||||
******************************************************************************/
|
|
||||||
typedef struct {
|
|
||||||
int (*cpu_on)(unsigned long);
|
|
||||||
int (*cpu_off)(unsigned long);
|
|
||||||
int (*cpu_suspend)(unsigned long);
|
|
||||||
int (*affinity_info)(unsigned long, unsigned int);
|
|
||||||
} pm_frontend_ops;
|
|
||||||
|
|
||||||
/*******************************************************************************
|
|
||||||
* Structure populated by a generic power management api implementation e.g.
|
|
||||||
* psci to perform api specific bits after a cpu has been turned on.
|
|
||||||
******************************************************************************/
|
|
||||||
typedef struct {
|
|
||||||
unsigned long (*cpu_off_finisher)(unsigned long);
|
|
||||||
unsigned long (*cpu_suspend_finisher)(unsigned long);
|
|
||||||
} pm_backend_ops;
|
|
||||||
|
|
||||||
/*******************************************************************************
|
|
||||||
* Function & variable prototypes
|
|
||||||
******************************************************************************/
|
|
||||||
extern pm_frontend_ops *get_pm_frontend_ops(void);
|
|
||||||
extern pm_backend_ops *get_pm_backend_ops(void);
|
|
||||||
extern void set_pm_frontend_ops(pm_frontend_ops *);
|
|
||||||
extern void set_pm_backend_ops(pm_backend_ops *);
|
|
||||||
|
|
||||||
#endif /*__ASSEMBLY__*/
|
|
||||||
|
|
||||||
#endif /* __PM_H__ */
|
|
|
@ -59,14 +59,14 @@
|
||||||
#define assert_bakery_entry_valid(entry, bakery) do { \
|
#define assert_bakery_entry_valid(entry, bakery) do { \
|
||||||
assert(bakery); \
|
assert(bakery); \
|
||||||
assert(entry < BAKERY_LOCK_MAX_CPUS); \
|
assert(entry < BAKERY_LOCK_MAX_CPUS); \
|
||||||
} while(0)
|
} while (0)
|
||||||
|
|
||||||
/* Convert a ticket to priority */
|
/* Convert a ticket to priority */
|
||||||
#define PRIORITY(t, pos) (((t) << 8) | (pos))
|
#define PRIORITY(t, pos) (((t) << 8) | (pos))
|
||||||
|
|
||||||
|
|
||||||
/* Initialize Bakery Lock to reset ownership and all ticket values */
|
/* Initialize Bakery Lock to reset ownership and all ticket values */
|
||||||
void bakery_lock_init(bakery_lock * bakery)
|
void bakery_lock_init(bakery_lock *bakery)
|
||||||
{
|
{
|
||||||
assert(bakery);
|
assert(bakery);
|
||||||
|
|
||||||
|
@ -176,7 +176,7 @@ void bakery_lock_get(unsigned long mpidr, bakery_lock *bakery)
|
||||||
|
|
||||||
|
|
||||||
/* Release the lock and signal contenders */
|
/* Release the lock and signal contenders */
|
||||||
void bakery_lock_release(unsigned long mpidr, bakery_lock * bakery)
|
void bakery_lock_release(unsigned long mpidr, bakery_lock *bakery)
|
||||||
{
|
{
|
||||||
unsigned int me = platform_get_core_pos(mpidr);
|
unsigned int me = platform_get_core_pos(mpidr);
|
||||||
|
|
|
@ -28,34 +28,33 @@
|
||||||
# POSSIBILITY OF SUCH DAMAGE.
|
# POSSIBILITY OF SUCH DAMAGE.
|
||||||
#
|
#
|
||||||
|
|
||||||
PLAT_INCLUDES := -Idrivers/arm/interconnect/cci-400 \
|
#
|
||||||
-Idrivers/arm/interconnect/tzc-400 \
|
# No additional platform system include directories required
|
||||||
-Idrivers/console \
|
#
|
||||||
-Idrivers/arm/peripherals/pl011 \
|
# PLAT_INCLUDES :=
|
||||||
-Idrivers/power
|
|
||||||
|
|
||||||
PLAT_BL1_C_VPATH := drivers/arm/interconnect/cci-400 \
|
PLAT_BL1_C_VPATH := drivers/arm/cci400 \
|
||||||
drivers/arm/peripherals/pl011 \
|
drivers/arm/pl011 \
|
||||||
lib/arch/${ARCH} \
|
lib/${ARCH} \
|
||||||
lib/semihosting \
|
lib/semihosting \
|
||||||
lib/stdlib \
|
lib/stdlib \
|
||||||
drivers/io
|
drivers/io
|
||||||
|
|
||||||
PLAT_BL1_S_VPATH := lib/semihosting/${ARCH}
|
PLAT_BL1_S_VPATH := lib/semihosting/${ARCH}
|
||||||
|
|
||||||
PLAT_BL2_C_VPATH := drivers/arm/interconnect/cci-400 \
|
PLAT_BL2_C_VPATH := drivers/arm/cci400 \
|
||||||
drivers/arm/interconnect/tzc-400 \
|
drivers/arm/pl011 \
|
||||||
drivers/arm/peripherals/pl011 \
|
drivers/arm/tzc400 \
|
||||||
lib/arch/${ARCH} \
|
lib/${ARCH} \
|
||||||
lib/stdlib \
|
lib/stdlib \
|
||||||
lib/semihosting \
|
lib/semihosting \
|
||||||
drivers/io
|
drivers/io
|
||||||
|
|
||||||
PLAT_BL2_S_VPATH := lib/semihosting/${ARCH}
|
PLAT_BL2_S_VPATH := lib/semihosting/${ARCH}
|
||||||
|
|
||||||
PLAT_BL31_C_VPATH := drivers/arm/interconnect/cci-400 \
|
PLAT_BL31_C_VPATH := drivers/arm/cci-400 \
|
||||||
drivers/arm/peripherals/pl011 \
|
drivers/arm/pl011 \
|
||||||
lib/arch/${ARCH} \
|
lib/${ARCH} \
|
||||||
lib/semihosting \
|
lib/semihosting \
|
||||||
lib/stdlib \
|
lib/stdlib \
|
||||||
drivers/power \
|
drivers/power \
|
||||||
|
|
|
@ -29,7 +29,7 @@
|
||||||
#
|
#
|
||||||
|
|
||||||
TSPD_DIR := services/spd/tspd
|
TSPD_DIR := services/spd/tspd
|
||||||
SPD_INCLUDES := -Iinclude/spd/tspd \
|
SPD_INCLUDES := -Iinclude/bl32/payloads \
|
||||||
-I${TSPD_DIR}
|
-I${TSPD_DIR}
|
||||||
|
|
||||||
SPD_SOURCES := tspd_common.c \
|
SPD_SOURCES := tspd_common.c \
|
||||||
|
|
|
@ -1 +1 @@
|
||||||
../../include/firmware_image_package.h
|
../../include/common/firmware_image_package.h
|
Loading…
Add table
Reference in a new issue