arm-trusted-firmware/services/std_svc/psci
Soby Mathew 42cae5a166 PSCI: Set ON_PENDING state early during CPU_ON
In the debug build of the function get_power_on_target_afflvl(), there is a
check to ensure that the CPU is emerging from a SUSPEND or ON_PENDING state.
The state is checked without acquiring the lock for the CPU node. The state
could be updated to ON_PENDING in psci_afflvl_on() after the target CPU has
been powered up. This results in a race condition which could cause the
check for the ON_PENDING state in get_power_on_target_afflvl() to fail.
This patch resolves this race condition by setting the state of the target
CPU to ON_PENDING before the platform port attempts to power it on. The
target CPU is thus guaranteed to read the correct the state. In case
the power on operation fails, the state of the CPU is restored to OFF.

Fixes ARM-software/tf-issues#302

Change-Id: I3f2306a78c58d47b1a0fb7e33ab04f917a2d5044
2015-05-13 10:52:02 +01:00
..
psci_afflvl_off.c Verify capabilities before handling PSCI calls 2015-01-26 12:42:45 +00:00
psci_afflvl_on.c PSCI: Set ON_PENDING state early during CPU_ON 2015-05-13 10:52:02 +01:00
psci_afflvl_suspend.c Fix violations to the coding style 2015-03-05 12:02:07 +00:00
psci_common.c Fix violations to the coding style 2015-03-05 12:02:07 +00:00
psci_entry.S Add support to indicate size and end of assembly functions 2015-04-08 13:02:59 +01:00
psci_helpers.S Add support to indicate size and end of assembly functions 2015-04-08 13:02:59 +01:00
psci_main.c Export maximum affinity using PLATFORM_MAX_AFFLVL macro 2015-02-12 15:12:52 +00:00
psci_private.h Export maximum affinity using PLATFORM_MAX_AFFLVL macro 2015-02-12 15:12:52 +00:00
psci_setup.c Export maximum affinity using PLATFORM_MAX_AFFLVL macro 2015-02-12 15:12:52 +00:00
psci_system_off.c Verify capabilities before handling PSCI calls 2015-01-26 12:42:45 +00:00