lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CANeKEMM_9qs8neP=Dwks_enmUt9oqGx6+UO=CvAh_4Fm+eF+ew@mail.gmail.com>
Date: Mon, 1 Jul 2024 12:55:16 +0200
From: Erez <erezgeva2@...il.com>
To: Tudor Ambarus <tudor.ambarus@...aro.org>
Cc: Esben Haabendal <esben@...nix.com>, Erez Geva <erezgeva@...ime.org>, linux-mtd@...ts.infradead.org, 
	Pratyush Yadav <pratyush@...nel.org>, Michael Walle <mwalle@...nel.org>, linux-kernel@...r.kernel.org, 
	Miquel Raynal <miquel.raynal@...tlin.com>, Richard Weinberger <richard@....at>, 
	Vignesh Raghavendra <vigneshr@...com>, devicetree@...r.kernel.org, Rob Herring <robh@...nel.org>, 
	Krzysztof Kozlowski <krzk+dt@...nel.org>, Conor Dooley <conor+dt@...nel.org>
Subject: Re: [PATCH v2 3/4] dt-bindings: mtd: macronix,mx25l12833f: add
 SPI-NOR chip

On Mon, 1 Jul 2024 at 12:15, Tudor Ambarus <tudor.ambarus@...aro.org> wrote:
>
>
>
> On 7/1/24 10:46 AM, Erez wrote:
> > When using mx25l12805d, we do not read SFDP.
> > As it uses the no-SFDP flags.
> > When using mx25l12833f hardware with mx25l12805d driver, it did not
> > try to read the SFDP.
> > Yet mx25l12833f does have SFDP, when I remove the no-SFDP flags, the
> > driver fetch the SFDP.
> >
> > Secondly SFDP does not contain OTP information.
> >
> > mx25l12805d has two OTP regions of 128 KiB and 384 KiB (yes asymmetric).
> > While mx25l12833f has two OTP regions of 512 KiB.
> >
> > How do we handle it?
>
> You would first try to parse SFDP and initialize the flash based on
> SFDP. If there's no SFDP then you fallback to the flags declared at
> flash declaration. Esben had a try recently, see [1]. I don't know if
> there's any progress in that direction.

That's great. I probably haven't seen it yet, as I used kernel 6.5 based.
However the OTP is not in the SFDP.
Reading the SFDP with "mx25l12805d" does improve :-)
if a user wants to use the OTP, he must specify "mx25l12833f".
Perhaps less likely, but yet no other solution for OTP at the moment.
I would not go to a kernel config for this.

>
> Also, you haven't mentioned anything about the testing. Do you have the
> flash?

I test the code with mx25l12833f hardware, with an older version of
the kernel, 6.5 I think.
It is a kernel provided by Microchip with their setting, The SPI-NOR
driver is vanilla.

In my testing using kernel 6.5 with a Microchip based board.
Before changing, the kernel driver, was using the "mx25l12805d"
setting and did NOT read the SFDP.
Once I added the "mx25l12833f" without any no-sfdp flags, the driver
did read the SFDP.
The driver can find "mx25l12833f" with a read ID, once I remove the
"mx25l12805d" setting, I did test that too.
Adding the new 'SPI_NOR_TRY_SFDP' is great. but does not provide proper OTP!

All the testings were done using the same mx25l12833f hardware, only
the settings in the driver were changed.

I am no longer in contact with the company that provides me the hardware.
And as this is a Microchip based hardware it is difficult to use the
latest kernel.

Anyhow as mx25l12805d hardware has not been sold since 2010, it is
hard to get one.
I do not want to change any setting of mx25l12805d without testing!

Anyhow my patch is focused on the new Macronix OTP callbacks.
I do not care about the "mx25l12833f" or "mx25l12805d" compatibilities
or settings.
If I had a different Macronix chip with a unique ID, I would gladly test it.

I only add them as the kernel rule is that new functions must be used
and tested with real hardware.

Erez

>
> [1]
> https://lore.kernel.org/linux-mtd/20240603-macronix-mx25l3205d-fixups-v2-0-ff98da26835c@geanix.com/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ