arm-trusted-firmware/docs
Manish Pandey ef738d19d3 feat(psci): remove cpu context init by index
Currently, the calling core (meaning the core which received the call to
CPU_ON or the powerdown path of CPU_SUSPEND on the same core) is in
charge of initialising the context for the waking core (the warmboot
entrypoint for both). This is convenient because the calling core can
write the context while in coherency and the waking core will only need
the context after its entered coherency. This avoids any cache
maintenance and makes communication simple.

However, this has 3 main problems:
a) asymmetric feature support is problematic - the calling core has no
   way of knowing the feature set of the waking core. If the two
   diverge, the architectural feature discovery via ID registers breaks
   down. We've thus far "fixed" this on a case by case basis which
   doesn't scale and introduces redundancy.

b) powerdown abandon (pabandon) introduces a contradiction - the calling
   core has to initialise the context for when the core wakes up, but
   should the core not powerdown it needs its old context intact. The only
   way to work around this is by keeping two copies of context which
   incurs a runtime and memory overhead.

c) cm_prepare_el3_exit[_ns]() doesn't have access to the entrypoint but needs
   it to make initialisation decisions. We can infer some of this from
   registers that have already been written but this is awkwardly
   limiting for what we can do. This also necessitates the split from
   the context initialisation.

We can solve all three by a making a core be in full ownership of its
own context. The calling core then only writes entrypoint information
and nothing else. The waking core then initialises its own context as it
sees fit with full knowledge of the whole picture.

The only tricky bit is cache coherency - the waking core has to be able
to coherently observe its new entrypoint. Calling cores will write to
the shared region with coherent caches on. If we make sure to read the
context only after the waking core has entered coherency, then we can
avoid cache operations and let hardware handle everything.

We can skip the spsr check for FEAT_TCR2 as it doesn't make a
difference. We can also skip enabling it twice from generic code.

Signed-off-by: Boyan Karatotev <boyan.karatotev@arm.com>
Signed-off-by: Manish Pandey <manish.pandey2@arm.com>
Change-Id: I86e7fe8b698191fc3b469e5ced1fd010f8754b0e
2025-04-11 07:27:23 +01:00
..
_static/css docs(threat model): add TF-A threat model 2021-04-30 17:59:22 +02:00
about fix(xlat): remove xlat_mpu 2025-04-09 11:02:40 +01:00
components feat(psci): remove cpu context init by index 2025-04-11 07:27:23 +01:00
design fix(libc): make sure __init functions are garbage collected 2025-04-09 09:39:10 +01:00
design_documents docs(tpm): add design documentation for dTPM 2025-03-18 20:53:44 +01:00
getting_started docs(prerequisites): update mbedtls to v3.6.3 2025-04-03 12:45:52 -05:00
perf docs(juno): update PSCI instrumentation data 2024-11-15 13:16:28 +00:00
plat Merge "docs: list removal of fvp_r" into integration 2025-04-09 09:53:57 +02:00
process docs: remove reference to phabricator pages 2024-05-15 14:27:45 +02:00
resources docs(tpm): add design documentation for dTPM 2025-03-18 20:53:44 +01:00
security_advisories chore: rename Poseidon to Neoverse V3 2024-03-26 11:27:31 -05:00
threat_model fix(plat): remove fvp_r 2025-04-08 14:27:06 +01:00
tools refactor(memmap): migrate to Poetry 2025-02-27 15:32:05 +00:00
change-log.md docs(changelog): changelog for v2.12 release 2024-11-19 18:08:58 -06:00
conf.py docs(changelog): changelog for v2.12 release 2024-11-19 18:08:58 -06:00
global_substitutions.txt docs(tpm): add design documentation for dTPM 2025-03-18 20:53:44 +01:00
glossary.rst docs(tpm): add design documentation for dTPM 2025-03-18 20:53:44 +01:00
index.rst feat(fwu): update the URL links for the FWU specification 2024-03-01 14:19:56 +05:30
license.rst feat(lib): introduce Hob creation library 2024-12-06 13:26:31 +00:00
Makefile build(poetry): install dependencies with --no-root 2025-03-10 09:27:38 +00:00
porting-guide.rst feat(rmmd): add RMM_MECID_KEY_UPDATE call 2025-03-18 17:17:06 -05:00