| #
9acaf99f |
| 29-Oct-2025 |
Manish V Badarkhe <manish.badarkhe@arm.com> |
Merge changes from topic "ahmed-azeem/rdaspen-enhancements" into integration
* changes: fix(dsu): dsu config for all cores in hot reset docs(rdaspen): bl32 and GPT support feat(rdaspen): suppo
Merge changes from topic "ahmed-azeem/rdaspen-enhancements" into integration
* changes: fix(dsu): dsu config for all cores in hot reset docs(rdaspen): bl32 and GPT support feat(rdaspen): support BL32 (OP-TEE)
show more ...
|
| #
98863b1e |
| 13-Oct-2025 |
Ahmed Azeem <ahmed.azeem@arm.com> |
fix(dsu): dsu config for all cores in hot reset
This allows DSU units to be configured across all cpu clusters instead of the primary cluster. This configures actlr_el3 in the hot reset path to allo
fix(dsu): dsu config for all cores in hot reset
This allows DSU units to be configured across all cpu clusters instead of the primary cluster. This configures actlr_el3 in the hot reset path to allow power control and PMU registers for all cores in lower ELs and fixes.
Change-Id: If4dd254736fbcc4bcb8785a16972a0132bc477ce Signed-off-by: Ahmed Azeem <ahmed.azeem@arm.com> Signed-off-by: Amr Mohamed <amr.mohamed@arm.com>
show more ...
|
| #
dfdb73f7 |
| 16-Sep-2025 |
Manish V Badarkhe <manish.badarkhe@arm.com> |
Merge changes from topic "bk/no_blx_setup" into integration
* changes: fix: replace stray BL2_AT_EL3 with RESET_TO_BL2 refactor(aarch64): move BL31 specific setup out of the PSCI entrypoint re
Merge changes from topic "bk/no_blx_setup" into integration
* changes: fix: replace stray BL2_AT_EL3 with RESET_TO_BL2 refactor(aarch64): move BL31 specific setup out of the PSCI entrypoint refactor: unify blx_setup() and blx_main() fix(bl2): unify the BL2 EL3 and RME entrypoints
show more ...
|
| #
63900851 |
| 11-Sep-2025 |
Boyan Karatotev <boyan.karatotev@arm.com> |
refactor(aarch64): move BL31 specific setup out of the PSCI entrypoint
We've charged the PSCI entrypoint with doing BL31 specific things like setting up the EL3 context and doing feature detection.
refactor(aarch64): move BL31 specific setup out of the PSCI entrypoint
We've charged the PSCI entrypoint with doing BL31 specific things like setting up the EL3 context and doing feature detection. Well, this is irrelevant for sp_min and not really appropriate for PSCI. So move it to the bl31_warmboot() function to reflect this correctly and bring the feature detection a bit earlier, hopefully spotting more errors.
This allows for a pair of minor cleanups - we can pass the core_pos to psci_warmboot_entrypoint() without having to refetch it, and we can put the pauth enablement in cm_manage_extensions_el3() along with all others. The call of that function is kept after the MMU is turned on so that we have nicer (coherent) access to cpu_data.
Change-Id: Id031cfa0e1d8fe98919a14f9db73eb5bc9e00f67 Signed-off-by: Boyan Karatotev <boyan.karatotev@arm.com>
show more ...
|
| #
d158d425 |
| 13-Aug-2025 |
Boyan Karatotev <boyan.karatotev@arm.com> |
refactor: unify blx_setup() and blx_main()
All BLs have a bl_setup() for things that need to happen early, a fall back into assembly and then bl_main() for the main functionality. This was necessary
refactor: unify blx_setup() and blx_main()
All BLs have a bl_setup() for things that need to happen early, a fall back into assembly and then bl_main() for the main functionality. This was necessary in order to fiddle with PAuth related things that tend to break C calls. Since then PAuth's enablement has seen a lot of refactoring and this is now worked around cleanly so the distinction can be removed. The only tradeoff is that this requires pauth to not be used for the top-level main function.
There are two main benefits to doing this: First, code is easier to understand as it's all together and the entrypoint is smaller. Second, the compiler gets to see more of the code and apply optimisations (importantly LTO).
Change-Id: Iddb93551115a2048988017547eb7b8db441dbd37 Signed-off-by: Boyan Karatotev <boyan.karatotev@arm.com>
show more ...
|
| #
452afcfb |
| 07-Aug-2025 |
Govindraj Raja <govindraj.raja@arm.com> |
Merge changes from topic "xlnx_fix_gen_unused_var" into integration
* changes: fix(console): create unique variable name fix(bl31): declare function as static fix(psci): initialise variable to
Merge changes from topic "xlnx_fix_gen_unused_var" into integration
* changes: fix(console): create unique variable name fix(bl31): declare function as static fix(psci): initialise variable to default zero fix(services): declare unused parameters as void fix(lib): declare unused parameters as void fix(platforms): declare unused parameters as void
show more ...
|
| #
d9712f9c |
| 18-Apr-2024 |
Signed-off-by: Maheedhar Bollapalli <maheedharsai.bollapalli@amd.com> |
fix(bl31): declare function as static
This corrects the MISRA violation C2012-8.7: Functions and objects should not be defined with external linkage if they are referenced in only one translation un
fix(bl31): declare function as static
This corrects the MISRA violation C2012-8.7: Functions and objects should not be defined with external linkage if they are referenced in only one translation unit. The functions are declared as static that are referenced only within a translation unit.
Change-Id: I785f9cd5378fa229812786d6877a5559983d32f3 Signed-off-by: Nithin G <nithing@amd.com> Signed-off-by: Maheedhar Bollapalli <maheedharsai.bollapalli@amd.com>
show more ...
|
| #
4ca4b3e2 |
| 29-Jul-2025 |
Manish Pandey <manish.pandey2@arm.com> |
Merge changes I3e086865,I47f05a9f,Iee495571 into integration
* changes: fix(cpufeat): update FEAT_PAUTH's feat detect line to tri-state fix(cpufeat): do feature detection before feature enableme
Merge changes I3e086865,I47f05a9f,Iee495571 into integration
* changes: fix(cpufeat): update FEAT_PAUTH's feat detect line to tri-state fix(cpufeat): do feature detection before feature enablement feat(cpufeat): do feature detection on secondary cores too
show more ...
|
| #
0f57a388 |
| 03-Jul-2025 |
Boyan Karatotev <boyan.karatotev@arm.com> |
fix(cpufeat): do feature detection before feature enablement
Situations where feature configuration does not reflect hardware's features can cause unhandled exceptions at EL3. Feature detection is m
fix(cpufeat): do feature detection before feature enablement
Situations where feature configuration does not reflect hardware's features can cause unhandled exceptions at EL3. Feature detection is meant to guard against these errors by checking hardware against the configuration. For this to happen though, feature detection has to happen before these unhandled exceptions have had a chance to happen.
Change-Id: I47f05a9f01321e011623083afb638552311ed013 Signed-off-by: Boyan Karatotev <boyan.karatotev@arm.com>
show more ...
|
| #
d335bbb1 |
| 03-Jul-2025 |
Boyan Karatotev <boyan.karatotev@arm.com> |
feat(cpufeat): do feature detection on secondary cores too
Feature detection currently only happens on the boot core, however, it is possible to have asymmetry between cores. TF-A supports limited s
feat(cpufeat): do feature detection on secondary cores too
Feature detection currently only happens on the boot core, however, it is possible to have asymmetry between cores. TF-A supports limited such configurations so it should check secondary cores too.
Change-Id: Iee4955714685be9ae6a017af4a6c284e835ff299 Signed-off-by: Boyan Karatotev <boyan.karatotev@arm.com>
show more ...
|
| #
52413650 |
| 08-Jul-2025 |
Mark Dykes <mark.dykes@arm.com> |
Merge "refactor(cm): gather per-world context management to the same place" into integration
|
| #
6eafc060 |
| 04-Mar-2025 |
Boyan Karatotev <boyan.karatotev@arm.com> |
refactor(cm): gather per-world context management to the same place
The per-world calls are disparate - they get called in different places, are guarded in different ways, and the code is apart.
Si
refactor(cm): gather per-world context management to the same place
The per-world calls are disparate - they get called in different places, are guarded in different ways, and the code is apart.
Since they just need to be called once at boot, add a function that we can call from BL31 and be done with it.
Change-Id: Id0ade302e35f2b00ca37c552a53038942ab7b58e Signed-off-by: Boyan Karatotev <boyan.karatotev@arm.com>
show more ...
|
| #
f8901e38 |
| 23-Jun-2025 |
Manish Pandey <manish.pandey2@arm.com> |
Merge "feat(dsu): support power control and autonomous powerdown config" into integration
|
| #
29ef8d7e |
| 23-Jun-2025 |
Manish Pandey <manish.pandey2@arm.com> |
Merge changes from topic "xlnx_fix_gen_op_datatype" into integration
* changes: fix(services): typecast operands to match data type fix(psci): typecast operands to match data type fix(common):
Merge changes from topic "xlnx_fix_gen_op_datatype" into integration
* changes: fix(services): typecast operands to match data type fix(psci): typecast operands to match data type fix(common): typecast operands to match data type fix(arm-drivers): typecast operands to match data type fix(bl31): typecast operands to match data type
show more ...
|
| #
2fa4dee6 |
| 24-Apr-2024 |
Maheedhar Bollapalli <maheedharsai.bollapalli@amd.com> |
fix(bl31): typecast operands to match data type
This corrects the MISRA violation C2012-10.3: The value of an expression shall not be assigned to an object with a narrower essential type or of a dif
fix(bl31): typecast operands to match data type
This corrects the MISRA violation C2012-10.3: The value of an expression shall not be assigned to an object with a narrower essential type or of a different essential type category. The condition is explicitly checked against 0U, appending 'U' and typecasting for unsigned comparison.
Change-Id: I36d794f7134f4432bd8249e3fe347727819e335d Signed-off-by: Nithin G <nithing@amd.com> Signed-off-by: Maheedhar Bollapalli <maheedharsai.bollapalli@amd.com>
show more ...
|
| #
d52ff2b3 |
| 07-May-2025 |
Arvind Ram Prakash <arvind.ramprakash@arm.com> |
feat(dsu): support power control and autonomous powerdown config
This patch allows platforms to enable certain DSU settings to ensure memory retention and control over cache power requests. We also
feat(dsu): support power control and autonomous powerdown config
This patch allows platforms to enable certain DSU settings to ensure memory retention and control over cache power requests. We also move the driver out of css into drivers/arm. Platforms can configure the CLUSTERPWRCTLR and CLUSTERPWRDN registers [1] to improve power efficiency.
These registers enable finer-grained control of DSU power state transitions, including powerdown and retention.
IMP_CLUSTERPWRCTLR_EL1 provides: - Functional retention: Allows configuration of the duration of inactivity before the DSU uses CLUSTERPACTIVE to request functional retention.
- Cache power request: These bits are output on CLUSTERPACTIVE[19:16] to indicate to the power controller which cache portions must remain powered.
IMP_CLUSTERPWRDN_EL1 includes: - Powerdown: Triggers full cluster powerdown, including control logic.
- Memory retention: Requests memory retention mode, keeping L3 RAM contents while powering off the rest of the DSU.
The DSU-120 TRM [2] provides the full field definitions, which are used as references in the `dsu_driver_data` structure.
References: [1]: https://developer.arm.com/documentation/100453/latest/ [2]: https://developer.arm.com/documentation/102547/0201/?lang=en
Signed-off-by: Arvind Ram Prakash <arvind.ramprakash@arm.com> Change-Id: I2eba808b8f2a27797782a333c65dd092b03208fe
show more ...
|
| #
139a5d05 |
| 18-Apr-2025 |
Madhukar Pappireddy <madhukar.pappireddy@arm.com> |
Merge changes I86959e67,I0b0d1d36,I5b5267f4,I056c8710,I3474aa97 into integration
* changes: chore: fix preprocessor checks refactor: convert arm platforms to use the generic GIC driver refacto
Merge changes I86959e67,I0b0d1d36,I5b5267f4,I056c8710,I3474aa97 into integration
* changes: chore: fix preprocessor checks refactor: convert arm platforms to use the generic GIC driver refactor(gic): promote most of the GIC driver to common code refactor: make arm_gicv2.c and arm_gicv3.c common refactor(fvp): use more arm generic code for gicv3
show more ...
|
| #
5d893410 |
| 07-Jan-2025 |
Boyan Karatotev <boyan.karatotev@arm.com> |
refactor(gic): promote most of the GIC driver to common code
More often than not, Arm based systems include some revision of a GIC. There are two ways of adding support for them in platform code - c
refactor(gic): promote most of the GIC driver to common code
More often than not, Arm based systems include some revision of a GIC. There are two ways of adding support for them in platform code - calling the top-level helpers from plat/arm/common/arm_gicvX.c or by using the driver directly. Both of these methods allow for a high degree of customisation - most functions are defined to be weak and there are no calls to any of them in generic code.
As it turns out, requirements around those GICs are largely the same. Platforms that use arm_gicvX.c use the helpers identically among each other. Platforms that use the driver directly tend to end up with calls that look a lot like the arm_gicvX.c helpers and the weakness of the functions are never exercised.
All of this results in a lot of code duplication to do what is essentially the same thing. Even though it's not a lot of code, when multiplied among many platforms it becomes significant and makes refactoring it quite difficult. It's also bug prone since the steps are a little convoluted and things are likely to work even with subtle errors (see 50009f61177421118f42d6a000611ba0e613d54b).
So promote as much of the GIC to be called from common code. Do the setup in bl31_main() and have every PSCI method do the state management directly instead of delegating it to the platform hooks. We can base this implementation on arm_gicvX.c since they already offer logical names and have worked quite well so far with minimal changes.
The main benefit of doing this is reduced code duplication. If we assume that, outside of some platform setup, GIC management is identical, then a platform can add support by telling the build system, regardless of GIC revision. The other benefit is performance - BL31 and PSCI already know the core_pos and they can pass it as an argument instead of having to call plat_my_core_pos(). Now, the only platform specific GIC actions necessary are the saving and restoring of context on entering and exiting a power domain. The PSCI library does not keep track of this so it is unable perform it itself. The routines themselves are also provided.
For compatibility all of this is hidden behind a build flag. Platforms are encouraged to adopt this driver, but it would not be practical to convert and validate every GIC based platform.
This patch renames the functions in question to follow the gic_<function>() convention. This allows the names to be version agnostic.
Finally, drop the weak definitions - they are unused, likely to remain so, and can be added back if the need arises.
Change-Id: I5b5267f4b72f633fb1096400ec8e4b208694135f Signed-off-by: Boyan Karatotev <boyan.karatotev@arm.com>
show more ...
|
| #
ee656609 |
| 16-Apr-2025 |
André Przywara <andre.przywara@arm.com> |
Merge changes Id942c20c,Idd286bea,I8917a26e,Iec8c3477,If3c25dcd, ... into integration
* changes: feat(cpufeat): enable FEAT_PAuth to FEAT_STATE_CHECKED perf(cpufeat): centralise PAuth key saving
Merge changes Id942c20c,Idd286bea,I8917a26e,Iec8c3477,If3c25dcd, ... into integration
* changes: feat(cpufeat): enable FEAT_PAuth to FEAT_STATE_CHECKED perf(cpufeat): centralise PAuth key saving refactor(cpufeat): convert FEAT_PAuth setup to C refactor(cpufeat): prepare FEAT_PAuth for FEATURE_DETECTION chore(cpufeat): remove PAuth presence checks feat(cpufeat): enable FEAT_BTI to FEAT_STATE_CHECKED
show more ...
|
| #
ec7c29ab |
| 26-Mar-2025 |
Boyan Karatotev <boyan.karatotev@arm.com> |
chore(cpufeat): remove PAuth presence checks
TF-A operates a policy that features must be correctly configured per each platform. There is a tool to assist in making sure that this is the case - FEA
chore(cpufeat): remove PAuth presence checks
TF-A operates a policy that features must be correctly configured per each platform. There is a tool to assist in making sure that this is the case - FEATURE_DETECTION. So performing these checks in common code is not the right place for this. Remove them and rely on FEATURE_DETECTION.
Change-Id: If3c25dcd7bc880f1f085bc6bb5270d8d1c4caf43 Signed-off-by: Boyan Karatotev <boyan.karatotev@arm.com>
show more ...
|
| #
23775427 |
| 27-Mar-2025 |
Govindraj Raja <govindraj.raja@arm.com> |
Merge changes from topic "xlnx_fix_gen_datatype_cast" into integration
* changes: fix(psci): add const qualifier fix(el3-runtime): add const qualifier fix(bl31): add const qualifier fix(cons
Merge changes from topic "xlnx_fix_gen_datatype_cast" into integration
* changes: fix(psci): add const qualifier fix(el3-runtime): add const qualifier fix(bl31): add const qualifier fix(console): typecast expressions to match data type fix(arm-drivers): typecast expressions to match data type fix(arm-drivers): align essential type categories fix(arm-drivers): typecast expression to match data type
show more ...
|
| #
e358089d |
| 19-Apr-2024 |
Nithin G <nithing@amd.com> |
fix(bl31): add const qualifier
This corrects the MISRA violation C2012-8.13: A pointer should point to a const-qualified type whenever possible. Added const qualifier to pointer in the function argu
fix(bl31): add const qualifier
This corrects the MISRA violation C2012-8.13: A pointer should point to a const-qualified type whenever possible. Added const qualifier to pointer in the function arguments.
Change-Id: Ia323a2b2946d61a639696e2559f88e376beda861 Signed-off-by: Nithin G <nithing@amd.com> Signed-off-by: Maheedhar Bollapalli <maheedharsai.bollapalli@amd.com>
show more ...
|
| #
2e0354f5 |
| 25-Feb-2025 |
Manish V Badarkhe <manish.badarkhe@arm.com> |
Merge changes I3d950e72,Id315a8fe,Ib62e6e9b,I1d0475b2 into integration
* changes: perf(cm): drop ZCR_EL3 saving and some ISBs and replace them with root context perf(psci): get PMF timestamps wi
Merge changes I3d950e72,Id315a8fe,Ib62e6e9b,I1d0475b2 into integration
* changes: perf(cm): drop ZCR_EL3 saving and some ISBs and replace them with root context perf(psci): get PMF timestamps with no cache flushes if possible perf(amu): greatly simplify AMU context management perf(mpmm): greatly simplify MPMM enablement
show more ...
|
| #
83ec7e45 |
| 06-Nov-2024 |
Boyan Karatotev <boyan.karatotev@arm.com> |
perf(amu): greatly simplify AMU context management
The current code is incredibly resilient to updates to the spec and has worked quite well so far. However, recent implementations expose a weakness
perf(amu): greatly simplify AMU context management
The current code is incredibly resilient to updates to the spec and has worked quite well so far. However, recent implementations expose a weakness in that this is rather slow. A large part of it is written in assembly, making it opaque to the compiler for optimisations. The future proofness requires reading registers that are effectively `volatile`, making it even harder for the compiler, as well as adding lots of implicit barriers, making it hard for the microarchitecutre to optimise as well.
We can make a few assumptions, checked by a few well placed asserts, and remove a lot of this burden. For a start, at the moment there are 4 group 0 counters with static assignments. Contexting them is a trivial affair that doesn't need a loop. Similarly, there can only be up to 16 group 1 counters. Contexting them is a bit harder, but we can do with a single branch with a falling through switch. If/when both of these change, we have a pair of asserts and the feature detection mechanism to guard us against pretending that we support something we don't.
We can drop contexting of the offset registers. They are fully accessible by EL2 and as such are its responsibility to preserve on powerdown.
Another small thing we can do, is pass the core_pos into the hook. The caller already knows which core we're running on, we don't need to call this non-trivial function again.
Finally, knowing this, we don't really need the auxiliary AMUs to be described by the device tree. Linux doesn't care at the moment, and any information we need for EL3 can be neatly placed in a simple array.
All of this, combined with lifting the actual saving out of assembly, reduces the instructions to save the context from 180 to 40, including a lot fewer branches. The code is also much shorter and easier to read.
Also propagate to aarch32 so that the two don't diverge too much.
Change-Id: Ib62e6e9ba5be7fb9fb8965c8eee148d5598a5361 Signed-off-by: Boyan Karatotev <boyan.karatotev@arm.com>
show more ...
|
| #
a97e1f97 |
| 08-May-2024 |
Manish Pandey <manish.pandey2@arm.com> |
Merge changes from topic "early_console" into integration
* changes: feat(stm32mp2): use early traces feat(st-bsec): use early traces refactor(st): replace STM32MP_EARLY_CONSOLE with EARLY_CON
Merge changes from topic "early_console" into integration
* changes: feat(stm32mp2): use early traces feat(st-bsec): use early traces refactor(st): replace STM32MP_EARLY_CONSOLE with EARLY_CONSOLE feat(console): introduce EARLY_CONSOLE feat(bl32): create an sp_min_setup function
show more ...
|