On Tue, Jun 19, 2018 at 12:53 PM, Elliott, Robert (Persistent Memory)
<elliott(a)hpe.com> wrote:
> -----Original Message-----
> From: linux-kernel-owner(a)vger.kernel.org [mailto:linux-kernel-
> owner(a)vger.kernel.org] On Behalf Of Dan Williams
> Sent: Tuesday, June 19, 2018 10:29 AM
> Subject: Re: [PATCH v3 1/2] acpi/nfit: Update nfit driver to comply with
> ACPI 6.1
...
> >
> > Here are some examples (kernel 4.17):
Note that these values were as reported on a little-endian system.
> Ok, so the lowest significant byte of the Micron id is supposed to be
> 0x2c and this text representation matches that. So the bytes are being
> endian swapped when written to the SPD?
SPD byte 320 is 0x80. That's the bank number byte (with odd parity).
SPD byte 321 is 0x2c. That's the manufacturer code byte (with odd parity).
If treated as a single 2-byte value, that is:
* 0x802c (32812 in decimal) if interpreted as big-endian
* 0x2c80 (11392 in decimal) if interpreted as little-endian
Ok, JEDEC defines byte 320 as the LSB, so the fact that Linux is
showing 0x2c as the LSB is wrong. Linux needs to be fixed.