Support of DDR4 EEPROMs
Hi all,
My topic for SUSE Hackweek 16 is to add support for DDR4 memory modules to decode-dimms:
https://hackweek.suse.com/16/projects/add-support-for-ddr4-to-decode-dimms
I naively thought it would only be about modifying the perl script to decode new fields and new values from the SPD EEPROM, however it turns out that the EEPROM themselves are different. Instead of regular 24C02-style 256-byte EEPROMs, DDR4 memory modules use 512-byte EEPROMs. The trick is that they still use only 1 I2C address each in the 0x50-0x57 range. You have to tinker with special commands in the 0x30-0x37 range to select one of 2 256-byte pages that will be reachable through the 0x50-0x57 I2C address. And as far as I can, it switched all EEPROMs at once, which won't be easy to implement.
The standard in question is JEDEC EE1004. I'm not sure if we should add support to the at24 driver, or write a separate driver for such EEPROMs. Before I start working on that, I would like to ask if anybody is already working on it?
Thanks,
Signature · 2 lines
Jean Delvare SUSE L3 Support
Quoted 3 lines · Jean Delvare
My topic for SUSE Hackweek 16 is to add support for DDR4 memory modules to decode-dimms:
https://hackweek.suse.com/16/projects/add-support-for-ddr4-to-decode-dimms
I have successfully completed my project.
SUMMARY
-------
There were two distinct problems to be solved:
* The register definitions of DDR4 SPD is different from previous SDRAM generations, so decode-dimms needed to be extended to know about them.
* The EEPROMs which hold the SPD data on DDR4 memory modules are no longer standard AT24C02-compatible EEPROMs. They are 512-byte EEPROMs which use only 1 I2C address for data access. You need to switch between the lower page and the upper page of data by sending commands on the SMBus.
RESULTS
-------
Support for DDR4 SDRAM modules was added to decode-dimms as 6 patches:
decode-dimms-DDR4-01-manufacturer.patch
decode-dimms: Add preliminary DDR4 support
decode-dimms-DDR4-02-size-and-timings.patch
decode-dimms: Decode size and timings of DDR4
decode-dimms-DDR4-03-extra-information.patch
decode-dimms: Decode misc parameters of DDR4
decode-dimms-DDR4-04-type-specific.patch
decode-dimms: Decode physical characteristics of DDR4
decode-dimms-DDR4-05-add-ee1004-driver.patch
decode-dimms: Documentation update for DDR4
decode-dimms-DDR4-06-check-block-1-CRC.patch
decode-dimms: Verify the CRC of DDR4 data block 1
I will post these patches on this list tomorrow.
The kernel-side support was implemented with a dedicated driver named ee1004. I'll wrap it into a proper patch tomorrow and post it here.
TESTING
-------
If you want to test the results of this hackweek project, you first have to download and build the standalone ee1004 driver:
http://users.suse.com/~jdelvare/hackweek/0x10/ee1004/
Once it is built, load it:
# insmod ee1004.ko
There is no auto-detection of the DDR4 SPD EEPROMs yet, so you then have to instantiate the ee1004 devices manually. Only try this on a system which you are sure does have DDR4 SDRAM memory.
First you must find out the i2c bus number of your motherboard's SMBus, using i2cdetect (i2cdetect is part of the i2c-tools package.) Example:
# modprobe i2c-dev # i2cdetect -l | grep smbus i2c-4 smbus SMBus I801 adapter at f040 SMBus adapter
So the SMBus is i2c-4. Then you must find the I2C addresses of the SPD EEPROMs:
# i2cdetect -y 4 0x50 0x57
0 1 2 3 4 5 6 7 8 9 a b c d e f
00:
10:
20:
30:
40:
50: -- 51 -- 53 -- -- -- --
60:
70: So there are 2 DDR4 SPD EEPROMs, one at I2C address 0x51 and one at I2C address 0x53. To instantiate the devices, do:
# echo ee1004 0x51 > /sys/bus/i2c/devices/i2c-4/new_device # echo ee1004 0x53 > /sys/bus/i2c/devices/i2c-4/new_device
After this, script decode-dimms will find the SPD EEPROMs and decode their contents:
http://users.suse.com/~jdelvare/hackweek/0x10/decode-dimms-DDR4
Thanks,
Signature · 2 lines
Jean Delvare SUSE L3 Support