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