| d6c76e6c | 17-Apr-2024 |
Madhukar Pappireddy <madhukar.pappireddy@arm.com> |
fix(cm): add more feature registers to EL1 context mgmt
The following system registers are made part of save and restore operations for EL1 context:
TRFCR_EL1 SCXTNUM_EL0 SCXTNUM_EL1 GCSCR_EL1 GCSC
fix(cm): add more feature registers to EL1 context mgmt
The following system registers are made part of save and restore operations for EL1 context:
TRFCR_EL1 SCXTNUM_EL0 SCXTNUM_EL1 GCSCR_EL1 GCSCRE0_EL1 GCSPR_EL1 GCSPR_EL0
Change-Id: I1077112bdc29a6c9cd39b9707d6cf10b95fa15e3 Signed-off-by: Madhukar Pappireddy <madhukar.pappireddy@arm.com>
show more ...
|
| d3604b35 | 16-Apr-2024 |
Manish Pandey <manish.pandey2@arm.com> |
Merge changes from topic "lto-fixes" into integration
* changes: fix(bl1): add missing `__RW_{START,END}__` symbols fix(fvp): don't check MPIDRs with the power controller in BL1 fix(arm): only
Merge changes from topic "lto-fixes" into integration
* changes: fix(bl1): add missing `__RW_{START,END}__` symbols fix(fvp): don't check MPIDRs with the power controller in BL1 fix(arm): only expose `arm_bl2_dyn_cfg_init` to BL2 fix(cm): hide `cm_init_context_by_index` from BL1 fix(bl1): add missing spinlock dependency
show more ...
|
| a796d5aa | 11-Apr-2024 |
Jayanth Dodderi Chidanand <jayanthdodderi.chidanand@arm.com> |
fix(cm): remove ENABLE_FEAT_MTE usage
commit@c282384dbb45b6185b4aba14efebbad110d18e49 removed ENABLE_FEAT_MTE but missed its usage in context structure declaration path.
All mte regs that are curre
fix(cm): remove ENABLE_FEAT_MTE usage
commit@c282384dbb45b6185b4aba14efebbad110d18e49 removed ENABLE_FEAT_MTE but missed its usage in context structure declaration path.
All mte regs that are currently context saved/restored are needed only when FEAT_MTE2 is enabled, so move to usage of FEAT_MTE2 and remove FEAT_MTE usage
Change-Id: I6b4417485fa6b7f52a31045562600945e48e81b7 Signed-off-by: Jayanth Dodderi Chidanand <jayanthdodderi.chidanand@arm.com>
show more ...
|
| a6b3643c | 06-Feb-2024 |
Chris Kay <chris.kay@arm.com> |
fix(cm): hide `cm_init_context_by_index` from BL1
BL1 requires the context management library but does not use or implement `cm_init_context_by_index`. This change ensures that is not compiled into
fix(cm): hide `cm_init_context_by_index` from BL1
BL1 requires the context management library but does not use or implement `cm_init_context_by_index`. This change ensures that is not compiled into BL1, as linking with LTO enabled causes an undefined reference for this function.
Change-Id: I4a4602843bd75bc4f47b3e0c4c5a6efce1514ef6 Signed-off-by: Chris Kay <chris.kay@arm.com>
show more ...
|
| ed9bb824 | 25-Mar-2024 |
Madhukar Pappireddy <madhukar.pappireddy@arm.com> |
fix(cm): add more system registers to EL1 context mgmt
The following system registers are made part of save and restore operations for EL1 context: MDCCINT_EL1 MDSCR_EL1 DISR_EL1 PIRE0_EL1
fix(cm): add more system registers to EL1 context mgmt
The following system registers are made part of save and restore operations for EL1 context: MDCCINT_EL1 MDSCR_EL1 DISR_EL1 PIRE0_EL1 PIR_EL1 POR_EL1 S2POR_EL1 TCR2_EL1
Some of these registers are available as part of core Armv8-A architecture while others are made available through various architectural extensions.
Change-Id: I507dccb9053ba177e1b98100fceccd1f32bdfc5c Signed-off-by: Madhukar Pappireddy <madhukar.pappireddy@arm.com>
show more ...
|
| 6aae3acf | 01-Apr-2024 |
Madhukar Pappireddy <madhukar.pappireddy@arm.com> |
fix(cm): save guarded control stack registers
This patch fixes a typo which led to incorrect context save operations for two FEAT_GCS registers.
Change-Id: I3d3202a6721714bbc8f84c2d775d1b28afffa5df
fix(cm): save guarded control stack registers
This patch fixes a typo which led to incorrect context save operations for two FEAT_GCS registers.
Change-Id: I3d3202a6721714bbc8f84c2d775d1b28afffa5df Signed-off-by: Madhukar Pappireddy <madhukar.pappireddy@arm.com>
show more ...
|
| c282384d | 07-Mar-2024 |
Govindraj Raja <govindraj.raja@arm.com> |
refactor(mte): remove mte, mte_perm
Currently both FEAT_MTE and FEAT_MTE_PERM aren't used for enabling of any feature bits in EL3. So remove both FEAT handling.
All mte regs that are currently cont
refactor(mte): remove mte, mte_perm
Currently both FEAT_MTE and FEAT_MTE_PERM aren't used for enabling of any feature bits in EL3. So remove both FEAT handling.
All mte regs that are currently context saved/restored are needed only when FEAT_MTE2 is enabled, so move to usage of FEAT_MTE2 and remove FEAT_MTE usage.
BREAKING CHANGE: Any platform or downstream code trying to use SCR_EL3.ATA bit(26) will see failures as this is now moved to be used only with FEAT_MTE2 with commit@ef0d0e5478a3f19cbe70a378b9b184036db38fe2
Change-Id: Id01e154156571f7792135639e17dc5c8d0e17cf8 Signed-off-by: Govindraj Raja <govindraj.raja@arm.com>
show more ...
|
| 869ee086 | 22-Mar-2024 |
Manish Pandey <manish.pandey2@arm.com> |
Merge "fix(mte): use ATA bit with FEAT_MTE2" into integration |
| d39b1236 | 06-Mar-2024 |
Jayanth Dodderi Chidanand <jayanthdodderi.chidanand@arm.com> |
refactor(cm): minor update on conditions used in prepare_el3_exit
This patch covers the following:
* Conditions set for verifying the EL2 presence and its usage for various scenarios while exitin
refactor(cm): minor update on conditions used in prepare_el3_exit
This patch covers the following:
* Conditions set for verifying the EL2 presence and its usage for various scenarios while exiting to Non secure world "cm_prepare_el3_exit" has been improved.
* It thereby also fixes the issue(misra_c_2012_rule_15_7_violation) for not terminating "if..else if" construct with an else statement and keeps code in accordance with MISRA standards.
Change-Id: Ie5284447f5ac91412552629b76dbf2e636a09fd9 Signed-off-by: Jayanth Dodderi Chidanand <jayanthdodderi.chidanand@arm.com>
show more ...
|
| ef0d0e54 | 28-Feb-2024 |
Govindraj Raja <govindraj.raja@arm.com> |
fix(mte): use ATA bit with FEAT_MTE2
Currently SCR_EL3.ATA bit(26) is used freely or either with FEAT_MTE, But ATA bit is available only with FEAT_MTE2. So use FEAT_MTE2 conditional check for use of
fix(mte): use ATA bit with FEAT_MTE2
Currently SCR_EL3.ATA bit(26) is used freely or either with FEAT_MTE, But ATA bit is available only with FEAT_MTE2. So use FEAT_MTE2 conditional check for use of SCR_EL3.ATA.
Ref: https://developer.arm.com/documentation/ddi0601/2023-12/AArch64-Registers/SCR-EL3--Secure-Configuration-Register?lang=en#fieldset_0-26_26-1
Change-Id: I0a5766a138b0be760c5584014f1ab817e4207a93 Signed-off-by: Govindraj Raja <govindraj.raja@arm.com>
show more ...
|
| d6af2344 | 24-Jan-2024 |
Jayanth Dodderi Chidanand <jayanthdodderi.chidanand@arm.com> |
refactor(cm): couple el2 registers with dependent feature flags
Currently the EL2 part of the context structure (el2_sysregs_t), is mostly feature dependent.
For instance, CTX_HCRX_EL2 is only need
refactor(cm): couple el2 registers with dependent feature flags
Currently the EL2 part of the context structure (el2_sysregs_t), is mostly feature dependent.
For instance, CTX_HCRX_EL2 is only needed when FEAT_HCX (ENABLE_FEAT_HCX=1) is set, but the entry is unconditionally added in the EL2 context structure and thereby consuming memory even in build configurations where FEAT_HCX is disabled.
Henceforth, all such context entries should be coupled/tied with their respective feature enables and be optimized away when unused. This would reduce the context memory allocation for platforms, that dont enable/support all the architectural features at once.
Further, converting the assembly context-offset entries into a c structure relies on garbage collection of the linker removing unreferenced structures from memory, as well as aiding in readability and future maintenance.
Change-Id: I0cf49498ee3033cb6f3ee3810331121b26627783 Signed-off-by: Jayanth Dodderi Chidanand <jayanthdodderi.chidanand@arm.com>
show more ...
|
| 885e93f9 | 22-Feb-2024 |
Olivier Deprez <olivier.deprez@arm.com> |
Merge "fix(cm): update gic el2 sysregs save/restore mechanism" into integration |
| 59f8882b | 08-Jan-2024 |
Jayanth Dodderi Chidanand <jayanthdodderi.chidanand@arm.com> |
refactor(context-mgmt): move EL1 save/restore routines into C
Similar to the refactoring process followed for EL2 system registers, moving the save and restore routines of EL1 system registers into
refactor(context-mgmt): move EL1 save/restore routines into C
Similar to the refactoring process followed for EL2 system registers, moving the save and restore routines of EL1 system registers into C file, thereby reducing assembly code.
Change-Id: Ib59fbbe2eef2aa815effe854cf962fc4ac62a2ae Signed-off-by: Jayanth Dodderi Chidanand <jayanthdodderi.chidanand@arm.com>
show more ...
|
| 937d6fdb | 05-Feb-2024 |
Manish Pandey <manish.pandey2@arm.com> |
fix(cm): update gic el2 sysregs save/restore mechanism
This patch does following two changes - Create a separate routine for saving/restoring GIC el2 system registers - To access ICC_SRE_EL2 registe
fix(cm): update gic el2 sysregs save/restore mechanism
This patch does following two changes - Create a separate routine for saving/restoring GIC el2 system registers - To access ICC_SRE_EL2 register there was a workaround to set SCR_EL3.NS before accessing it. This was required because SCR_EL3.EEL2 was zero. But with commit f105dd5fa this bit has been set to one early on in booting process for a system with FEAT_SEL2 present and S-EL2 enabled. However, we still need the workaround for a system which needs save/restore of EL2 registers without secure EL2 being enabled e.g. system with Non-secure and Realm world present.
Signed-off-by: Manish Pandey <manish.pandey2@arm.com> Change-Id: I8d55c3dc6a17c4749748822d4a738912c1e13298
show more ...
|
| 8e397889 | 26-Jan-2024 |
Govindraj Raja <govindraj.raja@arm.com> |
feat(mte): add mte2 feat
Add support for feat mte2. tfsr_el2 is available only with mte2, however currently its context_save/restore is done with mte rather than mte2, so introduce 'is_feat_mte2_sup
feat(mte): add mte2 feat
Add support for feat mte2. tfsr_el2 is available only with mte2, however currently its context_save/restore is done with mte rather than mte2, so introduce 'is_feat_mte2_supported' to check mte2.
Change-Id: I108d9989a8f5b4d1d2f3b9865a914056fa566cf2 Signed-off-by: Govindraj Raja <govindraj.raja@arm.com>
show more ...
|
| 30019d86 | 25-Oct-2023 |
Sona Mathew <sonarebecca.mathew@arm.com> |
feat(cpufeat): add feature detection for FEAT_CSV2_3
This feature provides support to context save the SCXTNUM_ELx register. FEAT_CSV2_3 implies the implementation of FEAT_CSV2_2. FEAT_CSV2_3 is sup
feat(cpufeat): add feature detection for FEAT_CSV2_3
This feature provides support to context save the SCXTNUM_ELx register. FEAT_CSV2_3 implies the implementation of FEAT_CSV2_2. FEAT_CSV2_3 is supported in AArch64 state only and is an optional feature in Arm v8.0 implementations.
This patch adds feature detection for v8.9 feature FEAT_CSV2_3, adds macros for ID_AA64PFR0_EL1.CSV2 bits [59:56] for detecting FEAT_CSV2_3 and macro for ENABLE_FEAT_CSV2_3.
Change-Id: Ida9f31e832b5f11bd89eebd6cc9f10ddad755c14 Signed-off-by: Sona Mathew <sonarebecca.mathew@arm.com>
show more ...
|
| 30788a84 | 25-Jan-2024 |
Govindraj Raja <govindraj.raja@arm.com> |
fix(mte): remove CTX_INCLUDE_MTE_REGS usage
commit@0a33adc058080433f73bde73895266068990245c Deprecated CTX_INCLUDE_MTE_REGS but missed its usage in context save and restore path.
Change-Id: I30544a
fix(mte): remove CTX_INCLUDE_MTE_REGS usage
commit@0a33adc058080433f73bde73895266068990245c Deprecated CTX_INCLUDE_MTE_REGS but missed its usage in context save and restore path.
Change-Id: I30544abdff2cf92ff05d2d4df46ffc6ff10611de Signed-off-by: Govindraj Raja <govindraj.raja@arm.com>
show more ...
|
| 0a33adc0 | 21-Dec-2023 |
Govindraj Raja <govindraj.raja@arm.com> |
refactor(mte): deprecate CTX_INCLUDE_MTE_REGS
Currently CTX_INCLUDE_MTE_REGS is used for dual purpose, to enable allocation tags register and to context save and restore them and also to check if mt
refactor(mte): deprecate CTX_INCLUDE_MTE_REGS
Currently CTX_INCLUDE_MTE_REGS is used for dual purpose, to enable allocation tags register and to context save and restore them and also to check if mte feature is available.
To make it more meaningful, remove CTX_INCLUDE_MTE_REGS and introduce FEAT_MTE. This would enable allocation tags register when FEAT_MTE is enabled and also supported from platform.
Also arch features can be conditionally enabled disabled based on arch version from `make_helpers/arch_features.mk`
Change-Id: Ibdd2d43874634ad7ddff93c7edad6044ae1631ed Signed-off-by: Govindraj Raja <govindraj.raja@arm.com>
show more ...
|
| bfef8b90 | 08-Nov-2023 |
Juan Pablo Conde <juanpablo.conde@arm.com> |
feat(context-mgmt): report context memory usage
This patch provides a reporting functionality to display the memory consumed by the context in each security state and for each exception level. Flag
feat(context-mgmt): report context memory usage
This patch provides a reporting functionality to display the memory consumed by the context in each security state and for each exception level. Flag PLATFORM_REPORT_CTX_MEM_USE enables or disables this feature.
Change-Id: I1515366bf87561dcedf2b3206be167804df681d4 Signed-off-by: Juan Pablo Conde <juanpablo.conde@arm.com> Signed-off-by: Jayanth Dodderi Chidanand <jayanthdodderi.chidanand@arm.com>
show more ...
|
| 9acff28a | 06-Oct-2023 |
Arvind Ram Prakash <arvind.ramprakash@arm.com> |
build(mpam): add new build option CTX_INCLUDE_MPAM_REGS
New build option CTX_INCLUDE_MPAM_REGS is added to select if the firmware needs to save the MPAM EL2 registers during world switches. This opt
build(mpam): add new build option CTX_INCLUDE_MPAM_REGS
New build option CTX_INCLUDE_MPAM_REGS is added to select if the firmware needs to save the MPAM EL2 registers during world switches. This option is currently disabled as MPAM is only enabled for NS world.
Signed-off-by: Arvind Ram Prakash <arvind.ramprakash@arm.com> Change-Id: Ie2e5e184cdb65f7e1a98d8fe81590253fd859679
show more ...
|
| ac4f6aaf | 08-Nov-2023 |
Arvind Ram Prakash <arvind.ramprakash@arm.com> |
refactor(cm): move MPAM3_EL3 reg to per world context
Refactor MPAM3_EL3 to be world-specific, eliminating redundant cross-CPU value duplication and reducing memory footprint.
Signed-off-by: Arvind
refactor(cm): move MPAM3_EL3 reg to per world context
Refactor MPAM3_EL3 to be world-specific, eliminating redundant cross-CPU value duplication and reducing memory footprint.
Signed-off-by: Arvind Ram Prakash <arvind.ramprakash@arm.com> Change-Id: Iddf020a5462737e01ac35e4f2b2b204a8759fafb
show more ...
|
| 4087ed6c | 11-Dec-2023 |
Jayanth Dodderi Chidanand <jayanthdodderi.chidanand@arm.com> |
refactor(cm): reset the cptr_el3 before perworld context setup
Currently, the registers which are maintained per-world, does not take into account the reset value while configuring the context for t
refactor(cm): reset the cptr_el3 before perworld context setup
Currently, the registers which are maintained per-world, does not take into account the reset value while configuring the context for the respective world. This leads to an issue, wherein the register retains the same value across world switch, which is an error.
This patch addresses this problem, by configuring the register (cptr_el3) precisely according to the world, the cpu is in execution via resetting it before initializing the world specific context.
Change-Id: I592d82af373155fca67eed109c199341c305f0b9 Signed-off-by: Jayanth Dodderi Chidanand <jayanthdodderi.chidanand@arm.com>
show more ...
|
| 183329a5 | 15-Aug-2023 |
Arvind Ram Prakash <arvind.ramprakash@arm.com> |
refactor(cm): introduce INIT_UNUSED_NS_EL2 macro
Introducing INIT_UNUSED_NS_EL2 macro which guards the code that disables the unused EL2 when a platform hands off from EL3 to NS-EL1 instead of NS-EL
refactor(cm): introduce INIT_UNUSED_NS_EL2 macro
Introducing INIT_UNUSED_NS_EL2 macro which guards the code that disables the unused EL2 when a platform hands off from EL3 to NS-EL1 instead of NS-EL2. Platforms without NS-EL2 in use must enable this flag.
BREAKING CHANGE: Initialisation code for handoff from EL3 to NS-EL1 disabled by default. Platforms which do that need to enable this macro going forward
Signed-off-by: Arvind Ram Prakash <arvind.ramprakash@arm.com> Change-Id: I61431cc4f7e2feb568d472828e5fd79cc73e51f5
show more ...
|
| 6597fcf1 | 26-Jun-2023 |
Manish Pandey <manish.pandey2@arm.com> |
feat(ras): use FEAT_IESB for error synchronization
For synchronization of errors at exception boundries TF-A uses "esb" instruction with FEAT_RAS or "dsb" and "isb" otherwise. The problem with esb i
feat(ras): use FEAT_IESB for error synchronization
For synchronization of errors at exception boundries TF-A uses "esb" instruction with FEAT_RAS or "dsb" and "isb" otherwise. The problem with esb instruction is, along with synching errors it might also consume the error, which is not ideal in all scenarios. On the other hand we can't use dsb always as its in the hot path.
To solve above mentioned problem the best way is to use FEAT_IESB feature which provides controls to insert an implicit Error synchronization event at exception entry and exception return.
Assumption in TF-A is, if RAS Extension is present then FEAT_IESB will also be present and enabled.
Signed-off-by: Manish Pandey <manish.pandey2@arm.com> Change-Id: Ie5861eec5da4028a116406bb4d1fea7dac232456
show more ...
|
| d04c04a4 | 25-May-2023 |
Manish Pandey <manish.pandey2@arm.com> |
feat(el3-runtime): modify vector entry paths
Vector entries in EL3 from lower ELs, first check for any pending async EAs from lower EL before handling the original exception. This happens when there
feat(el3-runtime): modify vector entry paths
Vector entries in EL3 from lower ELs, first check for any pending async EAs from lower EL before handling the original exception. This happens when there is an error (EA) in the system which is not yet signaled to PE while executing at lower EL. During entry into EL3 the errors (EA) are synchronized causing async EA to pend at EL3.
On detecting the pending EA (via ISR_EL1.A) EL3 either reflects it back to lower EL (KFH) or handles it in EL3 (FFH) based on EA routing model.
In case of Firmware First handling mode (FFH), EL3 handles the pended EA first before returing back to handle the original exception.
While in case of Kernel First handling mode (KFH), EL3 will return back to lower EL without handling the original exception. On returing to lower EL, EA will be pended. In KFH mode there is a risk of back and forth between EL3 and lower EL if the EA is masked at lower EL or priority of EA is lower than that of original exception. This is a limitation in current architecture but can be solved in future if EL3 gets a capability to inject virtual SError.
Signed-off-by: Manish Pandey <manish.pandey2@arm.com> Change-Id: I3a2a31de7cf454d9d690b1ef769432a5b24f6c11
show more ...
|