refactor(cpus): don't panic if errata out of order
Previously we have used enclosed the Errata ordering check
within the FEATURE_DETECTION flag as this flag is only
used for development purpose and it also enforces
ordering by causing a panic when the assert fails.
A simple warning message would suffice and hence this
patch removes the assert.
The erratum and cve ordering check is planned to be implemented
in static check at which point the warning will be taken out as well.
Signed-off-by: Arvind Ram Prakash <arvind.ramprakash@arm.com>
Change-Id: I0ffc40361985281163970ea5bc81ca0269b16442
diff --git a/lib/cpus/errata_report.c b/lib/cpus/errata_report.c
index e0a9076..03d18ec 100644
--- a/lib/cpus/errata_report.c
+++ b/lib/cpus/errata_report.c
@@ -77,7 +77,6 @@
uint32_t last_erratum_id = 0;
uint16_t last_cve_yr = 0;
bool check_cve = false;
- bool failed = false;
#endif /* FEATURE_DETECTION */
for (; entry != end; entry += 1) {
@@ -100,30 +99,20 @@
if (entry->cve) {
if (last_cve_yr > entry->cve ||
(last_cve_yr == entry->cve && last_erratum_id >= entry->id)) {
- ERROR("CVE %u_%u was out of order!\n",
+ WARN("CVE %u_%u was out of order!\n",
entry->cve, entry->id);
- failed = true;
}
check_cve = true;
last_cve_yr = entry->cve;
} else {
if (last_erratum_id >= entry->id || check_cve) {
- ERROR("Erratum %u was out of order!\n",
+ WARN("Erratum %u was out of order!\n",
entry->id);
- failed = true;
}
}
last_erratum_id = entry->id;
#endif /* FEATURE_DETECTION */
}
-
-#if FEATURE_DETECTION
- /*
- * enforce errata and CVEs are in ascending order and that CVEs are
- * after errata
- */
- assert(!failed);
-#endif /* FEATURE_DETECTION */
}
/*