Skip to content

Commit

Permalink
fix(cpu_idle): replace psci_power_down by a WFI call
Browse files Browse the repository at this point in the history
For physical boards (e.g. ZCU102), when using the Remote IO
there is a problem already identified when the Frontend VM's
CPU goes to the idle state, as a result of the trap process
and MMIO emulation. In this scenario, currently Bao Hypervisor
is unable to save the state of the registers before powering off.
This patch replaces the psci_power_down call by an explicit WFI
(Wait For Interrupt), temporarily resolving the problem.

Signed-off-by: joaopeixoto13 <[email protected]>
  • Loading branch information
joaopeixoto13 committed Apr 15, 2024
1 parent 5b33dd3 commit bf2fc92
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/arch/armv8/armv8-a/cpu.c
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ void cpu_arch_profile_init(cpuid_t cpuid, paddr_t load_addr)

void cpu_arch_profile_idle()
{
int64_t err = psci_power_down(PSCI_WAKEUP_IDLE);
int64_t err = PSCI_E_NOT_SUPPORTED;
if (err) {
switch (err) {
case PSCI_E_NOT_SUPPORTED:
Expand Down

0 comments on commit bf2fc92

Please sign in to comment.