Received: by mail.netbsd.org (Postfix, from userid 605) id 448B484E42; Thu, 3 Oct 2019 18:42:28 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by mail.netbsd.org (Postfix) with ESMTP id C0C6884D43 for ; Thu, 3 Oct 2019 18:42:27 +0000 (UTC) X-Virus-Scanned: amavisd-new at netbsd.org Received: from mail.netbsd.org ([127.0.0.1]) by localhost (mail.netbsd.org [127.0.0.1]) (amavisd-new, port 10025) with ESMTP id c9-5cjZPNOmN for ; Thu, 3 Oct 2019 18:42:26 +0000 (UTC) Received: from cvs.NetBSD.org (ivanova.netbsd.org [199.233.217.197]) by mail.netbsd.org (Postfix) with ESMTP id DBB4184CD6 for ; Thu, 3 Oct 2019 18:42:26 +0000 (UTC) Received: by cvs.NetBSD.org (Postfix, from userid 500) id D506DFBF4; Thu, 3 Oct 2019 18:42:26 +0000 (UTC) Content-Transfer-Encoding: 7bit Content-Type: multipart/mixed; boundary="_----------=_1570128146100460" MIME-Version: 1.0 Date: Thu, 3 Oct 2019 18:42:26 +0000 From: "Paul Goyette" Subject: CVS commit: pkgsrc/sysutils/decode-dimms To: pkgsrc-changes@NetBSD.org Reply-To: pgoyette@netbsd.org X-Mailer: log_accum Message-Id: <20191003184226.D506DFBF4@cvs.NetBSD.org> Sender: pkgsrc-changes-owner@NetBSD.org List-Id: pkgsrc-changes.NetBSD.org Precedence: bulk List-Unsubscribe: This is a multi-part message in MIME format. --_----------=_1570128146100460 Content-Disposition: inline Content-Transfer-Encoding: 8bit Content-Type: text/plain; charset="US-ASCII" Module Name: pkgsrc Committed By: pgoyette Date: Thu Oct 3 18:42:26 UTC 2019 Modified Files: pkgsrc/sysutils/decode-dimms: Makefile distinfo pkgsrc/sysutils/decode-dimms/patches: patch-decode-dimms Log Message: Update decode-dimms to 2019-10-02 Upstream changes. (Note that some of these don't really affect to NetBSD, but are included anyway for reducing differences with the upstream copy.) Detect and report truncated input files If using the wrong driver, or if reading from a truncated dump file, make sure we don't attempt to use data bytes beyond what is available. Doing so would spit pages of cryptic warnings to the user, explicit error messages are much better. Print kernel driver used When not reading from dump files, print which kernel driver is being used. This will help spot setup mistakes where the legacy eeprom driver stole EEPROMs from the ee1004 driver for DDR4 memory. Print DDR memory speed in MT/s not MHz Because it is DDR memory, transaction rate is twice the actual clock speed. What the user is interested in is MT/s, and that's the number we display, so use the right unit. Add DDR5 memory types to the list No information available yet about the contents of the DDR5 SPD EEPROMs but we can already report the basic memory type. Decode manufacturing data for LPDDR3 I assume the manufacturing data format for LPDDR3 is the same as regular DDR3. Fix the version string We moved away from Subversion long ago, so $Revision$ and $Date$ are no longer being resolved. Just use the version of i2c-tools itself. Point the user to the right driversHEADmaster The header comment only mentioned the legacy eeprom driver, while the at24 and ee1004 drivers should be used nowadays. To generate a diff of this commit: cvs rdiff -u -r1.20 -r1.21 pkgsrc/sysutils/decode-dimms/Makefile cvs rdiff -u -r1.16 -r1.17 pkgsrc/sysutils/decode-dimms/distinfo cvs rdiff -u -r1.15 -r1.16 \ pkgsrc/sysutils/decode-dimms/patches/patch-decode-dimms Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. --_----------=_1570128146100460 Content-Disposition: inline Content-Length: 6936 Content-Transfer-Encoding: binary Content-Type: text/x-diff; charset=us-ascii Modified files: Index: pkgsrc/sysutils/decode-dimms/Makefile diff -u pkgsrc/sysutils/decode-dimms/Makefile:1.20 pkgsrc/sysutils/decode-dimms/Makefile:1.21 --- pkgsrc/sysutils/decode-dimms/Makefile:1.20 Fri Sep 13 00:17:50 2019 +++ pkgsrc/sysutils/decode-dimms/Makefile Thu Oct 3 18:42:26 2019 @@ -1,10 +1,10 @@ -# $NetBSD: Makefile,v 1.20 2019/09/13 00:17:50 pgoyette Exp $ +# $NetBSD: Makefile,v 1.21 2019/10/03 18:42:26 pgoyette Exp $ # no Release yet -PKG_DATE= 20190903 -GIT_COMMIT= ecd987aa6d126830bb0b5bfbd67240c9568b441f +PKG_DATE= 20191002 +GIT_COMMIT= fde115730417ff24025f6f0f54d879f6b0789aca DISTNAME= i2c-tools-${GIT_COMMIT} -PKGNAME= decode-dimms-0.0.${PKG_DATE} +PKGNAME= decode-dimms-4.1.${PKG_DATE} CATEGORIES= sysutils MASTER_SITES= https://git.kernel.org/pub/scm/utils/i2c-tools/i2c-tools.git/snapshot/ @@ -19,8 +19,7 @@ REPLACE_PERL= eeprom/decode-dimms SUBST_CLASSES+= rev SUBST_STAGE.rev= post-extract SUBST_FILES.rev= eeprom/decode-dimms -SUBST_SED.rev= -e 's/^$$revision = .*;/$$revision = "${PKG_DATE}-${GIT_COMMIT}";/' -SUBST_SED.rev+= -e '/^$$revision =~/d' +SUBST_SED.rev= -e '/I2C_TOOLS_VER/s/4.1/4.1-${PKG_DATE}-${GIT_COMMIT}/' NO_BUILD= yes Index: pkgsrc/sysutils/decode-dimms/distinfo diff -u pkgsrc/sysutils/decode-dimms/distinfo:1.16 pkgsrc/sysutils/decode-dimms/distinfo:1.17 --- pkgsrc/sysutils/decode-dimms/distinfo:1.16 Fri Sep 13 00:17:50 2019 +++ pkgsrc/sysutils/decode-dimms/distinfo Thu Oct 3 18:42:26 2019 @@ -1,8 +1,8 @@ -$NetBSD: distinfo,v 1.16 2019/09/13 00:17:50 pgoyette Exp $ +$NetBSD: distinfo,v 1.17 2019/10/03 18:42:26 pgoyette Exp $ -SHA1 (i2c-tools-ecd987aa6d126830bb0b5bfbd67240c9568b441f.tar.gz) = 9d97c10b7b3e3ad9e4901bcacab8aed933f0699a -RMD160 (i2c-tools-ecd987aa6d126830bb0b5bfbd67240c9568b441f.tar.gz) = b710ff3f86bd036026ceac9f84e881f97a21cc46 -SHA512 (i2c-tools-ecd987aa6d126830bb0b5bfbd67240c9568b441f.tar.gz) = 9d43280df8c529fa9755e51b2a0de863330919d3e17f9b91a3718744b0c372bc40bbd60be7b3d8839cff8f637627aab8c0404f9664bb25d9961d32e4afe12847 -Size (i2c-tools-ecd987aa6d126830bb0b5bfbd67240c9568b441f.tar.gz) = 98369 bytes -SHA1 (patch-decode-dimms) = acad3757981b81fd7fd15a3b39ec72d8ae2a7dd7 +SHA1 (i2c-tools-fde115730417ff24025f6f0f54d879f6b0789aca.tar.gz) = 9f218c6239a20be444ec7b4f5abe6459551de567 +RMD160 (i2c-tools-fde115730417ff24025f6f0f54d879f6b0789aca.tar.gz) = 5872fabd73f32c793679dcf1d23ed7cb74da8a7c +SHA512 (i2c-tools-fde115730417ff24025f6f0f54d879f6b0789aca.tar.gz) = b51107b09578409d729a0d4dd2b3272ed8a4b46fa32faeda803e3c2e5c7874bdf405fc32e445d4d8a5f6f3fdd61256817d83aa744d246198935fd5cb7f5dd80e +Size (i2c-tools-fde115730417ff24025f6f0f54d879f6b0789aca.tar.gz) = 98669 bytes +SHA1 (patch-decode-dimms) = 9bbfaf9026fd5e3b9fe4fd789c8de79d1b0353be SHA1 (patch-decode-dimms.1) = c1c1444a73fa848eda0223e2c176819d4ded6641 Index: pkgsrc/sysutils/decode-dimms/patches/patch-decode-dimms diff -u pkgsrc/sysutils/decode-dimms/patches/patch-decode-dimms:1.15 pkgsrc/sysutils/decode-dimms/patches/patch-decode-dimms:1.16 --- pkgsrc/sysutils/decode-dimms/patches/patch-decode-dimms:1.15 Fri Sep 13 00:17:50 2019 +++ pkgsrc/sysutils/decode-dimms/patches/patch-decode-dimms Thu Oct 3 18:42:26 2019 @@ -1,23 +1,23 @@ -$NetBSD: patch-decode-dimms,v 1.15 2019/09/13 00:17:50 pgoyette Exp $ +$NetBSD: patch-decode-dimms,v 1.16 2019/10/03 18:42:26 pgoyette Exp $ Add NetBSD-specific ability to use spdmem(4)'s sysctl values as input. Remove attempts to use linux-specific data sources. ---- eeprom/decode-dimms.orig 2019-06-17 13:50:38.126887013 -0700 -+++ eeprom/decode-dimms 2019-06-17 13:51:53.574600812 -0700 -@@ -42,8 +42,9 @@ +--- eeprom/decode-dimms.orig 2019-10-03 10:53:17.810726776 -0700 ++++ eeprom/decode-dimms 2019-10-03 11:02:03.877954987 -0700 +@@ -45,8 +45,9 @@ use Fcntl qw(:DEFAULT :seek); use File::Basename; use vars qw($opt_html $opt_bodyonly $opt_side_by_side $opt_merge - $opt_igncheck $use_sysfs $use_hexdump $sbs_col_width -- @vendors %decode_callback $revision @dimm $current %hexdump_cache); -+ $opt_igncheck $use_sysfs $use_hexdump $use_sysctl $sbs_col_width -+ @vendors %decode_callback $revision @dimm $current %hexdump_cache +- @vendors %decode_callback @dimm $current %hexdump_cache); ++ $opt_igncheck $use_sysctl $use_sysfs $use_hexdump $sbs_col_width ++ @vendors %decode_callback @dimm $current %hexdump_cache + %sysctl_cache); use constant LITTLEENDIAN => "little-endian"; use constant BIGENDIAN => "big-endian"; -@@ -417,6 +418,7 @@ +@@ -419,6 +420,7 @@ ); $use_sysfs = -d '/sys/bus'; @@ -25,7 +25,7 @@ input. Remove attempts to use linux-spe # We consider that no data was written to this area of the SPD EEPROM if # all bytes read 0x00 or all bytes read 0xff -@@ -2355,6 +2357,26 @@ +@@ -2357,6 +2359,26 @@ } } @@ -52,17 +52,21 @@ input. Remove attempts to use linux-spe # Read bytes from SPD-EEPROM # Note: offset must be a multiple of 16! sub readspd($$$) -@@ -2364,6 +2386,9 @@ - if ($use_hexdump) { - @bytes = read_hexdump($dimm_i); +@@ -2370,6 +2392,13 @@ + $size = @bytes - $offset; + } return @bytes[$offset..($offset + $size - 1)]; + } elsif ($use_sysctl) { + @bytes = read_sysctl($dimm_i); -+ return @bytes[$offset..($offset + $size - 1)]; ++ if (@bytes < $offset + $size) { ++ print STDERR "WARNING: sysctl for $dimm_i is truncated\n"; ++ $size = @bytes - $offset; ++ } ++ return return @bytes[$offset..($offset + $size - 1)]; } elsif ($use_sysfs) { # Kernel 2.6 with sysfs sysopen(HANDLE, "$dimm_i/eeprom", O_RDONLY) -@@ -2440,7 +2465,7 @@ +@@ -2449,7 +2478,7 @@ # Parse command-line foreach (@ARGV) { if ($_ eq '-h' || $_ eq '--help') { @@ -71,7 +75,7 @@ input. Remove attempts to use linux-spe " $0 -h\n\n", " -f, --format Print nice html output\n", " -b, --bodyonly Don't print html header\n", -@@ -2454,6 +2479,8 @@ +@@ -2463,6 +2492,8 @@ " -x, Read data from hexdump files\n", " -X, Same as -x except treat multibyte hex\n", " data as little endian\n", @@ -80,7 +84,7 @@ input. Remove attempts to use linux-spe " -h, --help Display this usage summary\n"; print <<"EOF"; -@@ -2498,13 +2525,20 @@ +@@ -2507,13 +2538,20 @@ $use_hexdump = LITTLEENDIAN; next; } @@ -102,7 +106,7 @@ input. Remove attempts to use linux-spe } # Default values -@@ -2582,7 +2616,6 @@ +@@ -2598,7 +2636,6 @@ # * chk_spd: The checksum or CRC value found in the EEPROM # * chk_calc: The checksum or CRC computed from the EEPROM data # Keys are added over time. @@ -110,7 +114,7 @@ input. Remove attempts to use linux-spe for my $i (0 .. $#dimm) { my @bytes = readspd(0, 128, $dimm[$i]->{file}); -@@ -2634,7 +2667,7 @@ +@@ -2650,7 +2687,7 @@ printl("Decoding EEPROM", $dimm[$current]->{eeprom}); } --_----------=_1570128146100460--