| #
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 ...
|
| #
022fcb48 |
| 14-Aug-2025 |
Boyan Karatotev <boyan.karatotev@arm.com> |
refactor(el3-runtime): move the initialisation of the cpu_ops_ptr to C
The difference between AArch32 and AArch64 is insignificant and the usage is identical. The only thing that required the use of
refactor(el3-runtime): move the initialisation of the cpu_ops_ptr to C
The difference between AArch32 and AArch64 is insignificant and the usage is identical. The only thing that required the use of assembly was that the get_cpu_ops_ptr() function was not PCS compliant and needed a wrapper to do that instead. That has now been fixed so move this to C so it's more readable and more optimise-able by the compiler.
Change-Id: I5fcfe8ddb122dd35d58adc6d44a7484c5c595815 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 ...
|
| #
aadb4b56 |
| 12-Mar-2025 |
Boyan Karatotev <boyan.karatotev@arm.com> |
refactor(psci): unify coherency exit between AArch64 and AArch32
The procedure is fairly simple: if we have hardware assisted coherency, call into the cpu driver and let it do its thing. If we don't
refactor(psci): unify coherency exit between AArch64 and AArch32
The procedure is fairly simple: if we have hardware assisted coherency, call into the cpu driver and let it do its thing. If we don't, then we must turn data caches off, handle the confusion that causes with the stack, and call into the cpu driver which will flush the caches that need flushing.
On AArch32 the above happens in common code. On AArch64, however, the turning off of the caches happens in the cpu driver. Since we're dealing with the stack, we must exercise control over it and implement this in assembly. But as the two implementations are nominally different (in the ordering of operations), the part that is in assembly is quite large as jumping back to C to handle the difference might involve the stack.
Presumably, the AArch difference was introduced in order to cater for a possible implementation where turning off the caches requires an IMP DEF sequence. Well, Arm no longer makes cores without hardware assisted coherency, so this eventually is not possible.
So take this part out of the cpu driver and put it into common code, just like in AArch32. With this, there is no longer a need call prepare_cpu_pwr_dwn() in a different order either - we can delay it a bit to happen after the stack management. So the two AArch-s flows become identical. We can convert prepare_cpu_pwr_dwn() to C and leave psci_do_pwrdown_cache_maintenance() only to exercise control over stack.
Change-Id: Ie4759ebe20bb74b60533c6a47dbc2b101875900f 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 ...
|
| #
36eeb59f |
| 04-Dec-2024 |
Boyan Karatotev <boyan.karatotev@arm.com> |
perf(cpus): inline the cpu_get_rev_var call
Similar to the cpu_rev_var_xy functions, branching far away so early in the reset sequence incurs significant slowdowns. Inline the function.
Change-Id:
perf(cpus): inline the cpu_get_rev_var call
Similar to the cpu_rev_var_xy functions, branching far away so early in the reset sequence incurs significant slowdowns. Inline the function.
Change-Id: Ifc349015902cd803e11a1946208141bfe7606b89 Signed-off-by: Boyan Karatotev <boyan.karatotev@arm.com>
show more ...
|
| #
7791ce21 |
| 21-Jan-2025 |
Boyan Karatotev <boyan.karatotev@arm.com> |
perf(cpus): inline cpu_rev_var checks
We strive to apply errata as close to reset as possible with as few things enabled as possible. Importantly, the I-cache will not be enabled. This means that re
perf(cpus): inline cpu_rev_var checks
We strive to apply errata as close to reset as possible with as few things enabled as possible. Importantly, the I-cache will not be enabled. This means that repeated branches to these tiny functions must be re-fetched all the way from memory each time which has glacial speed. Cores are allowed to fetch things ahead of time though as long as execution is fairly linear. So we can trade a little bit of space (3 to 7 instructions per erratum) to keep things linear and not have to go to memory.
While we're at it, optimise the the cpu_rev_var_{ls, hs, range} functions to take up less space. Dropping the moves allows for a bit of assembly magic that produces the same result in 2 and 3 instructions respectively.
Change-Id: I51608352f23b2244ea7a99e76c10892d257f12bf 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 ...
|
| #
8ae6b1ad |
| 28-Jan-2025 |
Arvind Ram Prakash <arvind.ramprakash@arm.com> |
fix(security): apply SMCCC_ARCH_WORKAROUND_4 to affected cpus
This patch implements SMCCC_ARCH_WORKAROUND_4 and allows discovery through SMCCC_ARCH_FEATURES. This mechanism is enabled if CVE_2024_78
fix(security): apply SMCCC_ARCH_WORKAROUND_4 to affected cpus
This patch implements SMCCC_ARCH_WORKAROUND_4 and allows discovery through SMCCC_ARCH_FEATURES. This mechanism is enabled if CVE_2024_7881 [1] is enabled by the platform. If CVE_2024_7881 mitigation is implemented, the discovery call returns 0, if not -1 (SMC_ARCH_CALL_NOT_SUPPORTED).
For more information about SMCCC_ARCH_WORKAROUND_4 [2], please refer to the SMCCC Specification reference provided below.
[1]: https://developer.arm.com/Arm%20Security%20Center/Arm%20CPU%20Vulnerability%20CVE-2024-7881 [2]: https://developer.arm.com/documentation/den0028/latest
Signed-off-by: Arvind Ram Prakash <arvind.ramprakash@arm.com> Change-Id: I1b1ffaa1f806f07472fd79d5525f81764d99bc79
show more ...
|
| #
2c746960 |
| 03-May-2024 |
Manish Pandey <manish.pandey2@arm.com> |
Merge changes I9eba2e34,Iab2a2a2f into integration
* changes: refactor(cpus): replace adr with adr_l refactor(build): introduce adr_l macro
|
| #
a5c4212f |
| 21-Feb-2024 |
Hsin-Hsiung Wang <hsin-hsiung.wang@mediatek.com> |
refactor(cpus): replace adr with adr_l
Replace "adr" with "adr_l" to handle symbols or labels that exceeds 1MB access range. This modification resolves the link error.
Change-Id: I9eba2e34c0a303b40
refactor(cpus): replace adr with adr_l
Replace "adr" with "adr_l" to handle symbols or labels that exceeds 1MB access range. This modification resolves the link error.
Change-Id: I9eba2e34c0a303b40e4c7b3ea7c5b113f4c6d989 Signed-off-by: Hsin-Hsiung Wang <hsin-hsiung.wang@mediatek.com>
show more ...
|
| #
74e3959e |
| 10-Aug-2023 |
Bipin Ravi <bipin.ravi@arm.com> |
Merge "fix(cpus): assert invalid cpu_ops obtained" into integration
|
| #
3f721c6e |
| 19-Jul-2023 |
Thaddeus Serna <Thaddeus.Gonzalez-Serna@arm.com> |
fix(cpus): assert invalid cpu_ops obtained
Not including the proper CPU file can halt execution at the reset_handler since the cpu_ops obtained will be invalid and therefore the cpu reset function w
fix(cpus): assert invalid cpu_ops obtained
Not including the proper CPU file can halt execution at the reset_handler since the cpu_ops obtained will be invalid and therefore the cpu reset function will be invalid too, unless SUPPORT_UNKNOWN_MPID is enabled.
This patch adds an assert to check for the validity of the obtained cpu_ops object and will display an error if the object is invalid.
Change-Id: I0e1661745e4a692aab5e910e110c2de0caf64f46 Signed-off-by: Thaddeus Serna <Thaddeus.Gonzalez-Serna@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 ...
|
| #
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 ...
|
| #
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 ...
|
| #
a59cddf2 |
| 20-Mar-2023 |
Manish Pandey <manish.pandey2@arm.com> |
Merge changes from topic "bk/errata_refactor" into integration
* changes: chore(fvp): add the aarch32 cortex A57 to the build chore(cpus): remove redundant asserts refactor(cpus): shorten erra
Merge changes from topic "bk/errata_refactor" into integration
* changes: chore(fvp): add the aarch32 cortex A57 to the build chore(cpus): remove redundant asserts refactor(cpus): shorten errata flag defines
show more ...
|
| #
7c25a3a1 |
| 27-Jan-2023 |
Boyan Karatotev <boyan.karatotev@arm.com> |
chore(cpus): remove redundant asserts
get_cpu_ops_ptr asserts that it didn't get 0 for a cpu_ops pointer. Its callers don't need to do the same.
Signed-off-by: Boyan Karatotev <boyan.karatotev@arm.
chore(cpus): remove redundant asserts
get_cpu_ops_ptr asserts that it didn't get 0 for a cpu_ops pointer. Its callers don't need to do the same.
Signed-off-by: Boyan Karatotev <boyan.karatotev@arm.com> Change-Id: I547ac592949f74e153ef161015326f64aead2f28
show more ...
|
| #
a4c69581 |
| 15-Mar-2023 |
Manish Pandey <manish.pandey2@arm.com> |
Merge "refactor(build): distinguish BL2 as TF-A entry point and BL2 running at EL3" into integration
|
| #
42d4d3ba |
| 22-Nov-2022 |
Arvind Ram Prakash <arvind.ramprakash@arm.com> |
refactor(build): distinguish BL2 as TF-A entry point and BL2 running at EL3
BL2_AT_EL3 is an overloaded macro which has two uses: 1. When BL2 is entry point into TF-A(no BL1) 2. When BL2 is runnin
refactor(build): distinguish BL2 as TF-A entry point and BL2 running at EL3
BL2_AT_EL3 is an overloaded macro which has two uses: 1. When BL2 is entry point into TF-A(no BL1) 2. When BL2 is running at EL3 exception level These two scenarios are not exactly same even though first implicitly means second to be true. To distinguish between these two use cases we introduce new macros. BL2_AT_EL3 is renamed to RESET_TO_BL2 to better convey both 1. and 2. Additional macro BL2_RUNS_AT_EL3 is added to cover all scenarious where BL2 runs at EL3 (including four world systems).
BREAKING CHANGE: BL2_AT_EL3 renamed to RESET_TO_BL2 across the repository.
Change-Id: I477e1d0f843b44b799c216670e028fcb3509fb72 Signed-off-by: Arvind Ram Prakash <arvind.ramprakash@arm.com> Signed-off-by: Maksims Svecovs <maksims.svecovs@arm.com>
show more ...
|
| #
815abebc |
| 18-Mar-2022 |
Madhukar Pappireddy <madhukar.pappireddy@arm.com> |
Merge changes from topic "spectre_bhb" into integration
* changes: fix(security): apply SMCCC_ARCH_WORKAROUND_3 to A73/A75/A72/A57 fix(security): workaround for CVE-2022-23960 for Cortex-A57, Co
Merge changes from topic "spectre_bhb" into integration
* changes: fix(security): apply SMCCC_ARCH_WORKAROUND_3 to A73/A75/A72/A57 fix(security): workaround for CVE-2022-23960 for Cortex-A57, Cortex-A72 fix(fvp): disable reclaiming init code by default
show more ...
|