| 5ec9ade9 | 21-Oct-2024 |
Olivier Deprez <olivier.deprez@arm.com> |
Merge "fix(brbe): allow RME builds with BRBE" into integration |
| 17ef5da7 | 18-Oct-2024 |
Manish Pandey <manish.pandey2@arm.com> |
Merge "feat(context-mgmt): introduce EL3/root context" into integration |
| 9890eab5 | 18-Oct-2024 |
Boyan Karatotev <boyan.karatotev@arm.com> |
fix(brbe): allow RME builds with BRBE
It used to be the case that a FEAT_RME build could not be built with FEAT_BRBE support. BRBE doesn't have a 3-world aware disable and MDCR_EL3 was not context s
fix(brbe): allow RME builds with BRBE
It used to be the case that a FEAT_RME build could not be built with FEAT_BRBE support. BRBE doesn't have a 3-world aware disable and MDCR_EL3 was not context switched to allow for disabling in Realm world.
As of commit 123002f9171384d976d95935b7f566740d69cc68 MDCR_EL3 is context switched. Since the flag for BRBE support is ENABLE_BRBE_FOR_NS, move brbe_enable() to only happen for NS world. The other worlds will see BRBE disabled and branch recording prohibited. This allows for a build with both RME and BRBE.
Note that EL2 BRBE registers are not context switched. Further work is needed if non-NS support is required.
Change-Id: I82f0f08399dcd080902477dc9636bc4541685f89 Signed-off-by: Boyan Karatotev <boyan.karatotev@arm.com>
show more ...
|
| 40e5f7a5 | 08-Aug-2023 |
Jayanth Dodderi Chidanand <jayanthdodderi.chidanand@arm.com> |
feat(context-mgmt): introduce EL3/root context
* This patch adds root context procedure to restore/configure the registers, which are of importance during EL3 execution.
* EL3/Root context is a s
feat(context-mgmt): introduce EL3/root context
* This patch adds root context procedure to restore/configure the registers, which are of importance during EL3 execution.
* EL3/Root context is a simple restore operation that overwrites the following bits: (MDCR_EL3.SDD, SCR_EL3.{EA, SIF}, PMCR_EL0.DP PSTATE.DIT) while the execution is in EL3.
* It ensures EL3 world maintains its own settings distinct from other worlds (NS/Realm/SWd). With this in place, the EL3 system register settings is no longer influenced by settings of incoming worlds. This allows the EL3/Root world to access features for its own execution at EL3 (eg: Pauth).
* It should be invoked at cold and warm boot entry paths and also at all the possible exception handlers routing to EL3 at runtime. Cold and warm boot paths are handled by including setup_el3_context function in "el3_entrypoint_common" macro, which gets invoked in both the entry paths.
* At runtime, el3_context is setup at the stage, while we get prepared to enter into EL3 via "prepare_el3_entry" routine.
Change-Id: I5c090978c54a53bc1c119d1bc5fa77cd8813cdc2 Signed-off-by: Jayanth Dodderi Chidanand <jayanthdodderi.chidanand@arm.com>
show more ...
|
| 4ec4e545 | 06-Sep-2024 |
Jayanth Dodderi Chidanand <jayanthdodderi.chidanand@arm.com> |
feat(sctlr2): add support for FEAT_SCTLR2
Arm v8.9 introduces FEAT_SCTLR2, adding SCTLR2_ELx registers. Support this, context switching the registers and disabling traps so lower ELs can access the
feat(sctlr2): add support for FEAT_SCTLR2
Arm v8.9 introduces FEAT_SCTLR2, adding SCTLR2_ELx registers. Support this, context switching the registers and disabling traps so lower ELs can access the new registers.
Change the FVP platform to default to handling this as a dynamic option so the right decision can be made by the code at runtime.
Change-Id: I0c4cba86917b6b065a7e8dd6af7daf64ee18dcda Signed-off-by: Jayanth Dodderi Chidanand <jayanthdodderi.chidanand@arm.com> Signed-off-by: Govindraj Raja <govindraj.raja@arm.com>
show more ...
|
| 6d0433f0 | 05-Sep-2024 |
Jayanth Dodderi Chidanand <jayanthdodderi.chidanand@arm.com> |
feat(the): add support for FEAT_THE
Arm v8.9 introduces FEAT_THE, adding Translation Hardening Extension Read-Check-Write mask registers, RCWMASK_EL1 and RCWSMASK_EL1. Support this, context switchin
feat(the): add support for FEAT_THE
Arm v8.9 introduces FEAT_THE, adding Translation Hardening Extension Read-Check-Write mask registers, RCWMASK_EL1 and RCWSMASK_EL1. Support this, context switching the registers and disabling traps so lower ELs can access the new registers.
Change the FVP platform to default to handling this as a dynamic option so the right decision can be made by the code at runtime.
Change-Id: I8775787f523639b39faf61d046ef482f73b2a562 Signed-off-by: Jayanth Dodderi Chidanand <jayanthdodderi.chidanand@arm.com> Signed-off-by: Govindraj Raja <govindraj.raja@arm.com>
show more ...
|
| 7f152ea6 | 10-Jul-2024 |
Sona Mathew <sonarebecca.mathew@arm.com> |
fix(cpus): modify the fix for Cortex-A75 erratum 764081
Apply the mitigation only for the revision and variant mentioned in the SDEN.
SDEN Documentation: https://developer.arm.com/documentation/SDE
fix(cpus): modify the fix for Cortex-A75 erratum 764081
Apply the mitigation only for the revision and variant mentioned in the SDEN.
SDEN Documentation: https://developer.arm.com/documentation/SDEN859515/latest
Change-Id: Ifda1f4cb32bdec9a9af29397ddc03bf22a7a87fc Signed-off-by: Sona Mathew <sonarebecca.mathew@arm.com>
show more ...
|
| f4303d05 | 02-Sep-2024 |
Jayanth Dodderi Chidanand <jayanthdodderi.chidanand@arm.com> |
feat(cm): handle asymmetry for FEAT_TCR2
With introduction of FEAT_STATE_CHECK_ASYMMETRIC, the asymmetry of cores can be handled. FEAT_TCR2 is one of the features which can be asymmetric across core
feat(cm): handle asymmetry for FEAT_TCR2
With introduction of FEAT_STATE_CHECK_ASYMMETRIC, the asymmetry of cores can be handled. FEAT_TCR2 is one of the features which can be asymmetric across cores and the respective support is added here.
Adding a function to handle this asymmetry by re-visting the feature presence on running core. There are two possible cases: - If the primary core has the feature and secondary does not have it then the feature is disabled. - If the primary does not have the feature and secondary has it then, the feature need to be enabled in secondary cores.
Signed-off-by: Jayanth Dodderi Chidanand <jayanthdodderi.chidanand@arm.com> Change-Id: I73a70891d52268ddfa4effe40edf04115f5821ca
show more ...
|
| 781e1a44 | 20-May-2024 |
Jayanth Dodderi Chidanand <jayanthdodderi.chidanand@arm.com> |
feat(cm): enhance the cpu_context memory report
Currently, as part of the context_memory report, we explicitly list the EL3, EL1 and EL2 registers and memory usage per CPU for each world. The remain
feat(cm): enhance the cpu_context memory report
Currently, as part of the context_memory report, we explicitly list the EL3, EL1 and EL2 registers and memory usage per CPU for each world. The remaining bits in the cpu_context_t structure are grouped and listed as other section.
This patch enhances this part, by individually listing all the remaining bits (GPREGS, PAUTH_REGS) separately providing a much detailed overview of the context memory consumption amongst the registers.
The patch has been tested on the CI with the following patch and the results are summarised precisely. [https://review.trustedfirmware.org/c/ci/tf-a-ci-scripts/+/28849]
Change-Id: I16f210b605ddd7900600519520accf1ccd057bc7 Signed-off-by: Jayanth Dodderi Chidanand <jayanthdodderi.chidanand@arm.com>
show more ...
|
| a0674ab0 | 07-May-2024 |
Jayanth Dodderi Chidanand <jayanthdodderi.chidanand@arm.com> |
refactor(cm): remove el1 context when SPMD_SPM_AT_SEL2=1
* Currently, EL1 context is included in cpu_context_t by default for all the build configurations. As part of the cpu context structure,
refactor(cm): remove el1 context when SPMD_SPM_AT_SEL2=1
* Currently, EL1 context is included in cpu_context_t by default for all the build configurations. As part of the cpu context structure, we hold a copy of EL1, EL2 system registers, per world per PE. This context structure is enormous and will continue to grow bigger with the addition of new features incorporating new registers.
* Ideally, EL3 should save and restore the system registers at its next lower exception level, which is EL2 in majority of the configurations.
* This patch aims at optimising the memory allocation in cases, when the members from the context structure are unused. So el1 system register context must be omitted when lower EL is always x-EL2.
* "CTX_INCLUDE_EL2_REGS" is the internal build flag which gets set, when SPD=spmd and SPMD_SPM_AT_SEL2=1 or ENABLE_RME=1. It indicates, the system registers at EL2 are context switched for the respective build configuration. Here, there is no need to save and restore EL1 system registers, while x-EL2 is enabled.
Henceforth, this patch addresses this issue, by taking out the EL1 context at all possible places, while EL2 (CTX_INCLUDE_EL2_REGS) is enabled, there by saving memory.
Change-Id: Ifddc497d3c810e22a15b1c227a731bcc133c2f4a Signed-off-by: Jayanth Dodderi Chidanand <jayanthdodderi.chidanand@arm.com>
show more ...
|
| a0d9a973 | 30-Jul-2024 |
Jayanth Dodderi Chidanand <jayanthdodderi.chidanand@arm.com> |
chore(cm): reorganise sctlr_el1 and tcr_el1 ctx code
SCTLR_EL1 and TCR_EL1 regs are included either as part of errata "ERRATA_SPECULATIVE_AT" or under el1_sysregs_t context structure. The code to wr
chore(cm): reorganise sctlr_el1 and tcr_el1 ctx code
SCTLR_EL1 and TCR_EL1 regs are included either as part of errata "ERRATA_SPECULATIVE_AT" or under el1_sysregs_t context structure. The code to write and read into these context entries, looks repetitive and is invoked at most places. This section is refactored to bring them under a static procedure, keeping the code neat and easier to maintain.
Change-Id: Ib0d8c51bee09e1600c5baaa7f9745083dca9fee1 Signed-off-by: Jayanth Dodderi Chidanand <jayanthdodderi.chidanand@arm.com>
show more ...
|
| 4b6e4e61 | 20-Aug-2024 |
Manish V Badarkhe <manish.badarkhe@arm.com> |
Merge changes from topic "mp/simd_ctxt_mgmt" into integration
* changes: feat(fvp): allow SIMD context to be put in TZC DRAM docs(simd): introduce CTX_INCLUDE_SVE_REGS build flag feat(fvp): ad
Merge changes from topic "mp/simd_ctxt_mgmt" into integration
* changes: feat(fvp): allow SIMD context to be put in TZC DRAM docs(simd): introduce CTX_INCLUDE_SVE_REGS build flag feat(fvp): add Cactus partition manifest for EL3 SPMC chore(simd): remove unused macros and utilities for FP feat(el3-spmc): support simd context management upon world switch feat(trusty): switch to simd_ctx_save/restore apis feat(pncd): switch to simd_ctx_save/restore apis feat(spm-mm): switch to simd_ctx_save/restore APIs feat(simd): add rules to rationalize simd ctxt mgmt feat(simd): introduce simd context helper APIs feat(simd): add routines to save, restore sve state feat(simd): add sve state to simd ctxt struct feat(simd): add data struct for simd ctxt management
show more ...
|
| 308ebfa1 | 17-Jun-2024 |
Madhukar Pappireddy <madhukar.pappireddy@arm.com> |
feat(simd): introduce simd context helper APIs
This patch adds the common API to save and restore FP and SVE. When SVE is enabled we save and restore SVE which automatically covers FP. If FP is enab
feat(simd): introduce simd context helper APIs
This patch adds the common API to save and restore FP and SVE. When SVE is enabled we save and restore SVE which automatically covers FP. If FP is enabled while SVE is not, then we save and restore FP only.
The patch uses simd_ctx_t to save and restore both FP and SVE which means developers need not use fp or sve routines directly. Once all the calls to fpregs_context_* are replaced with simd_ctx_*, we can remove fp_regs_t data structure and macros (taken care in a following patch).
simd_ctx_t is currently allocated in section of its own. This will go into BSS section by default but platform will have option of relocating it to a different section by overriding in plat.ld.S.
Signed-off-by: Madhukar Pappireddy <madhukar.pappireddy@arm.com> Signed-off-by: Okash Khawaja <okash@google.com> Change-Id: I090f8b8fa3862e527b6c40385249adc69256bf24
show more ...
|
| 6d5319af | 17-Jun-2024 |
Madhukar Pappireddy <madhukar.pappireddy@arm.com> |
feat(simd): add routines to save, restore sve state
This adds assembly routines to save and restore SVE registers. In order to share between FPU and SVE the code to save and restore FPCR and FPSR, t
feat(simd): add routines to save, restore sve state
This adds assembly routines to save and restore SVE registers. In order to share between FPU and SVE the code to save and restore FPCR and FPSR, the patch converts code for those registers into macro. Since we will be using simd_ctx_t to save and restore FPU also, we use offsets in simd_ctx_t for FPSR and FPCR. Since simd_ctx_t has the same structure at the beginning as fp_regs_t, those offsets should be the same as CTX_FP_* offsets, when SVE is not enabled. Note that the code also saves and restores FPEXC32 reg along with FPSR and FPCR.
Signed-off-by: Madhukar Pappireddy <madhukar.pappireddy@arm.com> Signed-off-by: Okash Khawaja <okash@google.com> Change-Id: I120c02359794aa6bb6376a464a9afe98bd84ae60
show more ...
|
| 721249b0 | 05-Aug-2024 |
Arvind Ram Prakash <arvind.ramprakash@arm.com> |
feat(cm): asymmetric feature support for trbe
This patch checks if the Errata 2938996(Cortex-A520) , 2726228(Cortex-X4) applies to cores and if affected applies the errata workaround which disables
feat(cm): asymmetric feature support for trbe
This patch checks if the Errata 2938996(Cortex-A520) , 2726228(Cortex-X4) applies to cores and if affected applies the errata workaround which disables TRBE.
Signed-off-by: Arvind Ram Prakash <arvind.ramprakash@arm.com> Change-Id: I53b037839820c8b3a869f393588302a365d5b97c
show more ...
|
| 188f8c4b | 18-Jul-2024 |
Manish Pandey <manish.pandey2@arm.com> |
feat(cm): handle asymmetry for SPE feature
With introduction of FEAT_STATE_CHECK_ASYMMETRIC, the asymmetry of cores can be handled. SPE is one of the features which can be asymmetric across cores.
feat(cm): handle asymmetry for SPE feature
With introduction of FEAT_STATE_CHECK_ASYMMETRIC, the asymmetry of cores can be handled. SPE is one of the features which can be asymmetric across cores.
Add a function to handle this asymmetry by re-visting the feature presence on running core. There are two possible cases: - If the primary has the feature and secondary does not have it then, the feature needs to be disabled. - If the primary does not have the feature and secondary has it then, the feature need to be enabled
Signed-off-by: Manish Pandey <manish.pandey2@arm.com> Change-Id: Ibb2b88b5ef63b3efcb80801898ae8d8967e5c271
show more ...
|
| 2f41c9a7 | 12-Jul-2024 |
Manish Pandey <manish.pandey2@arm.com> |
feat(cm): support for asymmetric feature among cores
TF-A assumes that all the cores in a platform has architecture feature parity, this is evident by the fact that primary sets up the Non-secure co
feat(cm): support for asymmetric feature among cores
TF-A assumes that all the cores in a platform has architecture feature parity, this is evident by the fact that primary sets up the Non-secure context of secondary cores.
With changing landscape of platforms (e.g. big/little/mid cores), we are seeing more and more platforms which has feature asymmetry among cores. There is also a scenario where certain CPU erratum only applies to one type of cores and requires a feature to be disabled even it supports the feature.
To handle these scenarios, introduce a hook in warmboot path which would be called on the running CPU to override any feature disparity in the NS context stashed up by primary. Note that, re-checking of feature for Secure/Realm context is not required as the context is created on running core itself.
Signed-off-by: Manish Pandey <manish.pandey2@arm.com> Change-Id: I5a01dbda528fa8481a00fdd098b58a7463ed0e22
show more ...
|
| 43d1d951 | 18-Jul-2024 |
Manish Pandey <manish.pandey2@arm.com> |
feat(cpufeat): add new feature state for asymmetric features
Introduce a new feature state CHECK_ASYMMETRIC to cater for the features which are asymmetric across cores. This state is useful for plat
feat(cpufeat): add new feature state for asymmetric features
Introduce a new feature state CHECK_ASYMMETRIC to cater for the features which are asymmetric across cores. This state is useful for platforms which has architectural asymmetric cores (A feature is only present in one type of core e.g. big). This state is similar to FEAT_STATE_CHECK (dynamic detection) except that feature state is also checked on each core during warmboot path and override the context (just for asymmetric features) which was setup by core executing CPU_ON call.
Only Non-secure context will be re-checked as secure and realm context is created on same core.
Signed-off-by: Manish Pandey <manish.pandey2@arm.com> Change-Id: Ic78a0b6ca996e0d7881c43da1a6a0c422f528ef3
show more ...
|
| 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 |