| #
30c4248d |
| 01-Dec-2025 |
Manish Pandey <manish.pandey2@arm.com> |
Merge "fix(psci): get the cpu_ops before exiting coherency" into integration
|
| #
0ee188d0 |
| 28-Oct-2025 |
Boyan Karatotev <boyan.karatotev@arm.com> |
fix(psci): get the cpu_ops before exiting coherency
It is possible for the cpu_data structure to be cached somewhere in the cache hierarchy. When HW_ASSISTED_COHERENCY == 0 we flush the core's priva
fix(psci): get the cpu_ops before exiting coherency
It is possible for the cpu_data structure to be cached somewhere in the cache hierarchy. When HW_ASSISTED_COHERENCY == 0 we flush the core's private caches (usually the L1). However, the destination might be shared caches (eg DSU L2 cache) so when we subsequently dereference the cpu_data pointer we could get a stale value.
So dereference it prior to disabling the caches to avoid this scenario and do all accesses from a coherent view of memory.
Change-Id: If118ca8c0436dd04d6ad0d57073d69305a7f41cb Signed-off-by: Boyan Karatotev <boyan.karatotev@arm.com>
show more ...
|
| #
aabab09e |
| 01-Sep-2025 |
Manish Pandey <manish.pandey2@arm.com> |
Merge changes Id38d6f1b,I5fcfe8dd,I7f3b50e5 into integration
* changes: fix(cpus): inform the compiler that struct cpu_ops is aligned refactor(el3-runtime): move the initialisation of the cpu_op
Merge changes Id38d6f1b,I5fcfe8dd,I7f3b50e5 into integration
* changes: fix(cpus): inform the compiler that struct cpu_ops is aligned refactor(el3-runtime): move the initialisation of the cpu_ops_ptr to C fix(aarch32): make get_cpu_ops_ptr() PCS compliant
show more ...
|
| #
759ed946 |
| 13-Aug-2025 |
Boyan Karatotev <boyan.karatotev@arm.com> |
fix(cpus): inform the compiler that struct cpu_ops is aligned
The only way to access a cpu_ops structure is through a pointer returned from assembly so the compiler can't know its alignment and it m
fix(cpus): inform the compiler that struct cpu_ops is aligned
The only way to access a cpu_ops structure is through a pointer returned from assembly so the compiler can't know its alignment and it must assume the worst. As a result, it's scared to do 64 bit loads and must do 8 single byte loads that it then can combine together.
Well, the cpu assembly macros take care to align the cpu_ops entries to a word boundary so we can propagate that information to the structure definition as well and removed the compiler's paranoia.
Change-Id: Id38d6f1b92527b8a414cfbb856a5a82c76a1b1a8 Signed-off-by: Boyan Karatotev <boyan.karatotev@arm.com>
show more ...
|
| #
35b2bbf4 |
| 28-Jul-2025 |
Manish Pandey <manish.pandey2@arm.com> |
Merge changes from topic "bk/pabandon_cleanup" into integration
* changes: feat(cpus): add pabandon support to the Alto cpu feat(psci): optimise clock init on a pabandon feat(psci): check that
Merge changes from topic "bk/pabandon_cleanup" into integration
* changes: feat(cpus): add pabandon support to the Alto cpu feat(psci): optimise clock init on a pabandon feat(psci): check that CPUs handled a pabandon feat(psci): make pabandon support generic refactor(psci): unify coherency exit between AArch64 and AArch32 refactor(psci): absorb psci_power_down_wfi() into common code refactor(platforms): remove usage of psci_power_down_wfi fix(cm): disable SPE/TRBE correctly
show more ...
|
| #
461b62b5 |
| 25-Mar-2025 |
Boyan Karatotev <boyan.karatotev@arm.com> |
feat(psci): check that CPUs handled a pabandon
Up to now PSCI assumed that if a pabandon happened then the CPU driver will have handled it. This patch adds a simple protocol to make sure that this i
feat(psci): check that CPUs handled a pabandon
Up to now PSCI assumed that if a pabandon happened then the CPU driver will have handled it. This patch adds a simple protocol to make sure that this is indeed the case. The chosen method is with a return value that is highly unlikely on cores that are unaware of pabandon (x0 will be primed with 1 and if used should be overwritten with the value of CPUPWRCTLR_EL1 which should have its last bit set to power off and its top bits RES0; the ACK value is chosen to be the exact opposite). An alternative method would have been to add a field in cpu_ops, however that would have required more major refactoring across many cpus and would have taken up more memory on older platforms, so it was not chosen.
Change-Id: I5826c0e4802e104d295c4ecbd80b5f676d2cd871 Signed-off-by: Boyan Karatotev <boyan.karatotev@arm.com>
show more ...
|
| #
a6e01071 |
| 24-Apr-2025 |
Govindraj Raja <govindraj.raja@arm.com> |
Merge changes from topic "ar/cve_wa_refactor" into integration
* changes: refactor(cpus): optimize CVE checking refactor(cpus): move errata check to common code refactor(cpus): drop unused arg
Merge changes from topic "ar/cve_wa_refactor" into integration
* changes: refactor(cpus): optimize CVE checking refactor(cpus): move errata check to common code refactor(cpus): drop unused argument forward_flag
show more ...
|
| #
fd04156e |
| 04-Apr-2025 |
Arvind Ram Prakash <arvind.ramprakash@arm.com> |
refactor(cpus): optimize CVE checking
This patch replaces the use of EXTRA functions with using erratum entries check to verify CVE mitigation application for some of the SMCCC_ARCH_WORKAROUND_* cal
refactor(cpus): optimize CVE checking
This patch replaces the use of EXTRA functions with using erratum entries check to verify CVE mitigation application for some of the SMCCC_ARCH_WORKAROUND_* calls.
Previously, EXTRA functions were individually implemented for each SMCCC_ARCH_WORKAROUND_*, an approach that becomes unmanageable with the increasing number of workarounds. By looking up erratum entries for CVE check, the process is streamlined, reducing overhead associated with creating and maintaining EXTRA functions for each new workaround.
New Errata entries are created for SMC workarounds and that is used to target cpus that are uniquely impacted by SMC workarounds.
Signed-off-by: Arvind Ram Prakash <arvind.ramprakash@arm.com> Change-Id: I873534e367a35c99461d0a616ff7bf856a0000af
show more ...
|
| #
a8a5d39d |
| 24-Feb-2025 |
Manish V Badarkhe <manish.badarkhe@arm.com> |
Merge changes from topic "bk/errata_speed" into integration
* changes: refactor(cpus): declare runtime errata correctly perf(cpus): make reset errata do fewer branches perf(cpus): inline the i
Merge changes from topic "bk/errata_speed" into integration
* changes: refactor(cpus): declare runtime errata correctly perf(cpus): make reset errata do fewer branches perf(cpus): inline the init_cpu_data_ptr function perf(cpus): inline the reset function perf(cpus): inline the cpu_get_rev_var call perf(cpus): inline cpu_rev_var checks refactor(cpus): register DSU errata with the errata framework's wrappers refactor(cpus): convert checker functions to standard helpers refactor(cpus): convert the Cortex-A65 to use the errata framework fix(cpus): declare reset errata correctly
show more ...
|
| #
0d020822 |
| 19-Nov-2024 |
Boyan Karatotev <boyan.karatotev@arm.com> |
perf(cpus): inline the reset function
Similar to the cpu_rev_var and cpu_ger_rev_var functions, inline the call_reset_handler handler. This way we skip the costly branch at no extra cost as this is
perf(cpus): inline the reset function
Similar to the cpu_rev_var and cpu_ger_rev_var functions, inline the call_reset_handler handler. This way we skip the costly branch at no extra cost as this is the only place where this is called.
While we're at it, drop the options for CPU_NO_RESET_FUNC. The only cpus that need that are virtual cpus which can spare the tiny bit of performance lost. The rest are real cores which can save on the check for zero.
Now is a good time to put the assert for a missing cpu in the get_cpu_ops_ptr function so that it's a bit better encapsulated.
Change-Id: Ia7c3dcd13b75e5d7c8bafad4698994ea65f42406 Signed-off-by: Boyan Karatotev <boyan.karatotev@arm.com>
show more ...
|
| #
1f2c58b1 |
| 31-Jan-2025 |
Bipin Ravi <bipin.ravi@arm.com> |
Merge changes from topic "ar/smccc_arch_wa_4" into integration
* changes: fix(security): apply SMCCC_ARCH_WORKAROUND_4 to affected cpus fix(security): add support in cpu_ops for CVE-2024-7881
Merge changes from topic "ar/smccc_arch_wa_4" into integration
* changes: fix(security): apply SMCCC_ARCH_WORKAROUND_4 to affected cpus fix(security): add support in cpu_ops for CVE-2024-7881 fix(security): add CVE-2024-7881 mitigation to Cortex-X3 fix(security): add CVE-2024-7881 mitigation to Neoverse-V3 fix(security): add CVE-2024-7881 mitigation to Neoverse-V2 fix(security): add CVE-2024-7881 mitigation to Cortex-X925 fix(security): add CVE-2024-7881 mitigation to Cortex-X4 fix(security): enable WORKAROUND_CVE_2024_7881 build option
show more ...
|
| #
4caef42a |
| 16-Sep-2024 |
Arvind Ram Prakash <arvind.ramprakash@arm.com> |
fix(security): add support in cpu_ops for CVE-2024-7881
This patch adds new cpu ops function extra4 and a new macro for CVE-2024-7881 [1]. This new macro declare_cpu_ops_wa_4 allows support for new
fix(security): add support in cpu_ops for CVE-2024-7881
This patch adds new cpu ops function extra4 and a new macro for CVE-2024-7881 [1]. This new macro declare_cpu_ops_wa_4 allows support for new CVE check function.
[1]: https://developer.arm.com/Arm%20Security%20Center/Arm%20CPU%20Vulnerability%20CVE-2024-7881
Signed-off-by: Arvind Ram Prakash <arvind.ramprakash@arm.com> Change-Id: I417389f040c6ead7f96f9b720d29061833f43d37
show more ...
|
| #
cc4f3838 |
| 27-Aug-2024 |
Manish V Badarkhe <manish.badarkhe@arm.com> |
Merge changes from topic "clean-up-errata-compatibility" into integration
* changes: refactor(cpus): remove cpu specific errata funcs refactor(cpus): directly invoke errata reporter
|
| #
3fb52e41 |
| 14-May-2024 |
Ryan Everett <ryan.everett@arm.com> |
refactor(cpus): remove cpu specific errata funcs
Errata printing is done directly via generic_errata_report. This commit removes the unused \_cpu\()_errata_report functions for all cores, and remove
refactor(cpus): remove cpu specific errata funcs
Errata printing is done directly via generic_errata_report. This commit removes the unused \_cpu\()_errata_report functions for all cores, and removes errata_func from cpu_ops.
Change-Id: I04fefbde5f0ff63b1f1cd17c864557a14070d68c Signed-off-by: Ryan Everett <ryan.everett@arm.com>
show more ...
|
| #
0cfa06b2 |
| 31-May-2023 |
Lauren Wehrmeister <lauren.wehrmeister@arm.com> |
Merge changes from topic "bk/errata_refactor" into integration
* changes: feat(cpus): wrappers to propagate AArch32 errata info feat(cpus): add a way to automatically report errata feat(cpus):
Merge changes from topic "bk/errata_refactor" into integration
* changes: feat(cpus): wrappers to propagate AArch32 errata info feat(cpus): add a way to automatically report errata feat(cpus): add a concise way to implement AArch64 errata refactor(cpus): convert print_errata_status to C refactor(cpus): rename errata_report.h to errata.h refactor(cpus): move cpu_ops field defines to a header
show more ...
|
| #
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 ...
|
| #
007433d8 |
| 25-Jan-2023 |
Boyan Karatotev <boyan.karatotev@arm.com> |
refactor(cpus): move cpu_ops field defines to a header
The cpu_macros.S file is loaded with lots of definitions for the cpu_ops structure. However, since they are defined as .equ directives they are
refactor(cpus): move cpu_ops field defines to a header
The cpu_macros.S file is loaded with lots of definitions for the cpu_ops structure. However, since they are defined as .equ directives they are inaccessible for C code. Convert them to #defines, put them into order, refactor them for readability, and extract them to a separate file to make this possible.
This has the benefit of removing some Aarch differences and a lot of duplicate code.
Signed-off-by: Boyan Karatotev <boyan.karatotev@arm.com> Change-Id: I72861794b6c9131285a9297d5918822ed718b228
show more ...
|