| 42e35d2f | 11-Apr-2024 |
Jayanth Dodderi Chidanand <jayanthdodderi.chidanand@arm.com> |
refactor(cm): convert el1-ctx assembly offset entries to c structure
Currently the EL1 part of the context structure (el1_sysregs_t), is coupled with feature flags reducing the context memory alloca
refactor(cm): convert el1-ctx assembly offset entries to c structure
Currently the EL1 part of the context structure (el1_sysregs_t), is coupled with feature flags reducing the context memory allocation for platforms, that don't enable/support all the architectural features at once.
Similar to the el2 context optimization commit-"d6af234" this patch further improves this section by 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. Additionally, it eliminates the #ifs usage in 'context_mgmt.c' source file.
Change-Id: If6075931cec994bc89231241337eccc7042c5ede Signed-off-by: Jayanth Dodderi Chidanand <jayanthdodderi.chidanand@arm.com>
show more ...
|
| 59b7c0a0 | 05-Jun-2024 |
Jayanth Dodderi Chidanand <jayanthdodderi.chidanand@arm.com> |
feat(cm): add explicit context entries for ERRATA_SPECULATIVE_AT
* Currently, "ERRATA_SPECUALTIVE_AT" errata is enabled by default for few cores and they need context entries for saving and rest
feat(cm): add explicit context entries for ERRATA_SPECULATIVE_AT
* Currently, "ERRATA_SPECUALTIVE_AT" errata is enabled by default for few cores and they need context entries for saving and restoring EL1 regs "SCTLR_EL1 and TCR_EL1" registers at all times.
* This prevents the mechanism of decoupling EL1 and EL2 registers, as EL3 firmware shouldn't be handling both simultaneously.
* Depending on the build configuration either EL1 or EL2 context structures need to included, which would result in saving a good amount of context memory.
* In order to achieve this it's essential to have explicit context entries for registers supporting "ERRATA_SPECULATIVE_AT".
* This patch adds two context entries under "errata_speculative_at" structure to assist this errata and thereby allows decoupling EL1 and EL2 context structures.
Change-Id: Ia50626eea8fb64899a2e2d81622adbe07fe77d65 Signed-off-by: Jayanth Dodderi Chidanand <jayanthdodderi.chidanand@arm.com>
show more ...
|
| e7c060d5 | 24-Jul-2024 |
Manish Pandey <manish.pandey2@arm.com> |
Merge "feat(fgt2): add support for FEAT_FGT2" into integration |
| 0aa3284a | 17-Jul-2024 |
Jagdish Gediya <jagdish.gediya@arm.com> |
fix(context-mgmt): keep actlr_el2 value in the init context
The system register actlr_el2 can be set during CPU or platform reset handler. E.g. on Arm Total Compute platform, the CLUSTERPMUEN bit of
fix(context-mgmt): keep actlr_el2 value in the init context
The system register actlr_el2 can be set during CPU or platform reset handler. E.g. on Arm Total Compute platform, the CLUSTERPMUEN bit of actlr_el2 is set in the platform reset handler to enable the write access to DSU PMU registers from EL1. However, as EL2 context gets restored without saving it beforehand during jump to SPM and next NS image, therefore, the initialized value of actlr_el2 is not retained.
To fix this issue, keep track of actlr_el2 value during the EL2 context initialization. This applies for both secure and non-secure security state.
Change-Id: I1bd7b984216c042c056ad20c6724bedce5a6a3e2 Signed-off-by: Jagdish Gediya <jagdish.gediya@arm.com> Signed-off-by: Leo Yan <leo.yan@arm.com>
show more ...
|
| 33e6aaac | 06-Jun-2024 |
Arvind Ram Prakash <arvind.ramprakash@arm.com> |
feat(fgt2): add support for FEAT_FGT2
This patch disables trapping to EL3 when the FEAT_FGT2 specific trap registers are accessed by setting the SCR_EL3.FGTEn2 bit
Signed-off-by: Arvind Ram Prakash
feat(fgt2): add support for FEAT_FGT2
This patch disables trapping to EL3 when the FEAT_FGT2 specific trap registers are accessed by setting the SCR_EL3.FGTEn2 bit
Signed-off-by: Arvind Ram Prakash <arvind.ramprakash@arm.com> Change-Id: I6d2b614affb9067b2bc3d7bf0ae7d169d031592a
show more ...
|
| 83271d5a | 22-May-2024 |
Arvind Ram Prakash <arvind.ramprakash@arm.com> |
feat(debugv8p9): add support for FEAT_Debugv8p9
This patch enables FEAT_Debugv8p9 and prevents EL1/0 from trapping to EL3 when accessing MDSELR_EL1 register by setting the MDCR_EL3.EBWE bit.
Signed
feat(debugv8p9): add support for FEAT_Debugv8p9
This patch enables FEAT_Debugv8p9 and prevents EL1/0 from trapping to EL3 when accessing MDSELR_EL1 register by setting the MDCR_EL3.EBWE bit.
Signed-off-by: Arvind Ram Prakash <arvind.ramprakash@arm.com> Change-Id: I3613af1dd8cb8c0d3c33dc959f170846c0b9695a
show more ...
|
| a822a228 | 16-Jul-2024 |
Manish Pandey <manish.pandey2@arm.com> |
chore(cm): fix some typos in comments
Signed-off-by: Manish Pandey <manish.pandey2@arm.com> Change-Id: I592439f1686c333c855de98a8e7d377ba1e6c498 |
| 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 ...
|