From: Stephen Horvath via B4 Relay <devnull+s.horvath.outlook.com.au@kernel.org>
To: linux-i2c@vger.kernel.org
Cc: Jean Delvare <jdelvare@suse.de>,
Stephen Horvath <s.horvath@outlook.com.au>,
Guenter Roeck <linux@roeck-us.net>
Subject: [PATCH 2/6] decode-dimms: Decode DDR5 Manufacturer Data
Date: Thu, 14 Nov 2024 16:37:36 +1000 [thread overview]
Message-ID: <20241114-decode-ddr5-v1-2-0ed2db8ef30f@outlook.com.au> (raw)
In-Reply-To: <20241114-decode-ddr5-v1-0-0ed2db8ef30f@outlook.com.au>
From: Stephen Horvath <s.horvath@outlook.com.au>
Decode the DRAM's manufacturer data for DDR5.
There are more manufacturers in the common and type specific sections,
but I decided to limit myself to only reading the
'Manufacturing Information' section of the eeprom.
Signed-off-by: Stephen Horvath <s.horvath@outlook.com.au>
---
eeprom/decode-dimms | 51 +++++++++++++++++++++++++++++++++++++++++++++++++++
1 file changed, 51 insertions(+)
diff --git a/eeprom/decode-dimms b/eeprom/decode-dimms
index 88ebe67d86d52486c8ce439d885fb3f9c89526b6..b395eafca9ba17725e391e18a70d303c0baaa291 100755
--- a/eeprom/decode-dimms
+++ b/eeprom/decode-dimms
@@ -2278,6 +2278,48 @@ sub decode_ddr4_mfg_data($)
sprintf("0x%02X", $bytes->[349]));
}
+# Parameter: EEPROM bytes 0-639 (using 512-554)
+sub decode_ddr5_mfg_data($)
+{
+ my $bytes = shift;
+
+ prints("Manufacturer Data");
+
+ printl("Module Manufacturer",
+ manufacturer_ddr3($bytes->[512], $bytes->[513]));
+
+ printl_cond(spd_written(@{$bytes}[552..553]),
+ "DRAM Manufacturer",
+ manufacturer_ddr3($bytes->[552], $bytes->[553]));
+
+ printl_mfg_location_code($bytes->[514]);
+
+ printl_cond(spd_written(@{$bytes}[515..516]),
+ "Manufacturing Date",
+ manufacture_date($bytes->[515], $bytes->[516]));
+
+ printl_mfg_assembly_serial(@{$bytes}[517..520]);
+
+ printl("Part Number", part_number(@{$bytes}[521..550]));
+
+ printl_cond(spd_written(@{$bytes}[551]),
+ "Revision Code",
+ sprintf("0x%02X", $bytes->[551]));
+
+ if ($bytes->[554] != 0xff) {
+ # DRAM Stepping may be a number or an uppercase ASCII letter
+ # 0x00-0xfe is valid, 0xff is invalid
+ my $stepping = $bytes->[554];
+ if ($stepping < 0x41 || $stepping > 0x5a) {
+ printl("DRAM Stepping",
+ sprintf("0x%02X", $stepping));
+ } else {
+ printl("DRAM Stepping",
+ sprintf("%c", $stepping));
+ }
+ }
+}
+
# Parameter: EEPROM bytes 0-127 (using 64-98)
sub decode_manufacturing_information($)
{
@@ -2828,6 +2870,15 @@ for $current (0 .. $#dimm) {
} 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";
}
+ } elsif ($type eq "DDR5 SDRAM" ||
+ $type eq "LPDDR5 SDRAM" ||
+ $type eq "DDR5 NVDIMM-P" ||
+ $type eq "LPDDR5X SDRAM") {
+ if (@bytes >= 640) {
+ # Decode DDR5-specific manufacturing data in bytes
+ # 512-639
+ decode_ddr5_mfg_data(\@bytes);
+ }
} else {
# Decode next 35 bytes (64-98, common to most
# memory types)
--
2.45.2
next prev parent reply other threads:[~2024-11-14 6:40 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-11-14 6:37 [PATCH 0/6] decode-dimms: Implement DDR5 decoding Stephen Horvath via B4 Relay
2024-11-14 6:37 ` [PATCH 1/6] decode-dimms: Implement DDR5 checksum parsing Stephen Horvath via B4 Relay
2024-11-14 6:37 ` Stephen Horvath via B4 Relay [this message]
2024-11-14 6:37 ` [PATCH 3/6] decode-dimms: Decode timings and other data for DDR5 Stephen Horvath via B4 Relay
2024-11-14 6:37 ` [PATCH 4/6] decode-dimms: Decode DDR5 common module information Stephen Horvath via B4 Relay
2024-11-14 6:37 ` [PATCH 5/6] decode-dimms: Add basic decoding of type specific information for DDR5 Stephen Horvath via B4 Relay
2024-11-14 6:37 ` [PATCH 6/6] decode-dimms: Decode DDR5 error log Stephen Horvath via B4 Relay
2025-11-05 13:31 ` [PATCH 0/6] decode-dimms: Implement DDR5 decoding Kamil Aronowski
2025-11-06 1:26 ` Stephen Horvath
2025-11-06 13:55 ` Kamil Aronowski
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20241114-decode-ddr5-v1-2-0ed2db8ef30f@outlook.com.au \
--to=devnull+s.horvath.outlook.com.au@kernel.org \
--cc=jdelvare@suse.de \
--cc=linux-i2c@vger.kernel.org \
--cc=linux@roeck-us.net \
--cc=s.horvath@outlook.com.au \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox