[coreboot] [flashrom] flashrom problem: will not flash on compaq/deskpro Deskpro EN SFF P600. "ERASE FAILED @237568, val 60!" My box is doomed to be bricked :-(

Ludwig Jaffe luja at openhardware.de
Sun Jun 1 16:59:56 CEST 2008


Hi all,

i fiddled around with the flashrom util, and I managed to rewrite the 
original compaq-bios, which I saved before.
I modified the flashrom-utily to enable writing the flashrom. The 
29F002BT works with 29f002-funktions and *not* with jedec....
The only problem that remains, is that it is not possible to unprotect 
the 20f002bt (ST). with the flashrom utily. So I can not upgrade the flash!
I will go and code some improvement to that.

A suggestion regarding architecture:


struct flashchip flashchips[] = {
        
/**********************************************************************************************************************************************************************************************************************/
        /* Vendor       Chip                    Vendor ID       Chip 
ID                 TODO    TODO            Test status     Probe 
function          Erase function                  Write 
function          Read function */
        
/**********************************************************************************************************************************************************************************************************************/
        {"AMD",         "Am29F016D",            AMD_ID,         
AM_29F016D,             2048,   64 * 1024,      TEST_UNTESTED,  
probe_29f040b,          erase_29f040b,                  write_29f040b},
        {"AMD",         "Am29F040B",            AMD_ID,         
AM_29F040B,             512,    64 * 1024,      TEST_OK_PREW,   
probe_29f040b,          erase_29f040b,                  write_29f040b},
        {"AMD",         "Am29LV040B",           AMD_ID,         
AM_29LV040B,            512,    64 * 1024,      TEST_UNTESTED,  
probe_29f040b,          erase_29f040b,                  write_29f040b},
        {"ASD",         "AE49F2008",            ASD_ID,         
ASD_AE49F2008,          256,    128,            TEST_UNTESTED,  
probe_jedec,            erase_chip_jedec,               write_jedec},
        {"Atmel",       "AT29C020",             ATMEL_ID,       
AT_29C020,              256,    256,            TEST_UNTESTED,  
probe_jedec,            erase_chip_jedec,               write_jedec},
        {"Atmel",       "AT29C040A",            ATMEL_ID,       
AT_29C040A,             512,    256,            TEST_UNTESTED,  
probe_jedec,            erase_chip_jedec,               write_jedec},
        {"Atmel",       "AT49F002(N)",          ATMEL_ID,       
AT_49F002N,             256,    256,            TEST_UNTESTED,  
probe_jedec,            erase_chip_jedec,               write_jedec},
        {"Atmel",       "AT49F002(N)T",         ATMEL_ID,       
AT_49F002NT,            256,    256,            TEST_UNTESTED,  
probe_jedec,            erase_chip_jedec,               write_jedec},
        {"Atmel",       "AT25DF321",            ATMEL_ID,       
AT_25DF321,             4096,   256,            TEST_OK_PREW,   
probe_spi_rdid,         spi_chip_erase_c7,      spi_chip_write, 
spi_chip_read},
        {"Amic Technology","A25L40P",           AMIC_ID,        
AMIC_A25L40P,           512,    256,            TEST_UNTESTED,  
probe_spi_rdid,         spi_chip_erase_c7,      spi_chip_write, 
spi_chip_read},
        {"EMST",        "F49B002UA",            EMST_ID,        
EMST_F49B002UA,         256,    4096,           TEST_UNTESTED,  
probe_jedec,            erase_chip_jedec,               write_49f002},
        {"EON",         "EN29F002(A)(N)B",      EON_ID,         
EN_29F002B,             256,    256,            TEST_UNTESTED,  
probe_jedec,            erase_chip_jedec,               write_jedec},
        {"EON",         "EN29F002(A)(N)T",      EON_ID,         
EN_29F002T,             256,    256,            TEST_UNTESTED,  
probe_jedec,            erase_chip_jedec,               write_jedec},


        {"ST",          "M29F002BB/BNB",        ST_ID,          
ST_M29F002BB,           256,    64 * 1024,      TEST_UNTESTED,  
probe_29f002,           erase_29f002,                   write_29f002},
        {"ST",          "M29F002BT/BNT",        ST_ID,          
ST_M29F002BT,           256,    64 * 1024,      
TEST_OK_PR|TEST_BAD_ERASE,      probe_29f002,           
erase_29f002,                   write_29f002},

We should add a function-pointer for protect and unprotect, because this 
is sometimes special. e.g. 29f002bt (st).
We should provide an extra funktion to protect/unprotect the bios to the 
user, so that reweiting the eeprom will be
read() -> save old
unprotect()
test_if_unprotected()
 if not die
erase()
 test_if_empty()
 if not, try to rewrite saved_old!
 else die.
write
verify


So the methods protect/unprotect have to be seperate and not be hidden 
in erase or write functions.
And they should be accessible via the punction-pointer-table.



My patch contains my little modifications and da doxygen file to ease 
understanding the code.

Please help me to improve the architecture of flashrom.

Greetings


LuJa






Carl-Daniel Hailfinger schrieb:
> Hi all,
>
> [Ludwig: can you please subscribe to the coreboot list? We can continue
> working on your problem there.]
>
> IIRC Uwe has been working with the mainboard mentioned below. Could you
> please take a look?
>
> Regards,
> Carl-Daniel
>
> On 01.06.2008 00:24, Ludwig Jaffe wrote:
>   
>> Hi Having the Deskpro EN SFF P600. abused as poor mans webservers,
>> I was anoyed by the compaq-bios requiring a kbd to boot. even in
>> "server-mode"
>> Now having build a rom, I am little bit frustrated on programming the
>> flash.
>> Because if one has a programmer one has to de-solder the flash,
>> because there is *no*
>> socket. If one desolders one can also use a bigger flash, not having
>> to fiddle around with filo-features
>> just to get it fit (usb has to stay out)
>>
>> Now my machine is doomed to be bricked as soon as power fails :-(((
>> Would be nice if you can resolve the problem.
>>
>> Here is the program output:
>>
>>
>> ./flashrom  -w coreboot.rom
>> Calibrating delay loop... OK.
>> No coreboot table found.
>> Found chipset "Intel PIIX4/4E/4M", enabling flash write... OK.
>> Found chip "ST M29F002T/NT" (256 KB) at physical address 0xfffc0000.
>> ===
>> This flash part has status UNTESTED for operations: PROBE READ ERASE
>> WRITE
>> Please email a report to flashrom at coreboot.org if any of the above
>> operations
>> work correctly for you with this flash part. Please include the full
>> output
>> from the program, including chipset found. Thank you for your help!
>> ===
>> Note: If the following flash access fails, you might need to specify
>> -m <vendor>:<mainboard>.
>> ERASE FAILED @237568, val 60!
>>
>>
>>
>>
>> -- 
>> ./flashrom -V -w coreboot.rom >flash.txt
>>
>> Calibrating delay loop... 165M loops per second. OK.
>> No coreboot table found.
>> Found chipset "Intel PIIX4/4E/4M", enabling flash write... OK.
>> Probing for AMD Am29F016D, 2048 KB: probe_29f040b: id1 0xff, id2 0xff
>> Probing for AMD Am29F040B, 512 KB: probe_29f040b: id1 0x20, id2 0xb0
>> Probing for AMD Am29LV040B, 512 KB: probe_29f040b: id1 0x20, id2 0xb0
>> Probing for ASD AE49F2008, 256 KB: probe_jedec: id1 0x20, id2 0xb0
>> Probing for Atmel AT29C020, 256 KB: probe_jedec: id1 0x20, id2 0xb0
>> Probing for Atmel AT29C040A, 512 KB: probe_jedec: id1 0x20, id2 0xb0
>> Probing for Atmel AT49F002(N), 256 KB: probe_jedec: id1 0x20, id2 0xb0
>> Probing for Atmel AT49F002(N)T, 256 KB: probe_jedec: id1 0x20, id2 0xb0
>> Probing for Atmel AT25DF321, 4096 KB: spi_command called, but no SPI
>> chipset detected
>> Probing for Amic Technology A25L40P, 512 KB: spi_command called, but
>> no SPI chipset detected
>> Probing for EMST F49B002UA, 256 KB: probe_jedec: id1 0x20, id2 0xb0
>> Probing for EON EN29F002(A)(N)B, 256 KB: probe_jedec: id1 0x20, id2 0xb0
>> Probing for EON EN29F002(A)(N)T, 256 KB: probe_jedec: id1 0x20, id2 0xb0
>> Probing for Fujitsu MBM29F400TC, 512 KB: probe_m29f400bt: id1 0xff,
>> id2 0xff
>> Probing for Intel 82802AB, 512 KB: probe_82802ab: id1 0xff, id2 0xff
>> Probing for Intel 82802AC, 1024 KB: probe_82802ab: id1 0xff, id2 0xff
>> Probing for Macronix MX25L4005, 512 KB: spi_command called, but no SPI
>> chipset detected
>> Probing for Macronix MX25L8005, 1024 KB: spi_command called, but no
>> SPI chipset detected
>> Probing for Macronix MX25L1605, 2048 KB: spi_command called, but no
>> SPI chipset detected
>> Probing for Macronix MX25L3205, 4096 KB: spi_command called, but no
>> SPI chipset detected
>> Probing for Macronix MX29F002, 256 KB: probe_29f002: id1 0x20, id2 0xb0
>> Probing for PMC Pm25LV010, 128 KB: spi_command called, but no SPI
>> chipset detected
>> Probing for PMC Pm25LV016B, 2048 KB: spi_command called, but no SPI
>> chipset detected
>> Probing for PMC Pm25LV020, 256 KB: spi_command called, but no SPI
>> chipset detected
>> Probing for PMC Pm25LV040, 512 KB: spi_command called, but no SPI
>> chipset detected
>> Probing for PMC Pm25LV080B, 1024 KB: spi_command called, but no SPI
>> chipset detected
>> Probing for PMC Pm25LV512, 64 KB: spi_command called, but no SPI
>> chipset detected
>> Probing for PMC Pm49FL002, 256 KB: probe_jedec: id1 0x20, id2 0xb0
>> Probing for PMC Pm49FL004, 512 KB: probe_jedec: id1 0x20, id2 0xb0
>> Probing for Sharp LHF00L04, 1024 KB: probe_lhf00l04: id1 0xff, id2 0xff
>> Probing for Spansion S25FL016A, 2048 KB: spi_command called, but no
>> SPI chipset detected
>> Probing for SST SST25VF016B, 2048 KB: spi_command called, but no SPI
>> chipset detected
>> Probing for SST SST25VF040B, 512 KB: spi_command called, but no SPI
>> chipset detected
>> Probing for SST SST28SF040A, 512 KB: probe_28sf040: id1 0xff, id2 0xff
>> Probing for SST SST29EE010, 128 KB: probe_jedec: id1 0x20, id2 0xb0
>> Probing for SST SST29LE010, 128 KB: probe_jedec: id1 0x20, id2 0xb0
>> Probing for SST SST29EE020A, 256 KB: probe_jedec: id1 0x20, id2 0xb0
>> Probing for SST SST29LE020, 256 KB: probe_jedec: id1 0x20, id2 0xb0
>> Probing for SST SST39SF010A, 128 KB: probe_jedec: id1 0x20, id2 0xb0
>> Probing for SST SST39SF020A, 256 KB: probe_jedec: id1 0x20, id2 0xb0
>> Probing for SST SST39SF040, 512 KB: probe_jedec: id1 0x20, id2 0xb0
>> Probing for SST SST39VF512, 64 KB: probe_jedec: id1 0x20, id2 0xb0
>> Probing for SST SST39VF010, 128 KB: probe_jedec: id1 0x20, id2 0xb0
>> Probing for SST SST39VF020, 256 KB: probe_jedec: id1 0x20, id2 0xb0
>> Probing for SST SST39VF040, 512 KB: probe_jedec: id1 0x20, id2 0xb0
>> Probing for SST SST49LF002A/B, 256 KB: probe_jedec: id1 0x20, id2 0xb0
>> Probing for SST SST49LF003A/B, 384 KB: probe_jedec: id1 0x20, id2 0xb0
>> Probing for SST SST49LF004A/B, 512 KB: probe_jedec: id1 0x20, id2 0xb0
>> Probing for SST SST49LF004C, 512 KB: probe_49lfxxxc: id1 0xff, id2 0xff
>> Probing for SST SST49LF008A, 1024 KB: probe_jedec: id1 0x20, id2 0xb0
>> Probing for SST SST49LF008C, 1024 KB: probe_49lfxxxc: id1 0xff, id2 0xff
>> Probing for SST SST49LF016C, 2048 KB: probe_49lfxxxc: id1 0xff, id2 0xff
>> Probing for SST SST49LF020A, 256 KB: probe_jedec: id1 0x20, id2 0xb0
>> Probing for SST SST49LF040, 512 KB: probe_jedec: id1 0x20, id2 0xb0
>> Probing for SST SST49LF040B, 512 KB: probe_jedec: id1 0x20, id2 0xb0
>> Probing for SST SST49LF080A, 1024 KB: probe_jedec: id1 0x20, id2 0xb0
>> Probing for SST SST49LF160C, 2048 KB: probe_49lfxxxc: id1 0xff, id2 0xff
>> Probing for ST M25P05-A, 64 KB: spi_command called, but no SPI chipset
>> detected
>> Probing for ST M25P10-A, 128 KB: spi_command called, but no SPI
>> chipset detected
>> Probing for ST M25P20, 256 KB: spi_command called, but no SPI chipset
>> detected
>> Probing for ST M25P40, 512 KB: spi_command called, but no SPI chipset
>> detected
>> Probing for ST M25P40-old, 512 KB: spi_command called, but no SPI
>> chipset detected
>> Probing for ST M25P80, 1024 KB: spi_command called, but no SPI chipset
>> detected
>> Probing for ST M25P16, 2048 KB: spi_command called, but no SPI chipset
>> detected
>> Probing for ST M25P32, 4096 KB: spi_command called, but no SPI chipset
>> detected
>> Probing for ST M25P64, 8192 KB: spi_command called, but no SPI chipset
>> detected
>> Probing for ST M25P128, 16384 KB: spi_command called, but no SPI
>> chipset detected
>> Probing for ST M29F002B, 256 KB: probe_jedec: id1 0x20, id2 0xb0
>> Probing for ST M29F002T/NT, 256 KB: probe_jedec: id1 0x20, id2 0xb0
>> Found chip "ST M29F002T/NT" (256 KB) at physical address 0xfffc0000.
>> Probing for ST M29F040B, 512 KB: probe_29f040b: id1 0x20, id2 0xb0
>> Probing for ST M29F400BT, 512 KB: probe_m29f400bt: id1 0xff, id2 0xff
>> Probing for ST M29W010B, 128 KB: probe_jedec: id1 0x20, id2 0xb0
>> Probing for ST M29W040B, 512 KB: probe_jedec: id1 0x20, id2 0xb0
>> Probing for ST M50FLW040A, 512 KB: probe_stm50flw0x0x: id1 0x20, id2 0xb0
>> Probing for ST M50FLW040B, 512 KB: probe_stm50flw0x0x: id1 0x20, id2 0xb0
>> Probing for ST M50FLW080A, 1024 KB: probe_stm50flw0x0x: id1 0x20, id2
>> 0xb0
>> Probing for ST M50FLW080B, 1024 KB: probe_stm50flw0x0x: id1 0x20, id2
>> 0xb0
>> Probing for ST M50FW016, 2048 KB: probe_82802ab: id1 0xff, id2 0xff
>> Probing for ST M50FW040, 512 KB: probe_82802ab: id1 0xff, id2 0xff
>> Probing for ST M50FW080, 1024 KB: probe_82802ab: id1 0xff, id2 0xff
>> Probing for ST M50LPW116, 2048 KB: probe_jedec: id1 0xff, id2 0xff,
>> id1 parity violation
>> Probing for SyncMOS S29C31004T, 512 KB: probe_jedec: id1 0x20, id2 0xb0
>> Probing for SyncMOS S29C51001T, 128 KB: probe_jedec: id1 0x20, id2 0xb0
>> Probing for SyncMOS S29C51002T, 256 KB: probe_jedec: id1 0x20, id2 0xb0
>> Probing for SyncMOS S29C51004T, 512 KB: probe_jedec: id1 0x20, id2 0xb0
>> Probing for Winbond W25x10, 128 KB: spi_command called, but no SPI
>> chipset detected
>> Probing for Winbond W25x20, 256 KB: spi_command called, but no SPI
>> chipset detected
>> Probing for Winbond W25x40, 512 KB: spi_command called, but no SPI
>> chipset detected
>> Probing for Winbond W25x80, 1024 KB: spi_command called, but no SPI
>> chipset detected
>> Probing for Winbond W29C011, 128 KB: probe_jedec: id1 0x20, id2 0xb0
>> Probing for Winbond W29C020C, 256 KB: probe_jedec: id1 0x20, id2 0xb0
>> Probing for Winbond W29C040P, 512 KB: probe_jedec: id1 0x20, id2 0xb0
>> Probing for Winbond W29EE011, 128 KB: probe_w29ee011: id1 0xff, id2 0xff
>> Probing for Winbond W39V040A, 512 KB: probe_jedec: id1 0x20, id2 0xb0
>> Probing for Winbond W39V040B, 512 KB: probe_jedec: id1 0x20, id2 0xb0
>> Probing for Winbond W39V040FA, 512 KB: probe_jedec: id1 0x20, id2 0xb0
>> Probing for Winbond W39V080A, 1024 KB: probe_jedec: id1 0x20, id2 0xb0
>> Probing for Winbond W49F002U, 256 KB: probe_jedec: id1 0x20, id2 0xb0
>> Probing for Winbond W49V002A, 256 KB: probe_jedec: id1 0x20, id2 0xb0
>> Probing for Winbond W49V002FA, 256 KB: probe_jedec: id1 0x20, id2 0xb0
>> Probing for Winbond W39V080FA, 1024 KB: probe_winbond_fwhub: vid 0x20,
>> did 0xb0
>> Probing for Winbond W39V080FA (dual mode), 512 KB:
>> probe_winbond_fwhub: vid 0x20, did 0xb0
>> Probing for EON unknown EON SPI chip, 0 KB: spi_command called, but no
>> SPI chipset detected
>> Probing for Macronix unknown Macronix SPI chip, 0 KB: spi_command
>> called, but no SPI chipset detected
>> Probing for PMC unknown PMC SPI chip, 0 KB: spi_command called, but no
>> SPI chipset detected
>> Probing for SST unknown SST SPI chip, 0 KB: spi_command called, but no
>> SPI chipset detected
>> Probing for ST unknown ST SPI chip, 0 KB: spi_command called, but no
>> SPI chipset detected
>> ===
>> This flash part has status UNTESTED for operations: PROBE READ ERASE
>> WRITE
>> Please email a report to flashrom at coreboot.org if any of the above
>> operations
>> work correctly for you with this flash part. Please include the full
>> output
>> from the program, including chipset found. Thank you for your help!
>> ===
>> coreboot last image size (not ROM size) is 131072 bytes.
>> Manufacturer: Compaq
>> Mainboard ID: Deskpro EN SFF P600
>> Note: If the following flash access fails, you might need to specify
>> -m <vendor>:<mainboard>.
>> ERASE FAILED @237568, val 60!
>>
>> -
>> Why should I give the vendor and board if it was detected correctly?
>>
>>
>> Thanks for your help
>>
>> LuJa
>>
>>
>>     
>
>
>   

-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: flashrom.patch
URL: <http://www.coreboot.org/pipermail/coreboot/attachments/20080601/b1d64660/attachment.ksh>


More information about the coreboot mailing list