aboutsummaryrefslogtreecommitdiff
path: root/modules/devices
diff options
context:
space:
mode:
authorBurt P <pburt0@gmail.com>2019-06-29 02:30:19 -0500
committerLeandro A. F. Pereira <leandro@hardinfo.org>2019-06-29 17:58:52 -0700
commit8167a6f66527193f770bc8cb347c8c510496ae7f (patch)
tree52056b5c78de78c49e5e6e5790b86a5f8f4bb79f /modules/devices
parent3e3d9bb7c4b099628e6eeb2b48c777984d7b1c56 (diff)
Memory Devices: add ranks, io pins, voltages for ddr3
Signed-off-by: Burt P <pburt0@gmail.com>
Diffstat (limited to 'modules/devices')
-rw-r--r--modules/devices/spd-decode.c15
1 files changed, 14 insertions, 1 deletions
diff --git a/modules/devices/spd-decode.c b/modules/devices/spd-decode.c
index 1ec5bf3b..6250be9d 100644
--- a/modules/devices/spd-decode.c
+++ b/modules/devices/spd-decode.c
@@ -567,11 +567,24 @@ static gchar *decode_ddr3_sdram_extra(unsigned char *bytes) {
decode_ddr3_module_timings(bytes, &trcd, &trp, &tras, &tcl);
- return g_strdup_printf("[%s]\n"
+ int ranks = 1 + ((bytes[7] >> 3) & 0x7);
+ int pins = 4 << (bytes[7] & 0x7);
+
+ /* expected to continue an [SPD] section */
+ return g_strdup_printf("%s=%d\n"
+ "%s=%d\n"
+ "%s=%s %s %s\n"
+ "[%s]\n"
"tCL=%.2f\n"
"tRCD=%.3fns\n"
"tRP=%.3fns\n"
"tRAS=%.3fns\n",
+ _("Ranks"), ranks,
+ _("IO Pins per Chip"), pins,
+ _("Supported Voltages"),
+ (bytes[6] & 4) ? "1.25V" : "",
+ (bytes[6] & 2) ? "1.35V" : "",
+ (bytes[6] & 1) ? "" : "1.5V",
_("Timings"), tcl, trcd, trp, tras
);
}