arm-trusted-firmware/docs/components
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
..
fconf perf(amu): greatly simplify AMU context management 2025-02-25 08:50:46 +00:00
measured_boot feat(fvp): add Event Log maximum size property in DT 2023-04-18 17:13:17 +02:00
spd feat(optee): add loading OP-TEE image via an SMC 2023-01-31 10:38:16 -08:00
activity-monitors.rst chore(docs): explain what the plat_amu_aux_enables array does 2025-03-19 16:54:50 +01:00
arm-sip-service.rst refactor(docs): added versioning to smccc services 2024-05-06 09:42:11 -05:00
context-management-library.rst feat(psci): remove cpu context init by index 2025-04-11 07:27:23 +01:00
cot-binding.rst docs: fix typos in cot binding 2024-08-29 17:31:35 +01:00
debugfs-design.rst Fix broken links to various sections across docs 2020-08-03 09:55:04 -05:00
el3-spmc.rst docs(spm): add design documentation 2022-10-27 11:39:53 +01:00
exception-handling.rst Fix broken links in docs 2020-08-06 12:36:17 -05:00
ffa-manifest-binding.rst docs: fix ff-a manifest binding document 2024-09-18 15:10:13 -05:00
firmware-update.rst feat(fwu): update the URL links for the FWU specification 2024-03-01 14:19:56 +05:30
granule-protection-tables-design.rst feat(gpt): statically allocate bitlocks array 2025-02-11 15:10:49 +00:00
index.rst docs(context-mgmt): add documentation for context management library 2024-05-07 17:52:14 +01:00
mpmm.rst perf(mpmm): greatly simplify MPMM enablement 2025-02-25 08:50:45 +00:00
platform-interrupt-controller-API.rst fix(gic600): workaround for Part 1 of GIC600 erratum 2384374 2024-03-06 14:16:35 -06:00
ras.rst docs(ras): update RAS documentation 2023-11-01 17:46:47 +00:00
realm-management-extension.rst docs: change FVP argument in RME configuration 2024-02-06 11:00:54 +00:00
rmm-el3-comms-spec.rst feat(rme): add SMMU and PCIe information to Boot manifest 2025-03-25 10:26:18 +00:00
romlib-design.rst fix(romlib): wrap indirectly included functions 2024-08-15 10:49:07 -05:00
sdei.rst docs(sdei): provide security guidelines when using SDEI 2024-02-15 15:37:00 +00:00
secure-partition-manager-mm.rst docs(spm-mm): remove reference to SEL2 SPMC 2023-10-31 11:19:41 +01:00
secure-partition-manager.rst fix(mte): remove deprecated CTX_INCLUDE_MTE_REGS/FEAT_MTE 2024-10-24 10:00:19 -05:00
ven-el3-debugfs.rst refactor(smccc): move debugfs to vendor el3 calls 2024-05-06 09:42:11 -05:00
ven-el3-service.rst refactor(docs): added versioning to smccc services 2024-05-06 09:42:11 -05:00
xlat-tables-lib-v2-design.rst fix(xlat): remove xlat_mpu 2025-04-09 11:02:40 +01:00