switch-l4t-atf/docs
Soby Mathew 8ee2498039 PSCI: Add framework to handle composite power states
The state-id field in the power-state parameter of a CPU_SUSPEND call can be
used to describe composite power states specific to a platform. The current PSCI
implementation does not interpret the state-id field. It relies on the target
power level and the state type fields in the power-state parameter to perform
state coordination and power management operations. The framework introduced
in this patch allows the PSCI implementation to intepret generic global states
like RUN, RETENTION or OFF from the State-ID to make global state coordination
decisions and reduce the complexity of platform ports. It adds support to
involve the platform in state coordination which facilitates the use of
composite power states and improves the support for entering standby states
at multiple power domains.

The patch also includes support for extended state-id format for the power
state parameter as specified by PSCIv1.0.

The PSCI implementation now defines a generic representation of the power-state
parameter. It depends on the platform port to convert the power-state parameter
(possibly encoding a composite power state) passed in a CPU_SUSPEND call to this
representation via the `validate_power_state()` plat_psci_ops handler. It is an
array where each index corresponds to a power level. Each entry contains the
local power state the power domain at that power level could enter.

The meaning of the local power state values is platform defined, and may vary
between levels in a single platform. The PSCI implementation constrains the
values only so that it can classify the state as RUN, RETENTION or OFF as
required by the specification:
   * zero means RUN
   * all OFF state values at all levels must be higher than all RETENTION
     state values at all levels
   * the platform provides PLAT_MAX_RET_STATE and PLAT_MAX_OFF_STATE values
     to the framework

The platform also must define the macros PLAT_MAX_RET_STATE and
PLAT_MAX_OFF_STATE which lets the PSCI implementation find out which power
domains have been requested to enter a retention or power down state. The PSCI
implementation does not interpret the local power states defined by the
platform. The only constraint is that the PLAT_MAX_RET_STATE <
PLAT_MAX_OFF_STATE.

For a power domain tree, the generic implementation maintains an array of local
power states. These are the states requested for each power domain by all the
cores contained within the domain. During a request to place multiple power
domains in a low power state, the platform is passed an array of requested
power-states for each power domain through the plat_get_target_pwr_state()
API. It coordinates amongst these states to determine a target local power
state for the power domain. A default weak implementation of this API is
provided in the platform layer which returns the minimum of the requested
power-states back to the PSCI state coordination.

Finally, the plat_psci_ops power management handlers are passed the target
local power states for each affected power domain using the generic
representation described above. The platform executes operations specific to
these target states.

The platform power management handler for placing a power domain in a standby
state (plat_pm_ops_t.pwr_domain_standby()) is now only used as a fast path for
placing a core power domain into a standby or retention state should now be
used to only place the core power domain in a standby or retention state.

The extended state-id power state format can be enabled by setting the
build flag PSCI_EXTENDED_STATE_ID=1 and it is disabled by default.

Change-Id: I9d4123d97e179529802c1f589baaa4101759d80c
2015-08-13 19:57:31 +01:00
..
diagrams Document design of the Interrupt Mangement Framework 2014-06-03 18:42:14 +01:00
plat Implement get_sys_suspend_power_state() handler for Tegra 2015-07-06 09:15:02 +05:30
spd Move dispatcher documents to the docs/spd folder 2015-06-11 14:48:10 +05:30
auth-framework.md TBB: add authentication framework documentation 2015-06-25 08:53:27 +01:00
change-log.md Documentation for version 1.1 2015-02-03 11:43:43 +00:00
cpu-specific-build-macros.md Miscellaneous doc fixes for v1.1 2015-02-02 17:46:32 +00:00
firmware-design.md Merge pull request #324 from soby-mathew/sm/sys_suspend 2015-07-02 16:17:11 +01:00
interrupt-framework-design.md Create Table of Content links in markdown files 2015-01-07 15:01:07 +01:00
porting-guide.md Merge pull request #324 from soby-mathew/sm/sys_suspend 2015-07-02 16:17:11 +01:00
psci-pd-tree.md PSCI: Introduce new platform interface to describe topology 2015-08-13 16:28:26 +01:00
rt-svc-writers-guide.md Documentation for version 1.1 2015-02-03 11:43:43 +00:00
trusted-board-boot.md TBB: add authentication framework documentation 2015-06-25 08:53:27 +01:00
user-guide.md PSCI: Add framework to handle composite power states 2015-08-13 19:57:31 +01:00