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

Add Sidecar front IO HSC control, work around front IO PHY oscillator errata #1449

Merged
merged 5 commits into from
Jul 7, 2023

Conversation

arjenroodselaar
Copy link
Contributor

The oscillator used to drive the VSC8562 PHY on the Sidecar front IO board occasionally fails to start properly, causing the QSGMII link to the management network switch to fail and the technician ports to be non-functional (#1410). This diff does the following:

  • Implement sequencer control over the front IO hot swap controller
  • Make monorail-server detect the oscillator failure, request a power cycle of the front IO board and retry PHY initialization until the QSGMII link is operational
  • Refactor power rail status primitives into a new fpga-app-api crate

… errata

The oscillator used to drive the VSC8562 PHY on the Sidecar front IO board
occasionally fails to start properly, causing the QSGMII link to the management
network switch to fail and the technician ports to be non-functional. This diff
does the following:

- Implement sequencer control over the front IO hot swap controller
- Make monorail-server detect the oscillator failure, request a power cycle of
  the front IO board and retry PHY initialization until the QSGMII link is
  operational
- Refactor power rail status primitives into a new `fpga-app-api` crate
drv/fpga-app-api/Cargo.toml Outdated Show resolved Hide resolved
drv/fpga-app-api/src/lib.rs Outdated Show resolved Hide resolved
Comment on lines 9 to 12
/// This module implements state primitives matching the generic power
/// rail/voltage regulator as implemented in
/// https://github.com/oxidecomputer/quartz/blob/main/hdl/power_rail.rdl,
/// https://github.com/oxidecomputer/quartz/blob/main/hdl/PowerRail.bsv.
Copy link
Contributor

Choose a reason for hiding this comment

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

We have a pattern to tightly integrate types defined via RDL into our BSV/Rust code. At first blush, leaning on that could easily eliminate the duplicate hand coding of the PowerRailStatus enum. I don't recall if we support generating structs off hand, so PowerFailPinState may not be covered but that seems like a natural place to continue to expand our integration here lest we need to change RDL, BSV, and Rust every time a register changes.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Yes, the reason this looks the way it does is because while RDL can define types, we currently can't export those types through the JSON representation into Hubris. We can only generate specific instantiations of that type within a register map. We should figure out how to extend our capabilities here, but I don't want to hold up this diff on something open-ended.

drv/sidecar-front-io/src/phy_smi.rs Outdated Show resolved Hide resolved
@arjenroodselaar arjenroodselaar merged commit fcda20d into master Jul 7, 2023
65 checks passed
@arjenroodselaar arjenroodselaar deleted the front_io_bad_osc branch July 7, 2023 17:05
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.

None yet

3 participants