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
chips: ibex: Enable low power state #1882
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do we have an understanding of how peripherals interact with the power manager on this core (i.e. if waiting for a GPIO event or I2C event, do we have to go to a different power state)?
4fefb0b
to
3a14236
Compare
I have updated this addressing comments and rebasing it on #1886 |
4d01641
to
e185596
Compare
I think this is blocked on #1886 for now. In the meantime, I'm still slightly worried about understanding how peripherals interact with the power manager. For example, on the SAM4L there is fairly complex logic that checks which sleep state is safe to enter based on the peripherals that are active. Does ibex manage the various sleep states automatically, or is this something that Tock will need to manage? |
Signed-off-by: Alistair Francis <alistair.francis@wdc.com>
Signed-off-by: Alistair Francis <alistair.francis@wdc.com>
e185596
to
7df578b
Compare
I have updated this and it's no longer blocking. As for if the sleep state is safe to enter I don't see anything in the documentation describing that we need to check anything. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
bors r+
1887: sched: Add a watchdog r=bradjc a=alistair23 ### Pull Request Overview As part of #1882 we started talking about safe waits (#1552). I have a PR with some initial safe wait support (#1886) in that we can be interrupted while looping on a hardware condition. The idea here is that while entering low power mode we can skip the infinite loop if we get an interrupt. #1886 doesn't address a large number of loops in the driver capsules as they don't have access to `Chip` so it's more difficult to wait on interrupts. The harder part is what to do when a wait "fails". What happens when returning to full power fails to occur in a specific time, what happens when a bus fails to respond in a reasonable amount of time? How do we gracefully handle this and continue running in some capacity. This PR starts to implement a watchdog functionality. This is not instead of a safe wait (in lots of cases a safe wait would be more graceful) but is generally to help avoid infinite loops and help debugging. It is also something that has come up to help make Tock more reliable. It is up to `Chips` and boards to handle the watchdog interrupt and decided how to act. Currently we tickle the watch dog when iterating on each process and at the start of each kernel loop. ### Testing Strategy None ### TODO or Help Wanted Feedback ### Documentation Updated - [X] Updated the relevant files in `/docs`, or no updates are required. ### Formatting - [X] Ran `make format`. - [X] Fixed errors surfaced by `make clippy`. Co-authored-by: Alistair Francis <alistair.francis@wdc.com> Co-authored-by: Brad Campbell <bradjc5@gmail.com>
Pull Request Overview
This PR configures the OpenTitan Power Management IP to enter low power mode before calling the WFI.
Testing Strategy
This pull request was tested by running Tock and apps on the FPGA OT instance.
TODO or Help Wanted
Documentation Updated
/docs
, or no updates are required.Formatting
make format
.make clippy
.