mirror of
https://github.com/ARM-software/arm-trusted-firmware.git
synced 2025-04-17 10:04:26 +00:00
![]() Errata implementation involves adding a lot of boilerplate to random places with just conventions on how to do them. Copy pasting is the usual method for doing this. The result is an error-prone and verbose patch that is a nightmare to get through review. Errata workarounds have a very large degree of similarity - most of them involve setting a bit at reset. As such most of the boilerplate is not strictly necessary. To solve this, add a collection of assembly macros to wrap errata implementations such that only the actual mitigations need to be written. A new erratum mitigation looks something like: workaround_reset_start cortex_a77, ERRATUM(1925769), ERRATA_A77_1925769 sysreg_bit_set CORTEX_A77_CPUECTLR_EL1, CORTEX_A77_CPUECTLR_EL1_BIT_8 workaround_reset_end cortex_a77, ERRATUM(1925769) check_erratum_ls cortex_a77, ERRATUM(1925769), CPU_REV(1, 1) Note, that the long comment on every mitigation is missing. This is on purpose, as this new format includes all of its contents into an easily readable format. The workaround wrappers add an erratum entry (24 bytes) to a per-cpu data structure which can then be read by a standard reset function to apply all errata automatically. This has the added benefit of collecting all errata TF-A knows about in a central way, which was previously missing. This can then be used at runtime with the errata ABI. If an erratum doesn't fit this standard definition (eg. the CVE_2022_23960), it can progressively be unwrapped to the old convention. The only differences are that the naming format is slightly more verbose and a call to add_erratum_entry is needed to inform the framework about the errata. Finally, the internal workaround names change a tiny bit, especially CVEs. Signed-off-by: Boyan Karatotev <boyan.karatotev@arm.com> Change-Id: Iac644f85dcf85b8279b25e83baf1e7d08b253b16 |
||
---|---|---|
.. | ||
a64fx.h | ||
aem_generic.h | ||
cortex_a35.h | ||
cortex_a53.h | ||
cortex_a55.h | ||
cortex_a57.h | ||
cortex_a65.h | ||
cortex_a65ae.h | ||
cortex_a72.h | ||
cortex_a73.h | ||
cortex_a75.h | ||
cortex_a76.h | ||
cortex_a76ae.h | ||
cortex_a77.h | ||
cortex_a78.h | ||
cortex_a78_ae.h | ||
cortex_a78c.h | ||
cortex_a510.h | ||
cortex_a710.h | ||
cortex_blackhawk.h | ||
cortex_chaberton.h | ||
cortex_hayes.h | ||
cortex_hunter.h | ||
cortex_hunter_elp_arm.h | ||
cortex_makalu.h | ||
cortex_x1.h | ||
cortex_x2.h | ||
cortex_x3.h | ||
cpu_macros.S | ||
cpuamu.h | ||
denver.h | ||
dsu_def.h | ||
generic.h | ||
neoverse_e1.h | ||
neoverse_n1.h | ||
neoverse_n2.h | ||
neoverse_n_common.h | ||
neoverse_poseidon.h | ||
neoverse_v1.h | ||
neoverse_v2.h | ||
qemu_max.h | ||
rainier.h |