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

PSCI: fix some PSCI issues and decouple CPU standby from CPU power down #186

Merged
merged 2 commits into from
Nov 2, 2024

Conversation

joaopeixoto13
Copy link
Member

This PR is divided into three parts:

  • Fix QEMU PSCI power down and standby states
  • Remove unnecessary cpu_idle and vcpu_arch_run calls
  • Decouple CPU standby from CPU power down

@josecm
Copy link
Member

josecm commented Oct 22, 2024

@Diogo21Costa could you check this is inline with your previous work in distinguishing idle cpu states?

@Diogo21Costa
Copy link
Member

@Diogo21Costa could you check this is inline with your previous work in distinguishing idle cpu states?

@josecm aside from a few minor comments, this looks good to me and is consistent with the previous work!

Copy link
Member

@josecm josecm left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This PR should be dependent (and rebased) on #187 so that #187 is merged first, and the risc-v cpu_arch_standby implementation correctly uses the sbi suspend function.

src/core/vm.c Outdated Show resolved Hide resolved
@joaopeixoto13 joaopeixoto13 force-pushed the fix/psci branch 2 times, most recently from 777cbd6 to 12c0cfd Compare October 29, 2024 14:47
@josecm
Copy link
Member

josecm commented Oct 30, 2024

@joaopeixoto13 please rebase this on main and adapt the RISC-V suspend calls

@joaopeixoto13
Copy link
Member Author

@joaopeixoto13 please rebase this on main and adapt the RISC-V suspend calls

Done

josecm
josecm previously approved these changes Nov 1, 2024
src/core/vm.c Outdated Show resolved Hide resolved
src/arch/armv8/armv8-a/cpu.c Outdated Show resolved Hide resolved
Decoupled the CPU idle state (now called standby) from the CPU power down state.
This change allows future implementations requiring CPU standby — where the
core may be needed shortly after an event — to avoid transitioning to a deeper
power down state.

This commit also removes the `PSCI_WAKEUP_IDLE` (or standby in this case) from
`psci_wake_handlers` since the standby mode does not use the
`entry_point_address` and `context_id` fields and, therefore, does not require
a custom wake-up handler (e.g., psci_boot_entry).

Signed-off-by: João Peixoto <[email protected]>
@josecm josecm merged commit 6df80f4 into bao-project:main Nov 2, 2024
31 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants