Commit 9283233
authored
Fix SPD on Gimlet and Cosmo (#617)
This is a fix for humility#596, humility#595, and humility#568.
In hubris#2094, we moved the SPD data to a parameterized `struct SpdData<const
DIMM_COUNT: usize, const DATA_SIZE: usize>`. This is because Cosmo has a
different number of DIMMS (16 → 12), and their SPD data are a different size
(512 → 1024 bytes).
Unfortunately, this broke Humility, which was expecting an array named
`spd_data` and instead found a `struct`.
Cosmo is _also_ broken because DDR5 has a different SPD layout than DDR4; even
if we could read the `struct`, we wouldn't know how to parse it.
This PR fixes both things, flexibly decoding the `SpdData` and printing both
DDR4 and DDR5 SPDs. (This required updating the `spd` crate with DDR5 info)
To avoid a giant diff, this doesn't add new dumps for the test suite, but I'm
planning to add them in a subsequent PR.
Here's an example of Cosmo output:
```
Running `target/debug/humility -d /Users/mjk/Desktop/hubris.core.cosmo spd`
humility: attached to dump
ADDR MANUFACTURER PART WEEK YEAR
0 Micron Technology MTC40F2047S1RC64BB1 USFF 2 2025
1 Micron Technology MTC40F2047S1RC64BB1 USFF 2 2025
2 Micron Technology MTC40F2047S1RC64BB1 USFF 2 2025
3 Micron Technology MTC40F2047S1RC64BB1 USFF 2 2025
4 Micron Technology MTC40F2047S1RC64BB1 USFF 2 2025
5 Micron Technology MTC40F2047S1RC64BB1 USFF 2 2025
6 Micron Technology MTC40F2047S1RC64BB1 USFF 2 2025
7 Micron Technology MTC40F2047S1RC64BB1 USFF 2 2025
8 Micron Technology MTC40F2047S1RC64BB1 USFF 2 2025
9 Micron Technology MTC40F2047S1RC64BB1 USFF 2 2025
10 Micron Technology MTC40F2047S1RC64BB1 USFF 2 2025
11 Micron Technology MTC40F2047S1RC64BB1 USFF 2 2025
```1 parent 8e7d59c commit 9283233
5 files changed
Lines changed: 202 additions & 80 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
0 commit comments