[flashrom] MX25L6445E erase and write failed!

Urja Rannikko urjaman at gmail.com
Wed Mar 4 09:32:57 CET 2015


Hi,

Could you please keep this in the mailing list...

On Wed, Mar 4, 2015 at 9:09 AM, The Raven <originalraven at hotmail.com> wrote:
> Hi Again
>
> After a long time flashrom trys other erase options.
> Have a look here:
> -0x0f5fff:E, 0x0f6000-0x0f6fff:E, 0x0f7000-0x0f7fff:E,
> 0x0f8000-0x0f8fff:E, 0x0f9000-0x0f9fff:E, 0x0fa000-0x0fafff:E,
> 0x0fb000-0x0fbfff:E, 0x0fc000-0x0fcfff:E, 0x0fd000-0x0fdfff:E,
> 0x0fe000-0x0fefff:E, 0x0ff000-0x0fffff:E, 0x100000-0x100fff:EFAILED at
> 0x00100000! Expected=0xff, Found=0xeb, failed byte count from
> 0x00100000-0x00100fff: 0xfe5
> ERASE FAILED!
> Reading current flash chip contents... done. Looking for another erase
> function.
> Trying erase function 1... 0x000000-0x007fff:S, 0x008000-0x00ffff:S,
> 0x010000-0x017fff:S, 0x018000-0x01ffff:S, 0x020000-0x027fff:S,
> 0x028000-0x02ffff:S, 0x030000-0x037fff:S, 0x038000-0x03ffff:S,
> 0x040000-0x047fff:S, 0x048000-0x04ffff:S, 0x050000-0x057fff:S,
> 0x058000-0x05ffff:S, 0x060000-0x067fff:S, 0x068000-0x06ffff:S,
> 0x070000-0x077fff:S, 0x078000-0x07ffff:S, 0x080000-0x087fff:S,
> 0x088000-0x08ffff:S, 0x090000-0x097fff:S, 0x098000-0x09ffff:S,
> 0x0a0000-0x0a7fff:S, 0x0a8000-0x0affff:S, 0x0b0000-0x0b7fff:S,
> 0x0b8000-0x0bffff:S, 0x0c0000-0x0c7fff:S, 0x0c8000-0x0cffff:S,
> 0x0d0000-0x0d7fff:S, 0x0d8000-0x0dffff:S, 0x0e0000-0x0e7fff:S,
> 0x0e8000-0x0effff:S, 0x0f0000-0x0f7fff:S, 0x0f8000-0x0fffff:S,
> 0x100000-0x107fff:EFAILED at 0x00100000! Expected=0xff, Found=0xeb,
> failed byte count from 0x00100000-0x00107fff: 0x7f69
> ERASE FAILED!
> Reading current flash chip contents... done. Looking for another erase
> function.
> Trying erase function 2... 0x000000-0x00ffff:S, 0x010000-0x01ffff:S,
> 0x020000-0x02ffff:S, 0x030000-0x03ffff:S, 0x040000-0x04ffff:S,
> 0x050000-0x05ffff:S, 0x060000-0x06ffff:S, 0x070000-0x07ffff:S,
> 0x080000-0x08ffff:S, 0x090000-0x09ffff:S, 0x0a0000-0x0affff:S,
> 0x0b0000-0x0bffff:S, 0x0c0000-0x0cffff:S, 0x0d0000-0x0dffff:S,
> 0x0e0000-0x0effff:S, 0x0f0000-0x0fffff:S, 0x100000-0x10ffff:EFAILED at
> 0x00100000! Expected=0xff, Found=0xeb, failed byte count from
> 0x00100000-0x0010ffff: 0xfb20
> ERASE FAILED!
> Reading current flash chip contents... done. Looking for another erase
> function.
> Trying erase function 3... 0x000000-0x7fffff:EFAILED at 0x00100000!
> Expected=0xff, Found=0xeb, failed byte count from 0x00000000-0x007fffff:
> 0x26be30
> ERASE FAILED!
> Reading current flash chip contents... done. Looking for another erase
> function.
> Trying erase function 4... 0x000000-0x7fffff:EFAILED at 0x00100000!
> Expected=0xff, Found=0xeb, failed byte count from 0x00000000-0x007fffff:
> 0x26be30
> ERASE FAILED!
> Looking for another erase function.
> No usable erase functions left.
> FAILED!
>
> As you can see it always fails at the same byte count. I am still not
> sure if this problem is related to serprog.
>
> Greetings

I've an idea. Maybe you've managed to switch the MX25L6445E into the
"individual block protection mode" (read the datasheet page 30 - its
an OTP, once done once its for good) and now it isnt actually
erasing/writing anything at all (that 1M just happens to have
succeeded previously) because flashrom currently doesnt know of the
invidividual block unlock commands (or even the GBULK gang block
unlock) and thinks everything is ok because the status register looks
like unlocked.

So maybe read the current contents into a file and modify a little bit
in the erased area (eg. swap out the first 4k to random data*) and see
if it writes. My theory is it wont.

*here's example commands:
flashrom <insert your parameters> -r current.bin
dd if=/dev/urandom of=4krandom.bin bs=1024 count=4
dd if=current.bin bs=1024 skip=4 of=current-4.bin
cat 4krandom.bin current-4.bin > modified.bin
flashrom <parameters> -w modified.bin

Somebody'd need to write a patch to flashrom to use the RDSCUR command
to see if WPSEL is set to see for sure. But support for this wouldnt
hurt anyways. I'll see if i have time later in the evening to make a
prototype/test patch for this...

-- 
Urja Rannikko




More information about the flashrom mailing list