Skip to content

Fix SPD on Gimlet and Cosmo#617

Open
mkeeter wants to merge 5 commits intomasterfrom
mkeeter/fix-spd
Open

Fix SPD on Gimlet and Cosmo#617
mkeeter wants to merge 5 commits intomasterfrom
mkeeter/fix-spd

Conversation

@mkeeter
Copy link
Copy Markdown
Contributor

@mkeeter mkeeter commented Apr 15, 2026

This is a fix for #596, #595, and #568.

In oxidecomputer/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

Copy link
Copy Markdown

@rmustacc rmustacc left a comment

Choose a reason for hiding this comment

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

You'll want to have some folks look a bit closer at some of the specifics. I just have a few comments that mostly stem from my own confusion I think.

Comment thread cmd/spd/src/lib.rs
Comment thread cmd/spd/src/lib.rs
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.

2 participants