Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(rpi3_pm): fix RPi4 fails to boot secondary core at second time by PSCI #1988

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 4 additions & 14 deletions plat/rpi/common/rpi3_pm.c
Original file line number Diff line number Diff line change
Expand Up @@ -123,15 +123,6 @@ static void rpi3_pwr_domain_off(const psci_power_state_t *target_state)
#endif
}

void __dead2 plat_secondary_cold_boot_setup(void);

static void __dead2
rpi3_pwr_domain_pwr_down_wfi(const psci_power_state_t *target_state)
{
disable_mmu_el3();
plat_secondary_cold_boot_setup();
}

/*******************************************************************************
* Platform handler called when a power domain is about to be turned on. The
* mpidr determines the CPU to be turned on.
Expand Down Expand Up @@ -174,6 +165,8 @@ static void rpi3_pwr_domain_on_finish(const psci_power_state_t *target_state)
#endif
}

void __dead2 plat_secondary_cold_boot_setup(void);

static void __dead2 rpi3_pwr_down_wfi(
const psci_power_state_t *target_state)
{
Expand All @@ -194,10 +187,8 @@ static void __dead2 rpi3_pwr_down_wfi(
isb();
}

write_rmr_el3(RMR_EL3_RR_BIT | RMR_EL3_AA64_BIT);

while (1)
;
disable_mmu_el3();
plat_secondary_cold_boot_setup(); /* not return */
}

/*******************************************************************************
Expand Down Expand Up @@ -262,7 +253,6 @@ static void __dead2 rpi3_system_off(void)
static const plat_psci_ops_t plat_rpi3_psci_pm_ops = {
.cpu_standby = rpi3_cpu_standby,
.pwr_domain_off = rpi3_pwr_domain_off,
.pwr_domain_pwr_down_wfi = rpi3_pwr_domain_pwr_down_wfi,
.pwr_domain_on = rpi3_pwr_domain_on,
.pwr_domain_on_finish = rpi3_pwr_domain_on_finish,
.pwr_domain_pwr_down_wfi = rpi3_pwr_down_wfi,
Expand Down