In order to see the SPD (detailed memory information) data, the user currently has to manually load the needed kernel driver. Which driver to load depends on the memory type. Depending on the driver user, the devices may even have to be instantiated manually and this is a non-trivial multi-step task. Plus you need to be root to do it.
I would like to attempt to automatize all this at least in the most common and simple cases like Intel x86 desktop. The idea would be to figure out the memory type and the I2C address of the SPD EEPROMs based on DMI data. If the DMI data is of good quality then it should be possible to automatically figure out which driver to use and to instantiate the devices at boot time.
If this works then running "decode-dimms" (or any other equivalent tool) should just work after boot without any preparatory work, for all users.
I plan to start implementing this for DDR3 memory and the i2c-i801 SMBus controller driver because that's what I have on my workstation. If it works, doing the same for DDR4 shouldn't be too difficult. Once this works for the i2c-i801, it should be pretty trivial to do the same with other SMBus controller drivers, for example i2c-piix4.
Excluded from the scope are large server systems with multiple SMBus controllers or multiplexed SMBus. Also excluded are OF/DT systems as I would expect SPD EEPROMs to be declared in the device tree so they would already be instantiated without further effort.
This project is part of:
Hack Week 18
Activity
Comments
-
over 3 years ago by jdelvare | Reply
For the record, this hack week project was successful. Relevant upstream kernel commits:
commit 9e0afe3910ff7e5493c5d8ebe3b499994b5e0272 Author: Jean Delvare <jdelvare@suse.de> Date: Tue Dec 3 11:20:37 2019 +0100 firmware: dmi: Remember the memory type commit 7c2378800cf7ac87e2663afa7f39d102871f0c28 Author: Jean Delvare <jdelvare@suse.de> Date: Tue Dec 3 11:20:37 2019 +0100 firmware: dmi: Add dmi_memdev_handle commit 5ace60859e84113b7a185c117fbf2c429d381b59 Author: Jean Delvare <jdelvare@suse.de> Date: Mon Mar 16 11:22:24 2020 +0100 i2c: smbus: Add a way to instantiate SPD EEPROMs automatically commit 01590f361e94a01e9b9868fa81d4079d255c681f Author: Jean Delvare <jdelvare@suse.de> Date: Mon Mar 16 11:24:48 2020 +0100 i2c: i801: Instantiate SPD EEPROMs automatically
So the feature is supported since kernel v5.8. Next step is to extend support to systems with 5-8 memory slots (still on a single SMBus segment), and to add support to other SMBus controller drivers.
Similar Projects
early stage kdump support by mbrugger
[comment]: # (Please use the project descriptio...
FizzBuzz OS by mssola
Project Description
FizzBuzz OS (or just ...