How do bios flash utilities read binaries?

Only for programmers and BIOS gurus with technical questions.
Post Reply
Fencer128
New visitors - please read the rules.
Posts: 12
Joined: Wed May 29, 2002 2:38 pm
Location: St Andrews, Fife, Scotland

Hello,

I've recently been delving into the murky world of flash memory and bioses. What I've been unable to acertain is how the bios flash utility programs the binary files into the flash memory. I've noticed that the flash utilities are able to recognise certain chipsets and flash memory devices. This means that they have the software information required to program a specific ROM from a specific manufacturer. However, as anyone who has looked at this knows, different boot block flash ROMS have different arrangements of boot blocks, parameter blocks etc as well as different sector sizes. My question is this; Are all bios binary files written in the same format with the flash utility identifying the ROM device and then programming specific parts of the binary file to specific ROM memory locations (in order that the boot block is correctly placed for instance). Or are the binary files themselves formatted differently so that they expect a specific ROM and as such the data in the file is arranged to be read sequentially into the ROM by the flash utility. So, for one file the boot block information may be at the top, for the other at the bottom.

I really hope someone can help as I can't find this information readily on the net.

Cheers,

Andy
th
Legacy means reliability
Posts: 113
Joined: Thu Mar 21, 2002 5:41 pm
Contact:

AFAIK the flash memory writer for Award and AMI stuff does not really care for the content of the flash-rom image.
They are only able to leave out the boot-block option, or not.
Everything else is re-written just straight.

Are you sure about the boot-block being located at different locations?
Doesn't make much sense to me, because after a reset, the CPU will always start executing instructions from a hardwired adress.
Usually this should be, where the boot block is located.

The situation is different, if we are talking about Phoenix, the other AMI series (those used by intel) or major brandnames like Compaq.

These flashers do know about certain portions of the Bios and you are able to reflash those sections only (logo, language etc).
You will usually get a bunch of files for those machines and not only one image.

Bye
Thomas
286-16/NEAT Chipset/4 MB Mem/40 MB HDD/512kB Tridet/WfW
Fencer128
New visitors - please read the rules.
Posts: 12
Joined: Wed May 29, 2002 2:38 pm
Location: St Andrews, Fife, Scotland

Thanks

I am still slightly confused though...For instance the Winbond W29C020C family of ROMs have an 8k boot block located at the first 8k and last 8k bytes of memory. Whereas the AMIC A29001 family have 2 x 8k boot blocks at the first 16k bytes of memory. Are both these boot blocks necessary? if so then would these parts be compatible (assuming voltage, pin location the same).

Finally, could I also ask you whether the sector size/arrangement of the ROM is important for bios compatibility.

Cheers,

Andy
Rainbow
The UniFlasher
Posts: 3122
Joined: Wed Mar 20, 2002 4:16 pm
Location: Slovakia
Contact:

Some chips come in two versions - TOP and BOTTOM boot block. On the PC, only the TOP boot block versions are used (which means that boot block is located at the highest addresses) because CPU starts there after reset.
Some chips are divided into sectors, some consist of small blocks. But the data in image file is always 1:1 image of the chip. Generally, you can flash the BIOS in any chip that has the correct size (or is bigger). It should start but it may have problems - it needs to write DMI and ESCD data to the chip and it does not know all chips - you will then get "UNKNOWN FLASH TYPE" error message (if it's Award BIOS), but it should boot.
Patched and tested BIOSes are at http://wims.rainbow-software.org
UniFlash - Flash anything anywhere
Fencer128
New visitors - please read the rules.
Posts: 12
Joined: Wed May 29, 2002 2:38 pm
Location: St Andrews, Fife, Scotland

Thanks,

Can I just check to see if I've got this straight:

If the flash program has the data for a particular ROM i.e. EON EN29F002NT-70P for example, then it can flash any 2Mbit (or maybe smaller) *.bin file into that ROM, with the DMI and ESCD data correctly placed. If it does not have the support for the ROM - and it still allows flashing of an unknown device - then the machine will boot but there may be other complications to do with DMI and ESCD data not being at the memory location expected. So, different ROMs with sector arrangements and sizes are not a problem so long as they are supported by the flash utility. I could replace one ROM with another so long as DC characterstics, bus timings and pin arrangement are the same. Assuming the devices are supported by the flash utility there should be no further problems?

Thank you very much,

Andy
Rainbow
The UniFlasher
Posts: 3122
Joined: Wed Mar 20, 2002 4:16 pm
Location: Slovakia
Contact:

Everything including the DMI, ESCD and bootblock is placed exactly as it's in the image - nothing is moved. The flasher must know the chip so it can use the correct commands to flash it.
The BIOS can be loaded from any chip because all of them are read compatible (backward compatible with EEPROM, EPROM, PROM and ROM). BIOS will then want to update ESCD and DMI - it will try to detect chip type. If the chip is one that the BIOS supports, it will update the data and everything will work. If the BIOS does not support the chip, it will not know what commands use to write to the chip and will display UNKNOWN FLASH TYPE.
The pinouts are same for all DIP32 chips of the same capacity, the access time is usually not important (if the new chip is slower, it might cause problems but usually works OK). The only problem is that BIOS that you want to flash in the chip should support that chip - for the ESCD and DMI to work properly.
If you have EON EN29F002(N)T chip there, it's best to replace it with some other chip that has similiar structure - it's sectored chip with AMD-like command (sector sizes: 3x64k, 1x32k, 2x8k, 1x16k)
Patched and tested BIOSes are at http://wims.rainbow-software.org
UniFlash - Flash anything anywhere
Post Reply