arm-trusted-firmware/lib/psci
Wing Li 606b743007 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>
2023-03-20 22:20:35 -07:00
..
aarch32 fix(psci): tighten psci_power_down_wfi behaviour 2023-01-23 17:25:40 +00:00
aarch64 fix(cpus): workaround for Cortex-A510 erratum 2684597 2023-01-25 09:40:33 +00:00
psci_common.c feat(psci): add support for OS-initiated mode 2023-03-20 22:20:35 -07:00
psci_lib.mk fix(cpus): workaround for Cortex-A510 erratum 2684597 2023-01-25 09:40:33 +00:00
psci_main.c feat(psci): add support for OS-initiated mode 2023-03-20 22:20:35 -07:00
psci_mem_protect.c Sanitise includes across codebase 2019-01-04 10:43:17 +00:00
psci_off.c refactor(psci): move psci_do_pwrdown_sequence() out of private header 2022-09-15 18:09:56 +05:30
psci_on.c refactor(context mgmt): add cm_prepare_el3_exit_ns function 2022-04-12 17:42:11 +02:00
psci_private.h feat(psci): add support for OS-initiated mode 2023-03-20 22:20:35 -07:00
psci_setup.c feat(psci): add support for PSCI_SET_SUSPEND_MODE 2023-03-20 22:20:35 -07:00
psci_stat.c Unify type of "cpu_idx" across PSCI module. 2020-01-10 17:11:51 +00:00
psci_suspend.c feat(psci): add support for OS-initiated mode 2023-03-20 22:20:35 -07:00
psci_system_off.c Don't return error information from console_flush 2020-10-09 10:21:50 -05:00