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:19:55 +0000 |
commit | 1af540ef2a09797c3a22c40c340facd4b2f47c2f (patch) | |
tree | a36750064472fc321e69f8b1b497158277776187 /include | |
parent | dc6aad2e133829ee4c7bb9d2ba87c43f668f2acb (diff) |
Fix MISRA rule 8.4 Part 1
Rule 8.4: A compatible declaration shall be visible when
an object or function with external linkage is defined
Fixed for:
make DEBUG=1 PLAT=fvp LOG_LEVEL=50 all
Change-Id: I7c2ad3f5c015411c202605851240d5347e4cc8c7
Signed-off-by: Roberto Vargas <roberto.vargas@arm.com>
Diffstat (limited to 'include')
-rw-r--r-- | include/bl1/bl1.h | 1 | ||||
-rw-r--r-- | include/bl2/bl2.h | 3 | ||||
-rw-r--r-- | include/common/bl_common.h | 2 | ||||
-rw-r--r-- | include/common/desc_image_load.h | 5 | ||||
-rw-r--r-- | include/lib/pmf/pmf_helpers.h | 19 | ||||
-rw-r--r-- | include/plat/arm/common/plat_arm.h | 4 |
6 files changed, 31 insertions, 3 deletions
diff --git a/include/bl1/bl1.h b/include/bl1/bl1.h index 41d436de..dd03de05 100644 --- a/include/bl1/bl1.h +++ b/include/bl1/bl1.h @@ -83,6 +83,7 @@ register_t bl1_smc_handler(unsigned int smc_fid, void bl1_print_next_bl_ep_info(const struct entry_point_info *bl_ep_info); void bl1_main(void); +void bl1_plat_prepare_exit(entry_point_info_t *ep_info); /* * Check if the total number of FWU SMC calls are as expected. diff --git a/include/bl2/bl2.h b/include/bl2/bl2.h index 89ff06ea..f2bd07ef 100644 --- a/include/bl2/bl2.h +++ b/include/bl2/bl2.h @@ -7,6 +7,9 @@ #ifndef BL2_H__ #define BL2_H__ +struct entry_point_info; + void bl2_main(void); +struct entry_point_info *bl2_load_images(void); #endif /* BL2_H__ */ diff --git a/include/common/bl_common.h b/include/common/bl_common.h index 65718301..4ef916f5 100644 --- a/include/common/bl_common.h +++ b/include/common/bl_common.h @@ -210,7 +210,6 @@ int load_auth_image(unsigned int image_id, image_info_t *image_data); #else -uintptr_t page_align(uintptr_t value, unsigned dir); int load_image(meminfo_t *mem_layout, unsigned int image_id, uintptr_t image_base, @@ -230,6 +229,7 @@ extern const char build_message[]; extern const char version_string[]; void print_entry_point_info(const entry_point_info_t *ep_info); +uintptr_t page_align(uintptr_t value, unsigned dir); #endif /*__ASSEMBLY__*/ diff --git a/include/common/desc_image_load.h b/include/common/desc_image_load.h index f183db50..73aa27cc 100644 --- a/include/common/desc_image_load.h +++ b/include/common/desc_image_load.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 2016, ARM Limited and Contributors. All rights reserved. + * Copyright (c) 2016-2018, ARM Limited and Contributors. All rights reserved. * * SPDX-License-Identifier: BSD-3-Clause */ @@ -19,6 +19,9 @@ typedef struct bl_mem_params_node { bl_params_node_t params_node_mem; } bl_mem_params_node_t; +extern bl_mem_params_node_t *bl_mem_params_desc_ptr; +extern unsigned int bl_mem_params_desc_num; + /* * Macro to register list of BL image descriptors, * defined as an array of bl_mem_params_node_t. diff --git a/include/lib/pmf/pmf_helpers.h b/include/lib/pmf/pmf_helpers.h index 9984d691..829ad6cc 100644 --- a/include/lib/pmf/pmf_helpers.h +++ b/include/lib/pmf/pmf_helpers.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 2016, ARM Limited and Contributors. All rights reserved. + * Copyright (c) 2016-2018, ARM Limited and Contributors. All rights reserved. * * SPDX-License-Identifier: BSD-3-Clause */ @@ -45,8 +45,11 @@ typedef struct pmf_svc_desc { /* * Convenience macro to allocate memory for a PMF service. + * + * The extern declaration is there to satisfy MISRA C-2012 rule 8.4. */ #define PMF_ALLOCATE_TIMESTAMP_MEMORY(_name, _total_id) \ + extern unsigned long long pmf_ts_mem_ ## _name[_total_id]; \ unsigned long long pmf_ts_mem_ ## _name[_total_id] \ __aligned(CACHE_WRITEBACK_GRANULE) \ __section("pmf_timestamp_array") \ @@ -60,10 +63,15 @@ typedef struct pmf_svc_desc { /* * Convenience macros for capturing time-stamp. + * + * The extern declaration is there to satisfy MISRA C-2012 rule 8.4. */ #define PMF_DEFINE_CAPTURE_TIMESTAMP(_name, _flags) \ void pmf_capture_timestamp_ ## _name( \ unsigned int tid, \ + unsigned long long ts); \ + void pmf_capture_timestamp_ ## _name( \ + unsigned int tid, \ unsigned long long ts) \ { \ CASSERT(_flags, select_proper_config); \ @@ -76,6 +84,9 @@ typedef struct pmf_svc_desc { } \ void pmf_capture_timestamp_with_cache_maint_ ## _name( \ unsigned int tid, \ + unsigned long long ts); \ + void pmf_capture_timestamp_with_cache_maint_ ## _name( \ + unsigned int tid, \ unsigned long long ts) \ { \ CASSERT(_flags, select_proper_config); \ @@ -89,9 +100,13 @@ typedef struct pmf_svc_desc { /* * Convenience macros for retrieving time-stamp. + * + * The extern declaration is there to satisfy MISRA C-2012 rule 8.4. */ #define PMF_DEFINE_GET_TIMESTAMP(_name) \ unsigned long long pmf_get_timestamp_by_index_ ## _name( \ + unsigned int tid, unsigned int cpuid, unsigned int flags);\ + unsigned long long pmf_get_timestamp_by_index_ ## _name( \ unsigned int tid, unsigned int cpuid, unsigned int flags)\ { \ PMF_VALIDATE_TID(_name, tid); \ @@ -99,6 +114,8 @@ typedef struct pmf_svc_desc { return __pmf_get_timestamp(base_addr, tid, cpuid, flags);\ } \ unsigned long long pmf_get_timestamp_by_mpidr_ ## _name( \ + unsigned int tid, u_register_t mpidr, unsigned int flags);\ + unsigned long long pmf_get_timestamp_by_mpidr_ ## _name( \ unsigned int tid, u_register_t mpidr, unsigned int flags)\ { \ PMF_VALIDATE_TID(_name, tid); \ diff --git a/include/plat/arm/common/plat_arm.h b/include/plat/arm/common/plat_arm.h index 66efe450..0a80814c 100644 --- a/include/plat/arm/common/plat_arm.h +++ b/include/plat/arm/common/plat_arm.h @@ -237,4 +237,8 @@ int arm_execution_state_switch(unsigned int smc_fid, uint32_t cookie_lo, void *handle); +/* global variables */ +extern plat_psci_ops_t plat_arm_psci_pm_ops; +extern const mmap_region_t plat_arm_mmap[]; + #endif /* __PLAT_ARM_H__ */ |