Hello,
The first patch changes chip erase method from JEDEC Chip Erase to JEDEC Sector Erase for each sector. See the comment in util/flashrom/sst49lf040.c, line #40. Verified on a real SST49LF080A chip, for which JEDEC Chip Erase did not work as well.
The second patch makes printf working [as designed].
Roman
Index: util/flashrom/flashchips.c =================================================================== --- util/flashrom/flashchips.c (revision 2434) +++ util/flashrom/flashchips.c (working copy) @@ -67,7 +67,7 @@ {"SST49LF040", SST_ID, SST_49LF040, NULL, 512, 4096, probe_jedec, erase_49lf040, write_49lf040,NULL}, {"SST49LF080A", SST_ID, SST_49LF080A, NULL, 1024, 4096, - probe_jedec, erase_chip_jedec, write_49lf040,NULL}, + probe_jedec, erase_49lf040, write_49lf040,NULL}, {"SST49LF002A/B", SST_ID, SST_49LF002A, NULL, 256, 16 * 1024, probe_sst_fwhub, erase_sst_fwhub, write_sst_fwhub, NULL}, {"SST49LF003A/B", SST_ID, SST_49LF003A, NULL, 384, 64 * 1024, Index: util/flashrom/sst49lf040.c =================================================================== --- util/flashrom/sst49lf040.c (revision 2434) +++ util/flashrom/sst49lf040.c (working copy) @@ -59,13 +59,11 @@ erase_sector_jedec(bios, i * page_size);
/* write to the sector */ - if((i&0xfff)==0xfff) - printf("%04d at address: 0x%08x ", i, i * page_size); + printf("%04d at address: 0x%08x ", i, i * page_size);
write_sector_jedec(bios, buf + i * page_size, bios + i * page_size, page_size); - if((i&0xfff)==0xfff) - printf("\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b"); + printf("\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b"); fflush(stdout); } printf("\n");
* Roman Kononov kononov195-lbl@yahoo.com [061002 18:20]:
The second patch makes printf working [as designed].
putting this in will make it impossible to update the bios using a serial line. :-(
On 10/02/2006 03:38 PM, Stefan Reinauer wrote:
putting this in will make it impossible to update the bios using a serial line. :-(
Cannot get it. Why?
Thanks
Roman Kononov wrote:
On 10/02/2006 03:38 PM, Stefan Reinauer wrote:
putting this in will make it impossible to update the bios using a serial line. :-(
Cannot get it. Why?
Thanks
it's something like 20 chars per byte write, so for 1 MB part, you're talking 20 M chars. It will take 20 minutes to print at 9600.
I did this once on a 1024-node cluster. it was really bad. 1 billion chars.
ron
On 10/02/2006 05:34 PM, Ronald G Minnich wrote:
it's something like 20 chars per byte write, so for 1 MB part, you're talking 20 M chars. It will take 20 minutes to print at 9600.
I see.
But in this case, before the patch, it printfs once per 4096 sectors, which is never. After the patch, it printfs once per sector, which is once per 64K.
Roman
roman, mea culpa, I think you are right. We are all worn out here in hamburg and three of us misread the patch the same way. Sorry!
I'll talk to stefan tomorrow and we'll probably go for it. Thanks for fixing that part.
ron
* Roman Kononov kononov195-lbl@yahoo.com [061003 00:24]:
On 10/02/2006 03:38 PM, Stefan Reinauer wrote:
putting this in will make it impossible to update the bios using a serial line. :-(
Cannot get it. Why?
because you are trying to output 18874368 characters during a single flash.
1) it will mess up your timing during the write process. 2) if you are on a 9600 baud line, writing the flash 1* will require 262 minutes.
;-)
* Roman Kononov kononov195-lbl@yahoo.com [061002 18:20]:
Hello,
The first patch changes chip erase method from JEDEC Chip Erase to JEDEC Sector Erase for each sector. See the comment in util/flashrom/sst49lf040.c, line #40. Verified on a real SST49LF080A chip, for which JEDEC Chip Erase did not work as well.
The second patch makes printf working [as designed].
Roman
Ups. It seems you are right on the printf part. Looks like too much hacking after midnight ;-)
Let me test it when I am back from the LinuxBIOS symposium and had enough sleep ;) Guess we want this in.
* Roman Kononov kononov195-lbl@yahoo.com [061002 18:20]:
Hello,
The first patch changes chip erase method from JEDEC Chip Erase to JEDEC Sector Erase for each sector. See the comment in util/flashrom/sst49lf040.c, line #40. Verified on a real SST49LF080A chip, for which JEDEC Chip Erase did not work as well.
The second patch makes printf working [as designed].
Thanks. Applied.