diff options
author | Roberto Vargas <roberto.vargas@arm.com> | 2018-02-12 12:36:17 +0000 |
---|---|---|
committer | Roberto Vargas <roberto.vargas@arm.com> | 2018-02-28 17:18:46 +0000 |
commit | 7fabe1a89903cab4919304faa085ee6eaaec5c9d (patch) | |
tree | 140db3931433edf3ac1724eef7db426614afa42a /include | |
parent | 9fb8af33c40f21becde99fc15db73b1f4d82059c (diff) |
Fix MISRA rule 8.4 in common code
Rule 8.4: A compatible declaration shall be visible when
an object or function with external linkage is defined.
Change-Id: I26e042cb251a6f9590afa1340fdac73e42f23979
Signed-off-by: Roberto Vargas <roberto.vargas@arm.com>
Diffstat (limited to 'include')
-rw-r--r-- | include/bl1/bl1.h | 20 | ||||
-rw-r--r-- | include/bl2/bl2.h | 12 | ||||
-rw-r--r-- | include/bl2u/bl2u.h | 12 | ||||
-rw-r--r-- | include/bl31/bl31.h | 2 | ||||
-rw-r--r-- | include/common/runtime_svc.h | 4 | ||||
-rw-r--r-- | include/lib/cpus/errata_report.h | 5 | ||||
-rw-r--r-- | include/lib/el3_runtime/cpu_data.h | 4 | ||||
-rw-r--r-- | include/lib/el3_runtime/pubsub.h | 7 | ||||
-rw-r--r-- | include/plat/common/platform.h | 2 |
9 files changed, 63 insertions, 5 deletions
diff --git a/include/bl1/bl1.h b/include/bl1/bl1.h index b0421007..41d436de 100644 --- a/include/bl1/bl1.h +++ b/include/bl1/bl1.h @@ -64,6 +64,26 @@ #ifndef __ASSEMBLY__ #include <cassert.h> +struct entry_point_info; + +register_t bl1_smc_wrapper(uint32_t smc_fid, + void *cookie, + void *handle, + unsigned int flags); + +register_t bl1_smc_handler(unsigned int smc_fid, + register_t x1, + register_t x2, + register_t x3, + register_t x4, + void *cookie, + void *handle, + unsigned int flags); + +void bl1_print_next_bl_ep_info(const struct entry_point_info *bl_ep_info); + +void bl1_main(void); + /* * Check if the total number of FWU SMC calls are as expected. */ diff --git a/include/bl2/bl2.h b/include/bl2/bl2.h new file mode 100644 index 00000000..89ff06ea --- /dev/null +++ b/include/bl2/bl2.h @@ -0,0 +1,12 @@ +/* + * Copyright (c) 2018, ARM Limited and Contributors. All rights reserved. + * + * SPDX-License-Identifier: BSD-3-Clause + */ + +#ifndef BL2_H__ +#define BL2_H__ + +void bl2_main(void); + +#endif /* BL2_H__ */ diff --git a/include/bl2u/bl2u.h b/include/bl2u/bl2u.h new file mode 100644 index 00000000..7017b3ac --- /dev/null +++ b/include/bl2u/bl2u.h @@ -0,0 +1,12 @@ +/* + * Copyright (c) 2018, ARM Limited and Contributors. All rights reserved. + * + * SPDX-License-Identifier: BSD-3-Clause + */ + +#ifndef BL2_H__ +#define BL2_H__ + +void bl2u_main(void); + +#endif /* BL2_H__ */ diff --git a/include/bl31/bl31.h b/include/bl31/bl31.h index aac6e289..7c35922c 100644 --- a/include/bl31/bl31.h +++ b/include/bl31/bl31.h @@ -18,5 +18,7 @@ uint32_t bl31_get_next_image_type(void); void bl31_prepare_next_image_entry(void); void bl31_register_bl32_init(int32_t (*func)(void)); void bl31_warm_entrypoint(void); +void bl31_main(void); +void bl31_lib_init(void); #endif /* __BL31_H__ */ diff --git a/include/common/runtime_svc.h b/include/common/runtime_svc.h index e179e4ba..6150b322 100644 --- a/include/common/runtime_svc.h +++ b/include/common/runtime_svc.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 2013-2016, ARM Limited and Contributors. All rights reserved. + * Copyright (c) 2013-2018, ARM Limited and Contributors. All rights reserved. * * SPDX-License-Identifier: BSD-3-Clause */ @@ -126,5 +126,7 @@ extern uintptr_t __RT_SVC_DESCS_START__; extern uintptr_t __RT_SVC_DESCS_END__; void init_crash_reporting(void); +extern uint8_t rt_svc_descs_indices[MAX_RT_SVCS]; + #endif /*__ASSEMBLY__*/ #endif /* __RUNTIME_SVC_H__ */ diff --git a/include/lib/cpus/errata_report.h b/include/lib/cpus/errata_report.h index 14f24073..d2138bf5 100644 --- a/include/lib/cpus/errata_report.h +++ b/include/lib/cpus/errata_report.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 2017, ARM Limited and Contributors. All rights reserved. + * Copyright (c) 2017-2018, ARM Limited and Contributors. All rights reserved. * * SPDX-License-Identifier: BSD-3-Clause */ @@ -20,6 +20,9 @@ void print_errata_status(void); static inline void print_errata_status(void) {} #endif +void errata_print_msg(unsigned int status, const char *cpu, const char *id); +int errata_needs_reporting(spinlock_t *lock, uint32_t *reported); + #endif /* __ASSEMBLY__ */ /* Errata status */ diff --git a/include/lib/el3_runtime/cpu_data.h b/include/lib/el3_runtime/cpu_data.h index 3f48de5e..15d34ebf 100644 --- a/include/lib/el3_runtime/cpu_data.h +++ b/include/lib/el3_runtime/cpu_data.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014-2017, ARM Limited and Contributors. All rights reserved. + * Copyright (c) 2014-2018, ARM Limited and Contributors. All rights reserved. * * SPDX-License-Identifier: BSD-3-Clause */ @@ -102,6 +102,8 @@ typedef struct cpu_data { #endif } __aligned(CACHE_WRITEBACK_GRANULE) cpu_data_t; +extern cpu_data_t percpu_data[PLATFORM_CORE_COUNT]; + #if CRASH_REPORTING /* verify assembler offsets match data structures */ CASSERT(CPU_DATA_CRASH_BUF_OFFSET == __builtin_offsetof diff --git a/include/lib/el3_runtime/pubsub.h b/include/lib/el3_runtime/pubsub.h index 9a854808..2c8a1967 100644 --- a/include/lib/el3_runtime/pubsub.h +++ b/include/lib/el3_runtime/pubsub.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 2017, ARM Limited and Contributors. All rights reserved. + * Copyright (c) 2017-2018, ARM Limited and Contributors. All rights reserved. * * SPDX-License-Identifier: BSD-3-Clause */ @@ -49,9 +49,12 @@ * Have the function func called back when the specified event happens. This * macro places the function address into the pubsub section, which is picked up * and invoked by the invoke_pubsubs() function via. the PUBLISH_EVENT* macros. + * + * The extern declaration is there to satisfy MISRA C-2012 rule 8.4. */ #define SUBSCRIBE_TO_EVENT(event, func) \ - pubsub_cb_t __cb_func_##func##event __pubsub_section(event) = func + extern pubsub_cb_t __cb_func_##func##event __pubsub_section(event); \ + pubsub_cb_t __cb_func_##func##event __pubsub_section(event) = (func) /* * Iterate over subscribed handlers for a defined event. 'event' is the name of diff --git a/include/plat/common/platform.h b/include/plat/common/platform.h index e614cdb9..aa181c82 100644 --- a/include/plat/common/platform.h +++ b/include/plat/common/platform.h @@ -386,12 +386,14 @@ int platform_setup_pm(const plat_pm_ops_t **); unsigned int plat_get_aff_count(unsigned int, unsigned long); unsigned int plat_get_aff_state(unsigned int, unsigned long); + #else /* __ENABLE_PLAT_COMPAT__ */ /* * The below function enable Trusted Firmware components like SPDs which * haven't migrated to the new platform API to compile on platforms which * have the compatibility layer disabled. */ +unsigned int platform_core_pos_helper(unsigned long mpidr); unsigned int platform_get_core_pos(unsigned long mpidr) __deprecated; #endif /* __ENABLE_PLAT_COMPAT__ */ |