summaryrefslogtreecommitdiff
path: root/include/lib
diff options
context:
space:
mode:
authordavidcunado-arm <david.cunado@arm.com>2018-02-28 18:53:30 +0000
committerGitHub <noreply@github.com>2018-02-28 18:53:30 +0000
commit73a9605197ba04aaf02d436a2a4ad56e695b426c (patch)
tree5beb6774d0dabeffdfb6dc3753e9eb4ac2f62754 /include/lib
parentfd50c18adbdb5b7c4cfd1f4661e905b56a7676fe (diff)
parentfd116b9f6c26d7fd49c7aa0cdbfb3d93871daec3 (diff)
Merge pull request #1282 from robertovargas-arm/misra-changes
Misra changes
Diffstat (limited to 'include/lib')
-rw-r--r--include/lib/cpus/errata_report.h5
-rw-r--r--include/lib/el3_runtime/cpu_data.h4
-rw-r--r--include/lib/el3_runtime/pubsub.h7
-rw-r--r--include/lib/pmf/pmf.h4
-rw-r--r--include/lib/pmf/pmf_helpers.h19
5 files changed, 32 insertions, 7 deletions
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/lib/pmf/pmf.h b/include/lib/pmf/pmf.h
index cdff7635..a3d32263 100644
--- a/include/lib/pmf/pmf.h
+++ b/include/lib/pmf/pmf.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
*/
@@ -162,7 +162,7 @@
int pmf_get_timestamp_smc(unsigned int tid,
u_register_t mpidr,
unsigned int flags,
- unsigned long long *ts);
+ unsigned long long *ts_value);
int pmf_setup(void);
uintptr_t pmf_smc_handler(unsigned int smc_fid,
u_register_t x1,
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); \