| #
603a0c6f |
| 17-Nov-2022 |
Andre Przywara <andre.przywara@arm.com> |
refactor(cpufeat): enable SYS_REG_TRACE for FEAT_STATE_CHECKED
At the moment we only support access to the trace unit by system registers (SYS_REG_TRACE) to be either unconditionally compiled in, or
refactor(cpufeat): enable SYS_REG_TRACE for FEAT_STATE_CHECKED
At the moment we only support access to the trace unit by system registers (SYS_REG_TRACE) to be either unconditionally compiled in, or to be not supported at all.
Add support for runtime detection (ENABLE_SYS_REG_TRACE_FOR_NS=2), by adding is_feat_sys_reg_trace_supported(). That function considers both build time settings and runtime information (if needed), and is used before we access SYS_REG_TRACE related registers.
The FVP platform decided to compile in support unconditionally (=1), even though this is an optional feature, so it is not available with the FVP model's default command line. Change that to the now supported dynamic option (=2), so the right decision can be made by the code at runtime.
Change-Id: I450a574a4f6bd9fc269887037049c94c906f54b2 Signed-off-by: Andre Przywara <andre.przywara@arm.com>
show more ...
|
| #
7419b7a7 |
| 20-Mar-2023 |
Manish Pandey <manish.pandey2@arm.com> |
Merge changes from topic "feat_state_part3" into integration
* changes: refactor(cpufeat): enable FEAT_VHE for FEAT_STATE_CHECKED refactor(mpam): enable FEAT_MPAM for FEAT_STATE_CHECKED feat(l
Merge changes from topic "feat_state_part3" into integration
* changes: refactor(cpufeat): enable FEAT_VHE for FEAT_STATE_CHECKED refactor(mpam): enable FEAT_MPAM for FEAT_STATE_CHECKED feat(libc): add support for fallthrough statement refactor(spe): enable FEAT_SPE for FEAT_STATE_CHECKED refactor(cpufeat): rename ENABLE_SPE_FOR_LOWER_ELS to ENABLE_SPE_FOR_NS fix(spe): drop SPE EL2 context switch code
show more ...
|
| #
ea735bf5 |
| 17-Nov-2022 |
Andre Przywara <andre.przywara@arm.com> |
refactor(cpufeat): enable FEAT_VHE for FEAT_STATE_CHECKED
At the moment we only support FEAT_VHE to be either unconditionally compiled in, or to be not supported at all.
Add support for runtime det
refactor(cpufeat): enable FEAT_VHE for FEAT_STATE_CHECKED
At the moment we only support FEAT_VHE to be either unconditionally compiled in, or to be not supported at all.
Add support for runtime detection (ENABLE_FEAT_VHE=2), by splitting is_armv8_1_vhe_present() into an ID register reading function and a second function to report the support status. That function considers both build time settings and runtime information (if needed), and is used before we access VHE related registers. Also move the context saving code from assembly to C, and use the new is_feat_vhe_supported() function to guard its execution.
Enable VHE in its runtime detection version for all FVP builds.
Change-Id: Ib397cd0c83e8c709bd6fed603560e39901fa672b Signed-off-by: Andre Przywara <andre.przywara@arm.com>
show more ...
|
| #
9448f2b8 |
| 17-Nov-2022 |
Andre Przywara <andre.przywara@arm.com> |
refactor(mpam): enable FEAT_MPAM for FEAT_STATE_CHECKED
At the moment we only support FEAT_MPAM to be either unconditionally compiled in, or to be not supported at all.
Add support for runtime dete
refactor(mpam): enable FEAT_MPAM for FEAT_STATE_CHECKED
At the moment we only support FEAT_MPAM to be either unconditionally compiled in, or to be not supported at all.
Add support for runtime detection (ENABLE_MPAM_FOR_LOWER_ELS=2), by splitting get_mpam_version() into an ID register reading function and a second function to report the support status. That function considers both build time settings and runtime information (if needed), and is used before we access MPAM related registers. Also move the context saving code from assembly to C, and use the new is_feat_mpam_supported() function to guard its execution.
ENABLE_MPAM_FOR_LOWER_ELS defaults to 0, so add a stub enable function to cover builds with compiler optimisations turned off. The unused mpam_enable() function call will normally be optimised away (because it would never be called), but with -O0 the compiler will leave the symbol in the object file.
Change-Id: I531d87cb855a7c43471f861f625b5a6d4bc61313 Signed-off-by: Andre Przywara <andre.przywara@arm.com>
show more ...
|
| #
6437a09a |
| 17-Nov-2022 |
Andre Przywara <andre.przywara@arm.com> |
refactor(spe): enable FEAT_SPE for FEAT_STATE_CHECKED
At the moment we only support FEAT_SPE to be either unconditionally compiled in, or to be not supported at all.
Add support for runtime detecti
refactor(spe): enable FEAT_SPE for FEAT_STATE_CHECKED
At the moment we only support FEAT_SPE to be either unconditionally compiled in, or to be not supported at all.
Add support for runtime detection (ENABLE_SPE_FOR_NS=2), by splitting is_armv8_2_feat_spe_present() into an ID register reading function and a second function to report the support status. That function considers both build time settings and runtime information (if needed), and is used before we access SPE related registers.
Previously SPE was enabled unconditionally for all platforms, change this now to the runtime detection version.
Change-Id: I830c094107ce6a398bf1f4aef7ffcb79d4f36552 Signed-off-by: Andre Przywara <andre.przywara@arm.com>
show more ...
|
| #
90118bb5 |
| 03-Feb-2023 |
Andre Przywara <andre.przywara@arm.com> |
refactor(cpufeat): rename ENABLE_SPE_FOR_LOWER_ELS to ENABLE_SPE_FOR_NS
At the moment we hardcode the SPE functionality to be available on the non-secure side only, by setting MDCR_EL2.E2PB accordin
refactor(cpufeat): rename ENABLE_SPE_FOR_LOWER_ELS to ENABLE_SPE_FOR_NS
At the moment we hardcode the SPE functionality to be available on the non-secure side only, by setting MDCR_EL2.E2PB accordingly.
This should be reflected in the feature selection symbol, so rename that to ENABLE_SPE_FOR_NS, to make it clearer that SPE is not supported in the secure world.
Change-Id: I3f9b48eab1a45d6ccfcbb9c90a11eeb66867ad9a Signed-off-by: Andre Przywara <andre.przywara@arm.com>
show more ...
|
| #
16e3ddba |
| 03-Feb-2023 |
Andre Przywara <andre.przywara@arm.com> |
fix(spe): drop SPE EL2 context switch code
At the moment we hardcode the SPE functionality to be available on the non-secure side only, by setting MDCR_EL3.NSPB accordingly. This also means that the
fix(spe): drop SPE EL2 context switch code
At the moment we hardcode the SPE functionality to be available on the non-secure side only, by setting MDCR_EL3.NSPB accordingly. This also means that the secure world cannot use SPE, so there is no need to context switch the PMSCR_EL2 register.
Drop the SPE bits from the EL2 context switch code. If any of the other EL2 worlds wish to start using SPE, this can be brought back.
Change-Id: Ie0fedb2aeb722a2c9db316051fbbe57ca0e3c0c9 Signed-off-by: Andre Przywara <andre.przywara@arm.com>
show more ...
|
| #
c41b8e90 |
| 17-Mar-2023 |
Manish Pandey <manish.pandey2@arm.com> |
Merge "feat(tcr2): support FEAT_TCR2" into integration
|
| #
d3331603 |
| 14-Mar-2023 |
Mark Brown <broonie@kernel.org> |
feat(tcr2): support FEAT_TCR2
Arm v8.9 introduces FEAT_TCR2, adding extended translation control registers. Support this, context switching TCR2_EL2 and disabling traps so lower ELs can access the n
feat(tcr2): support FEAT_TCR2
Arm v8.9 introduces FEAT_TCR2, adding extended translation control registers. Support this, context switching TCR2_EL2 and disabling traps so lower ELs can access the new registers.
Change the FVP platform to default to handling this as a dynamic option so the right decision can be made by the code at runtime.
Signed-off-by: Mark Brown <broonie@kernel.org> Change-Id: I297452acd8646d58bac64fc15e05b06a543e5148
show more ...
|
| #
b4fc0410 |
| 28-Feb-2023 |
Manish Pandey <manish.pandey2@arm.com> |
Merge changes from topic "feat_state_part2" into integration
* changes: refactor(trf): enable FEAT_TRF for FEAT_STATE_CHECKED refactor(brbe): enable FEAT_BRBE for FEAT_STATE_CHECKED refactor(t
Merge changes from topic "feat_state_part2" into integration
* changes: refactor(trf): enable FEAT_TRF for FEAT_STATE_CHECKED refactor(brbe): enable FEAT_BRBE for FEAT_STATE_CHECKED refactor(trbe): enable FEAT_TRBE for FEAT_STATE_CHECKED fix(cpufeat): context-switch: move FGT availability check to callers feat(cpufeat): extend check_feature() to deal with min/max refactor(cpufeat): wrap CPU ID register field isolation
show more ...
|
| #
fc8d2d39 |
| 17-Nov-2022 |
Andre Przywara <andre.przywara@arm.com> |
refactor(trf): enable FEAT_TRF for FEAT_STATE_CHECKED
At the moment we only support FEAT_TRF to be either unconditionally compiled in, or to be not supported at all.
Add support for runtime detecti
refactor(trf): enable FEAT_TRF for FEAT_STATE_CHECKED
At the moment we only support FEAT_TRF to be either unconditionally compiled in, or to be not supported at all.
Add support for runtime detection (ENABLE_TRF_FOR_NS=2), by splitting is_feat_trf_present() into an ID register reading function and a second function to report the support status. That function considers both build time settings and runtime information (if needed), and is used before we access TRF related registers. Also move the context saving code from assembly to C, and use the new is_feat_trf_supported() function to guard its execution.
The FVP platform decided to compile in support unconditionally (=1), even though FEAT_TRF is an ARMv8.4 feature, so is not available with the FVP model's default command line. Change that to the now supported dynamic option (=2), so the right decision can be made by the code at runtime.
Change-Id: Ia97b01adbe24970a4d837afd463dc5506b7295a3 Signed-off-by: Andre Przywara <andre.przywara@arm.com>
show more ...
|
| #
ff491036 |
| 17-Nov-2022 |
Andre Przywara <andre.przywara@arm.com> |
refactor(brbe): enable FEAT_BRBE for FEAT_STATE_CHECKED
At the moment we only support FEAT_BRBE to be either unconditionally compiled in, or to be not supported at all.
Add support for runtime dete
refactor(brbe): enable FEAT_BRBE for FEAT_STATE_CHECKED
At the moment we only support FEAT_BRBE to be either unconditionally compiled in, or to be not supported at all.
Add support for runtime detection (ENABLE_BRBE_FOR_NS=2), by splitting is_feat_brbe_present() into an ID register reading function and a second function to report the support status. That function considers both build time settings and runtime information (if needed), and is used before we access BRBE related registers.
The FVP platform decided to compile in support unconditionally (=1), even though FEAT_BRBE is an ARMv9 feature, so is not available with the FVP model's default command line. Change that to the now supported dynamic option (=2), so the right decision can be made by the code at runtime.
Change-Id: I5f2e2c9648300f65f0fa9a5f8e2f34e73529d053 Signed-off-by: Andre Przywara <andre.przywara@arm.com>
show more ...
|
| #
f5360cfa |
| 17-Nov-2022 |
Andre Przywara <andre.przywara@arm.com> |
refactor(trbe): enable FEAT_TRBE for FEAT_STATE_CHECKED
At the moment we only support FEAT_TRBE to be either unconditionally compiled in, or to be not supported at all.
Add support for runtime dete
refactor(trbe): enable FEAT_TRBE for FEAT_STATE_CHECKED
At the moment we only support FEAT_TRBE to be either unconditionally compiled in, or to be not supported at all.
Add support for runtime detection (ENABLE_TRBE_FOR_NS=2), by splitting is_feat_trbe_present() into an ID register reading function and a second function to report the support status. That function considers both build time settings and runtime information (if needed), and is used before we access TRBE related registers.
The FVP platform decided to compile in support unconditionally (=1), even though FEAT_TRBE is an ARMv9 feature, so is not available with the FVP model's default command line. Change that to the now supported dynamic option (=2), so the right decision can be made by the code at runtime.
Change-Id: Iee7f88ea930119049543a8a4a105389997e7692c Signed-off-by: Andre Przywara <andre.przywara@arm.com>
show more ...
|
| #
de8c4892 |
| 15-Feb-2023 |
Andre Przywara <andre.przywara@arm.com> |
fix(cpufeat): context-switch: move FGT availability check to callers
To be inline with other features, and to allow the availability to be checked for different contexts, move the FGT availability c
fix(cpufeat): context-switch: move FGT availability check to callers
To be inline with other features, and to allow the availability to be checked for different contexts, move the FGT availability check out of the save/restore functions. This is instead now checked at the caller.
Change-Id: I96e0638714f9d1b6fdadc1cb989cbd33bd48b1f6 Signed-off-by: Andre Przywara <andre.przywara@arm.com>
show more ...
|
| #
904da6f1 |
| 10-Feb-2023 |
Manish Pandey <manish.pandey2@arm.com> |
Merge "fix(context-mgmt): enable SCXTNUM access" into integration
|
| #
01cf14dd |
| 02-Feb-2023 |
Maksims Svecovs <maksims.svecovs@arm.com> |
fix(context-mgmt): enable SCXTNUM access
Enable SCXTNUM_ELx access for lower ELs in non-secure state. Make realm context setup take this build flag into account but enable it by default when RME is
fix(context-mgmt): enable SCXTNUM access
Enable SCXTNUM_ELx access for lower ELs in non-secure state. Make realm context setup take this build flag into account but enable it by default when RME is used.
Signed-off-by: Maksims Svecovs <maksims.svecovs@arm.com> Change-Id: Ieb0186b2fdffad464bb9316fc3973772c9c28cd0
show more ...
|
| #
344e5e81 |
| 19-Jan-2023 |
Manish Pandey <manish.pandey2@arm.com> |
Merge changes from topic "feat_state_rework" into integration
* changes: feat(fvp): enable FEAT_HCX by default refactor(context-mgmt): move FEAT_HCX save/restore into C refactor(cpufeat): conv
Merge changes from topic "feat_state_rework" into integration
* changes: feat(fvp): enable FEAT_HCX by default refactor(context-mgmt): move FEAT_HCX save/restore into C refactor(cpufeat): convert FEAT_HCX to new scheme feat(fvp): enable FEAT_FGT by default refactor(context-mgmt): move FEAT_FGT save/restore code into C refactor(amu): convert FEAT_AMUv1 to new scheme refactor(cpufeat): decouple FGT feature detection and build flags refactor(cpufeat): check FEAT_FGT in a new way refactor(cpufeat): move helpers into .c file, rename FEAT_STATE_ feat(aarch64): make ID system register reads non-volatile
show more ...
|
| #
c5a3ebbd |
| 15-Nov-2022 |
Andre Przywara <andre.przywara@arm.com> |
refactor(context-mgmt): move FEAT_HCX save/restore into C
At the moment we save and restore the HCRX_EL2 register in assembly, and just depend on the build time flags. To allow runtime checking, and
refactor(context-mgmt): move FEAT_HCX save/restore into C
At the moment we save and restore the HCRX_EL2 register in assembly, and just depend on the build time flags. To allow runtime checking, and to avoid too much code in assembly, move that over to C, and use the new combined build/runtime feature check.
This also allows to drop the assert, since this should now be covered by the different FEAT_STATE_x options.
Change-Id: I3e20b9ba17121d423cd08edc20bbf4e7ae7c0178 Signed-off-by: Andre Przywara <andre.przywara@arm.com>
show more ...
|
| #
bb7b85a3 |
| 10-Nov-2022 |
Andre Przywara <andre.przywara@arm.com> |
refactor(context-mgmt): move FEAT_FGT save/restore code into C
At the moment we do the EL2 context save/restore sequence in assembly, where it is just guarded by #ifdef statement for the build time
refactor(context-mgmt): move FEAT_FGT save/restore code into C
At the moment we do the EL2 context save/restore sequence in assembly, where it is just guarded by #ifdef statement for the build time flags. This does not cover the FEAT_STATE_CHECK case, where we need to check for the runtime availability of a feature.
To simplify this extension, and to avoid writing too much code in assembly, move that sequence into C: it is called from C context anyways.
This protects the C code with the new version of the is_xxx_present() check, which combines both build time and runtime check, as necessary, and allows the compiler to optimise the calls aways, if we don't need them.
Signed-off-by: Andre Przywara <andre.przywara@arm.com> Change-Id: I7c91bec60efcc00a43429dc0381f7e1c203be780
show more ...
|
| #
ce485955 |
| 10-Nov-2022 |
Andre Przywara <andre.przywara@arm.com> |
refactor(cpufeat): decouple FGT feature detection and build flags
Split the feature check for FEAT_FGT into two parts: - A boolean function that just evaluates whether the feature is usable. This
refactor(cpufeat): decouple FGT feature detection and build flags
Split the feature check for FEAT_FGT into two parts: - A boolean function that just evaluates whether the feature is usable. This takes build time flags into account, and only evaluates the CPU feature ID registers when the flexible FEAT_STATE_CHECK method is used. - A "raw" function that returns the unfiltered CPU feature ID register.
Change the callers where needed, to give them the version they actually want.
Signed-off-by: Andre Przywara <andre.przywara@arm.com> Change-Id: I9a041132d280451f5d9f653a62904f603b2a916d
show more ...
|
| #
2f546146 |
| 11-Nov-2022 |
Manish Pandey <manish.pandey2@arm.com> |
Merge "fix(pmu): add sensible default for MDCR_EL2" into integration
|
| #
7f856198 |
| 26-Oct-2022 |
Boyan Karatotev <boyan.karatotev@arm.com> |
fix(pmu): add sensible default for MDCR_EL2
When TF-A is set to save and restore EL2 registers it initially zeroes all of them so that it does not leak any information. However, MDCR_EL2.HPMN of 0 i
fix(pmu): add sensible default for MDCR_EL2
When TF-A is set to save and restore EL2 registers it initially zeroes all of them so that it does not leak any information. However, MDCR_EL2.HPMN of 0 is poorly defined when FEAT_HPMN0 is not implemented. Set it to its hardware reset value so that lower ELs don't inherit a wrong value.
Signed-off-by: Boyan Karatotev <boyan.karatotev@arm.com> Change-Id: I8055005ef9b6eaafefa13b62a0b41289079fdd23
show more ...
|
| #
f41e23ea |
| 10-Nov-2022 |
Olivier Deprez <olivier.deprez@arm.com> |
Merge changes from topic "mp/ras_refactoring" into integration
* changes: docs: document do_panic() and panic() helper functions fix(ras): restrict RAS support for NS world
|
| #
46cc41d5 |
| 10-Oct-2022 |
Manish Pandey <manish.pandey2@arm.com> |
fix(ras): restrict RAS support for NS world
Current RAS framework in TF-A only supports handling errors originating from NS world but the HANDLE_EA_EL3_FIRST flag configures it for all lower Els. To
fix(ras): restrict RAS support for NS world
Current RAS framework in TF-A only supports handling errors originating from NS world but the HANDLE_EA_EL3_FIRST flag configures it for all lower Els. To make the current design of RAS explicit, rename this macro to HANDLE_EA_EL3_FIRST_NS and set EA bit in scr_el3 only when switching to NS world.
Note: I am unaware of any platform which traps errors originating in Secure world to EL3, if there is any such platform then it need to be explicitly implemented in TF-A
Signed-off-by: Manish Pandey <manish.pandey2@arm.com> Change-Id: If58eb201d8fa792c16325c85c26056e9b409b750
show more ...
|
| #
2c16b802 |
| 30-Sep-2022 |
Manish Pandey <manish.pandey2@arm.com> |
Merge "fix(ras): trap "RAS error record" accesses only for NS" into integration
|