1 /*
2  * Copyright (c) 2017-2018, ARM Limited and Contributors. All rights reserved.
3  *
4  * SPDX-License-Identifier: BSD-3-Clause
5  */
6 
7 #ifndef ERRATA_REPORT_H
8 #define ERRATA_REPORT_H
9 
10 #ifndef __ASSEMBLER__
11 
12 #include <arch.h>
13 #include <arch_helpers.h>
14 #include <lib/spinlock.h>
15 #include <lib/utils_def.h>
16 
17 #if DEBUG
18 void print_errata_status(void);
19 #else
print_errata_status(void)20 static inline void print_errata_status(void) {}
21 #endif
22 
23 void errata_print_msg(unsigned int status, const char *cpu, const char *id);
24 int errata_needs_reporting(spinlock_t *lock, uint32_t *reported);
25 
26 #endif /* __ASSEMBLER__ */
27 
28 /* Errata status */
29 #define ERRATA_NOT_APPLIES	0
30 #define ERRATA_APPLIES		1
31 #define ERRATA_MISSING		2
32 
33 /* Macro to get CPU revision code for checking errata version compatibility. */
34 #define CPU_REV(r, p)		((r << 4) | p)
35 
36 #endif /* ERRATA_REPORT_H */
37