Remove extern keyword from function declarations
Function declarations implicitly have external linkage so do not
need the extern keyword.
Change-Id: Ia0549786796d8bf5956487e8996450a0b3d79f32
diff --git a/include/bl1/bl1.h b/include/bl1/bl1.h
index d8afae4..b1bbf24 100644
--- a/include/bl1/bl1.h
+++ b/include/bl1/bl1.h
@@ -40,7 +40,7 @@
/******************************************
* Function prototypes
*****************************************/
-extern void bl1_platform_setup(void);
-extern struct meminfo *bl1_plat_sec_mem_layout(void);
+void bl1_platform_setup(void);
+struct meminfo *bl1_plat_sec_mem_layout(void);
#endif /* __BL1_H__ */
diff --git a/include/bl2/bl2.h b/include/bl2/bl2.h
index 4cd3cee..b028faa 100644
--- a/include/bl2/bl2.h
+++ b/include/bl2/bl2.h
@@ -40,34 +40,32 @@
* Forward declarations
*****************************************/
struct meminfo;
-struct bl31_args;
+struct bl31_params;
+struct entry_point_info;
/******************************************
* Function prototypes
*****************************************/
-extern void bl2_platform_setup(void);
-extern struct meminfo *bl2_plat_sec_mem_layout(void);
+void bl2_platform_setup(void);
+struct meminfo *bl2_plat_sec_mem_layout(void);
/*******************************************************************************
* This function returns a pointer to the shared memory that the platform has
* kept aside to pass trusted firmware related information that BL3-1
* could need
******************************************************************************/
-extern struct bl31_params *bl2_plat_get_bl31_params(void);
-
+struct bl31_params *bl2_plat_get_bl31_params(void);
/*******************************************************************************
* This function returns a pointer to the shared memory that the platform
* has kept to point to entry point information of BL31 to BL2
******************************************************************************/
-extern struct entry_point_info *bl2_plat_get_bl31_ep_info(void);
-
+struct entry_point_info *bl2_plat_get_bl31_ep_info(void);
/************************************************************************
* This function flushes to main memory all the params that are
* passed to BL3-1
**************************************************************************/
-extern void bl2_plat_flush_bl31_params(void);
-
+void bl2_plat_flush_bl31_params(void);
#endif /* __BL2_H__ */
diff --git a/include/bl31/bl31.h b/include/bl31/bl31.h
index e77c554..744dcc2 100644
--- a/include/bl31/bl31.h
+++ b/include/bl31/bl31.h
@@ -41,22 +41,21 @@
/******************************************
* Forward declarations
*****************************************/
-struct meminfo;
struct entry_point_info;
struct bl31_parms;
/*******************************************************************************
* Function prototypes
******************************************************************************/
-extern void bl31_arch_setup(void);
-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 struct entry_point_info *bl31_get_next_image_info(uint32_t type);
-extern void bl31_early_platform_setup(struct bl31_params *from_bl2,
- void *plat_params_from_bl2);
-extern void bl31_platform_setup(void);
-extern void bl31_register_bl32_init(int32_t (*)(void));
+void bl31_arch_setup(void);
+void bl31_next_el_arch_setup(uint32_t security_state);
+void bl31_set_next_image_type(uint32_t type);
+uint32_t bl31_get_next_image_type(void);
+void bl31_prepare_next_image_entry();
+struct entry_point_info *bl31_get_next_image_info(uint32_t type);
+void bl31_early_platform_setup(struct bl31_params *from_bl2,
+ void *plat_params_from_bl2);
+void bl31_platform_setup(void);
+void bl31_register_bl32_init(int32_t (*)(void));
#endif /* __BL31_H__ */
diff --git a/include/bl31/context_mgmt.h b/include/bl31/context_mgmt.h
index ad9d785..ce4f7a8 100644
--- a/include/bl31/context_mgmt.h
+++ b/include/bl31/context_mgmt.h
@@ -36,24 +36,24 @@
/*******************************************************************************
* Function & variable prototypes
******************************************************************************/
-extern void cm_init(void);
-extern void *cm_get_context(uint64_t mpidr, uint32_t security_state);
-extern void cm_set_context(uint64_t mpidr,
- void *context,
- uint32_t security_state);
-extern void cm_el3_sysregs_context_save(uint32_t security_state);
-extern void cm_el3_sysregs_context_restore(uint32_t security_state);
-extern void cm_el1_sysregs_context_save(uint32_t security_state);
-extern void cm_el1_sysregs_context_restore(uint32_t security_state);
-extern void cm_set_el3_eret_context(uint32_t security_state, uint64_t entrypoint,
- uint32_t spsr, uint32_t scr);
-extern void cm_set_elr_el3(uint32_t security_state, uint64_t entrypoint);
-extern void cm_write_scr_el3_bit(uint32_t security_state,
- uint32_t bit_pos,
- uint32_t value);
-extern void cm_set_next_eret_context(uint32_t security_state);
-extern void cm_init_pcpu_ptr_cache();
-extern void cm_set_pcpu_ptr_cache(const void *pcpu_ptr);
-extern void *cm_get_pcpu_ptr_cache(void);
-extern uint32_t cm_get_scr_el3(uint32_t security_state);
+void cm_init(void);
+void *cm_get_context(uint64_t mpidr, uint32_t security_state);
+void cm_set_context(uint64_t mpidr,
+ void *context,
+ uint32_t security_state);
+void cm_el3_sysregs_context_save(uint32_t security_state);
+void cm_el3_sysregs_context_restore(uint32_t security_state);
+void cm_el1_sysregs_context_save(uint32_t security_state);
+void cm_el1_sysregs_context_restore(uint32_t security_state);
+void cm_set_el3_eret_context(uint32_t security_state, uint64_t entrypoint,
+ uint32_t spsr, uint32_t scr);
+void cm_set_elr_el3(uint32_t security_state, uint64_t entrypoint);
+void cm_write_scr_el3_bit(uint32_t security_state,
+ uint32_t bit_pos,
+ uint32_t value);
+void cm_set_next_eret_context(uint32_t security_state);
+void cm_init_pcpu_ptr_cache();
+void cm_set_pcpu_ptr_cache(const void *pcpu_ptr);
+void *cm_get_pcpu_ptr_cache(void);
+uint32_t cm_get_scr_el3(uint32_t security_state);
#endif /* __CM_H__ */
diff --git a/include/bl31/interrupt_mgmt.h b/include/bl31/interrupt_mgmt.h
index 0b24f39..3a2c00c 100644
--- a/include/bl31/interrupt_mgmt.h
+++ b/include/bl31/interrupt_mgmt.h
@@ -117,12 +117,12 @@
/*******************************************************************************
* Function & variable prototypes
******************************************************************************/
-extern uint32_t get_scr_el3_from_routing_model(uint32_t security_state);
-extern int32_t set_routing_model(uint32_t type, uint32_t flags);
-extern int32_t register_interrupt_type_handler(uint32_t type,
- interrupt_type_handler_t handler,
- uint32_t flags);
-extern interrupt_type_handler_t get_interrupt_type_handler(uint32_t interrupt_type);
+uint32_t get_scr_el3_from_routing_model(uint32_t security_state);
+int32_t set_routing_model(uint32_t type, uint32_t flags);
+int32_t register_interrupt_type_handler(uint32_t type,
+ interrupt_type_handler_t handler,
+ uint32_t flags);
+interrupt_type_handler_t get_interrupt_type_handler(uint32_t interrupt_type);
#endif /*__ASSEMBLY__*/
#endif /* __INTERRUPT_MGMT_H__ */
diff --git a/include/bl31/runtime_svc.h b/include/bl31/runtime_svc.h
index 66562e1..d7d88d4 100644
--- a/include/bl31/runtime_svc.h
+++ b/include/bl31/runtime_svc.h
@@ -264,10 +264,10 @@
/*******************************************************************************
* Function & variable prototypes
******************************************************************************/
-extern void runtime_svc_init();
+void runtime_svc_init();
extern uint64_t __RT_SVC_DESCS_START__;
extern uint64_t __RT_SVC_DESCS_END__;
-extern uint64_t get_crash_stack(uint64_t mpidr);
-extern void runtime_exceptions(void);
+uint64_t get_crash_stack(uint64_t mpidr);
+void runtime_exceptions(void);
#endif /*__ASSEMBLY__*/
#endif /* __RUNTIME_SVC_H__ */
diff --git a/include/bl31/services/psci.h b/include/bl31/services/psci.h
index b6e272c..887c4ce 100644
--- a/include/bl31/services/psci.h
+++ b/include/bl31/services/psci.h
@@ -178,36 +178,36 @@
/*******************************************************************************
* Function & Data prototypes
******************************************************************************/
-extern unsigned int psci_version(void);
-extern int __psci_cpu_suspend(unsigned int, unsigned long, unsigned long);
-extern int __psci_cpu_off(void);
-extern int psci_affinity_info(unsigned long, unsigned int);
-extern int psci_migrate(unsigned int);
-extern unsigned int psci_migrate_info_type(void);
-extern unsigned long psci_migrate_info_up_cpu(void);
-extern void psci_system_off(void);
-extern void psci_system_reset(void);
-extern int psci_cpu_on(unsigned long,
- unsigned long,
- unsigned long);
-extern void __dead2 psci_power_down_wfi(void);
-extern void psci_aff_on_finish_entry(void);
-extern void psci_aff_suspend_finish_entry(void);
-extern void psci_register_spd_pm_hook(const spd_pm_ops_t *);
-extern int psci_get_suspend_stateid(unsigned long mpidr);
-extern int psci_get_suspend_afflvl(unsigned long mpidr);
+unsigned int psci_version(void);
+int __psci_cpu_suspend(unsigned int, unsigned long, unsigned long);
+int __psci_cpu_off(void);
+int psci_affinity_info(unsigned long, unsigned int);
+int psci_migrate(unsigned int);
+unsigned int psci_migrate_info_type(void);
+unsigned long psci_migrate_info_up_cpu(void);
+void psci_system_off(void);
+void psci_system_reset(void);
+int psci_cpu_on(unsigned long,
+ unsigned long,
+ unsigned long);
+void __dead2 psci_power_down_wfi(void);
+void psci_aff_on_finish_entry(void);
+void psci_aff_suspend_finish_entry(void);
+void psci_register_spd_pm_hook(const spd_pm_ops_t *);
+int psci_get_suspend_stateid(unsigned long mpidr);
+int psci_get_suspend_afflvl(unsigned long mpidr);
-extern uint64_t psci_smc_handler(uint32_t smc_fid,
- uint64_t x1,
- uint64_t x2,
- uint64_t x3,
- uint64_t x4,
- void *cookie,
- void *handle,
- uint64_t flags);
+uint64_t psci_smc_handler(uint32_t smc_fid,
+ uint64_t x1,
+ uint64_t x2,
+ uint64_t x3,
+ uint64_t x4,
+ void *cookie,
+ void *handle,
+ uint64_t flags);
/* PSCI setup function */
-extern int32_t psci_setup(void);
+int32_t psci_setup(void);
#endif /*__ASSEMBLY__*/
diff --git a/include/bl32/bl32.h b/include/bl32/bl32.h
index 3239487..ede7c48 100644
--- a/include/bl32/bl32.h
+++ b/include/bl32/bl32.h
@@ -41,8 +41,8 @@
/******************************************
* Function prototypes
*****************************************/
-extern void bl32_platform_setup(void);
-extern struct meminfo *bl32_plat_sec_mem_layout(void);
-extern uint64_t bl32_main(void);
+void bl32_platform_setup(void);
+struct meminfo *bl32_plat_sec_mem_layout(void);
+uint64_t bl32_main(void);
#endif /* __BL32_H__ */
diff --git a/include/bl32/payloads/tsp.h b/include/bl32/payloads/tsp.h
index 9239ba4..237ad48 100644
--- a/include/bl32/payloads/tsp.h
+++ b/include/bl32/payloads/tsp.h
@@ -157,43 +157,43 @@
*/
CASSERT(TSP_ARGS_SIZE == sizeof(tsp_args_t), assert_sp_args_size_mismatch);
-extern void tsp_get_magic(uint64_t args[4]);
+void tsp_get_magic(uint64_t args[4]);
-extern tsp_args_t *tsp_cpu_resume_main(uint64_t arg0,
- uint64_t arg1,
- uint64_t arg2,
- uint64_t arg3,
- uint64_t arg4,
- uint64_t arg5,
- uint64_t arg6,
- uint64_t arg7);
-extern tsp_args_t *tsp_cpu_suspend_main(uint64_t arg0,
- uint64_t arg1,
- uint64_t arg2,
- uint64_t arg3,
- uint64_t arg4,
- uint64_t arg5,
- uint64_t arg6,
- uint64_t arg7);
-extern tsp_args_t *tsp_cpu_on_main(void);
-extern tsp_args_t *tsp_cpu_off_main(uint64_t arg0,
- uint64_t arg1,
- uint64_t arg2,
- uint64_t arg3,
- uint64_t arg4,
- uint64_t arg5,
- uint64_t arg6,
- uint64_t arg7);
+tsp_args_t *tsp_cpu_resume_main(uint64_t arg0,
+ uint64_t arg1,
+ uint64_t arg2,
+ uint64_t arg3,
+ uint64_t arg4,
+ uint64_t arg5,
+ uint64_t arg6,
+ uint64_t arg7);
+tsp_args_t *tsp_cpu_suspend_main(uint64_t arg0,
+ uint64_t arg1,
+ uint64_t arg2,
+ uint64_t arg3,
+ uint64_t arg4,
+ uint64_t arg5,
+ uint64_t arg6,
+ uint64_t arg7);
+tsp_args_t *tsp_cpu_on_main(void);
+tsp_args_t *tsp_cpu_off_main(uint64_t arg0,
+ uint64_t arg1,
+ uint64_t arg2,
+ uint64_t arg3,
+ uint64_t arg4,
+ uint64_t arg5,
+ uint64_t arg6,
+ uint64_t arg7);
/* Generic Timer functions */
-extern void tsp_generic_timer_start(void);
-extern void tsp_generic_timer_handler(void);
-extern void tsp_generic_timer_stop(void);
-extern void tsp_generic_timer_save(void);
-extern void tsp_generic_timer_restore(void);
+void tsp_generic_timer_start(void);
+void tsp_generic_timer_handler(void);
+void tsp_generic_timer_stop(void);
+void tsp_generic_timer_save(void);
+void tsp_generic_timer_restore(void);
/* FIQ management functions */
-extern void tsp_update_sync_fiq_stats(uint32_t type, uint64_t elr_el3);
+void tsp_update_sync_fiq_stats(uint32_t type, uint64_t elr_el3);
/* Data structure to keep track of TSP statistics */
extern spinlock_t console_lock;
diff --git a/include/common/bl_common.h b/include/common/bl_common.h
index 47b1e40..79f2329 100644
--- a/include/common/bl_common.h
+++ b/include/common/bl_common.h
@@ -194,23 +194,23 @@
/*******************************************************************************
* Function & variable prototypes
******************************************************************************/
-extern unsigned long page_align(unsigned long, unsigned);
-extern void change_security_state(unsigned int);
-extern void init_bl2_mem_layout(meminfo_t *,
- meminfo_t *,
- unsigned int,
- unsigned long) __attribute__((weak));
-extern void init_bl31_mem_layout(const meminfo_t *,
- meminfo_t *,
- unsigned int) __attribute__((weak));
-extern unsigned long image_size(const char *);
-extern int load_image(meminfo_t *,
- const char *,
- unsigned int,
- unsigned long,
- image_info_t *,
- entry_point_info_t *);
-extern unsigned long *get_el_change_mem_ptr(void);
+unsigned long page_align(unsigned long, unsigned);
+void change_security_state(unsigned int);
+void init_bl2_mem_layout(meminfo_t *,
+ meminfo_t *,
+ unsigned int,
+ unsigned long) __attribute__((weak));
+void init_bl31_mem_layout(const meminfo_t *,
+ meminfo_t *,
+ unsigned int) __attribute__((weak));
+unsigned long image_size(const char *);
+int load_image(meminfo_t *,
+ const char *,
+ unsigned int,
+ unsigned long,
+ image_info_t *,
+ entry_point_info_t *);
+unsigned long *get_el_change_mem_ptr(void);
extern const char build_message[];
#endif /*__ASSEMBLY__*/
diff --git a/include/common/debug.h b/include/common/debug.h
index 522b4df..5b496d7 100644
--- a/include/common/debug.h
+++ b/include/common/debug.h
@@ -57,15 +57,15 @@
* spin. This can be expanded in the future to provide more information.
*/
#if DEBUG
-extern void __dead2 do_panic(const char *file, int line);
+void __dead2 do_panic(const char *file, int line);
#define panic() do_panic(__FILE__, __LINE__)
#else
-extern void __dead2 do_panic(void);
+void __dead2 do_panic(void);
#define panic() do_panic()
#endif
-extern void print_string_value(char *s, unsigned long *mem);
+void print_string_value(char *s, unsigned long *mem);
#endif /* __DEBUG_H__ */
diff --git a/include/drivers/arm/cci400.h b/include/drivers/arm/cci400.h
index 3921675..7222391 100644
--- a/include/drivers/arm/cci400.h
+++ b/include/drivers/arm/cci400.h
@@ -66,7 +66,7 @@
#define CHANGE_PENDING_BIT (1 << 0)
/* Function declarations */
-extern void cci_enable_coherency(unsigned long mpidr);
-extern void cci_disable_coherency(unsigned long mpidr);
+void cci_enable_coherency(unsigned long mpidr);
+void cci_disable_coherency(unsigned long mpidr);
#endif /* __CCI_400_H__ */
diff --git a/include/drivers/arm/gic_v2.h b/include/drivers/arm/gic_v2.h
index e819676..1859a8e 100644
--- a/include/drivers/arm/gic_v2.h
+++ b/include/drivers/arm/gic_v2.h
@@ -143,41 +143,41 @@
* GIC Distributor function prototypes
******************************************************************************/
-extern unsigned int gicd_read_igroupr(unsigned int, unsigned int);
-extern unsigned int gicd_read_isenabler(unsigned int, unsigned int);
-extern unsigned int gicd_read_icenabler(unsigned int, unsigned int);
-extern unsigned int gicd_read_ispendr(unsigned int, unsigned int);
-extern unsigned int gicd_read_icpendr(unsigned int, unsigned int);
-extern unsigned int gicd_read_isactiver(unsigned int, unsigned int);
-extern unsigned int gicd_read_icactiver(unsigned int, unsigned int);
-extern unsigned int gicd_read_ipriorityr(unsigned int, unsigned int);
-extern unsigned int gicd_read_itargetsr(unsigned int, unsigned int);
-extern unsigned int gicd_read_icfgr(unsigned int, unsigned int);
-extern unsigned int gicd_read_cpendsgir(unsigned int, unsigned int);
-extern unsigned int gicd_read_spendsgir(unsigned int, unsigned int);
-extern void gicd_write_igroupr(unsigned int, unsigned int, unsigned int);
-extern void gicd_write_isenabler(unsigned int, unsigned int, unsigned int);
-extern void gicd_write_icenabler(unsigned int, unsigned int, unsigned int);
-extern void gicd_write_ispendr(unsigned int, unsigned int, unsigned int);
-extern void gicd_write_icpendr(unsigned int, unsigned int, unsigned int);
-extern void gicd_write_isactiver(unsigned int, unsigned int, unsigned int);
-extern void gicd_write_icactiver(unsigned int, unsigned int, unsigned int);
-extern void gicd_write_ipriorityr(unsigned int, unsigned int, unsigned int);
-extern void gicd_write_itargetsr(unsigned int, unsigned int, unsigned int);
-extern void gicd_write_icfgr(unsigned int, unsigned int, unsigned int);
-extern void gicd_write_cpendsgir(unsigned int, unsigned int, unsigned int);
-extern void gicd_write_spendsgir(unsigned int, unsigned int, unsigned int);
-extern unsigned int gicd_get_igroupr(unsigned int, unsigned int);
-extern void gicd_set_igroupr(unsigned int, unsigned int);
-extern void gicd_clr_igroupr(unsigned int, unsigned int);
-extern void gicd_set_isenabler(unsigned int, unsigned int);
-extern void gicd_set_icenabler(unsigned int, unsigned int);
-extern void gicd_set_ispendr(unsigned int, unsigned int);
-extern void gicd_set_icpendr(unsigned int, unsigned int);
-extern void gicd_set_isactiver(unsigned int, unsigned int);
-extern void gicd_set_icactiver(unsigned int, unsigned int);
-extern void gicd_set_ipriorityr(unsigned int, unsigned int, unsigned int);
-extern void gicd_set_itargetsr(unsigned int, unsigned int, unsigned int);
+unsigned int gicd_read_igroupr(unsigned int, unsigned int);
+unsigned int gicd_read_isenabler(unsigned int, unsigned int);
+unsigned int gicd_read_icenabler(unsigned int, unsigned int);
+unsigned int gicd_read_ispendr(unsigned int, unsigned int);
+unsigned int gicd_read_icpendr(unsigned int, unsigned int);
+unsigned int gicd_read_isactiver(unsigned int, unsigned int);
+unsigned int gicd_read_icactiver(unsigned int, unsigned int);
+unsigned int gicd_read_ipriorityr(unsigned int, unsigned int);
+unsigned int gicd_read_itargetsr(unsigned int, unsigned int);
+unsigned int gicd_read_icfgr(unsigned int, unsigned int);
+unsigned int gicd_read_cpendsgir(unsigned int, unsigned int);
+unsigned int gicd_read_spendsgir(unsigned int, unsigned int);
+void gicd_write_igroupr(unsigned int, unsigned int, unsigned int);
+void gicd_write_isenabler(unsigned int, unsigned int, unsigned int);
+void gicd_write_icenabler(unsigned int, unsigned int, unsigned int);
+void gicd_write_ispendr(unsigned int, unsigned int, unsigned int);
+void gicd_write_icpendr(unsigned int, unsigned int, unsigned int);
+void gicd_write_isactiver(unsigned int, unsigned int, unsigned int);
+void gicd_write_icactiver(unsigned int, unsigned int, unsigned int);
+void gicd_write_ipriorityr(unsigned int, unsigned int, unsigned int);
+void gicd_write_itargetsr(unsigned int, unsigned int, unsigned int);
+void gicd_write_icfgr(unsigned int, unsigned int, unsigned int);
+void gicd_write_cpendsgir(unsigned int, unsigned int, unsigned int);
+void gicd_write_spendsgir(unsigned int, unsigned int, unsigned int);
+unsigned int gicd_get_igroupr(unsigned int, unsigned int);
+void gicd_set_igroupr(unsigned int, unsigned int);
+void gicd_clr_igroupr(unsigned int, unsigned int);
+void gicd_set_isenabler(unsigned int, unsigned int);
+void gicd_set_icenabler(unsigned int, unsigned int);
+void gicd_set_ispendr(unsigned int, unsigned int);
+void gicd_set_icpendr(unsigned int, unsigned int);
+void gicd_set_isactiver(unsigned int, unsigned int);
+void gicd_set_icactiver(unsigned int, unsigned int);
+void gicd_set_ipriorityr(unsigned int, unsigned int, unsigned int);
+void gicd_set_itargetsr(unsigned int, unsigned int, unsigned int);
/*******************************************************************************
diff --git a/include/drivers/arm/gic_v3.h b/include/drivers/arm/gic_v3.h
index 6f072a3..0f99994 100644
--- a/include/drivers/arm/gic_v3.h
+++ b/include/drivers/arm/gic_v3.h
@@ -68,13 +68,13 @@
******************************************************************************/
uintptr_t gicv3_get_rdist(uintptr_t gicr_base, uint64_t mpidr);
-extern unsigned int read_icc_sre_el1(void);
-extern unsigned int read_icc_sre_el2(void);
-extern unsigned int read_icc_sre_el3(void);
-extern void write_icc_sre_el1(unsigned int);
-extern void write_icc_sre_el2(unsigned int);
-extern void write_icc_sre_el3(unsigned int);
-extern void write_icc_pmr_el1(unsigned int);
+unsigned int read_icc_sre_el1(void);
+unsigned int read_icc_sre_el2(void);
+unsigned int read_icc_sre_el3(void);
+void write_icc_sre_el1(unsigned int);
+void write_icc_sre_el2(unsigned int);
+void write_icc_sre_el3(unsigned int);
+void write_icc_pmr_el1(unsigned int);
/*******************************************************************************
* GIC Redistributor interface accessors
diff --git a/include/lib/aarch64/arch_helpers.h b/include/lib/aarch64/arch_helpers.h
index f30301d..f16c4b5 100644
--- a/include/lib/aarch64/arch_helpers.h
+++ b/include/lib/aarch64/arch_helpers.h
@@ -37,243 +37,243 @@
/*******************************************************************************
* Aarch64 translation tables manipulation helper prototypes
******************************************************************************/
-extern unsigned long create_table_desc(unsigned long *next_table_ptr);
-extern unsigned long create_block_desc(unsigned long desc,
- unsigned long addr,
- unsigned int level);
-extern unsigned long create_device_block(unsigned long output_addr,
- unsigned int level,
- unsigned int ns);
-extern unsigned long create_romem_block(unsigned long output_addr,
- unsigned int level,
- unsigned int ns);
-extern unsigned long create_rwmem_block(unsigned long output_addr,
- unsigned int level,
- unsigned int ns);
+unsigned long create_table_desc(unsigned long *next_table_ptr);
+unsigned long create_block_desc(unsigned long desc,
+ unsigned long addr,
+ unsigned int level);
+unsigned long create_device_block(unsigned long output_addr,
+ unsigned int level,
+ unsigned int ns);
+unsigned long create_romem_block(unsigned long output_addr,
+ unsigned int level,
+ unsigned int ns);
+unsigned long create_rwmem_block(unsigned long output_addr,
+ unsigned int level,
+ unsigned int ns);
/*******************************************************************************
* TLB maintenance accessor prototypes
******************************************************************************/
-extern void tlbialle1(void);
-extern void tlbialle1is(void);
-extern void tlbialle2(void);
-extern void tlbialle2is(void);
-extern void tlbialle3(void);
-extern void tlbialle3is(void);
-extern void tlbivmalle1(void);
+void tlbialle1(void);
+void tlbialle1is(void);
+void tlbialle2(void);
+void tlbialle2is(void);
+void tlbialle3(void);
+void tlbialle3is(void);
+void tlbivmalle1(void);
/*******************************************************************************
* Cache maintenance accessor prototypes
******************************************************************************/
-extern void dcisw(unsigned long);
-extern void dccisw(unsigned long);
-extern void dccsw(unsigned long);
-extern void dccvac(unsigned long);
-extern void dcivac(unsigned long);
-extern void dccivac(unsigned long);
-extern void dccvau(unsigned long);
-extern void dczva(unsigned long);
-extern void flush_dcache_range(unsigned long, unsigned long);
-extern void inv_dcache_range(unsigned long, unsigned long);
-extern void dcsw_op_louis(unsigned int);
-extern void dcsw_op_all(unsigned int);
+void dcisw(unsigned long);
+void dccisw(unsigned long);
+void dccsw(unsigned long);
+void dccvac(unsigned long);
+void dcivac(unsigned long);
+void dccivac(unsigned long);
+void dccvau(unsigned long);
+void dczva(unsigned long);
+void flush_dcache_range(unsigned long, unsigned long);
+void inv_dcache_range(unsigned long, unsigned long);
+void dcsw_op_louis(unsigned int);
+void dcsw_op_all(unsigned int);
-extern void disable_mmu_el3(void);
-extern void disable_mmu_icache_el3(void);
+void disable_mmu_el3(void);
+void disable_mmu_icache_el3(void);
/*******************************************************************************
* Misc. accessor prototypes
******************************************************************************/
-extern void enable_irq(void);
-extern void enable_fiq(void);
-extern void enable_serror(void);
-extern void enable_debug_exceptions(void);
+void enable_irq(void);
+void enable_fiq(void);
+void enable_serror(void);
+void enable_debug_exceptions(void);
-extern void disable_irq(void);
-extern void disable_fiq(void);
-extern void disable_serror(void);
-extern void disable_debug_exceptions(void);
+void disable_irq(void);
+void disable_fiq(void);
+void disable_serror(void);
+void disable_debug_exceptions(void);
-extern unsigned long read_id_pfr1_el1(void);
-extern unsigned long read_id_aa64pfr0_el1(void);
-extern unsigned long read_current_el(void);
-extern unsigned long read_daif(void);
-extern unsigned long read_spsr_el1(void);
-extern unsigned long read_spsr_el2(void);
-extern unsigned long read_spsr_el3(void);
-extern unsigned long read_elr_el1(void);
-extern unsigned long read_elr_el2(void);
-extern unsigned long read_elr_el3(void);
+unsigned long read_id_pfr1_el1(void);
+unsigned long read_id_aa64pfr0_el1(void);
+unsigned long read_current_el(void);
+unsigned long read_daif(void);
+unsigned long read_spsr_el1(void);
+unsigned long read_spsr_el2(void);
+unsigned long read_spsr_el3(void);
+unsigned long read_elr_el1(void);
+unsigned long read_elr_el2(void);
+unsigned long read_elr_el3(void);
-extern void write_daif(unsigned long);
-extern void write_spsr_el1(unsigned long);
-extern void write_spsr_el2(unsigned long);
-extern void write_spsr_el3(unsigned long);
-extern void write_elr_el1(unsigned long);
-extern void write_elr_el2(unsigned long);
-extern void write_elr_el3(unsigned long);
+void write_daif(unsigned long);
+void write_spsr_el1(unsigned long);
+void write_spsr_el2(unsigned long);
+void write_spsr_el3(unsigned long);
+void write_elr_el1(unsigned long);
+void write_elr_el2(unsigned long);
+void write_elr_el3(unsigned long);
-extern void wfi(void);
-extern void wfe(void);
-extern void rfe(void);
-extern void sev(void);
-extern void dsb(void);
-extern void isb(void);
+void wfi(void);
+void wfe(void);
+void rfe(void);
+void sev(void);
+void dsb(void);
+void isb(void);
-extern unsigned int get_afflvl_shift(unsigned int);
-extern unsigned int mpidr_mask_lower_afflvls(unsigned long, unsigned int);
+unsigned int get_afflvl_shift(unsigned int);
+unsigned int mpidr_mask_lower_afflvls(unsigned long, unsigned int);
-extern void __dead2 eret(unsigned long, unsigned long,
- unsigned long, unsigned long,
- unsigned long, unsigned long,
- unsigned long, unsigned long);
+void __dead2 eret(unsigned long, unsigned long,
+ unsigned long, unsigned long,
+ unsigned long, unsigned long,
+ unsigned long, unsigned long);
-extern void __dead2 smc(unsigned long, unsigned long,
- unsigned long, unsigned long,
- unsigned long, unsigned long,
- unsigned long, unsigned long);
+void __dead2 smc(unsigned long, unsigned long,
+ unsigned long, unsigned long,
+ unsigned long, unsigned long,
+ unsigned long, unsigned long);
/*******************************************************************************
* System register accessor prototypes
******************************************************************************/
-extern unsigned long read_midr(void);
-extern unsigned long read_mpidr(void);
+unsigned long read_midr(void);
+unsigned long read_mpidr(void);
-extern unsigned long read_scr(void);
-extern unsigned long read_hcr(void);
+unsigned long read_scr(void);
+unsigned long read_hcr(void);
-extern unsigned long read_vbar_el1(void);
-extern unsigned long read_vbar_el2(void);
-extern unsigned long read_vbar_el3(void);
+unsigned long read_vbar_el1(void);
+unsigned long read_vbar_el2(void);
+unsigned long read_vbar_el3(void);
-extern unsigned long read_sctlr_el1(void);
-extern unsigned long read_sctlr_el2(void);
-extern unsigned long read_sctlr_el3(void);
+unsigned long read_sctlr_el1(void);
+unsigned long read_sctlr_el2(void);
+unsigned long read_sctlr_el3(void);
-extern unsigned long read_actlr_el1(void);
-extern unsigned long read_actlr_el2(void);
-extern unsigned long read_actlr_el3(void);
+unsigned long read_actlr_el1(void);
+unsigned long read_actlr_el2(void);
+unsigned long read_actlr_el3(void);
-extern unsigned long read_esr_el1(void);
-extern unsigned long read_esr_el2(void);
-extern unsigned long read_esr_el3(void);
+unsigned long read_esr_el1(void);
+unsigned long read_esr_el2(void);
+unsigned long read_esr_el3(void);
-extern unsigned long read_afsr0_el1(void);
-extern unsigned long read_afsr0_el2(void);
-extern unsigned long read_afsr0_el3(void);
+unsigned long read_afsr0_el1(void);
+unsigned long read_afsr0_el2(void);
+unsigned long read_afsr0_el3(void);
-extern unsigned long read_afsr1_el1(void);
-extern unsigned long read_afsr1_el2(void);
-extern unsigned long read_afsr1_el3(void);
+unsigned long read_afsr1_el1(void);
+unsigned long read_afsr1_el2(void);
+unsigned long read_afsr1_el3(void);
-extern unsigned long read_far_el1(void);
-extern unsigned long read_far_el2(void);
-extern unsigned long read_far_el3(void);
+unsigned long read_far_el1(void);
+unsigned long read_far_el2(void);
+unsigned long read_far_el3(void);
-extern unsigned long read_mair_el1(void);
-extern unsigned long read_mair_el2(void);
-extern unsigned long read_mair_el3(void);
+unsigned long read_mair_el1(void);
+unsigned long read_mair_el2(void);
+unsigned long read_mair_el3(void);
-extern unsigned long read_amair_el1(void);
-extern unsigned long read_amair_el2(void);
-extern unsigned long read_amair_el3(void);
+unsigned long read_amair_el1(void);
+unsigned long read_amair_el2(void);
+unsigned long read_amair_el3(void);
-extern unsigned long read_rvbar_el1(void);
-extern unsigned long read_rvbar_el2(void);
-extern unsigned long read_rvbar_el3(void);
+unsigned long read_rvbar_el1(void);
+unsigned long read_rvbar_el2(void);
+unsigned long read_rvbar_el3(void);
-extern unsigned long read_rmr_el1(void);
-extern unsigned long read_rmr_el2(void);
-extern unsigned long read_rmr_el3(void);
+unsigned long read_rmr_el1(void);
+unsigned long read_rmr_el2(void);
+unsigned long read_rmr_el3(void);
-extern unsigned long read_tcr_el1(void);
-extern unsigned long read_tcr_el2(void);
-extern unsigned long read_tcr_el3(void);
+unsigned long read_tcr_el1(void);
+unsigned long read_tcr_el2(void);
+unsigned long read_tcr_el3(void);
-extern unsigned long read_ttbr0_el1(void);
-extern unsigned long read_ttbr0_el2(void);
-extern unsigned long read_ttbr0_el3(void);
+unsigned long read_ttbr0_el1(void);
+unsigned long read_ttbr0_el2(void);
+unsigned long read_ttbr0_el3(void);
-extern unsigned long read_ttbr1_el1(void);
+unsigned long read_ttbr1_el1(void);
-extern unsigned long read_cptr_el2(void);
-extern unsigned long read_cptr_el3(void);
+unsigned long read_cptr_el2(void);
+unsigned long read_cptr_el3(void);
-extern unsigned long read_cpacr(void);
-extern unsigned long read_cpuectlr(void);
-extern unsigned int read_cntfrq_el0(void);
-extern unsigned int read_cntps_ctl_el1(void);
-extern unsigned int read_cntps_tval_el1(void);
-extern unsigned long read_cntps_cval_el1(void);
-extern unsigned long read_cntpct_el0(void);
-extern unsigned long read_cnthctl_el2(void);
+unsigned long read_cpacr(void);
+unsigned long read_cpuectlr(void);
+unsigned int read_cntfrq_el0(void);
+unsigned int read_cntps_ctl_el1(void);
+unsigned int read_cntps_tval_el1(void);
+unsigned long read_cntps_cval_el1(void);
+unsigned long read_cntpct_el0(void);
+unsigned long read_cnthctl_el2(void);
-extern unsigned long read_tpidr_el3(void);
+unsigned long read_tpidr_el3(void);
-extern void write_scr(unsigned long);
-extern void write_hcr(unsigned long);
-extern void write_cpacr(unsigned long);
-extern void write_cntfrq_el0(unsigned int);
-extern void write_cntps_ctl_el1(unsigned int);
-extern void write_cntps_tval_el1(unsigned int);
-extern void write_cntps_cval_el1(unsigned long);
-extern void write_cnthctl_el2(unsigned long);
+void write_scr(unsigned long);
+void write_hcr(unsigned long);
+void write_cpacr(unsigned long);
+void write_cntfrq_el0(unsigned int);
+void write_cntps_ctl_el1(unsigned int);
+void write_cntps_tval_el1(unsigned int);
+void write_cntps_cval_el1(unsigned long);
+void write_cnthctl_el2(unsigned long);
-extern void write_vbar_el1(unsigned long);
-extern void write_vbar_el2(unsigned long);
-extern void write_vbar_el3(unsigned long);
+void write_vbar_el1(unsigned long);
+void write_vbar_el2(unsigned long);
+void write_vbar_el3(unsigned long);
-extern void write_sctlr_el1(unsigned long);
-extern void write_sctlr_el2(unsigned long);
-extern void write_sctlr_el3(unsigned long);
+void write_sctlr_el1(unsigned long);
+void write_sctlr_el2(unsigned long);
+void write_sctlr_el3(unsigned long);
-extern void write_actlr_el1(unsigned long);
-extern void write_actlr_el2(unsigned long);
-extern void write_actlr_el3(unsigned long);
+void write_actlr_el1(unsigned long);
+void write_actlr_el2(unsigned long);
+void write_actlr_el3(unsigned long);
-extern void write_esr_el1(unsigned long);
-extern void write_esr_el2(unsigned long);
-extern void write_esr_el3(unsigned long);
+void write_esr_el1(unsigned long);
+void write_esr_el2(unsigned long);
+void write_esr_el3(unsigned long);
-extern void write_afsr0_el1(unsigned long);
-extern void write_afsr0_el2(unsigned long);
-extern void write_afsr0_el3(unsigned long);
+void write_afsr0_el1(unsigned long);
+void write_afsr0_el2(unsigned long);
+void write_afsr0_el3(unsigned long);
-extern void write_afsr1_el1(unsigned long);
-extern void write_afsr1_el2(unsigned long);
-extern void write_afsr1_el3(unsigned long);
+void write_afsr1_el1(unsigned long);
+void write_afsr1_el2(unsigned long);
+void write_afsr1_el3(unsigned long);
-extern void write_far_el1(unsigned long);
-extern void write_far_el2(unsigned long);
-extern void write_far_el3(unsigned long);
+void write_far_el1(unsigned long);
+void write_far_el2(unsigned long);
+void write_far_el3(unsigned long);
-extern void write_mair_el1(unsigned long);
-extern void write_mair_el2(unsigned long);
-extern void write_mair_el3(unsigned long);
+void write_mair_el1(unsigned long);
+void write_mair_el2(unsigned long);
+void write_mair_el3(unsigned long);
-extern void write_amair_el1(unsigned long);
-extern void write_amair_el2(unsigned long);
-extern void write_amair_el3(unsigned long);
+void write_amair_el1(unsigned long);
+void write_amair_el2(unsigned long);
+void write_amair_el3(unsigned long);
-extern void write_rmr_el1(unsigned long);
-extern void write_rmr_el2(unsigned long);
-extern void write_rmr_el3(unsigned long);
+void write_rmr_el1(unsigned long);
+void write_rmr_el2(unsigned long);
+void write_rmr_el3(unsigned long);
-extern void write_tcr_el1(unsigned long);
-extern void write_tcr_el2(unsigned long);
-extern void write_tcr_el3(unsigned long);
+void write_tcr_el1(unsigned long);
+void write_tcr_el2(unsigned long);
+void write_tcr_el3(unsigned long);
-extern void write_ttbr0_el1(unsigned long);
-extern void write_ttbr0_el2(unsigned long);
-extern void write_ttbr0_el3(unsigned long);
+void write_ttbr0_el1(unsigned long);
+void write_ttbr0_el2(unsigned long);
+void write_ttbr0_el3(unsigned long);
-extern void write_ttbr1_el1(unsigned long);
+void write_ttbr1_el1(unsigned long);
-extern void write_cpuectlr(unsigned long);
-extern void write_cptr_el2(unsigned long);
-extern void write_cptr_el3(unsigned long);
+void write_cpuectlr(unsigned long);
+void write_cptr_el2(unsigned long);
+void write_cptr_el3(unsigned long);
-extern void write_tpidr_el3(unsigned long);
+void write_tpidr_el3(unsigned long);
#define IS_IN_EL(x) \
(GET_EL(read_current_el()) == MODE_EL##x)
diff --git a/include/lib/aarch64/xlat_tables.h b/include/lib/aarch64/xlat_tables.h
index d7e1c60..a500f03 100644
--- a/include/lib/aarch64/xlat_tables.h
+++ b/include/lib/aarch64/xlat_tables.h
@@ -60,11 +60,11 @@
mmap_attr_t attr;
} mmap_region_t;
-extern void mmap_add_region(unsigned long base, unsigned long size,
- unsigned attr);
-extern void mmap_add(const mmap_region_t *mm);
+void mmap_add_region(unsigned long base, unsigned long size,
+ unsigned attr);
+void mmap_add(const mmap_region_t *mm);
-extern void init_xlat_tables(void);
+void init_xlat_tables(void);
extern uint64_t l1_xlation_table[];
diff --git a/include/lib/mmio.h b/include/lib/mmio.h
index d3c2cae..5d33c59 100644
--- a/include/lib/mmio.h
+++ b/include/lib/mmio.h
@@ -33,13 +33,13 @@
#include <stdint.h>
-extern void mmio_write_8(uintptr_t addr, uint8_t value);
-extern uint8_t mmio_read_8(uintptr_t addr);
+void mmio_write_8(uintptr_t addr, uint8_t value);
+uint8_t mmio_read_8(uintptr_t addr);
-extern void mmio_write_32(uintptr_t addr, uint32_t value);
-extern uint32_t mmio_read_32(uintptr_t addr);
+void mmio_write_32(uintptr_t addr, uint32_t value);
+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);
+void mmio_write_64(uintptr_t addr, uint64_t value);
+uint64_t mmio_read_64(uintptr_t addr);
#endif /* __MMIO_H__ */