| 2e0efb3f | 27-Jun-2024 |
Manish Pandey <manish.pandey2@arm.com> |
Merge "feat(cm): context switch MDCR_EL3 register" into integration |
| 123002f9 | 18-Jun-2024 |
Jayanth Dodderi Chidanand <jayanthdodderi.chidanand@arm.com> |
feat(cm): context switch MDCR_EL3 register
Currently MDCR_EL3 register value is same for all the worlds(Non-secure, Secure, Realm and Root).
With this approach, features enable/disable settings rem
feat(cm): context switch MDCR_EL3 register
Currently MDCR_EL3 register value is same for all the worlds(Non-secure, Secure, Realm and Root).
With this approach, features enable/disable settings remain same across all the worlds. This is not ideal as there must be flexibility in controlling feature as per the requirements for individual world.
The patch addresses this by providing MDCR_EL3 a per world value. Features with identical values for all the worlds are grouped under ``manage_extensions_common`` API.
Change-Id: Ibc068d985fe165d8cb6d0ffb84119bffd743b3d1 Signed-off-by: Jayanth Dodderi Chidanand <jayanthdodderi.chidanand@arm.com>
show more ...
|
| da1a4591 | 06-Mar-2024 |
Jayanth Dodderi Chidanand <jayanthdodderi.chidanand@arm.com> |
refactor(cm): update SCTLR_EL2 initialisation
Currently, during the initial bootup phase SCTLR_EL2 register has been initialised with the endianness bit based on header attribute evaluation at EL3.
refactor(cm): update SCTLR_EL2 initialisation
Currently, during the initial bootup phase SCTLR_EL2 register has been initialised with the endianness bit based on header attribute evaluation at EL3.
This is not mandatorily required as TF-A by default, expects the software at EL2 to execute in little endian format ( EE = 0).
Henceforth, this patch removes the endianness bit evaluation for SCTLR_EL2 register and initialises with a predefined RESET value, setting SCTLR_EL2.EE=0.
Change-Id: I53fdd5bf907cbe35c551fc03cc893821229ff807 Signed-off-by: Jayanth Dodderi Chidanand <jayanthdodderi.chidanand@arm.com>
show more ...
|
| 7d930c7e | 28-May-2024 |
Jayanth Dodderi Chidanand <jayanthdodderi.chidanand@arm.com> |
refactor(cm): move mpam registers into el2 context
* FEAT_MPAM related EL2 registers are placed explicitly outside the EL2 context in the cpu_context_t structure.
* With EL2 registers now coupled
refactor(cm): move mpam registers into el2 context
* FEAT_MPAM related EL2 registers are placed explicitly outside the EL2 context in the cpu_context_t structure.
* With EL2 registers now coupled with dependent features, this patch moves them to the el2_context structure "el2_sysregs_t".
* Further, converting the assembly context-offset entries into a c structure. It relies on garbage collection of the linker removing unreferenced structures from memory, as well as aiding in readability and future maintenance.
Change-Id: Ib784bc8d2fbe35a8a47a569426d8663282ec06aa Signed-off-by: Jayanth Dodderi Chidanand <jayanthdodderi.chidanand@arm.com>
show more ...
|
| aaaf2cc3 | 13-Mar-2024 |
Sona Mathew <sonarebecca.mathew@arm.com> |
refactor(cpufeat): add macro to simplify is_feat_xx_present
In this patch, we are trying to introduce the wrapper macro CREATE_FEATURE_PRESENT to get the following capability and align it for all th
refactor(cpufeat): add macro to simplify is_feat_xx_present
In this patch, we are trying to introduce the wrapper macro CREATE_FEATURE_PRESENT to get the following capability and align it for all the features:
-> is_feat_xx_present(): Does Hardware implement the feature. -> uniformity in naming the function across multiple features. -> improved readability
The is_feat_xx_present() is implemented to check if the hardware implements the feature and does not take into account the ENABLE_FEAT_XXX flag enabled/disabled in software.
- CREATE_FEATURE_PRESENT(name, idreg, shift, mask, idval) The wrapper macro reduces the function to a single line and creates the is_feat_xx_present function that checks the id register based on the shift and mask values and compares this against a determined idvalue.
Change-Id: I7b91d2c9c6fbe55f94c693aa1b2c50be54fb9ecc Signed-off-by: Sona Mathew <sonarebecca.mathew@arm.com>
show more ...
|
| 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 ...
|
| 85658c56 | 19-Apr-2024 |
Yann Gautier <yann.gautier@st.com> |
Merge "fix(pmu): fix breakage on ARMv7 CPUs with SP_min as BL32" into integration |
| 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 ...
|
| e6f8fc74 | 12-Mar-2024 |
Ahmad Fatoum <a.fatoum@pengutronix.de> |
fix(pmu): fix breakage on ARMv7 CPUs with SP_min as BL32
While comments introduced with the original commit claim that pmuv3_disable_el3()/pmuv3_init_el3() are compatible with PMUv2 and PMUv1, this
fix(pmu): fix breakage on ARMv7 CPUs with SP_min as BL32
While comments introduced with the original commit claim that pmuv3_disable_el3()/pmuv3_init_el3() are compatible with PMUv2 and PMUv1, this is not true in practice: The function accesses the Secure Debug Control Register (SDCR), which only available to ARMv8 CPUs.
ARMv8 CPUs executing in AArch32 mode would thus be able to disable their PMUv3, while ARMv7 CPUs would hang trying to access the SDCR.
Fix this by only doing PMUv3 handling when we know a PMUv3 to be available. This resolves boot hanging on all STM32MP15 platforms that use SP_min as BL32 instead of OP-TEE.
Change-Id: I40f7611cf46b89a30243cc55bf55a8d9c9de93c8 Fixes: c73686a11cea ("feat(pmu): introduce pmuv3 lib/extensions folder") Signed-off-by: Ahmad Fatoum <a.fatoum@pengutronix.de>
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 ...
|