arm-trusted-firmware/lib
Boyan Karatotev 45c7328c0b fix(cpus): avoid SME related loss of context on powerdown
Travis' and Gelas' TRMs tell us to disable SME (set PSTATE.{ZA, SM} to
0) when we're attempting to power down. What they don't tell us is that
if this isn't done, the powerdown request will be rejected. On the
CPU_OFF path that's not a problem - we can force SVCR to 0 and be
certain the core will power off.

On the suspend to powerdown path, however, we cannot do this. The TRM
also tells us that the sequence could also be aborted on eg. GIC
interrupts. If this were to happen when we have overwritten SVCR to 0,
upon a return to the caller they would experience a loss of context. We
know that at least Linux may call into PSCI with SVCR != 0. One option
is to save the entire SME context which would be quite expensive just to
work around. Another option is to downgrade the request to a normal
suspend when SME was left on. This option is better as this is expected
to happen rarely enough to ignore the wasted power and we don't want to
burden the generic (correct) path with needless context management.

Signed-off-by: Boyan Karatotev <boyan.karatotev@arm.com>
Change-Id: I698fa8490ebf51461f6aa8bba84f9827c5c46ad4
2025-02-03 14:29:47 +00:00
..
aarch32 chore: update to use Arm word across TF-A 2023-08-08 15:12:30 +01:00
aarch64 feat(gpt): add support for large GPT mappings 2024-05-14 10:36:42 +02:00
bl_aux_params chore: update to use Arm word across TF-A 2023-08-08 15:12:30 +01:00
compiler-rt chore(compiler-rt): update compiler-rt source files 2024-05-10 11:24:49 +02:00
coreboot chore: update to use Arm word across TF-A 2023-08-08 15:12:30 +01:00
cpus fix(cpus): avoid SME related loss of context on powerdown 2025-02-03 14:29:47 +00:00
debugfs chore: update to use Arm word across TF-A 2023-08-08 15:12:30 +01:00
el3_runtime Merge "feat(pmuv3): setup per world MDCR_EL3" into integration 2025-01-27 19:11:37 +01:00
extensions feat(pmuv3): setup per world MDCR_EL3 2025-01-24 10:09:08 +00:00
fconf feat(fconf): support signing-key in root cert node 2024-01-18 13:18:09 -06:00
gpt_rme chore(gpt): fix typo in comment 2024-09-17 18:16:00 +02:00
hob feat(lib): introduce Hob creation library 2024-12-06 13:26:31 +00:00
libc fix(libc): memset inclusion to libc makefiles 2024-02-02 09:49:01 +01:00
libfdt build(libfdt): introduce include guards 2024-05-10 11:58:45 +00:00
locks feat(locks): add bitlock 2024-04-15 12:14:16 +01:00
mpmm fix(errata): workaround for Cortex-A510 erratum 2250311 2022-02-24 23:30:41 +02:00
optee chore: update to use Arm word across TF-A 2023-08-08 15:12:30 +01:00
pmf feat((smccc): add version FID for PMF 2024-05-06 09:42:11 -05:00
psa feat(psa): introduce generic library for CCA attestation 2024-06-07 11:40:08 +01:00
psci fix(cpus): avoid SME related loss of context on powerdown 2025-02-03 14:29:47 +00:00
romlib chore(romlib): remove unused jmptbl.i file 2024-12-05 17:35:57 +00:00
semihosting chore: update to use Arm word across TF-A 2023-08-08 15:12:30 +01:00
stack_protector chore: update to use Arm word across TF-A 2023-08-08 15:12:30 +01:00
transfer_list fix(handoff): fix message formatting of hex values 2024-12-18 14:48:23 +00:00
utils chore: update to use Arm word across TF-A 2023-08-08 15:12:30 +01:00
xlat_mpu refactor(cpufeat): add macro to simplify is_feat_xx_present 2024-05-02 12:16:16 -05:00
xlat_tables feat(d128): add support for FEAT_D128 2024-10-24 14:51:55 -05:00
xlat_tables_v2 feat(d128): add support for FEAT_D128 2024-10-24 14:51:55 -05:00
zlib chore(zlib): update zlib to version 1.3 2023-11-06 21:13:38 +00:00