writing to eeprom

Programming, for all ages and all languages.
Post Reply
a5498828
Member
Member
Posts: 99
Joined: Thu Aug 12, 2010 7:25 am

writing to eeprom

Post by a5498828 »

i need to know how to write (and read) eeprom from most popular motherboards. (ami and award/phoenix)
im most interested in reads, but i guess its simmilar.
i understand i need to use some sequence of magic pio requests, right?

i dont want to access shadowed rom, only real rom.



- how much will cost me cheapest eeprom programmer (so i can recover from error while testing my new bios).
Gigasoft
Member
Member
Posts: 855
Joined: Sat Nov 21, 2009 5:11 pm

Re: writing to eeprom

Post by Gigasoft »

Reading is always the same, just read the area from FFFx0000 - FFFFFFFF depending on the size of the ROM. Often, unmapped addresses will just read as FF.

As for writing, it's probably not documented, so you'll have to disassemble the updating program to find out.

But, writing a new PC BIOS is just as demanding as it sounds. You should be very familiar with how the chipset works. And remember that the startup code can't use memory until the memory controller has been configured, and in the BIOSes I've looked at, there are very many steps that take place beforehand. This, of course means, that everything must be stored in registers, including return addresses for subroutine calls.

EEPROM programmers can cost as low as 45 dollars, depending on how advanced they are.
User avatar
Brynet-Inc
Member
Member
Posts: 2426
Joined: Tue Oct 17, 2006 9:29 pm
Libera.chat IRC: brynet
Location: Canada
Contact:

Re: writing to eeprom

Post by Brynet-Inc »

The memory mapped region isn't always the complete contents of the ROM/Flash, either.

The flashrom program from the coreboot project is probably the single most collective resource for reading and writing BIOS firmware.. it's very chipset/vendor specific, doing it all in one tool is even more complicated.

You can find more information on their website.
Image
Twitter: @canadianbryan. Award by smcerm, I stole it. Original was larger.
Post Reply