oxidecomputer / oxidecomputer/hubris
IPCC sensor list is incomplete
Nobody has claimed this yet.
- Dominant language
- Rust
- Stars
- 3.6k
- Forks
- 239
- Avg merge
- 1d 12h
- Merged PRs (30d)
- 23
Description
...you can help by expanding it.
https://github.com/oxidecomputer/hubris/pull/2108 was recently merged (edit: and https://github.com/oxidecomputer/hubris/pull/2578 is now open), which made three new temperature sensors available on gimlet (and cosmo) from the rails controlled by ISL68224 devices. These new sensors showed up automatically in humility-based querying.
However, for IPCC-based querying, e.g. over host-sp-comms, @rmustacc pointed out that:
- Sensor data retrieval is based on
SensorId - These mappings are on a per device basis
- These mappings are handled manually
An example of this can be found here, where we match on a magic number:
Also worth noting that InventoryData::Isl68224 doesn't include temp_sensor, like InventoryData::Bmr491 does.
I'm not currently sure where the authoritative definition of SensorId is, whether it is just these match statements in the BSP, or if there is another place where this match statement is following. However, the code says:
/// Indexes are assigned arbitrarily and may change freely with SP
/// revisions.
Which is even more confusing to me, personally.
At a minimum, we should probably "plumb through" these new temperature sensors, and potentially add temperature sensors to InventoryData::Isl68224's fields.
Longer term, it might be better to use a different/stable identifier for this querying, perhaps by refdes or rail name. I'm unsure of the bigger picture here, so open to suggestions.
CC @rmustacc, @hawkw
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 in task/host-sp-comms/src/bsp/cosmo_ab.rs at the SensorId match statements, then inspect InventoryData::Isl68224 and compare it with InventoryData::Bmr491. Trace how the per-device mappings serve IPCC querying over host-sp-comms. Done means the new temperature sensors are exposed for gimlet and cosmo, with any required inventory fields updated.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- rust
- Domain
- embedded-iot
- Issue type
- Feature
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Quiet
- Clarity
- Mostly clear
- Newbie friendliness
- 48/100