fix(rpi3): tighten platform pwr_domain_pwr_down_wfi behaviour

Platforms which implement pwr_domain_pwr_down_wfi differ substantially
in behaviour. However, different cpus require similar sequences to power
down. This patch tightens the behaviour of these platforms to end on a
wfi loop after performing platform power down. This is required so that
platforms behave more consistently on power down, in cases where the wfi
can fall through.

Signed-off-by: Boyan Karatotev <boyan.karatotev@arm.com>
Change-Id: Ie29bd3a5e654780bacb4e07a6d123ac6d2467c1f
This commit is contained in:
Boyan Karatotev 2022-10-05 13:41:56 +01:00
parent cf58b2d41c
commit 028c4e42d8
2 changed files with 5 additions and 3 deletions

View file

@ -2769,7 +2769,8 @@ must ensure that races between multiple CPUs cannot occur.
The ``target_state`` has a similar meaning as described in the ``pwr_domain_off()``
operation and it encodes the platform coordinated target local power states for
the CPU power domain and its parent power domain levels. This function must
not return back to the caller.
not return back to the caller (by calling wfi in an infinite loop to ensure
some CPUs power down mitigations work properly).
If this function is not implemented by the platform, PSCI generic
implementation invokes ``psci_power_down_wfi()`` for power down.

View file

@ -187,8 +187,9 @@ static void __dead2 rpi3_pwr_down_wfi(
write_rmr_el3(RMR_EL3_RR_BIT | RMR_EL3_AA64_BIT);
while (1)
;
while (1) {
wfi();
}
}
/*******************************************************************************