Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/dev/ic Print rank on DDR4.
details: https://anonhg.NetBSD.org/src/rev/f1ca19f8db33
branches: trunk
changeset: 446968:f1ca19f8db33
user: msaitoh <msaitoh%NetBSD.org@localhost>
date: Thu Dec 27 02:54:00 2018 +0000
description:
Print rank on DDR4.
diffstat:
sys/dev/ic/spdmem.c | 17 ++++++++++-------
sys/dev/ic/spdmemvar.h | 5 +++--
2 files changed, 13 insertions(+), 9 deletions(-)
diffs (69 lines):
diff -r e18a643543ed -r f1ca19f8db33 sys/dev/ic/spdmem.c
--- a/sys/dev/ic/spdmem.c Wed Dec 26 22:57:22 2018 +0000
+++ b/sys/dev/ic/spdmem.c Thu Dec 27 02:54:00 2018 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: spdmem.c,v 1.29 2018/12/26 10:24:20 msaitoh Exp $ */
+/* $NetBSD: spdmem.c,v 1.30 2018/12/27 02:54:00 msaitoh Exp $ */
/*
* Copyright (c) 2007 Nicolas Joly
@@ -35,7 +35,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: spdmem.c,v 1.29 2018/12/26 10:24:20 msaitoh Exp $");
+__KERNEL_RCSID(0, "$NetBSD: spdmem.c,v 1.30 2018/12/27 02:54:00 msaitoh 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/group, %d bank groups, "
- "%d.%03dns cycle time\n",
+ "%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 e18a643543ed -r f1ca19f8db33 sys/dev/ic/spdmemvar.h
--- a/sys/dev/ic/spdmemvar.h Wed Dec 26 22:57:22 2018 +0000
+++ b/sys/dev/ic/spdmemvar.h Thu Dec 27 02:54:00 2018 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: spdmemvar.h,v 1.13 2017/01/18 06:02:50 msaitoh Exp $ */
+/* $NetBSD: spdmemvar.h,v 1.14 2018/12/27 02:54:00 msaitoh 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