diff options
author | Jeenu Viswambharan <jeenu.viswambharan@arm.com> | 2017-01-05 11:01:02 +0000 |
---|---|---|
committer | Jeenu Viswambharan <jeenu.viswambharan@arm.com> | 2017-03-02 11:00:20 +0000 |
commit | b0408e87f7dfbdfe3e00cd3c1421b2939dd209ca (patch) | |
tree | 8a51404d3455039208b4a73497ae13d06f60da0f /docs | |
parent | a10d3632acbd1135648f07c2a998cba8c5c77cfd (diff) |
PSCI: Optimize call paths if all participants are cache-coherent
The current PSCI implementation can apply certain optimizations upon the
assumption that all PSCI participants are cache-coherent.
- Skip performing cache maintenance during power-up.
- Skip performing cache maintenance during power-down:
At present, on the power-down path, CPU driver disables caches and
MMU, and performs cache maintenance in preparation for powering down
the CPU. This means that PSCI must perform additional cache
maintenance on the extant stack for correct functioning.
If all participating CPUs are cache-coherent, CPU driver would
neither disable MMU nor perform cache maintenance. The CPU being
powered down, therefore, remain cache-coherent throughout all PSCI
call paths. This in turn means that PSCI cache maintenance
operations are not required during power down.
- Choose spin locks instead of bakery locks:
The current PSCI implementation must synchronize both cache-coherent
and non-cache-coherent participants. Mutual exclusion primitives are
not guaranteed to function on non-coherent memory. For this reason,
the current PSCI implementation had to resort to bakery locks.
If all participants are cache-coherent, the implementation can
enable MMU and data caches early, and substitute bakery locks for
spin locks. Spin locks make use of architectural mutual exclusion
primitives, and are lighter and faster.
The optimizations are applied when HW_ASSISTED_COHERENCY build option is
enabled, as it's expected that all PSCI participants are cache-coherent
in those systems.
Change-Id: Iac51c3ed318ea7e2120f6b6a46fd2db2eae46ede
Signed-off-by: Jeenu Viswambharan <jeenu.viswambharan@arm.com>
Diffstat (limited to 'docs')
-rw-r--r-- | docs/psci-lib-integration-guide.md | 14 |
1 files changed, 8 insertions, 6 deletions
diff --git a/docs/psci-lib-integration-guide.md b/docs/psci-lib-integration-guide.md index f290966b..d81b3286 100644 --- a/docs/psci-lib-integration-guide.md +++ b/docs/psci-lib-integration-guide.md @@ -176,7 +176,9 @@ interfaces are: * The page tables must be setup and the MMU enabled * The C runtime environment must be setup and stack initialized * The Data cache must be enabled prior to invoking any of the PSCI library - interfaces except for `psci_warmboot_entrypoint()`. + interfaces except for `psci_warmboot_entrypoint()`. For + `psci_warmboot_entrypoint()`, if the build option `HW_ASSISTED_COHERENCY` + is enabled however, data caches are expected to be enabled. Further requirements for each interface can be found in the interface description. @@ -270,11 +272,11 @@ wakes up, it will start execution from the warm reset address. Return : void This function performs the warm boot initialization/restoration as mandated by -[PSCI spec]. For AArch32, on wakeup from power down the CPU resets to secure -SVC mode and the EL3 Runtime Software must perform the prerequisite -initializations mentioned at top of this section. This function must be called -with Data cache disabled but with MMU initialized and enabled. The major -actions performed by this function are: +[PSCI spec]. For AArch32, on wakeup from power down the CPU resets to secure SVC +mode and the EL3 Runtime Software must perform the prerequisite initializations +mentioned at top of this section. This function must be called with Data cache +disabled (unless build option `HW_ASSISTED_COHERENCY` is enabled) but with MMU +initialized and enabled. The major actions performed by this function are: * Invalidates the stack and enables the data cache. * Initializes architecture and PSCI state coordination. |