Reading RAM SPD data on a Gigabyte Z77 Chipset motherboard under Linux

2015/02/22

Tags: linux SPD memory ACPI

I was interested in reading the RAM timing of my memory under Linux. Turns out this can be done with the decode-dimms command, which is part of the i2c-tools package.

To get this to work I had to do several steps though:

Reboot and add the following kernel parameter: acpi_enforce_resources=lax

By default this is set to strict, which meant that the i2c-i801 module was prevented from using the SMBUS controller. This could be seen from the following messages in dmesg:

[    2.338436] ACPI Warning: SystemIO range 0x000000000000f000-0x000000000000f01f conflicts with OpRegion 0x000000000000f000-0x000000000000f00f (\_SB_.PCI0.SBUS.SMBI) (20140926/utaddress-258)
[    2.338442] ACPI: If an ACPI driver is available for this device, you should use it instead of the native driver
[    2.338471] i801_smbus 0000:00:1f.3: SMBus using PCI Interrupt

and looking at the lshw output, the SMBUS controller was unclaimed:

        *-serial UNCLAIMED
             description: SMBus
             product: 7 Series/C210 Series Chipset Family SMBus Controller
             vendor: Intel Corporation
             physical id: 1f.3
             bus info: pci@0000:00:1f.3
             version: 04
             width: 64 bits
             clock: 33MHz
             configuration: driver=i801_smbus latency=0
             resources: irq:18 memory:f7f15000-f7f150ff ioport:f000(size=32)

After rebooting with the kernel parameter, an additional dmesg line will be outputted indicating the conflict has been allowed

[    2.338436] ACPI Warning: SystemIO range 0x000000000000f000-0x000000000000f01f conflicts with OpRegion 0x000000000000f000-0x000000000000f00f (\_SB_.PCI0.SBUS.SMBI) (20140926/utaddress-258)
[    2.338441] ACPI: This conflict may cause random problems and system instability
[    2.338442] ACPI: If an ACPI driver is available for this device, you should use it instead of the native driver
[    2.338471] i801_smbus 0000:00:1f.3: SMBus using PCI Interrupt

Finally, the eeprom module needs to be inserted:

modprobe eeprom

After that, decode-dimms should work as expected:

[root@orinoco ~]# decode-dimms        
# decode-dimms version 6231 (2014-02-20 10:54:34 +0100)

Memory Serial Presence Detect Decoder
By Philip Edelbrock, Christian Zuckschwerdt, Burkart Lingner,
Jean Delvare, Trent Piepho and others


Decoding EEPROM: /sys/bus/i2c/drivers/eeprom/0-0050
Guessing DIMM is in                             bank 1

---=== SPD EEPROM Information ===---
EEPROM CRC of bytes 0-116                       OK (0xE8AC)
# of bytes written to SDRAM EEPROM              176
Total number of bytes in EEPROM                 256
Fundamental Memory type                         DDR3 SDRAM
Module Type                                     UDIMM
etc....