Page 1 of 1

CMOS on AMI BIOS

Posted: Mon Nov 12, 2007 8:29 pm
by gabirata
I'm developing a application to save and restore the content of the CMOS. Then I'm copying the 128 bytes to a file and later restoring it again. In other BIOSes it works fine, but with AMI I get the error "CMOS Configuration Wrong".

Anyone knows if the AMI has some check that depend on dynamic data?

Posted: Fri Nov 16, 2007 11:23 am
by superpyton
This is because new BIOSes (not only AMI but also latest version of AWARD 6.00 too) uses 256-bytes length CMOS. Use ports 0x72 and 0x73 (instead 0x70 and 0x71) to access all data in CMOS-memory.

CMOS on AMI BIOS

Posted: Mon Nov 19, 2007 6:36 pm
by gabirata
I should read the first 128 bytes using the ports 0x70 and 0x71 then using the ports 0x72 and 0x73 to read the next 128 bytes?
Or may I use the ports 0x72 and 0x73 to read the entire 256 bytes?

thanks by your attention!

Some othet oddities of AMI

Posted: Tue Nov 20, 2007 4:59 pm
by gabirata
Maybe the length would be a problem too. But, I think there is another error. Please take a look at the step I used to test the program:

1 - First, I run my program to save the CMOS to a file.
2 - Next, I reboot the machine and then I make some modifications to the CMOS using the Setup, including the boot sequence.
3 - Next, I run my program again to restore the CMOS from the file previously saved.
4 - Finally, when I reboot the machine I get the error "CMOS Configurations Wrong".

But when I look the Setup again, all configurations was restored, except the boot sequence. Then, I just change the boot sequence, save the Setup and everything works fine. Because this, I'm wondering that AMI has some check related to the boot sequence.

Other stuff: If I save the CMOS to a file and then restore it without make change in the Setup everything works fine. None worth was made, but this shows that the code would be OK. Only when I make changes I get the error.

Have someone any idea?

Thanks in advance!

Posted: Sat Nov 24, 2007 1:41 pm
by superpyton
You should read all data by ports 72h/73h.
Try this CMOS editor - i've use it on ASRock K8Upgrade-NF3 (AMI BIOS 8 ) and it works fine:
http://www.rebelshavenforum.com/sisubb/ ... 2;t=000086

CMOS On AMIBIOS

Posted: Wed Dec 12, 2007 4:13 pm
by gabirata
I had saved to the CMOS using the ports 72h/73h. I really can modify its configurations, but the error still remain. I see that all configuration was saved but the boot sequence, that always appear with the floppy disk in the first place. I think this is causing the message "CMOS Settings Wrong". The same code works fine in Award BIOSes but fail with the AMI BIOS.

Posted: Tue Dec 18, 2007 12:22 pm
by superpyton
Maybe CMOS is larger than 256 bytes on your motherboard? Try to read/write 384 or 512 bytes... Maybe this is the key...