Skip to content

mcsee-artifacts/spd-decoder

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 

Repository files navigation

Quickstart

Requirements

Before running the SPD dumping tool, make sure the following packages are installed:

sudo apt-get update
sudo apt-get install -y i2c-tools python3 python3-pip

This tool was developed and tested on a system with an Intel Raptor Lake CPU. Compatibility with other platforms has not been verified.

Using dump_spd_pretty.py

The script dump_spd_pretty.py extracts SPD data and can either display it on the console or export it as JSON files.

Arguments

  • -n, --num-dimms <int>
    Number of DIMMs to scan (default: 1)

  • -ids, --dimm-ids <comma-separated list>
    Comma-separated list of DIMM IDs in the recommended insertion order, e.g., A2,B2,A1,B1

  • -p, --print
    Print the SPD data to stdout

  • -j, --export-json
    Write SPD data as JSON files to the ./data/ directory

⚠️ Important Constraint:
If --export-json is specified, --dimm-ids must also be provided.
Otherwise, the script will terminate with an error.

Example Usage

Print SPD data for one DIMM:

python dump_spd_pretty.py -n 1 -p

Export SPD data for four DIMMs:

python dump_spd_pretty.py -n 4 --dimm-ids A2,B2,A1,B1 -j

Implementation

SPD Hub Detection

SPD hubs are typically located at I²C addresses 0x51 and 0x53
(similar to DDR4, where SPD data is between 0x50–0x57).
To detect them, use:

sudo i2cdetect -y ${SMBUS_ID}

To automatically determine the correct SMBUS_ID, run:

SMBUS_ID=$(sudo i2cdetect -l | grep smbus | cut -f1 | tr -d 'i2c-')

Page Selection

Due to lack of support for the newer I3C standard in Linux drivers,
page selection relies on legacy I²C mechanisms. Set byte 11 (0x0B)
to a value between 0 and 7 to select a page.

⚠️ Warning:
Do not write values greater than 7 to this register.
It will enable 2-byte addressing mode, which cannot be reset without a full system reboot.

Reading RFM Values

The RFM (Refresh Management) values are stored in MR58 (the 59th byte) on page 1.
SPD data is laid out as follows:

  • Bytes 0–127: General SPD hub information (e.g., vendor ID, temperature)
  • Bytes 128–255: Page-specific data according to JEDEC 79-5

The RFM value is located at:

128 (start of page 1) + 58 (MR58) = 0xBA

About

The DDR5 SPD chip decoder to extract the RFM values.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published