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