| 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 ...
|
| 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 ...
|
| 3e840ec8 | 26-Apr-2024 |
Madhukar Pappireddy <madhukar.pappireddy@arm.com> |
chore(simd): remove unused macros and utilities for FP
Now that we have switched to simd context save/restore apis which uses simd_context_t data structures, we can safely remove any macros, helpers
chore(simd): remove unused macros and utilities for FP
Now that we have switched to simd context save/restore apis which uses simd_context_t data structures, we can safely remove any macros, helpers and utilities used in the old way of FPU context management.
Change-Id: I27a636dd07bf5c4cb99fd25b9a204d55b525b677 Signed-off-by: Madhukar Pappireddy <madhukar.pappireddy@arm.com>
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 ...
|
| 42422622 | 17-Jun-2024 |
Madhukar Pappireddy <madhukar.pappireddy@arm.com> |
feat(simd): add sve state to simd ctxt struct
This patch extends the simd data structure to hold the SVE state. A new build flag CTX_INCLUDE_SVE_REGS is introduced in this patch to enable SVE contex
feat(simd): add sve state to simd ctxt struct
This patch extends the simd data structure to hold the SVE state. A new build flag CTX_INCLUDE_SVE_REGS is introduced in this patch to enable SVE context management.
Necessary precautions are taken such as ensuring the field offsets are not changed and necessary padding is added for alignment reasons.
Signed-off-by: Madhukar Pappireddy <madhukar.pappireddy@arm.com> Signed-off-by: Okash Khawaja <okash@google.com> Change-Id: I54f5222c7d8c68638105003f68caa511d347cd60
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 ...
|