[coreboot] [PATCH] flashrom: ST M25P40 bug?

Carl-Daniel Hailfinger c-d.hailfinger.devel.2006 at gmx.net
Sat Mar 29 22:17:54 CET 2008

On 29.03.2008 04:42, Fredrik Tolf wrote:
> I don't know if this is a bug, or if there are somehow two completely
> different versions of the ST M25P40 SPI chip.

The data sheet says:
"The Read Identification (RDID) instruction is available in products
with Process Technology code X only."
That means the previous code was correct for only a subset of devices.
Unfortunately, that limitation is not mentioned in the ST M25P
application note.

> I just tried to burn such a chip with flashrom, but it wouldn't detect
> it at all, so I checked the datasheet for it, and it turned out that the
> probe was completely different from what one would think, reading
> flashrom's source.
> It seems that the M25P40 doesn't use the RDID command to send its ID,
> but rather a "RES" (Read Electronic Signature) command instead, which
> returns just one byte. I added support for it, and then it worked
> perfectly for me.

See above.

> I'm attaching my patch to fix the problem. I would imagine that the
> other M25Pxx chips would be affected by the same problem, but since I
> can neither verify nor test what IDs they would have, they are excluded
> from my patch.

Thanks for investigating and coding this. However, I have to veto the
patch in its current form. I know at least 4 flash chips with different
sizes from different manufacturers which have the same RES code.
Can you post the RDID output for your device? Maybe we can figure out a
way to identify it safely with the help of RDID and RES and possibly READ.


More information about the coreboot mailing list