oxidecomputer / oxidecomputer/hubris
We probably want the entire I2C driver to wait for the sequencer to finish setting things up
Nobody has claimed this yet.
- Dominant language
- Rust
- Stars
- 3.6k
- Forks
- 239
- Avg merge
- 1d 12h
- Merged PRs (30d)
- 23
Description
Currently, certain I2C clients will check power state before issuing certain I2C requests. However, I think we might want to interlock the entire I2C driver's startup on the sequencer reaching some basic level of initialization.
Thinking about the out-of-band reset lines we've added in Gimlet D (yaaaaaay), if we add code to the I2C driver to pulse all the resets early in startup, we could pretty easily wind up with this interleaving of events if the SP gets reset while the host is up:
- Sequencer starts doing things
- I2C driver starts doing things like pulling resets
- I2C driver has reset all muxes and starts accepting bus traffic
- Sequencer pulls CRESETB, dropping power state to A2.
- Muxes may now be left connected to unpowered domains.
I think our safeguards in tasks like thermal would prevent this from happening, and I could imagine inserting code in the I2C driver to try to recover from certain cases by resetting muxes again, but I feel like it'd be easier to reason about if we just had the I2C driver wait until the sequencer has made the power state consistent.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by tracing the I2C driver's startup path and the sequencer initialization and power-state handling described in the issue. Confirm the ordering around reset and bus availability, then define completion as the I2C driver remaining blocked until the sequencer has established a consistent power state; the payload names no specific files or tests.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- rust
- Domain
- embedded-iot
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100