| 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 ...
|
| ed804406 | 11-Nov-2022 |
Rohit Mathew <rohit.mathew@arm.com> |
fix(mpam): run-time checks for mpam save/restore routines
With "ENABLE_MPAM_FOR_LOWER_ELS" and "CTX_INCLUDE_EL2_REGS" build options enabled, MPAM EL2 registers would be saved/restored as part of con
fix(mpam): run-time checks for mpam save/restore routines
With "ENABLE_MPAM_FOR_LOWER_ELS" and "CTX_INCLUDE_EL2_REGS" build options enabled, MPAM EL2 registers would be saved/restored as part of context management. Context save/restore routines as of now would proceed to access all of MPAM EL2 registers without any runtime checks. MPAM specification states that MPAMHCR_EL2 should only be accessed if MPAMIDR_EL1.HAS_HCR is "1". Likewise, MPAMIDR_EL1.VPMR_MAX has to be probed to obtain the maximum supported MPAMVPM<x>_EL2 before accessing corresponding MPAMVPM<x>_EL2 registers. Since runtime checks are not being made, an exception would be raised if the platform under test doesn't support one of the registers. On Neoverse reference design platforms, an exception is being raised while MPAMVPM2_EL2 or above are accessed. Neoverse reference design platforms support only registers till MPAMVPM1_EL2 at this point.
To resolve this, add sufficient runtime checks in MPAM EL2 context save/restore routines. As part of the new save/restore routines, MPAMIDR_EL1.HAS_HCR and MPAMIDR_EL1.VPMR_MAX are probed for the right set of registers to be saved and restored.
CC: Davidson Kumaresan <davidson.kumaresan@arm.com> Signed-off-by: Rohit Mathew <rohit.mathew@arm.com> Change-Id: I2e3affd23091023b287b2bd5057a4a549037b611
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 ...
|