I re-seated my test clips and I tried again. The results were quite strange:
*With the patched flashrom, using S25FL128P......1# /usr/src/flashrompatch/flashrom -p usbblaster_spi -o write1.log -c "S25FL128P......1" -w rog.bin* flashrom v0.9.7-r1806 on Linux 3.2.0-4-686-pae (i686) flashrom is free software, get the source code at http://www.flashrom.org
Calibrating delay loop... OK. No EEPROM/flash device found. Note: flashrom can never write if the flash chip isn't found automatically.
*With the patched flashrom using S25FL128P......0# /usr/src/flashrompatch/flashrom -p usbblaster_spi -o write1.log -c "S25FL128P......0" -w rog.bin* flashrom v0.9.7-r1806 on Linux 3.2.0-4-686-pae (i686) flashrom is free software, get the source code at http://www.flashrom.org
Calibrating delay loop... OK. Found Spansion flash chip "S25FL128P......0" (16384 kB, SPI) on usbblaster_spi. === This flash part has status UNTESTED for operations: PROBE READ ERASE WRITE The test status of this chip may have been updated in the latest development version of flashrom. If you are running the latest development version, please email a report to flashrom@flashrom.org if any of the above operations work correctly for you with this flash part. Please include the flashrom output with the additional -V option for all operations you tested (-V, -Vr, -VE, -Vw), and mention which mainboard or programmer you tested. Please mention your board in the subject line. Thanks for your help! Reading old flash chip contents... done. Erasing and writing flash chip... FAILED at 0x00000000! Expected=0xff, Found=0x00, failed byte count from 0x00000000-0x0003ffff: 0x3 ERASE FAILED! Reading current flash chip contents... done. Erase/write done. Verifying flash... FAILED at 0x00000000! Expected=0xea, Found=0x00, failed byte count from 0x00000000-0x00ffffff: 0xeff72f Your flash chip is in an unknown state. Please report this on IRC at chat.freenode.net (channel #flashrom) or mail flashrom@flashrom.org, thanks!
*With the patched flashrom using S25FL128P......1 again*
*# /usr/src/flashrompatch/flashrom -p usbblaster_spi -o write2.log -c "S25FL128P......1" -w rog.bin*flashrom v0.9.7-r1806 on Linux 3.2.0-4-686-pae (i686) flashrom is free software, get the source code at http://www.flashrom.org
Calibrating delay loop... OK. Found Spansion flash chip "S25FL128P......1" (16384 kB, SPI) on usbblaster_spi. === This flash part has status UNTESTED for operations: PROBE READ ERASE WRITE The test status of this chip may have been updated in the latest development version of flashrom. If you are running the latest development version, please email a report to flashrom@flashrom.org if any of the above operations work correctly for you with this flash part. Please include the flashrom output with the additional -V option for all operations you tested (-V, -Vr, -VE, -Vw), and mention which mainboard or programmer you tested. Please mention your board in the subject line. Thanks for your help! Reading old flash chip contents... done. Erasing and writing flash chip... Erase/write done. *Verifying flash... VERIFIED.*
This seems quite random, so I am not sure what's going on. Before the first operation, I did a full erase, would the detect not work if the chip is erased ?
Liviu
On Fri, Jun 13, 2014 at 8:06 AM, Liviu Toma liviu.toma@gmail.com wrote:
Hi Stefan,
Thanks, I will test again tonight when I get home. The content of the rog.bin was the same for both attempts.
Liviu
On Fri, Jun 13, 2014 at 4:41 AM, Stefan Tauner < stefan.tauner@alumni.tuwien.ac.at> wrote:
Thanks for the test, there are two issues here. One is that I swapped the erase block sizes of the P models. This is clearly shown in your logs. The ...0 model should have 64 kB erase blocks, but does not:
Trying erase function 0... 0x000000-0x03ffff:EFAILED at 0x00010000!
Expected=0xff, Found=0xe5 0x03ffff is 262143 in decimal... I have fixed that locally, but this is not the main problem here.
The chip erase and the subsequent write should have worked, and your second try with the definition of the ...1 model too (because it contains the right block size). But both failed and I don't understand why yet. The first failed byte is equal in both cases but not all of them are (a different number of bytes fail in the two cases). This indicates that the behavior might be indeterministic. The contents of the "rog.bin" file were equal for both tries, right? What happens if you retry the second test again? /usr/src/flashrompatch/flashrom -p usbblaster_spi -o write2.log -c S25FL128P......1 -w rog.bin If you can not reproduce exactly the same output, i.e. Verifying flash... FAILED at 0x0000005b! Expected=0xd3, Found=0xfb, failed byte count from 0x00000000-0x00ffffff: 0xaf66ea Then we are on the right track. In that case I would ask you how the chip is connected exactly, especially how WP# and HOLD# are driven.
PS: You dont need to install flashrom after recompiling. You can execute the built binary in the source directory (make; ./flashrom ...).
-- Kind regards/Mit freundlichen Grüßen, Stefan Tauner