Flashing Bios Success...

Peter Stuge stuge-linuxbios at cdy.org
Thu May 8 12:32:01 CEST 2003


On Thu, May 08, 2003 at 10:42:52AM -0600, ron minnich wrote:
> On Thu, 8 May 2003, Nathanael Noblet wrote:
> 
> > Now this is all great and what not, but I'm confused. We're having 
> > problems detecting the flash, not writing to it. So I'm not sure how 
> > this will help. As well in the flash_rom sources the enable_sis is 
> > never called.
> 
> the reason is that you can't ID a flash without having write access to it. 
> 
> > 1) Does the write enable bit help with detecting?
> 
> it is essential. Must have it.

To clarify this a bit;

Most flash ROM chips are identified, erased and programmed according to a
standard set by JEDEC.

Byte-program, sector-erase, block-erase, chip-erase, software-id-entry and
software-id-exit are the most common (the only?) commands available.

Each command is up to six write cycles long.

E.g. for byte-program:

Write 0xaah to address 0x5555h in the ROM.
Write 0x55h to address 0x2aaah in the ROM.
Write 0xa0h to address 0x5555h in the ROM.
Write byte-data to desired address in the ROM.


Memory chips are identified by first entering the software-id mode:
Write 0xaah to address 0x5555h in the ROM.
Write 0x55h to address 0x2aaah in the ROM.
Write 0x90h to address 0x5555h in the ROM.

Now the 'manufacturer ID' and the 'device ID' bytes can be read from
addresses 0 and 1 in the ROM, respectively.

After reading the IDs, exit software-id mode thusly:
Write 0xaah to address 0x5555h in the ROM.
Write 0x55h to address 0x2aaah in the ROM.
Write 0xf0h to address 0x5555h in the ROM.

And so on. Grab a datasheet for the flash ROM chip you are working with,
this will most likely be documented there too.


//Peter



More information about the coreboot mailing list