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: CPU power down #197

Open
wants to merge 2 commits into
base: main
Choose a base branch
from
Open

Conversation

joaopeixoto13
Copy link
Member

No description provided.

This commit fixes issue introduced in commit 6df80f4 by ensuring the
CPU jumps to the CPU message handler (if received any CPU message)
after waking from power down.
This allows the target CPU to update the `psci_ctx.state` field to
`ON`, enabling the vCPU to resume execution.

Signed-off-by: João Peixoto <[email protected]>
Currently, Arm Trusted Firmware does not support power-down suspend calls.
This is evident in the implementation of the `qemu_pwr_domain_suspend`
function, which contains an `assert(0)` statement, causing the CPU to
halt indefinitely without recovery.

Signed-off-by: João Peixoto <[email protected]>
@@ -127,6 +127,11 @@ void cpu_standby_wakeup(void)

void cpu_powerdown_wakeup(void)
Copy link
Member

Choose a reason for hiding this comment

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

I think we can merge this with cpu_standby_wakeup and have a single wake up function

Copy link
Member Author

Choose a reason for hiding this comment

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

I think we can merge this with cpu_standby_wakeup and have a single wake up function

My question is: how can we invoke the cpu_standby() and cpu_powerdown() functions if cpu()->vcpu is NULL? Should we pass an argument to the new cpu_wakeup() function and determine the specific method to call based on that argument?

Copy link
Member

Choose a reason for hiding this comment

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

For me it's ok how it is currently
IMO in this case it is better to have the two separate but similar functions

@@ -127,6 +127,11 @@ void cpu_standby_wakeup(void)

void cpu_powerdown_wakeup(void)
Copy link
Member

Choose a reason for hiding this comment

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

For me it's ok how it is currently
IMO in this case it is better to have the two separate but similar functions

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.

3 participants