Skip to content

Commit

Permalink
feat(armv8-a/cpu): Handle unexpected powerdown behavior
Browse files Browse the repository at this point in the history
We've observed that some platforms behave unexpectedly when performing
power down. In these cases, after powerdown, the CPU cores are not awaken
by interrupts as expected by Bao. This commit solve this, by adding the
ability to skip the powerdown firmware call, instead relying on the
fallback mechanism of using wfi.

Signed-off-by: David Cerdeira <[email protected]>
  • Loading branch information
DavidMCerdeira committed Oct 2, 2024
1 parent 02790d7 commit 7b4d6f5
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions src/arch/armv8/armv8-a/psci.c
Original file line number Diff line number Diff line change
Expand Up @@ -90,6 +90,13 @@ int32_t psci_standby()

int32_t psci_power_down(enum wakeup_reason reason)
{
/* We've observed that some platforms behave unexpectedly when performing
* power down. In these cases, after powerdown, the CPU cores are not awaken
* by interrupts as expected by Bao. */
if (!DEFINED(PLAT_PSCI_POWERDOWN_NOT_SUPPORTED)) {
return PSCI_E_NOT_SUPPORTED;
}

extern void psci_boot_entry(unsigned long x0);

uint32_t pwr_state_aux = PSCI_POWER_STATE_LVL_0 | PSCI_STATE_TYPE_POWERDOWN;
Expand Down

0 comments on commit 7b4d6f5

Please sign in to comment.