Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/netbsd-8]: src/sys/dev/ic Pull up following revision(s) (requested by ms...



details:   https://anonhg.NetBSD.org/src/rev/422f33d450ea
branches:  netbsd-8
changeset: 447231:422f33d450ea
user:      martin <martin%NetBSD.org@localhost>
date:      Thu Jan 03 11:23:54 2019 +0000

description:
Pull up following revision(s) (requested by msaitoh in ticket #1153):

        sys/dev/ic/spdmemvar.h: revision 1.14
        sys/dev/ic/spdmem.c: revision 1.30
        sys/dev/ic/spdmem.c: revision 1.29

- Fix DDR4's rows and columns value.
- Print "banks/group" instead of "banks" because it's not the total bank
   number.

 -

  Print rank on DDR4.

diffstat:

 sys/dev/ic/spdmem.c    |  19 +++++++++++--------
 sys/dev/ic/spdmemvar.h |   5 +++--
 2 files changed, 14 insertions(+), 10 deletions(-)

diffs (70 lines):

diff -r 5b4b8eaf22b7 -r 422f33d450ea sys/dev/ic/spdmem.c
--- a/sys/dev/ic/spdmem.c       Thu Jan 03 09:03:41 2019 +0000
+++ b/sys/dev/ic/spdmem.c       Thu Jan 03 11:23:54 2019 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: spdmem.c,v 1.24.6.1 2017/11/22 14:33:23 martin Exp $ */
+/* $NetBSD: spdmem.c,v 1.24.6.2 2019/01/03 11:23:54 martin Exp $ */
 
 /*
  * Copyright (c) 2007 Nicolas Joly
@@ -35,7 +35,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: spdmem.c,v 1.24.6.1 2017/11/22 14:33:23 martin Exp $");
+__KERNEL_RCSID(0, "$NetBSD: spdmem.c,v 1.24.6.2 2019/01/03 11:23:54 martin Exp $");
 
 #include <sys/param.h>
 #include <sys/device.h>
@@ -869,7 +869,7 @@
 static void
 decode_ddr4(const struct sysctlnode *node, device_t self, struct spdmem *s)
 {
-       int dimm_size, cycle_time;
+       int dimm_size, cycle_time, ranks;
        int tAA_clocks, tRCD_clocks,tRP_clocks, tRAS_clocks;
 
        aprint_naive("\n");
@@ -937,15 +937,18 @@
                          1 << (s->sm_ddr4.ddr4_primary_bus_width + 3),
                          TRUE, "PC4", 0);
 
+       ranks = s->sm_ddr4.ddr4_package_ranks + 1;
        aprint_verbose_dev(self,
-           "%d rows, %d cols, %d banks, %d bank groups, "
-           "%d.%03dns cycle time\n",
-           s->sm_ddr4.ddr4_rows + 9, s->sm_ddr4.ddr4_cols + 12,
+           "%d rows, %d cols, %d ranks%s, %d banks/group, %d bank groups\n",
+           s->sm_ddr4.ddr4_rows + 12, s->sm_ddr4.ddr4_cols + 9,
+           ranks, (ranks > 1) ? ((s->sm_ddr4.ddr4_rank_mix == 1)
+               ? " (asymmetric)" : " (symmetiric)") : "",
            1 << (2 + s->sm_ddr4.ddr4_logbanks),
-           1 << s->sm_ddr4.ddr4_bankgroups,
+           1 << s->sm_ddr4.ddr4_bankgroups);
+
+       aprint_verbose_dev(self, "%d.%03dns cycle time\n",
            cycle_time / 1000, cycle_time % 1000);
 
-
        tAA_clocks =  __DDR4_VALUE(tAAmin)  * 1000 / cycle_time;
        tRCD_clocks = __DDR4_VALUE(tRCDmin) * 1000 / cycle_time;
        tRP_clocks =  __DDR4_VALUE(tRPmin)  * 1000 / cycle_time;
diff -r 5b4b8eaf22b7 -r 422f33d450ea sys/dev/ic/spdmemvar.h
--- a/sys/dev/ic/spdmemvar.h    Thu Jan 03 09:03:41 2019 +0000
+++ b/sys/dev/ic/spdmemvar.h    Thu Jan 03 11:23:54 2019 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: spdmemvar.h,v 1.13 2017/01/18 06:02:50 msaitoh Exp $ */
+/* $NetBSD: spdmemvar.h,v 1.13.6.1 2019/01/03 11:23:54 martin Exp $ */
 
 /*
  * Copyright (c) 2007 Paul Goyette
@@ -768,7 +768,8 @@
                uint8_t ddr4_device_width:3,    \
                /* number of package ranks is field value plus 1 */ \
                uint8_t ddr4_package_ranks:3,   \
-               uint8_t ddr4_unused9:2,         \
+               uint8_t ddr4_rank_mix:1,        \
+               uint8_t ddr4_unused9:1          \
        );
        SPD_BITFIELD(                                   \
                /* primary width is offset by 3, extension is offset by 2 */ \



Home | Main Index | Thread Index | Old Index