| #
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 ...
|
| #
cadd6afc |
| 13-Jun-2022 |
Manish Pandey <manish.pandey2@arm.com> |
Merge "refactor(context mgmt): refactor EL2 context save and restore functions" into integration
|
| #
d20052f3 |
| 04-Apr-2022 |
Zelalem Aweke <zelalem.aweke@arm.com> |
refactor(context mgmt): refactor EL2 context save and restore functions
This patch splits the el2_sysregs_context_save/restore functions into multiple functions based on features. This will allow us
refactor(context mgmt): refactor EL2 context save and restore functions
This patch splits the el2_sysregs_context_save/restore functions into multiple functions based on features. This will allow us to selectively save and restore EL2 context registers based on features enabled for a particular configuration.
For now feature build flags are used to decide which registers to save and restore. The long term plan is to dynamically check for features that are enabled and then save/restore registers accordingly. Splitting el2_sysregs_context_save/restore functions into smaller assembly functions makes that task easier. For more information please take a look at: https://trustedfirmware-a.readthedocs.io/en/latest/design_documents/context_mgmt_rework.html
Signed-off-by: Zelalem Aweke <zelalem.aweke@arm.com> Change-Id: I1819a9de8b70fa35c8f45568908025f790c4808c
show more ...
|
| #
6cd0a2cb |
| 12-Apr-2022 |
Joanna Farley <joanna.farley@arm.com> |
Merge "refactor(context mgmt): remove registers accessible only from secure state from EL2 context" into integration
|
| #
7f41bcc7 |
| 03-Nov-2021 |
Zelalem Aweke <zelalem.aweke@arm.com> |
refactor(context mgmt): remove registers accessible only from secure state from EL2 context
The following registers are only accessible from secure state, therefore don't need to be saved/restored d
refactor(context mgmt): remove registers accessible only from secure state from EL2 context
The following registers are only accessible from secure state, therefore don't need to be saved/restored during world switch. - SDER32_EL2 - VSTCR_EL2 - VSTTBR_EL2
This patch removes these registers from EL2 context.
Signed-off-by: Zelalem Aweke <zelalem.aweke@arm.com> Change-Id: I24d08aacb1b6def261c7b37d3e1265bb76adafdc
show more ...
|
| #
f6ca81dd |
| 07-Apr-2022 |
Manish Pandey <manish.pandey2@arm.com> |
Merge changes from topic "jc/detect_feat" into integration
* changes: docs(build): update the feature enablement flags refactor(el3-runtime): replace ARM_ARCH_AT_LEAST macro with FEAT flags re
Merge changes from topic "jc/detect_feat" into integration
* changes: docs(build): update the feature enablement flags refactor(el3-runtime): replace ARM_ARCH_AT_LEAST macro with FEAT flags refactor(el3-runtime): add arch-features detection mechanism
show more ...
|
| #
0ce220af |
| 26-Jan-2022 |
Jayanth Dodderi Chidanand <jayanthdodderi.chidanand@arm.com> |
refactor(el3-runtime): replace ARM_ARCH_AT_LEAST macro with FEAT flags
Replacing ARM_ARCH_AT_LEAST macro with feature specific build options to prevent unconditional accesses to the registers during
refactor(el3-runtime): replace ARM_ARCH_AT_LEAST macro with FEAT flags
Replacing ARM_ARCH_AT_LEAST macro with feature specific build options to prevent unconditional accesses to the registers during context save and restore routines.
Registers are tightly coupled with features more than architecture versions. Henceforth having a feature-specific build flag guarding the respective registers, will restrict any undefined actions.
Signed-off-by: Jayanth Dodderi Chidanand <jayanthdodderi.chidanand@arm.com> Change-Id: I809774df580530803c8a6e05a62d8d4de0910e02
show more ...
|
| #
a5645148 |
| 13-Dec-2021 |
Manish Pandey <manish.pandey2@arm.com> |
Merge changes from topic "jc/AMUv1" into integration
* changes: docs(build-options): add build macros for features FGT,AMUv1 and ECV fix(amu): fault handling on EL2 context switch
|
| #
f74cb0be |
| 25-Nov-2021 |
Jayanth Dodderi Chidanand <jayanthdodderi.chidanand@arm.com> |
fix(amu): fault handling on EL2 context switch
The HAFGRTR_EL2 register is UNDEFINED unless the CPU supports both FEAT_FGT and FEAT_AMUv1. FEAT_FGT is mandatory for v8.6-A and upwards, but FEAT_AMUv
fix(amu): fault handling on EL2 context switch
The HAFGRTR_EL2 register is UNDEFINED unless the CPU supports both FEAT_FGT and FEAT_AMUv1. FEAT_FGT is mandatory for v8.6-A and upwards, but FEAT_AMUv1 is optional (from v8.4-A upwards), and as such any 8.6-A cores today without support for FEAT_AMUv1 will trigger an undefined instruction exception on accessing this register.
Currently ARM_ARCH_AT_LEAST macro has been used to associate with an architecture extension allowing to access HAFGRTR_EL2 register. This condition should be replaced with macros specific to individual features. This patch adds a new set of macros "ENABLE_FEAT_FGT, ENABLE_FEAT_AMUv1, ENABLE_FEAT_ECV" under build options to provide controlled access to the HAFGRTR_EL2 register.
Further to ensure that the the build options passed comply with the given hardware implementation, a feature detection mechanism, checking whether build options match with the architecture is required at bootime. This will be implemented and pushed later in a separate patch.
Signed-off-by: Jayanth Dodderi Chidanand <jayanthdodderi.chidanand@arm.com> Change-Id: Ie390f4babe233b8b09455290277edbddecd33ead
show more ...
|
| #
1d651211 |
| 06-Oct-2021 |
Soby Mathew <soby.mathew@arm.com> |
Merge changes from topic "za/feat_rme" into integration
* changes: refactor(gpt): productize and refactor GPT library feat(rme): disable Watchdog for Arm platforms if FEAT_RME enabled docs(rme
Merge changes from topic "za/feat_rme" into integration
* changes: refactor(gpt): productize and refactor GPT library feat(rme): disable Watchdog for Arm platforms if FEAT_RME enabled docs(rme): add build and run instructions for FEAT_RME fix(plat/fvp): bump BL2 stack size fix(plat/fvp): allow changing the kernel DTB load address refactor(plat/arm): rename ARM_DTB_DRAM_NS region macros refactor(plat/fvp): update FVP platform DTS for FEAT_RME feat(plat/arm): add GPT initialization code for Arm platforms feat(plat/fvp): add memory map for FVP platform for FEAT_RME refactor(plat/arm): modify memory region attributes to account for FEAT_RME feat(plat/fvp): add RMM image support for FVP platform feat(rme): add GPT Library feat(rme): add ENABLE_RME build option and support for RMM image refactor(makefile): remove BL prefixes in build macros feat(rme): add context management changes for FEAT_RME feat(rme): add Test Realm Payload (TRP) feat(rme): add RMM dispatcher (RMMD) feat(rme): run BL2 in root world when FEAT_RME is enabled feat(rme): add xlat table library changes for FEAT_RME feat(rme): add Realm security state definition feat(rme): add register definitions and helper functions for FEAT_RME
show more ...
|
| #
c5ea4f8a |
| 09-Jul-2021 |
Zelalem Aweke <zelalem.aweke@arm.com> |
feat(rme): add context management changes for FEAT_RME
This patch adds a new context for realm world and realm world awareness in context management.
Signed-off-by: Zelalem Aweke <zelalem.aweke@arm
feat(rme): add context management changes for FEAT_RME
This patch adds a new context for realm world and realm world awareness in context management.
Signed-off-by: Zelalem Aweke <zelalem.aweke@arm.com> Signed-off-by: Subhasish Ghosh <subhasish.ghosh@arm.com> Change-Id: Ic17469393603e789d7adc025880346bc3d6233d7
show more ...
|
| #
72a56fca |
| 28-Sep-2021 |
Manish Pandey <manish.pandey2@arm.com> |
Merge "feat(hcx): add build option to enable FEAT_HCX" into integration
|
| #
cb4ec47b |
| 05-Aug-2021 |
johpow01 <john.powell@arm.com> |
feat(hcx): add build option to enable FEAT_HCX
FEAT_HCX adds the extended hypervisor configuration register (HCRX_EL2) and access to this register must be explicitly enabled through the SCR_EL3.HXEn
feat(hcx): add build option to enable FEAT_HCX
FEAT_HCX adds the extended hypervisor configuration register (HCRX_EL2) and access to this register must be explicitly enabled through the SCR_EL3.HXEn bit. This patch adds a new build flag ENABLE_FEAT_HCX to allow the register to be accessed from EL2.
Signed-off-by: John Powell <john.powell@arm.com> Change-Id: Ibb36ad90622f1dc857adab4b0d4d7a89456a522b
show more ...
|
| #
81a8b2da |
| 30-Jun-2021 |
Olivier Deprez <olivier.deprez@arm.com> |
Merge "feat(sve): enable SVE for the secure world" into integration
|
| #
0c5e7d1c |
| 22-Mar-2021 |
Max Shvetsov <maksims.svecovs@arm.com> |
feat(sve): enable SVE for the secure world
Enables SVE support for the secure world via ENABLE_SVE_FOR_SWD. ENABLE_SVE_FOR_SWD defaults to 0 and has to be explicitly set by the platform. SVE is conf
feat(sve): enable SVE for the secure world
Enables SVE support for the secure world via ENABLE_SVE_FOR_SWD. ENABLE_SVE_FOR_SWD defaults to 0 and has to be explicitly set by the platform. SVE is configured during initial setup and then uses EL3 context save/restore routine to switch between SVE configurations for different contexts. Reset value of CPTR_EL3 changed to be most restrictive by default.
Signed-off-by: Max Shvetsov <maksims.svecovs@arm.com> Change-Id: I889fbbc2e435435d66779b73a2d90d1188bf4116
show more ...
|
| #
e729595f |
| 07-Apr-2021 |
Olivier Deprez <olivier.deprez@arm.com> |
Merge "Fix: Remove save/restore of EL2 timer registers" into integration
|
| #
a7cf2743 |
| 31-Mar-2021 |
Max Shvetsov <maksims.svecovs@arm.com> |
Fix: Remove save/restore of EL2 timer registers
Since there is a secure and non-secure version of the timer registers there is no need to preserve their context in EL3. With that, following register
Fix: Remove save/restore of EL2 timer registers
Since there is a secure and non-secure version of the timer registers there is no need to preserve their context in EL3. With that, following registers were removed from EL3 save/restore routine: cnthps_ctl_el2 cnthps_tval_el2 cnthps_cval_el2 cnthvs_ctl_el2 cnthvs_tval_el2 cnthvs_cval_el2 cnthp_ctl_el2 cnthp_cval_el2 cnthp_tval_el2 cnthv_ctl_el2 cnthv_cval_el2 cnthv_tval_el2
Signed-off-by: Max Shvetsov <maksims.svecovs@arm.com> Change-Id: I6e2fc09c74a7375c4fccc11f12af4e39e6dc616b
show more ...
|
| #
96edbe03 |
| 02-Feb-2021 |
Madhukar Pappireddy <madhukar.pappireddy@arm.com> |
Merge "Fix exception handlers in BL31: Use DSB to synchronize pending EA" into integration
|
| #
c2d32a5f |
| 24-Jul-2020 |
Madhukar Pappireddy <madhukar.pappireddy@arm.com> |
Fix exception handlers in BL31: Use DSB to synchronize pending EA
For SoCs which do not implement RAS, use DSB as a barrier to synchronize pending external aborts at the entry and exit of exception
Fix exception handlers in BL31: Use DSB to synchronize pending EA
For SoCs which do not implement RAS, use DSB as a barrier to synchronize pending external aborts at the entry and exit of exception handlers. This is needed to isolate the SErrors to appropriate context.
However, this introduces an unintended side effect as discussed in the https://review.trustedfirmware.org/c/TF-A/trusted-firmware-a/+/3440 A summary of the side effect and a quick workaround is provided as part of this patch and summarized here:
The explicit DSB at the entry of various exception vectors in BL31 for handling exceptions from lower ELs can inadvertently trigger an SError exception in EL3 due to pending asyncrhonouus aborts in lower ELs. This will end up being handled by serror_sp_elx in EL3 which will ultimately panic and die.
The way to workaround is to update a flag to indicate if the exception truly came from EL3. This flag is allocated in the cpu_context structure. This is not a bullet proof solution to the problem at hand because we assume the instructions following "isb" that help to update the flag (lines 100-102 & 139-141) execute without causing further exceptions.
Change-Id: I4d345b07d746a727459435ddd6abb37fda24a9bf Signed-off-by: Madhukar Pappireddy <madhukar.pappireddy@arm.com>
show more ...
|
| #
faf7713c |
| 18-Aug-2020 |
Alexei Fedorov <Alexei.Fedorov@arm.com> |
Merge "el3_runtime: Rearrange context offset of EL1 sys registers" into integration
|
| #
cb55615c |
| 28-Jul-2020 |
Manish V Badarkhe <Manish.Badarkhe@arm.com> |
el3_runtime: Rearrange context offset of EL1 sys registers
SCTLR and TCR registers of EL1 plays role in enabling/disabling of page table walk for lower ELs (EL0 and EL1). Hence re-arranged EL1 conte
el3_runtime: Rearrange context offset of EL1 sys registers
SCTLR and TCR registers of EL1 plays role in enabling/disabling of page table walk for lower ELs (EL0 and EL1). Hence re-arranged EL1 context offsets to have SCTLR and TCR registers values one after another in the stack so that these registers values can be saved and restored using stp and ldp instruction respectively.
Change-Id: Iaa28fd9eba82a60932b6b6d85ec8857a9acd5f8b Signed-off-by: Manish V Badarkhe <Manish.Badarkhe@arm.com>
show more ...
|
| #
f1a1653c |
| 19-May-2020 |
Manish Pandey <manish.pandey2@arm.com> |
Merge "Fix exception in save/restore of EL2 registers." into integration
|
| #
30ee3755 |
| 13-May-2020 |
Max Shvetsov <maksims.svecovs@arm.com> |
Fix exception in save/restore of EL2 registers.
Removing FPEXC32_EL2 from the register save/restore routine for EL2 registers since it is already a part of save/restore routine for fpregs.
Signed-o
Fix exception in save/restore of EL2 registers.
Removing FPEXC32_EL2 from the register save/restore routine for EL2 registers since it is already a part of save/restore routine for fpregs.
Signed-off-by: Max Shvetsov <maksims.svecovs@arm.com> Change-Id: I5ed45fdbf7c8efa8dcfcd96586328d4f6b256bc4
show more ...
|
| #
f89eea4e |
| 24-Mar-2020 |
Manish Pandey <manish.pandey2@arm.com> |
Merge "context: TPIDR_EL2 register not saved/restored" into integration
|