]> git.baikalelectronics.ru Git - arm-tf.git/commit
feat(psci): add support for OS-initiated mode
authorWing Li <wingers@google.com>
Wed, 14 Sep 2022 20:18:17 +0000 (13:18 -0700)
committerWing Li <wingers@google.com>
Tue, 21 Mar 2023 05:20:35 +0000 (22:20 -0700)
commit606b7430077c15695a5b3bcfbad4975f00c9bf95
tree341df6d7d352afc086f6315d9fef4f25e84651f3
parentb88a4416b5e5f2bda2240c632ba79e15a9a75c45
feat(psci): add support for OS-initiated mode

This patch adds a `psci_validate_state_coordination` function that is
called by `psci_cpu_suspend_start` in OS-initiated mode.

This function validates the request per sections 4.2.3.2, 5.4.5, and 6.3
of the PSCI spec (DEN0022D.b):
- The requested power states are consistent with the system's state
- The calling core is the last running core at the requested power level

This function differs from `psci_do_state_coordination` in that:
- The `psci_req_local_pwr_states` map is not modified if the request
  were to be denied
- The `state_info` argument is never modified since it contains the
  power states requested by the calling OS

This is conditionally compiled into the build depending on the value of
the `PSCI_OS_INIT_MODE` build option.

Change-Id: I667041c842d2856e9d128c98db4d5ae4e4552df3
Signed-off-by: Wing Li <wingers@google.com>
docs/getting_started/porting-guide.rst
include/lib/psci/psci.h
lib/psci/psci_common.c
lib/psci/psci_main.c
lib/psci/psci_private.h
lib/psci/psci_suspend.c