arm-trusted-firmware/lib/extensions
Jayanth Dodderi Chidanand a0674ab081 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>
2024-08-21 16:35:27 +01:00
..
amu refactor(cm): move EL3 registers to global context 2023-10-31 11:18:42 +00:00
brbe feat(cm): context switch MDCR_EL3 register 2024-06-25 13:50:32 +01:00
debug feat(debugv8p9): add support for FEAT_Debugv8p9 2024-07-18 13:49:43 -05:00
fgt feat(fgt2): add support for FEAT_FGT2 2024-07-18 13:49:43 -05:00
mpam refactor(cm): move MPAM3_EL3 reg to per world context 2023-12-21 12:37:21 +00:00
pauth chore(pauth): remove redundant pauth_disable_el3() call 2023-04-28 08:09:14 +01:00
pmuv3 refactor(cm): remove el1 context when SPMD_SPM_AT_SEL2=1 2024-08-21 16:35:27 +01:00
ras chore: update to use Arm word across TF-A 2023-08-08 15:12:30 +01:00
sme refactor(cpufeat): add macro to simplify is_feat_xx_present 2024-05-02 12:16:16 -05:00
spe feat(spe): introduce spe_disable() function 2024-07-29 20:34:18 +01:00
sve refactor(cm): move EL3 registers to global context 2023-10-31 11:18:42 +00:00
sys_reg_trace refactor(cm): move EL3 registers to global context 2023-10-31 11:18:42 +00:00
trbe feat(trbe): introduce trbe_disable() function 2024-07-29 20:35:14 +01:00
trf feat(cm): context switch MDCR_EL3 register 2024-06-25 13:50:32 +01:00