Alan Alexander wrote:
Many thanks to all of the help regarding flashing of the Pm49fl004 device through the AMD CS5536 chipset on my IEI Nano LX board. I am now able to erase and write the entire 512KByte region as desired.
Unfortunately, it would appear that I have overlooked something in my quest for an automatic way to modify the legacy bios settings in our embedded Linux devices. Although I can now alter the BIOS at my hearts content, it seems that the actual BIOS settings themselves are stored elsewhere. For example:
- BIOS settings are set to configuration 'a'
- I make a change to the Legacy BIOS settings (using the BIOS boot
menu) - configuration now 'b' (not equal to 'a') 2) I save the BIOS image (with configuration 'b') from the Pm49fl004 device via flashrom -r. 3) I revert the BIOS settings back to configuration 'a' using the BIOS boot menu. 4) I re-apply the saved image ('b') using flashrom -w and verify it with flashrom -v 5) On reboot the settings change applied in configuration 'b' are missing.
So, my conclusion is that the actual BIOS settings must be stored elsewhere. I suspect that this is probably obvious to you guys.
The BIOS setting is stored in a Non-Volatile RAM, known as the CMOS chip. (actually it's better to call it NVRAM but most people call it the CMOS chip). This chip is battery backed, i.e. powered by battery. You can see the battery in the board in all likelihood ;-) (Its shape is round, IIRC it's a Li-Ion battery). The CMOS contents are accessed through I/O port 70h,71h, and in some chipset also through 72h and 73h.
Could someone please tell me if this is the usual setup (i.e. BIOS flash
- some other storage device for settings). If so, could someone also
point me at a likely interface/device/address range for this 'other' storage device. Is it likely to be a SPI flash or something?
I'm not sure if there is somekind of /dev/cmos in Linux. But IIRC, there is a project that working on such a thing. I just don't know where exactly it is.
Kind Regards,
Darmawan
On 27.11.2007 19:15, Darmawan Salihun wrote:
Alan Alexander wrote:
So, my conclusion is that the actual BIOS settings must be stored elsewhere. I suspect that this is probably obvious to you guys.
The BIOS setting is stored in a Non-Volatile RAM, known as the CMOS chip. (actually it's better to call it NVRAM but most people call it the CMOS chip). This chip is battery backed, i.e. powered by battery. You can see the battery in the board in all likelihood ;-) (Its shape is round, IIRC it's a Li-Ion battery). The CMOS contents are accessed through I/O port 70h,71h, and in some chipset also through 72h and 73h.
There are also BIOS flash chips which have an additional 4kB for parameter storage. This 4kB segment can NOT be accessed in the usual way. It also is not affected if you erase or write to the chip.
Regards, Carl-Daniel
* Carl-Daniel Hailfinger c-d.hailfinger.devel.2006@gmx.net [071127 19:29]:
There are also BIOS flash chips which have an additional 4kB for parameter storage. This 4kB segment can NOT be accessed in the usual way. It also is not affected if you erase or write to the chip.
Interesting. Have a part number or data sheet?
On 28.11.2007 09:47, Stefan Reinauer wrote:
- Carl-Daniel Hailfinger c-d.hailfinger.devel.2006@gmx.net [071127 19:29]:
There are also BIOS flash chips which have an additional 4kB for parameter storage. This 4kB segment can NOT be accessed in the usual way. It also is not affected if you erase or write to the chip.
Interesting. Have a part number or data sheet?
No, but a Google search: http://www.google.com/search?q=en4k+serial+flash
Regards, Carl-Daniel
i am finding an old cmos utility we use, will post it when i do
ron
On Wed, Nov 28, 2007 at 01:15:01AM +0700, Darmawan Salihun wrote:
I'm not sure if there is somekind of /dev/cmos in Linux. But IIRC, there is a project that working on such a thing. I just don't know where exactly it is.
I think lxbios has an option to dump the CMOS contents (which should also work if you're not booted with LinuxBIOS).
Uwe.
Uwe Hermann wrote:
On Wed, Nov 28, 2007 at 01:15:01AM +0700, Darmawan Salihun wrote:
I'm not sure if there is somekind of /dev/cmos in Linux. But IIRC, there is a project that working on such a thing. I just don't know where exactly it is.
/dev/nvram
dd if=/dev/nvram of=nvram.img bs=1 count=114
That rips a copy of the CS5536 nvram. /dev/nvram skips the actual clock registers. So the byte indexes don't exactly line up with the indexes you would use via port 0x70/0x71 IO. Something to note when lining it up with the docs.
Edit with a hex editor and flip the of= if= args to write.