Module Name: src Committed By: pgoyette Date: Tue Dec 8 02:09:23 UTC 2015
Modified Files: src/sys/dev/ic: spdmem.c Log Message: Update calculations for DDR4 devices. This gets 1066MHz modules to report as PC4-17000. XXX Due to insufficient precision in the SPD ROM data, we still report XXX these modules with a DDR speed of 2132MHz, not 2133. :( (The XXX cycle time is really 937.5ps, but is stored in the ROM as 938.0ps) To generate a diff of this commit: cvs rdiff -u -r1.18 -r1.19 src/sys/dev/ic/spdmem.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
Modified files: Index: src/sys/dev/ic/spdmem.c diff -u src/sys/dev/ic/spdmem.c:1.18 src/sys/dev/ic/spdmem.c:1.19 --- src/sys/dev/ic/spdmem.c:1.18 Mon Dec 7 14:13:05 2015 +++ src/sys/dev/ic/spdmem.c Tue Dec 8 02:09:23 2015 @@ -1,4 +1,4 @@ -/* $NetBSD: spdmem.c,v 1.18 2015/12/07 14:13:05 msaitoh Exp $ */ +/* $NetBSD: spdmem.c,v 1.19 2015/12/08 02:09:23 pgoyette Exp $ */ /* * Copyright (c) 2007 Nicolas Joly @@ -35,7 +35,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: spdmem.c,v 1.18 2015/12/07 14:13:05 msaitoh Exp $"); +__KERNEL_RCSID(0, "$NetBSD: spdmem.c,v 1.19 2015/12/08 02:09:23 pgoyette Exp $"); #include <sys/param.h> #include <sys/device.h> @@ -875,7 +875,7 @@ decode_ddr4(const struct sysctlnode *nod dimm_size = (1 << dimm_size) * (s->sm_ddr4.ddr4_package_ranks + 1); /* log.ranks/DIMM */ if (s->sm_ddr4.ddr4_signal_loading == 2) { - dimm_size *= s->sm_ddr4.ddr4_diecount; + dimm_size *= (s->sm_ddr4.ddr4_diecount + 1); } } @@ -892,7 +892,7 @@ decode_ddr4(const struct sysctlnode *nod cycle_time % 1000, 1000000 / cycle_time); decode_size_speed(self, node, dimm_size, cycle_time, 2, - 1 << (s->sm_ddr4.ddr4_device_width + 3), + 1 << (s->sm_ddr4.ddr4_primary_bus_width + 3), TRUE, "PC4", 0); aprint_verbose_dev(self,