| 21d068be | 24-Jan-2025 |
Boyan Karatotev <boyan.karatotev@arm.com> |
refactor(cpus): declare runtime errata correctly
There errata don't have a workaround in the cpu file. So calling the wrappers is redundant. We can simply register them with the framework.
Change-I
refactor(cpus): declare runtime errata correctly
There errata don't have a workaround in the cpu file. So calling the wrappers is redundant. We can simply register them with the framework.
Change-Id: I316daeee603e86c9f2bdccf91e1b10f7ec6c3f9d Signed-off-by: Boyan Karatotev <boyan.karatotev@arm.com>
show more ...
|
| 89dba82d | 22-Jan-2025 |
Boyan Karatotev <boyan.karatotev@arm.com> |
perf(cpus): make reset errata do fewer branches
Errata application is painful for performance. For a start, it's done when the core has just come out of reset, which means branch predictors and cach
perf(cpus): make reset errata do fewer branches
Errata application is painful for performance. For a start, it's done when the core has just come out of reset, which means branch predictors and caches will be empty so a branch to a workaround function must be fetched from memory and that round trip is very slow. Then it also runs with the I-cache off, which means that the loop to iterate over the workarounds must also be fetched from memory on each iteration.
We can remove both branches. First, we can simply apply every erratum directly instead of defining a workaround function and jumping to it. Currently, no errata that need to be applied at both reset and runtime, with the same workaround function, exist. If the need arose in future, this should be achievable with a reset + runtime wrapper combo.
Then, we can construct a function that applies each erratum linearly instead of looping over the list. If this function is part of the reset function, then the only "far" branches at reset will be for the checker functions. Importantly, this mitigates the slowdown even when an erratum is disabled.
The result is ~50% speedup on N1SDP and ~20% on AArch64 Juno on wakeup from PSCI calls that end in powerdown. This is roughly back to the baseline of v2.9, before the errata framework regressed on performance (or a little better). It is important to note that there are other slowdowns since then that remain unknown.
Change-Id: Ie4d5288a331b11fd648e5c4a0b652b74160b07b9 Signed-off-by: Boyan Karatotev <boyan.karatotev@arm.com>
show more ...
|
| b07c317f | 19-Nov-2024 |
Boyan Karatotev <boyan.karatotev@arm.com> |
perf(cpus): inline the init_cpu_data_ptr function
Similar to the reset function inline, inline this too to not do a costly branch with no extra cost.
Change-Id: I54cc399e570e9d0f373ae13c7224d32dbdf
perf(cpus): inline the init_cpu_data_ptr function
Similar to the reset function inline, inline this too to not do a costly branch with no extra cost.
Change-Id: I54cc399e570e9d0f373ae13c7224d32dbdfae1e5 Signed-off-by: Boyan Karatotev <boyan.karatotev@arm.com>
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 ...
|
| 41ae0473 | 03-Feb-2025 |
Sona Mathew <sonarebecca.mathew@arm.com> |
fix(rmm): add support for BRBCR_EL2 register for feat_brbe
Currently BRBE is being disabled for Realm world in EL3 by switching the SBRBE bit in mdcr_el3 register to 0b00. The patch removes the swit
fix(rmm): add support for BRBCR_EL2 register for feat_brbe
Currently BRBE is being disabled for Realm world in EL3 by switching the SBRBE bit in mdcr_el3 register to 0b00. The patch removes the switching of SBRBE bits, and adds context switch of BRBCR_EL2 register.
Change-Id: I66ca13edefc37e40fa265fd438b0b66f7d09b4bb Signed-off-by: Sona Mathew <sonarebecca.mathew@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 ...
|
| b62673c6 | 23-Jan-2025 |
Boyan Karatotev <boyan.karatotev@arm.com> |
refactor(cpus): register DSU errata with the errata framework's wrappers
The existing DSU errata workarounds hijack the errata framework's inner workings to register with it. However, that is undesi
refactor(cpus): register DSU errata with the errata framework's wrappers
The existing DSU errata workarounds hijack the errata framework's inner workings to register with it. However, that is undesirable as any change to the framework may end up missing these workarounds. So convert the checks and workarounds to macros and have them included with the standard wrappers.
The only problem with this is the is_scu_present_in_dsu weak function. Fortunately, it is only needed for 2 of the errata and only on 3 cores. So drop it, assuming the default behaviour and have the callers handle the exception.
Change-Id: Iefa36325804ea093e938f867b9a6f49a6984b8ae Signed-off-by: Boyan Karatotev <boyan.karatotev@arm.com>
show more ...
|
| 74dd541f | 20-Feb-2025 |
Olivier Deprez <olivier.deprez@arm.com> |
Merge "fix(simd): fix base register in fpregs_context_*" into integration |
| b5477167 | 21-Jan-2025 |
Boyan Karatotev <boyan.karatotev@arm.com> |
refactor(cpus): convert checker functions to standard helpers
The library check_erratum_ls already incorporates the check. The return of ERRATA_MISSING is handled in the errata_report.c functions.
refactor(cpus): convert checker functions to standard helpers
The library check_erratum_ls already incorporates the check. The return of ERRATA_MISSING is handled in the errata_report.c functions.
Change-Id: Ic1dff2bc5235195f7cfce1709cd42467f88b3e4c Signed-off-by: Boyan Karatotev <boyan.karatotev@arm.com>
show more ...
|
| 52e89e9e | 23-Jan-2025 |
Boyan Karatotev <boyan.karatotev@arm.com> |
refactor(cpus): convert the Cortex-A65 to use the errata framework
Result was verified by manually stepping through the reset function with a debugger.
Change-Id: I91cd6111ccf95d6b7ee2364ac2126cb98
refactor(cpus): convert the Cortex-A65 to use the errata framework
Result was verified by manually stepping through the reset function with a debugger.
Change-Id: I91cd6111ccf95d6b7ee2364ac2126cb98ee4bb15 Signed-off-by: Boyan Karatotev <boyan.karatotev@arm.com>
show more ...
|
| 5cba510e | 20-Jan-2025 |
Boyan Karatotev <boyan.karatotev@arm.com> |
fix(cpus): declare reset errata correctly
The errata in this patch are declared as runtime, but are never called explicitly. This means that they are never called! Convert them to reset errata so th
fix(cpus): declare reset errata correctly
The errata in this patch are declared as runtime, but are never called explicitly. This means that they are never called! Convert them to reset errata so that they are called at reset. Their SDENs entries have been checked and confirm that this is how they should be implemented.
Also, drop the the MIDR check on the a57 erratum as it's not needed - the erratum is already called from a cpu-specific function.
Change-Id: I22c3043ab454ce94b3c122c856e5804bc2ebb18b Signed-off-by: Boyan Karatotev <boyan.karatotev@arm.com>
show more ...
|
| 8c52ca8c | 10-Dec-2024 |
Sona Mathew <sonarebecca.mathew@arm.com> |
refactor(cpufeat): add FGT2 and Debugv8p9 to realm state
Enable FEAT_FGT2 and FEAT_Debugv8p9 in Realm state as well.
Change-Id: Ib9cdde3af328ffdd8718b1ba404265757f2e542b Signed-off-by: Sona Mathew
refactor(cpufeat): add FGT2 and Debugv8p9 to realm state
Enable FEAT_FGT2 and FEAT_Debugv8p9 in Realm state as well.
Change-Id: Ib9cdde3af328ffdd8718b1ba404265757f2e542b Signed-off-by: Sona Mathew <sonarebecca.mathew@arm.com>
show more ...
|
| c37c35d6 | 12-Feb-2025 |
Bipin Ravi <bipin.ravi@arm.com> |
Merge changes from topic "gr/errata_mpidr" into integration
* changes: fix(cpus): workaround for Cortex-X925 erratum 2963999 fix(cpus): workaround for Neoverse-V3 erratum 2970647 fix(cpus): wo
Merge changes from topic "gr/errata_mpidr" into integration
* changes: fix(cpus): workaround for Cortex-X925 erratum 2963999 fix(cpus): workaround for Neoverse-V3 erratum 2970647 fix(cpus): workaround for Cortex-X4 erratum 2957258
show more ...
|
| 6db9aac6 | 12-Feb-2025 |
Lauren Wehrmeister <lauren.wehrmeister@arm.com> |
Merge changes from topic "mb/drtm" into integration
* changes: fix(drtm): fix DLME data size check fix(drtm): sort the address-map in ascending order feat(libc): import qsort implementation |
| 29bda258 | 07-Feb-2025 |
Govindraj Raja <govindraj.raja@arm.com> |
fix(cpus): workaround for Cortex-X925 erratum 2963999
Cortex-X925 erratum 2963999 that applies to r0p0 and is fixed in r0p1.
In EL3, reads of MPIDR_EL1 and MIDR_EL1 might incorrectly virtualize whi
fix(cpus): workaround for Cortex-X925 erratum 2963999
Cortex-X925 erratum 2963999 that applies to r0p0 and is fixed in r0p1.
In EL3, reads of MPIDR_EL1 and MIDR_EL1 might incorrectly virtualize which register to return when reading the value of MPIDR_EL1/VMPIDR_EL2 and MIDR_EL1/VPIDR_EL2, respectively.
The workaround is to do an ISB prior to an MRS read to either MPIDR_EL1 and MIDR_EL1.
SDEN documentation: https://developer.arm.com/documentation/109180/latest/
Change-Id: I447fd359ea32e1d274e1245886e1de57d14f082c Signed-off-by: Govindraj Raja <govindraj.raja@arm.com>
show more ...
|
| 5f32fd21 | 07-Feb-2025 |
Govindraj Raja <govindraj.raja@arm.com> |
fix(cpus): workaround for Neoverse-V3 erratum 2970647
Neoverse V3 erratum 2970647 that applies to r0p0 and is fixed in r0p1.
In EL3, reads of MPIDR_EL1 and MIDR_EL1 might incorrectly virtualize whi
fix(cpus): workaround for Neoverse-V3 erratum 2970647
Neoverse V3 erratum 2970647 that applies to r0p0 and is fixed in r0p1.
In EL3, reads of MPIDR_EL1 and MIDR_EL1 might incorrectly virtualize which register to return when reading the value of MPIDR_EL1/VMPIDR_EL2 and MIDR_EL1/VPIDR_EL2, respectively.
The workaround is to do an ISB prior to an MRS read to either MPIDR_EL1 and MIDR_EL1.
SDEN documentation: https://developer.arm.com/documentation/SDEN-2891958/latest/
Change-Id: Iedf7d799451f0be58a5da1f93f7f5b6940f2bb35 Signed-off-by: Govindraj Raja <govindraj.raja@arm.com>
show more ...
|
| 09c1edb8 | 07-Feb-2025 |
Govindraj Raja <govindraj.raja@arm.com> |
fix(cpus): workaround for Cortex-X4 erratum 2957258
Cortex-X4 erratum 2957258 that applies to r0p0, r0p1 and is fixed in r0p2.
In EL3, reads of MPIDR_EL1 and MIDR_EL1 might incorrectly virtualize w
fix(cpus): workaround for Cortex-X4 erratum 2957258
Cortex-X4 erratum 2957258 that applies to r0p0, r0p1 and is fixed in r0p2.
In EL3, reads of MPIDR_EL1 and MIDR_EL1 might incorrectly virtualize which register to return when reading the value of MPIDR_EL1/VMPIDR_EL2 and MIDR_EL1/VPIDR_EL2, respectively.
The workaround is to do an ISB prior to an MRS read to either MPIDR_EL1 and MIDR_EL1.
SDEN documentation: https://developer.arm.com/documentation/109148/latest/
Change-Id: I2d8e7f4ce19ca2e1d87527c31e7778d81aff0279 Signed-off-by: Govindraj Raja <govindraj.raja@arm.com>
show more ...
|
| e1362231 | 12-Feb-2025 |
Soby Mathew <soby.mathew@arm.com> |
Merge changes from topic "memory_bank" into integration
* changes: fix(qemu): statically allocate bitlocks array feat(qemu): update for renamed struct memory_bank feat(fvp): increase GPT PPS t
Merge changes from topic "memory_bank" into integration
* changes: fix(qemu): statically allocate bitlocks array feat(qemu): update for renamed struct memory_bank feat(fvp): increase GPT PPS to 1TB feat(gpt): statically allocate bitlocks array chore(gpt): define PPS in platform header files feat(fvp): allocate L0 GPT at the top of SRAM feat(fvp): change size of PCIe memory region 2 feat(rmm): add PCIe IO info to Boot manifest feat(fvp): define single Root region
show more ...
|
| fcb80d7d | 11-Feb-2025 |
Manish Pandey <manish.pandey2@arm.com> |
Merge changes I765a7fa0,Ic33f0b6d,I8d1a88c7,I381f96be,I698fa849, ... into integration
* changes: fix(cpus): clear CPUPWRCTLR_EL1.CORE_PWRDN_EN_BIT on reset chore(docs): drop the "wfi" from `pwr_
Merge changes I765a7fa0,Ic33f0b6d,I8d1a88c7,I381f96be,I698fa849, ... into integration
* changes: fix(cpus): clear CPUPWRCTLR_EL1.CORE_PWRDN_EN_BIT on reset chore(docs): drop the "wfi" from `pwr_domain_pwr_down_wfi` chore(psci): drop skip_wfi variable feat(arm): convert arm platforms to expect a wakeup fix(cpus): avoid SME related loss of context on powerdown feat(psci): allow cores to wake up from powerdown refactor: panic after calling psci_power_down_wfi() refactor(cpus): undo errata mitigations feat(cpus): add sysreg_bit_toggle
show more ...
|
| b0f1c840 | 24-Jan-2025 |
AlexeiFedorov <Alexei.Fedorov@arm.com> |
feat(gpt): statically allocate bitlocks array
Statically allocate 'gpt_bitlock' array of fine-grained 'bitlock_t' data structures in arm_bl31_setup.c. The amount of memory needed for this array is c
feat(gpt): statically allocate bitlocks array
Statically allocate 'gpt_bitlock' array of fine-grained 'bitlock_t' data structures in arm_bl31_setup.c. The amount of memory needed for this array is controlled by 'RME_GPT_BITLOCK_BLOCK' build option and 'PLAT_ARM_PPS' macro defined in platform_def.h which specifies the size of protected physical address space in bytes. 'PLAT_ARM_PPS' takes values from 4GB to 4PB supported by Arm architecture.
Change-Id: Icf620b5039e45df6828d58fca089cad83b0bc669 Signed-off-by: AlexeiFedorov <Alexei.Fedorov@arm.com>
show more ...
|
| 277713e0 | 21-Jan-2025 |
Manish V Badarkhe <Manish.Badarkhe@arm.com> |
feat(libc): import qsort implementation
Import qsort implementation from FreeBSD[1] to libc.
[1]: https://cgit.freebsd.org/src/tree/lib/libc/stdlib/qsort.c
Change-Id: Ia0d8e2d1c40c679844c0746db1b6
feat(libc): import qsort implementation
Import qsort implementation from FreeBSD[1] to libc.
[1]: https://cgit.freebsd.org/src/tree/lib/libc/stdlib/qsort.c
Change-Id: Ia0d8e2d1c40c679844c0746db1b669cda672a482 Signed-off-by: Manish V Badarkhe <Manish.Badarkhe@arm.com>
show more ...
|
| 0d22145f | 10-Feb-2025 |
Manish Pandey <manish.pandey2@arm.com> |
Merge "fix: add support for 128-bit sysregs to EL3 crash handler" into integration |
| 593ae354 | 22-Mar-2023 |
Boyan Karatotev <boyan.karatotev@arm.com> |
feat(cpus): add ENABLE_ERRATA_ALL flag
Now that all errata flags are all conveniently in a single list we can make sweeping decisions about their values. The first use-case is to enable all errata i
feat(cpus): add ENABLE_ERRATA_ALL flag
Now that all errata flags are all conveniently in a single list we can make sweeping decisions about their values. The first use-case is to enable all errata in TF-A. This is useful for CI runs where it is impractical to list every single one. This should help with the long standing issue of errata not being built or tested.
Also add missing CPUs with errata to `ENABLE_ERRATA_ALL` to enable all errata builds in CI.
Signed-off-by: Govindraj Raja <govindraj.raja@arm.com> Signed-off-by: Boyan Karatotev <boyan.karatotev@arm.com> Change-Id: I2b456d304d7bf3215c7c4f4fd70b56ecbcb09979
show more ...
|
| 58fadd62 | 15-Nov-2024 |
Igor Podgainõi <igor.podgainoi@arm.com> |
fix: add support for 128-bit sysregs to EL3 crash handler
The following changes have been made: * Add new sysreg definitions and ASM macro is_feat_sysreg128_present_asm * Add registers TTBR0_EL2 and
fix: add support for 128-bit sysregs to EL3 crash handler
The following changes have been made: * Add new sysreg definitions and ASM macro is_feat_sysreg128_present_asm * Add registers TTBR0_EL2 and VTTBR_EL2 to EL3 crash handler output * Use MRRS instead of MRS for registers TTBR0_EL1, TTBR0_EL2, TTBR1_EL1, VTTBR_EL2 and PAR_EL1
Change-Id: I0e20b2c35251f3afba2df794c1f8bc0c46c197ff Signed-off-by: Igor Podgainõi <igor.podgainoi@arm.com>
show more ...
|