mirror of
https://github.com/ARM-software/arm-trusted-firmware.git
synced 2025-05-09 02:51:21 +00:00
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:
parent
fb037bfb7c
commit
97043ac98e
89 changed files with 258 additions and 294 deletions
|
@ -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__ */
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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.
|
||||
|
|
|
@ -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__ */
|
||||
|
|
|
@ -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)
|
||||
|
|
|
@ -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
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue