From patchwork Tue Sep 3 09:21:03 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jean Delvare X-Patchwork-Id: 1156884 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=none (mailfrom) smtp.mailfrom=vger.kernel.org (client-ip=209.132.180.67; helo=vger.kernel.org; envelope-from=linux-i2c-owner@vger.kernel.org; receiver=) Authentication-Results: ozlabs.org; dmarc=none (p=none dis=none) header.from=suse.de Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by ozlabs.org (Postfix) with ESMTP id 46N1f0741Xz9s00 for ; Tue, 3 Sep 2019 19:20:56 +1000 (AEST) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727078AbfICJU4 (ORCPT ); Tue, 3 Sep 2019 05:20:56 -0400 Received: from mx2.suse.de ([195.135.220.15]:52032 "EHLO mx1.suse.de" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1726452AbfICJUz (ORCPT ); Tue, 3 Sep 2019 05:20:55 -0400 X-Virus-Scanned: by amavisd-new at test-mx.suse.de Received: from relay2.suse.de (unknown [195.135.220.254]) by mx1.suse.de (Postfix) with ESMTP id DCA58AC10 for ; Tue, 3 Sep 2019 09:20:54 +0000 (UTC) Date: Tue, 3 Sep 2019 11:21:03 +0200 From: Jean Delvare To: Linux I2C Subject: [PATCH 1/7] decode-dimms: Detect and report truncated input files Message-ID: <20190903112103.57c83378@endymion> In-Reply-To: <20190903111706.43f9bc2b@endymion> References: <20190903111706.43f9bc2b@endymion> Organization: SUSE Linux X-Mailer: Claws Mail 3.17.3 (GTK+ 2.24.32; x86_64-suse-linux-gnu) MIME-Version: 1.0 Sender: linux-i2c-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-i2c@vger.kernel.org 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. Signed-off-by: Jean Delvare --- eeprom/decode-dimms | 28 +++++++++++++++++++++------- 1 file changed, 21 insertions(+), 7 deletions(-) --- i2c-tools.orig/eeprom/decode-dimms 2019-09-03 10:35:58.809347741 +0200 +++ i2c-tools/eeprom/decode-dimms 2019-09-03 11:08:31.291140716 +0200 @@ -5,7 +5,7 @@ # Copyright 1998, 1999 Philip Edelbrock # modified by Christian Zuckschwerdt # modified by Burkart Lingner -# Copyright (C) 2005-2017 Jean Delvare +# Copyright (C) 2005-2019 Jean Delvare # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by @@ -2362,9 +2362,13 @@ sub spd_sizes($) sub readspd($$$) { my ($offset, $size, $dimm_i) = @_; - my @bytes; + my (@bytes, $read); if ($use_hexdump) { @bytes = read_hexdump($dimm_i); + if (@bytes < $offset + $size) { + print STDERR "WARNING: Dump file $dimm_i is truncated\n"; + $size = @bytes - $offset; + } return @bytes[$offset..($offset + $size - 1)]; } elsif ($use_sysfs) { # Kernel 2.6 with sysfs @@ -2373,9 +2377,12 @@ sub readspd($$$) binmode HANDLE; sysseek(HANDLE, $offset, SEEK_SET) or die "Cannot seek $dimm_i/eeprom"; - sysread(HANDLE, my $eeprom, $size) - or die "Cannot read $dimm_i/eeprom"; + $read = sysread(HANDLE, my $eeprom, $size) + or die "Cannot read $dimm_i/eeprom"; close HANDLE; + if ($read < $size) { + print STDERR "WARNING: $dimm_i/eeprom is smaller than expected\n"; + } @bytes = unpack("C*", $eeprom); } else { # Kernel 2.4 with procfs @@ -2666,11 +2673,14 @@ for $current (0 .. $#dimm) { printl("Total number of bytes in EEPROM", $spd_size); # If there's more data than what we've read, let's - # read it now. DDR3 will need this data. + # read it now. DDR3 and DDR4 will need this data. if ($spd_used > @bytes) { push (@bytes, readspd(@bytes, $spd_used - @bytes, $dimm[$current]->{file})); + if (@bytes < $spd_used) { + print STDERR "WARNING: Fewer data bytes available (".(scalar @bytes).") than needed ($spd_used)\n"; + } } } @@ -2703,14 +2713,18 @@ for $current (0 .. $#dimm) { if ($type eq "DDR3 SDRAM") { # Decode DDR3-specific manufacturing data in bytes # 117-149 - decode_ddr3_mfg_data(\@bytes) + if (@bytes >= 150) { + decode_ddr3_mfg_data(\@bytes) + } } elsif ($type eq "DDR4 SDRAM" || $type eq "DDR4E SDRAM" || $type eq "LPDDR4 SDRAM" || $type eq "LPDDR4X SDRAM") { # Decode DDR4-specific manufacturing data in bytes # 320-383 - decode_ddr4_mfg_data(\@bytes) + if (@bytes >= 384) { + decode_ddr4_mfg_data(\@bytes); + } } else { # Decode next 35 bytes (64-98, common to most # memory types) From patchwork Tue Sep 3 09:21:51 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jean Delvare X-Patchwork-Id: 1156885 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=none (mailfrom) smtp.mailfrom=vger.kernel.org (client-ip=209.132.180.67; helo=vger.kernel.org; envelope-from=linux-i2c-owner@vger.kernel.org; receiver=) Authentication-Results: ozlabs.org; dmarc=none (p=none dis=none) header.from=suse.de Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by ozlabs.org (Postfix) with ESMTP id 46N1fw70hPz9s00 for ; Tue, 3 Sep 2019 19:21:44 +1000 (AEST) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727005AbfICJVo (ORCPT ); Tue, 3 Sep 2019 05:21:44 -0400 Received: from mx2.suse.de ([195.135.220.15]:52322 "EHLO mx1.suse.de" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1728128AbfICJVn (ORCPT ); Tue, 3 Sep 2019 05:21:43 -0400 X-Virus-Scanned: by amavisd-new at test-mx.suse.de Received: from relay2.suse.de (unknown [195.135.220.254]) by mx1.suse.de (Postfix) with ESMTP id DE95CAC10 for ; Tue, 3 Sep 2019 09:21:42 +0000 (UTC) Date: Tue, 3 Sep 2019 11:21:51 +0200 From: Jean Delvare To: Linux I2C Subject: [PATCH 2/7] decode-dimms: Print kernel driver used Message-ID: <20190903112151.3e63882b@endymion> In-Reply-To: <20190903111706.43f9bc2b@endymion> References: <20190903111706.43f9bc2b@endymion> Organization: SUSE Linux X-Mailer: Claws Mail 3.17.3 (GTK+ 2.24.32; x86_64-suse-linux-gnu) MIME-Version: 1.0 Sender: linux-i2c-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-i2c@vger.kernel.org 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. Signed-off-by: Jean Delvare --- eeprom/decode-dimms | 24 +++++++++++++++++------- 1 file changed, 17 insertions(+), 7 deletions(-) Index: i2c-tools/eeprom/decode-dimms =================================================================== --- i2c-tools.orig/eeprom/decode-dimms +++ i2c-tools/eeprom/decode-dimms @@ -2537,17 +2537,22 @@ sub sysfs_device_attribute sub get_dimm_list { - my (@dirs, $dir, $opened, $file, @files); + my (@drivers, $driver, $dir, $opened, $file, @files); if ($use_sysfs) { - @dirs = ('/sys/bus/i2c/drivers/eeprom', - '/sys/bus/i2c/drivers/at24', - '/sys/bus/i2c/drivers/ee1004'); # DDR4 + @drivers = ('eeprom', + 'at24', + 'ee1004'); # DDR4 } else { - @dirs = ('/proc/sys/dev/sensors'); + @drivers = ('eeprom'); + $dir = '/proc/sys/dev/sensors'; } - foreach $dir (@dirs) { + foreach $driver (@drivers) { + if ($use_sysfs) { + $dir = "/sys/bus/i2c/drivers/$driver"; + } + next unless opendir(local *DIR, $dir); $opened++; while (defined($file = readdir(DIR))) { @@ -2567,7 +2572,8 @@ sub get_dimm_list next unless $file =~ /^eeprom-/; } push @files, { eeprom => "$file", - file => "$dir/$file" }; + file => "$dir/$file", + driver => "$driver" }; } close(DIR); } @@ -2584,6 +2590,7 @@ sub get_dimm_list # Each hash has the following keys: # * eeprom: Name of the eeprom data file # * file: Full path to the eeprom data file +# * driver: Driver used to retrieve the data (undef for dump files) # * bytes: The EEPROM data (array) # * is_rambus: Whether this is a RAMBUS DIMM or not (boolean) # * chk_label: The label to display for the checksum or CRC @@ -2650,6 +2657,7 @@ for $current (0 .. $#dimm) { printl("Guessing DIMM is in", "bank $dimm_num"); } } + printl("Kernel driver used", $dimm[$current]->{driver}); } # Decode first 3 bytes (0-2) @@ -2724,6 +2732,8 @@ for $current (0 .. $#dimm) { # 320-383 if (@bytes >= 384) { decode_ddr4_mfg_data(\@bytes); + } elsif (!$use_hexdump && $dimm[$current]->{driver} ne "ee1004") { + print STDERR "HINT: You should be using the ee1004 driver instead of the $dimm[$current]->{driver} driver\n"; } } else { # Decode next 35 bytes (64-98, common to most From patchwork Tue Sep 3 09:22:15 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jean Delvare X-Patchwork-Id: 1156886 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=none (mailfrom) smtp.mailfrom=vger.kernel.org (client-ip=209.132.180.67; helo=vger.kernel.org; envelope-from=linux-i2c-owner@vger.kernel.org; receiver=) Authentication-Results: ozlabs.org; dmarc=none (p=none dis=none) header.from=suse.de Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by ozlabs.org (Postfix) with ESMTP id 46N1gP2hFWz9s00 for ; Tue, 3 Sep 2019 19:22:08 +1000 (AEST) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727078AbfICJWI (ORCPT ); Tue, 3 Sep 2019 05:22:08 -0400 Received: from mx2.suse.de ([195.135.220.15]:52460 "EHLO mx1.suse.de" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1726946AbfICJWH (ORCPT ); Tue, 3 Sep 2019 05:22:07 -0400 X-Virus-Scanned: by amavisd-new at test-mx.suse.de Received: from relay2.suse.de (unknown [195.135.220.254]) by mx1.suse.de (Postfix) with ESMTP id C4FBDAC10 for ; Tue, 3 Sep 2019 09:22:06 +0000 (UTC) Date: Tue, 3 Sep 2019 11:22:15 +0200 From: Jean Delvare To: Linux I2C Subject: [PATCH 3/7] decode-dimms: Print DDR memory speed in MT/s not MHz Message-ID: <20190903112215.4fc40aea@endymion> In-Reply-To: <20190903111706.43f9bc2b@endymion> References: <20190903111706.43f9bc2b@endymion> Organization: SUSE Linux X-Mailer: Claws Mail 3.17.3 (GTK+ 2.24.32; x86_64-suse-linux-gnu) MIME-Version: 1.0 Sender: linux-i2c-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-i2c@vger.kernel.org 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. Signed-off-by: Jean Delvare --- eeprom/decode-dimms | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) --- i2c-tools.orig/eeprom/decode-dimms 2019-09-02 11:43:00.090302646 +0200 +++ i2c-tools/eeprom/decode-dimms 2019-09-02 11:47:15.905567693 +0200 @@ -1043,7 +1043,7 @@ sub decode_ddr_sdram($) $pcclk += 100 if ($pcclk % 100) >= 50; # Round properly $pcclk = $pcclk - ($pcclk % 100); $ddrclk = int ($ddrclk); - printl("Maximum module speed", "$ddrclk MHz (PC${pcclk})"); + printl("Maximum module speed", "$ddrclk MT/s (PC${pcclk})"); #size computation my $k = 0; @@ -1296,7 +1296,7 @@ sub decode_ddr2_sdram($) # Round down to comply with Jedec $pcclk = $pcclk - ($pcclk % 100); $ddrclk = int ($ddrclk); - printl("Maximum module speed", "$ddrclk MHz (PC2-${pcclk})"); + printl("Maximum module speed", "$ddrclk MT/s (PC2-${pcclk})"); #size computation my $k = 0; @@ -1626,7 +1626,7 @@ sub decode_ddr3_sdram($) # Round down to comply with Jedec $pcclk = $pcclk - ($pcclk % 100); $ddrclk = int ($ddrclk); - printl("Maximum module speed", "$ddrclk MHz (PC3-${pcclk})"); + printl("Maximum module speed", "$ddrclk MT/s (PC3-${pcclk})"); # Size computation @@ -1894,7 +1894,7 @@ sub decode_ddr4_sdram($) # Round down to comply with Jedec $pcclk = $pcclk - ($pcclk % 100); $ddrclk = int ($ddrclk); - printl("Maximum module speed", "$ddrclk MHz (PC4-${pcclk})"); + printl("Maximum module speed", "$ddrclk MT/s (PC4-${pcclk})"); # Size computation my $sdram_width = 4 << ($bytes->[12] & 0x07); From patchwork Tue Sep 3 09:22:46 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jean Delvare X-Patchwork-Id: 1156889 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=none (mailfrom) smtp.mailfrom=vger.kernel.org (client-ip=209.132.180.67; helo=vger.kernel.org; envelope-from=linux-i2c-owner@vger.kernel.org; receiver=) Authentication-Results: ozlabs.org; dmarc=none (p=none dis=none) header.from=suse.de Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by ozlabs.org (Postfix) with ESMTP id 46N1gz4gXYz9s00 for ; Tue, 3 Sep 2019 19:22:39 +1000 (AEST) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727005AbfICJWj (ORCPT ); Tue, 3 Sep 2019 05:22:39 -0400 Received: from mx2.suse.de ([195.135.220.15]:52792 "EHLO mx1.suse.de" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1726946AbfICJWi (ORCPT ); Tue, 3 Sep 2019 05:22:38 -0400 X-Virus-Scanned: by amavisd-new at test-mx.suse.de Received: from relay2.suse.de (unknown [195.135.220.254]) by mx1.suse.de (Postfix) with ESMTP id E9104AC10 for ; Tue, 3 Sep 2019 09:22:37 +0000 (UTC) Date: Tue, 3 Sep 2019 11:22:46 +0200 From: Jean Delvare To: Linux I2C Subject: [PATCH 4/7] decode-dimms: Add DDR5 memory types to the list Message-ID: <20190903112246.3702690b@endymion> In-Reply-To: <20190903111706.43f9bc2b@endymion> References: <20190903111706.43f9bc2b@endymion> Organization: SUSE Linux X-Mailer: Claws Mail 3.17.3 (GTK+ 2.24.32; x86_64-suse-linux-gnu) MIME-Version: 1.0 Sender: linux-i2c-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-i2c@vger.kernel.org No information available yet about the contents of the DDR5 SPD EEPROMs but we can already report the basic memory type. Signed-off-by: Jean Delvare --- eeprom/decode-dimms | 1 + 1 file changed, 1 insertion(+) --- i2c-tools.orig/eeprom/decode-dimms 2019-09-03 10:18:12.983813689 +0200 +++ i2c-tools/eeprom/decode-dimms 2019-09-03 10:29:53.609710368 +0200 @@ -2707,6 +2707,7 @@ for $current (0 .. $#dimm) { "DDR4 SDRAM", "Reserved", # 12, 13 "DDR4E SDRAM", "LPDDR3 SDRAM", # 14, 15 "LPDDR4 SDRAM", "LPDDR4X SDRAM", # 16, 17 + "DDR5 SDRAM", "LPDDR5 SDRAM", # 18, 19 ); if ($bytes[2] < @type_list) { $type = $type_list[$bytes[2]]; From patchwork Tue Sep 3 09:23:24 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jean Delvare X-Patchwork-Id: 1156891 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=none (mailfrom) smtp.mailfrom=vger.kernel.org (client-ip=209.132.180.67; helo=vger.kernel.org; envelope-from=linux-i2c-owner@vger.kernel.org; receiver=) Authentication-Results: ozlabs.org; dmarc=none (p=none dis=none) header.from=suse.de Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by ozlabs.org (Postfix) with ESMTP id 46N1hk2Z0Fz9s00 for ; Tue, 3 Sep 2019 19:23:18 +1000 (AEST) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727078AbfICJXR (ORCPT ); Tue, 3 Sep 2019 05:23:17 -0400 Received: from mx2.suse.de ([195.135.220.15]:53126 "EHLO mx1.suse.de" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1727077AbfICJXR (ORCPT ); Tue, 3 Sep 2019 05:23:17 -0400 X-Virus-Scanned: by amavisd-new at test-mx.suse.de Received: from relay2.suse.de (unknown [195.135.220.254]) by mx1.suse.de (Postfix) with ESMTP id 89559AC10 for ; Tue, 3 Sep 2019 09:23:16 +0000 (UTC) Date: Tue, 3 Sep 2019 11:23:24 +0200 From: Jean Delvare To: Linux I2C Subject: [PATCH 5/7] decode-dimms: Decode manufacturing data for LPDDR3 Message-ID: <20190903112324.7466e21b@endymion> In-Reply-To: <20190903111706.43f9bc2b@endymion> References: <20190903111706.43f9bc2b@endymion> Organization: SUSE Linux X-Mailer: Claws Mail 3.17.3 (GTK+ 2.24.32; x86_64-suse-linux-gnu) MIME-Version: 1.0 Sender: linux-i2c-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-i2c@vger.kernel.org I assume the manufacturing data format for LPDDR3 is the same as regular DDR3. Signed-off-by: Jean Delvare --- eeprom/decode-dimms | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) --- i2c-tools.orig/eeprom/decode-dimms 2019-09-03 10:29:53.609710368 +0200 +++ i2c-tools/eeprom/decode-dimms 2019-09-03 10:33:56.479794382 +0200 @@ -2719,7 +2719,8 @@ for $current (0 .. $#dimm) { $decode_callback{$type}->(\@bytes) if exists $decode_callback{$type}; - if ($type eq "DDR3 SDRAM") { + if ($type eq "DDR3 SDRAM" || + $type eq "LPDDR3 SDRAM") { # Decode DDR3-specific manufacturing data in bytes # 117-149 if (@bytes >= 150) { From patchwork Tue Sep 3 09:24:15 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jean Delvare X-Patchwork-Id: 1156892 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=none (mailfrom) smtp.mailfrom=vger.kernel.org (client-ip=209.132.180.67; helo=vger.kernel.org; envelope-from=linux-i2c-owner@vger.kernel.org; receiver=) Authentication-Results: ozlabs.org; dmarc=none (p=none dis=none) header.from=suse.de Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by ozlabs.org (Postfix) with ESMTP id 46N1jj1MZcz9s00 for ; Tue, 3 Sep 2019 19:24:09 +1000 (AEST) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727077AbfICJYI (ORCPT ); Tue, 3 Sep 2019 05:24:08 -0400 Received: from mx2.suse.de ([195.135.220.15]:53576 "EHLO mx1.suse.de" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1727005AbfICJYI (ORCPT ); Tue, 3 Sep 2019 05:24:08 -0400 X-Virus-Scanned: by amavisd-new at test-mx.suse.de Received: from relay2.suse.de (unknown [195.135.220.254]) by mx1.suse.de (Postfix) with ESMTP id 4FAE2AC64 for ; Tue, 3 Sep 2019 09:24:07 +0000 (UTC) Date: Tue, 3 Sep 2019 11:24:15 +0200 From: Jean Delvare To: Linux I2C Subject: [PATCH 6/7] decode-dimms: Fix the version string Message-ID: <20190903112415.315c4097@endymion> In-Reply-To: <20190903111706.43f9bc2b@endymion> References: <20190903111706.43f9bc2b@endymion> Organization: SUSE Linux X-Mailer: Claws Mail 3.17.3 (GTK+ 2.24.32; x86_64-suse-linux-gnu) MIME-Version: 1.0 Sender: linux-i2c-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-i2c@vger.kernel.org We moved away from Subversion long ago, so $Revision$ and $Date$ are no longer being resolved. Just use the version of i2c-tools itself. Signed-off-by: Jean Delvare --- eeprom/decode-dimms | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) --- i2c-tools.orig/eeprom/decode-dimms 2019-09-03 10:38:26.287220460 +0200 +++ i2c-tools/eeprom/decode-dimms 2019-09-03 10:41:14.805360317 +0200 @@ -43,14 +43,11 @@ 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); + @vendors %decode_callback @dimm $current %hexdump_cache); use constant LITTLEENDIAN => "little-endian"; use constant BIGENDIAN => "big-endian"; - -$revision = '$Revision$ ($Date$)'; -$revision =~ s/\$\w+: (.*?) \$/$1/g; -$revision =~ s/ \([^()]*\)//; +use constant I2C_TOOLS_VER => "4.1"; @vendors = ( ["AMD", "AMI", "Fairchild", "Fujitsu", @@ -2637,7 +2634,7 @@ if ($opt_html && !$opt_bodyonly) { "\n"; } -printc("decode-dimms version $revision"); +printc("decode-dimms version ".I2C_TOOLS_VER); printh('Memory Serial Presence Detect Decoder', 'By Philip Edelbrock, Christian Zuckschwerdt, Burkart Lingner, Jean Delvare, Trent Piepho and others'); From patchwork Tue Sep 3 09:26:00 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jean Delvare X-Patchwork-Id: 1156893 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=none (mailfrom) smtp.mailfrom=vger.kernel.org (client-ip=209.132.180.67; helo=vger.kernel.org; envelope-from=linux-i2c-owner@vger.kernel.org; receiver=) Authentication-Results: ozlabs.org; dmarc=none (p=none dis=none) header.from=suse.de Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by ozlabs.org (Postfix) with ESMTP id 46N1lj6qXyz9sBF for ; Tue, 3 Sep 2019 19:25:53 +1000 (AEST) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728371AbfICJZx (ORCPT ); Tue, 3 Sep 2019 05:25:53 -0400 Received: from mx2.suse.de ([195.135.220.15]:54278 "EHLO mx1.suse.de" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1726840AbfICJZw (ORCPT ); Tue, 3 Sep 2019 05:25:52 -0400 X-Virus-Scanned: by amavisd-new at test-mx.suse.de Received: from relay2.suse.de (unknown [195.135.220.254]) by mx1.suse.de (Postfix) with ESMTP id C6340ABC7 for ; Tue, 3 Sep 2019 09:25:51 +0000 (UTC) Date: Tue, 3 Sep 2019 11:26:00 +0200 From: Jean Delvare To: Linux I2C Subject: [PATCH 7/7] decode-dimms: Point the user to the right drivers Message-ID: <20190903112600.3db9caef@endymion> In-Reply-To: <20190903111706.43f9bc2b@endymion> References: <20190903111706.43f9bc2b@endymion> Organization: SUSE Linux X-Mailer: Claws Mail 3.17.3 (GTK+ 2.24.32; x86_64-suse-linux-gnu) MIME-Version: 1.0 Sender: linux-i2c-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-i2c@vger.kernel.org The header comment only mentioned the legacy eeprom driver, while the at24 and ee1004 drivers should be used nowadays. Signed-off-by: Jean Delvare --- eeprom/decode-dimms | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) --- i2c-tools.orig/eeprom/decode-dimms 2019-09-03 10:41:14.805360317 +0200 +++ i2c-tools/eeprom/decode-dimms 2019-09-03 10:53:19.259559561 +0200 @@ -22,9 +22,12 @@ # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, # MA 02110-1301 USA. # -# -# The eeprom driver must be loaded (unless option -x is used). For kernels -# older than 2.6.0, the eeprom driver can be found in the lm-sensors package. +# A kernel driver must be loaded (unless option -x is used). Up to DDR3, +# you need either the at24 driver (in the kernel tree since v2.6.27) or +# the legacy eeprom driver (in the kernel tree since v2.6.0). For kernels +# older than 2.6.0, the eeprom driver can be found in the lm-sensors 2 +# package. For DDR4, you need the ee1004 driver (in the kernel tree since +# kernel v4.20). # # References: # PC SDRAM Serial Presence