fix(spe): drop SPE EL2 context switch code

At the moment we hardcode the SPE functionality to be available on the
non-secure side only, by setting MDCR_EL3.NSPB accordingly.
This also means that the secure world cannot use SPE, so there is no
need to context switch the PMSCR_EL2 register.

Drop the SPE bits from the EL2 context switch code. If any of the other
EL2 worlds wish to start using SPE, this can be brought back.

Change-Id: Ie0fedb2aeb722a2c9db316051fbbe57ca0e3c0c9
Signed-off-by: Andre Przywara <andre.przywara@arm.com>
This commit is contained in:
Andre Przywara 2023-02-03 15:23:59 +00:00
parent c41b8e90f7
commit 16e3ddba1f
3 changed files with 0 additions and 28 deletions
include/lib/el3_runtime/aarch64
lib/el3_runtime/aarch64

View file

@ -514,10 +514,6 @@ void el1_sysregs_context_restore(el1_sysregs_t *regs);
#if CTX_INCLUDE_EL2_REGS
void el2_sysregs_context_save_common(el2_sysregs_t *regs);
void el2_sysregs_context_restore_common(el2_sysregs_t *regs);
#if ENABLE_SPE_FOR_LOWER_ELS
void el2_sysregs_context_save_spe(el2_sysregs_t *regs);
void el2_sysregs_context_restore_spe(el2_sysregs_t *regs);
#endif /* ENABLE_SPE_FOR_LOWER_ELS */
#if CTX_INCLUDE_MTE_REGS
void el2_sysregs_context_save_mte(el2_sysregs_t *regs);
void el2_sysregs_context_restore_mte(el2_sysregs_t *regs);

View file

@ -13,10 +13,6 @@
#if CTX_INCLUDE_EL2_REGS
.global el2_sysregs_context_save_common
.global el2_sysregs_context_restore_common
#if ENABLE_SPE_FOR_LOWER_ELS
.global el2_sysregs_context_save_spe
.global el2_sysregs_context_restore_spe
#endif /* ENABLE_SPE_FOR_LOWER_ELS */
#if CTX_INCLUDE_MTE_REGS
.global el2_sysregs_context_save_mte
.global el2_sysregs_context_restore_mte
@ -220,20 +216,6 @@ func el2_sysregs_context_restore_common
ret
endfunc el2_sysregs_context_restore_common
#if ENABLE_SPE_FOR_LOWER_ELS
func el2_sysregs_context_save_spe
mrs x13, PMSCR_EL2
str x13, [x0, #CTX_PMSCR_EL2]
ret
endfunc el2_sysregs_context_save_spe
func el2_sysregs_context_restore_spe
ldr x13, [x0, #CTX_PMSCR_EL2]
msr PMSCR_EL2, x13
ret
endfunc el2_sysregs_context_restore_spe
#endif /* ENABLE_SPE_FOR_LOWER_ELS */
#if CTX_INCLUDE_MTE_REGS
func el2_sysregs_context_save_mte
mrs x9, TFSR_EL2

View file

@ -856,9 +856,6 @@ void cm_el2_sysregs_context_save(uint32_t security_state)
el2_sysregs_ctx = get_el2_sysregs_ctx(ctx);
el2_sysregs_context_save_common(el2_sysregs_ctx);
#if ENABLE_SPE_FOR_LOWER_ELS
el2_sysregs_context_save_spe(el2_sysregs_ctx);
#endif
#if CTX_INCLUDE_MTE_REGS
el2_sysregs_context_save_mte(el2_sysregs_ctx);
#endif
@ -919,9 +916,6 @@ void cm_el2_sysregs_context_restore(uint32_t security_state)
el2_sysregs_ctx = get_el2_sysregs_ctx(ctx);
el2_sysregs_context_restore_common(el2_sysregs_ctx);
#if ENABLE_SPE_FOR_LOWER_ELS
el2_sysregs_context_restore_spe(el2_sysregs_ctx);
#endif
#if CTX_INCLUDE_MTE_REGS
el2_sysregs_context_restore_mte(el2_sysregs_ctx);
#endif