summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorkhali <khali@7894878c-1315-0410-8ee3-d5d059ff63e0>2013-04-14 17:39:10 +0000
committerkhali <khali@7894878c-1315-0410-8ee3-d5d059ff63e0>2013-04-14 17:39:10 +0000
commit4c8210edf689c9ac940dd87fadb150e338f8a8e8 (patch)
tree1e62f7f584338d778fe48391114ae16eca038133
parente4eb2941c41cd4529cd6a0017e849fca9816fb35 (diff)
downloadi2c-tools-4c8210edf689c9ac940dd87fadb150e338f8a8e8.tar.gz
DDR3: Print physical characteristics and registered DIMM information
for all module types which support it. git-svn-id: http://lm-sensors.org/svn/i2c-tools/trunk@6141 7894878c-1315-0410-8ee3-d5d059ff63e0
-rw-r--r--CHANGES1
-rwxr-xr-xeeprom/decode-dimms45
2 files changed, 29 insertions, 17 deletions
diff --git a/CHANGES b/CHANGES
index ceea7fe..3d43c63 100644
--- a/CHANGES
+++ b/CHANGES
@@ -32,6 +32,7 @@ SVN HEAD
Fix speed and PC3 number of high-speed DDR3 modules
Decode DDR3 reference card revision
Print width of all known DDR3 module types
+ Print physical characteristics for all DDR3 module types
i2cdetect: Do a best effort detection if functionality is missing
Clarify the SMBus commands used for probing by default
i2c-dev.h: Minimize differences with kernel flavor
diff --git a/eeprom/decode-dimms b/eeprom/decode-dimms
index 16bc8ad..0c1ac3f 100755
--- a/eeprom/decode-dimms
+++ b/eeprom/decode-dimms
@@ -1366,6 +1366,11 @@ sub ddr3_reference_card($$)
return "$ref_card revision $revision";
}
+use constant DDR3_UNBUFFERED => 1;
+use constant DDR3_REGISTERED => 2;
+use constant DDR3_CLOCKED => 3;
+use constant DDR3_LOAD_REDUCED => 4;
+
# Parameter: EEPROM bytes 0-127 (using 3-76)
sub decode_ddr3_sdram($)
{
@@ -1377,19 +1382,19 @@ sub decode_ddr3_sdram($)
my @module_types = (
{ type => "Undefined", width => "Unknown" },
- { type => "RDIMM", width => "133.35 mm" },
- { type => "UDIMM", width => "133.35 mm" },
- { type => "SO-DIMM", width => "67.6 mm" },
- { type => "Micro-DIMM", width => "TBD" },
- { type => "Mini-RDIMM", width => "82.0 mm" },
- { type => "Mini-UDIMM", width => "82.0 mm" },
- { type => "Mini-CDIMM", width => "67.6 mm" },
- { type => "72b-SO-UDIMM", width => "67.6 mm" },
- { type => "72b-SO-RDIMM", width => "67.6 mm" },
- { type => "72b-SO-CDIMM", width => "67.6 mm" },
- { type => "LRDIMM", width => "133.35 mm" },
- { type => "16b-SO-DIMM", width => "67.6 mm" },
- { type => "32b-SO-DIMM", width => "67.6 mm" },
+ { type => "RDIMM", width => "133.35 mm", family => DDR3_REGISTERED },
+ { type => "UDIMM", width => "133.35 mm", family => DDR3_UNBUFFERED },
+ { type => "SO-DIMM", width => "67.6 mm", family => DDR3_UNBUFFERED },
+ { type => "Micro-DIMM", width => "TBD", family => DDR3_UNBUFFERED },
+ { type => "Mini-RDIMM", width => "82.0 mm", family => DDR3_REGISTERED },
+ { type => "Mini-UDIMM", width => "82.0 mm", family => DDR3_UNBUFFERED },
+ { type => "Mini-CDIMM", width => "67.6 mm", family => DDR3_CLOCKED },
+ { type => "72b-SO-UDIMM", width => "67.6 mm", family => DDR3_UNBUFFERED },
+ { type => "72b-SO-RDIMM", width => "67.6 mm", family => DDR3_REGISTERED },
+ { type => "72b-SO-CDIMM", width => "67.6 mm", family => DDR3_CLOCKED },
+ { type => "LRDIMM", width => "133.35 mm", family => DDR3_LOAD_REDUCED },
+ { type => "16b-SO-DIMM", width => "67.6 mm", family => DDR3_UNBUFFERED },
+ { type => "32b-SO-DIMM", width => "67.6 mm", family => DDR3_UNBUFFERED },
);
printl("Module Type", ($bytes->[3] <= $#module_types) ?
@@ -1543,19 +1548,25 @@ sub decode_ddr3_sdram($)
printl("SDRAM Device Type",
($bytes->[33] & 128) ? sprintf($bytes->[33] & 127) :
"Standard Monolithic");
- if ($bytes->[3] >= 1 && $bytes->[3] <= 6) {
+ # Following bytes are type-specific, so don't continue if type
+ # isn't known.
+ return if $bytes->[3] == 0 || $bytes->[3] > $#module_types;
+
+ if ($module_types[$bytes->[3]]->{family} == DDR3_UNBUFFERED ||
+ $module_types[$bytes->[3]]->{family} == DDR3_REGISTERED ||
+ $module_types[$bytes->[3]]->{family} == DDR3_CLOCKED ||
+ $module_types[$bytes->[3]]->{family} == DDR3_LOAD_REDUCED) {
prints("Physical Characteristics");
printl("Module Height", (($bytes->[60] & 31) + 15) . " mm");
printl("Module Thickness", sprintf("%d mm front, %d mm back",
($bytes->[61] & 15) + 1,
(($bytes->[61] >> 4) & 15) +1));
- printl("Module Width", $bytes->[3] <= $#module_types ?
- $module_types[$bytes->[3]]->{width} : "TBD");
+ printl("Module Width", $module_types[$bytes->[3]]->{width});
printl("Module Reference Card", ddr3_reference_card($bytes->[62], $bytes->[60]));
}
- if ($bytes->[3] == 1 || $bytes->[3] == 5) {
+ if ($module_types[$bytes->[3]]->{family} == DDR3_REGISTERED) {
prints("Registered DIMM");
my @rows = ("Undefined", 1, 2, 4);