arm-trusted-firmware/include/lib/extensions
Boyan Karatotev f808873372 fix(spe): add a psb before updating context and remove context saving
In the chapter about FEAT_SPE (D16.4 specifically) it is stated that
"Sampling is always disabled at EL3". That means that disabling sampling
(writing PMBLIMITR_EL1.E to 0) is redundant and can be removed. The only
reason we save/restore SPE context is because of that disable, so those
can be removed too.

There's the issue of draining the profiling buffer though. No new
samples will have been generated since entering EL3. However, old
samples might still be in-flight. Unless synchronised by a psb csync,
those might be affected by our extensive context mutation. Adding a psb
in prepare_el3_entry should cater for that. Note that prior to the
introduction of root context this was not a problem as context remained
unchanged and the hooks took care of the rest.

Then, the only time we care about the buffer actually making it to
memory is when we exit coherency. On HW_ASSISTED_COHERENCY systems we
don't have to do anything, it should be handled for us. Systems without
it need a dsb to wait for them to complete. There should be one already
in each cpu's powerdown hook which should work.

While on the topic of barriers, the esb barrier is no longer used.
Remove it.

Change-Id: I9736fc7d109702c63e7d403dc9e2a4272828afb2
Signed-off-by: Boyan Karatotev <boyan.karatotev@arm.com>
2024-12-16 15:14:30 +00:00
..
amu.h refactor(cm): move EL3 registers to global context 2023-10-31 11:18:42 +00:00
brbe.h feat(cm): context switch MDCR_EL3 register 2024-06-25 13:50:32 +01:00
debug_v8p9.h feat(debugv8p9): add support for FEAT_Debugv8p9 2024-07-18 13:49:43 -05:00
fgt2.h feat(fgt2): add support for FEAT_FGT2 2024-07-18 13:49:43 -05:00
fpmr.h feat(fpmr): disable FPMR trap 2024-12-12 10:03:23 -06:00
mpam.h refactor(cm): move MPAM3_EL3 reg to per world context 2023-12-21 12:37:21 +00:00
pauth.h chore: update to use Arm word across TF-A 2023-08-08 15:12:30 +01:00
pmuv3.h refactor(cpufeat): separate the EL2 and EL3 enablement code 2023-07-04 14:57:46 +01:00
ras.h chore: update to use Arm word across TF-A 2023-08-08 15:12:30 +01:00
ras_arch.h chore: update to use Arm word across TF-A 2023-08-08 15:12:30 +01:00
sme.h refactor(cm): move EL3 registers to global context 2023-10-31 11:18:42 +00:00
spe.h fix(spe): add a psb before updating context and remove context saving 2024-12-16 15:14:30 +00:00
sve.h feat(simd): add routines to save, restore sve state 2024-08-19 11:10:10 -05:00
sys_reg_trace.h refactor(cm): move EL3 registers to global context 2023-10-31 11:18:42 +00:00
sysreg128.h feat(d128): add support for FEAT_D128 2024-10-24 14:51:55 -05:00
tcr2.h feat(cm): handle asymmetry for FEAT_TCR2 2024-09-05 16:28:23 +01:00
trbe.h feat(trbe): introduce trbe_disable() function 2024-07-29 20:35:14 +01:00
trf.h feat(cm): context switch MDCR_EL3 register 2024-06-25 13:50:32 +01:00