| 3f4c1e1e | 27-Jan-2023 |
Boyan Karatotev <boyan.karatotev@arm.com> |
feat(cpus): add a concise way to implement AArch64 errata
Errata implementation involves adding a lot of boilerplate to random places with just conventions on how to do them. Copy pasting is the usu
feat(cpus): add a concise way to implement AArch64 errata
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
show more ...
|
| dd9fae1c | 25-Jan-2023 |
Boyan Karatotev <boyan.karatotev@arm.com> |
refactor(cpus): convert print_errata_status to C
The function is called in a fully initialised C environment and calls into other C functions. The Aarch differences are minimal and are hidden by the
refactor(cpus): convert print_errata_status to C
The function is called in a fully initialised C environment and calls into other C functions. The Aarch differences are minimal and are hidden by the pre-existing headers. Converting it results into cleaner code that is the same across both Aarch64 and Aarch32.
To avoid having to do very ugly pointer arithmetic, define a C struct for the cpu_ops for both Aarch64 and Aarch32.
Signed-off-by: Boyan Karatotev <boyan.karatotev@arm.com> Change-Id: Idc07c4064e03143c88a4a0e2d10ceda70ba19a50
show more ...
|
| 6bb96fa6 | 27-Jan-2023 |
Boyan Karatotev <boyan.karatotev@arm.com> |
refactor(cpus): rename errata_report.h to errata.h
The ERRATA_XXX macros, used in cpu_helpers.S, are necessary for the check_errata_xxx family of functions. The CPU_REV should be used in the cpu fil
refactor(cpus): rename errata_report.h to errata.h
The ERRATA_XXX macros, used in cpu_helpers.S, are necessary for the check_errata_xxx family of functions. The CPU_REV should be used in the cpu files but for whatever reason the values have been hard-coded so far (at the cost of readability). It's evident this file is not strictly for status reporting.
The new purpose of this file is to make it a one-stop-shop for all things errata.
Signed-off-by: Boyan Karatotev <boyan.karatotev@arm.com> Change-Id: I1ce22dd36df5aa0bcfc5f2772251f91af8703dfb
show more ...
|
| 6578343b | 13-Mar-2023 |
Govindraj Raja <govindraj.raja@arm.com> |
feat(cpus): add support for blackhawk cpu
Add basic CPU library code to support the Blackhawk CPU, BlackHawk core is based out of Hunter ELP core, so overall library code was adapted based on that.
feat(cpus): add support for blackhawk cpu
Add basic CPU library code to support the Blackhawk CPU, BlackHawk core is based out of Hunter ELP core, so overall library code was adapted based on that.
Change-Id: I4750e774732218ee669dceb734cd107f46b78492 Signed-off-by: Govindraj Raja <govindraj.raja@arm.com>
show more ...
|
| 5668db72 | 12-Jan-2023 |
Andrew Davis <afd@ti.com> |
feat(ti): set snoop-delayed exclusive handling on A72 cores
Snoop requests should not be responded to during atomic operations. This can be handled by the interconnect using its global monitor or by
feat(ti): set snoop-delayed exclusive handling on A72 cores
Snoop requests should not be responded to during atomic operations. This can be handled by the interconnect using its global monitor or by the core's SCU delaying to check for the corresponding atomic monitor state.
TI SoCs take the second approach. Set the snoop-delayed exclusive handling bit to inform the core it needs to delay responses to perform this check.
As J784s4 is currently the only SoC with multiple A72 clusters, limit this delay to only that device.
Signed-off-by: Andrew Davis <afd@ti.com> Change-Id: I875f64e4f53d47a9a0ccbf3415edc565be7f84d9
show more ...
|
| 81858a35 | 10-Jan-2023 |
Andrew Davis <afd@ti.com> |
feat(ti): set L2 cache ECC and and parity on A72 cores
The Cortex-A72 based cores on K3 platforms have cache ECC and parity protection, enable these.
Signed-off-by: Andrew Davis <afd@ti.com> Change
feat(ti): set L2 cache ECC and and parity on A72 cores
The Cortex-A72 based cores on K3 platforms have cache ECC and parity protection, enable these.
Signed-off-by: Andrew Davis <afd@ti.com> Change-Id: Icd00bc4aa9c1c48f0fb2a10ea66e75e0b146ef3c
show more ...
|
| 888eafa0 | 03-Oct-2022 |
Boyan Karatotev <boyan.karatotev@arm.com> |
fix(cpus): workaround for Cortex-A710 erratum 2291219
Cortex-A710 erratum 2291219 is a Cat B erratum that applies to revisions r0p0, r1p0, and r2p0, and is fixed in r2p1. The workaround is to set CP
fix(cpus): workaround for Cortex-A710 erratum 2291219
Cortex-A710 erratum 2291219 is a Cat B erratum that applies to revisions r0p0, r1p0, and r2p0, and is fixed in r2p1. The workaround is to set CPUACTLR2_EL1[36] to 1 before the power down sequence that sets CORE_PWRDN_EN. This allows the cpu to retry the power down and prevents the deadlock. TF-A never clears this bit even if it wakes up from the wfi in the sequence since it is not expected to do anything but retry to power down after and the bit is cleared on reset.
SDEN can be found here: https://developer.arm.com/documentation/SDEN1775101/latest
Signed-off-by: Boyan Karatotev <boyan.karatotev@arm.com> Change-Id: I7d3a97dfac0c433c0be386c1f3d2f2e895a3f691
show more ...
|
| 79544126 | 03-Oct-2022 |
Boyan Karatotev <boyan.karatotev@arm.com> |
fix(cpus): workaround for Cortex-X3 erratum 2313909
Cortex-X3 erratum 2313909 is a Cat B erratum that applies to revisions r0p0 and r1p0, and is fixed in r1p1. The workaround is to set CPUACTLR2_EL1
fix(cpus): workaround for Cortex-X3 erratum 2313909
Cortex-X3 erratum 2313909 is a Cat B erratum that applies to revisions r0p0 and r1p0, and is fixed in r1p1. The workaround is to set CPUACTLR2_EL1[36] to 1 before the power down sequence that sets CORE_PWRDN_EN. This allows the cpu to retry the power down and prevents the deadlock. TF-A never clears this bit even if it wakes up from the wfi in the sequence since it is not expected to do anything but retry to power down after and the bit is cleared on reset.
SDEN can be found here: https://developer.arm.com/documentation/SDEN2055130/latest
Signed-off-by: Boyan Karatotev <boyan.karatotev@arm.com> Change-Id: I5935b4bcd1e6712477c0d6eab2acc96d7964a35d
show more ...
|