You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Add LastPostCode component details to SP5 host CPU (#2251)
Fixes#2244
We would like to be able to read the `LAST_POST_CODE` register from the
FPGA. This PR adds it as a `ComponentDetail` to the `SP5_HOST_CPU`
component.
The MGS side is
oxidecomputer/management-gateway-service#451, so
this is marked as a draft (but can still be reviewed).
There are two interesting changes:
- `Inventory::num_component_details` now returns 1 for the
`SP5_HOST_CPU` component
- `Inventory::component_details` now accepts a closure to handle any
components in `OUR_DEVICES`
The rest of the PR is mostly plumbing, e.g. adding modules to the
generated FMC code (because otherwise we have name collisions between
`espi` and `sequencer` registers).
I tested this on the bench with a Grapefruit, and it "works":
```
➜ management-gateway-service jj:(zq) cargo run -pfaux-mgs -- --interface=en10 component-details sp5-host-cpu
Compiling gateway-messages v0.1.0 (/Users/mjk/oxide/management-gateway-service/gateway-messages)
Compiling gateway-sp-comms v0.1.1 (/Users/mjk/oxide/management-gateway-service/gateway-sp-comms)
Compiling faux-mgs v0.1.1 (/Users/mjk/oxide/management-gateway-service/faux-mgs)
Finished `dev` profile [unoptimized + debuginfo] target(s) in 7.01s
Running `target/debug/faux-mgs --interface=en10 component-details sp5-host-cpu`
Sep 25 15:41:12.950 INFO creating SP handle on interface en10, component: faux-mgs
Sep 25 15:41:12.954 INFO initial discovery complete, addr: [fe80::c1d:8cff:fec0:e208%26]:11111, interface: en10, socket: control-plane-agent, component: faux-mgs
LastPostCode(LastPostCode(0))
```
I've also tested the `Sequencer.last_post_code` function on a Cosmo
through `humility hiffy`. I would like to do an end-to-end test, but
Cosmos with network connectivity are in high demand (see
oxidecomputer/meta#761)
0 commit comments