mirror of
https://github.com/ARM-software/arm-trusted-firmware.git
synced 2025-04-17 01:54:22 +00:00
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
This commit is contained in:
parent
38b5f93a2b
commit
3426ed4966
1 changed files with 2 additions and 13 deletions
|
@ -77,7 +77,6 @@ void generic_errata_report(void)
|
|||
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 @@ void generic_errata_report(void)
|
|||
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 */
|
||||
}
|
||||
|
||||
/*
|
||||
|
|
Loading…
Add table
Reference in a new issue