arm-trusted-firmware/lib/psci
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
..
aarch32 chore: update to use Arm word across TF-A 2023-08-08 15:12:30 +01:00
aarch64 chore(cpus): optimise runtime errata applications 2024-10-16 13:59:57 +01:00
psci_common.c fix(spe): add a psb before updating context and remove context saving 2024-12-16 15:14:30 +00:00
psci_lib.mk chore(cpus): optimise runtime errata applications 2024-10-16 13:59:57 +01:00
psci_main.c fix(smccc): ensure that mpidr passed through SMC is valid 2023-11-06 20:43:38 +00:00
psci_mem_protect.c chore: update to use Arm word across TF-A 2023-08-08 15:12:30 +01:00
psci_off.c fix(psci): add optional pwr_domain_validate_suspend to plat_psci_ops_t 2023-05-31 23:54:19 -07:00
psci_on.c fix(smccc): ensure that mpidr passed through SMC is valid 2023-11-06 20:43:38 +00:00
psci_private.h fix(smccc): ensure that mpidr passed through SMC is valid 2023-11-06 20:43:38 +00:00
psci_setup.c chore: update to use Arm word across TF-A 2023-08-08 15:12:30 +01:00
psci_stat.c fix(smccc): ensure that mpidr passed through SMC is valid 2023-11-06 20:43:38 +00:00
psci_suspend.c refactor(psci): extract cm_prepare_el3_exit_ns() to a common location 2023-07-24 11:04:44 +01:00
psci_system_off.c Don't return error information from console_flush 2020-10-09 10:21:50 -05:00