Page 1 of 1

AsRock BIOS MOD

Posted: Thu Nov 25, 2010 12:48 pm
by nico
Hi ,

i have a question:

i'm trying to mod the BIOS of an AsRock board.

The model is K7S41GX , bios version 2.80 , link to bios :

http://europe.asrock.com/downloadsite/b ... (2.80).zip

I'm able to succesfully replace/add modules using AMIBCP75. After modifying i checked the result file with an hex editor and all seems to be OK , modules checksums are OK.
There's only one thing i'm not sure it's ok, comparing the modded bios with the original one i can see in the hex editor that the first 4 bytes in the rom image are different. The original asrock bios has a 4 byte value that seems to be some sort of checksum , while in mod bios , generated with amibcp those bytes are set to 0xFF.

Can someone tell what's the exact meaning of those bytes ? Are thay some sort of checsum ? Are a vendor specific (ASROCK) checksum ?
I tryed all combinations for custom CRC and checksum algorithms but none of them produced the correct value .
I don't have a second board to recover bios if something goes wrong so i want to be 100% of what those bytes means .
Can they be a sort of checsum calculated at runtime then the bios is executed ?

Thanks .
Nico.

Re: AsRock BIOS MOD

Posted: Thu Nov 25, 2010 2:26 pm
by edwin
checksum is at the end of the file, not at the start. For sure AMIBCP being an AMI tool for AMI bios files, will not give you a corrupt bios.

Just always make sure you have a backup of your current bios and you know how to recover from a corrupt bios flash, just in case. This even applies to flashing manufacturer-made bioses.

Re: AsRock BIOS MOD

Posted: Thu Nov 25, 2010 3:01 pm
by nico
Hi,

first thanks for the reply.

I'm not sure if you downloaded and opened the bios file in an hex editor , but just in case you haven't , this is the start of the file :

0116DC6EFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF.....

then there's an empty section (filled with 0xFF) and then the bios modules .

The file ends with 0xFC 0x00 .

All versions of the bios (i checked 2.80, 2.50 and 2.30) ends with the same word value (0xFC00) , so don't think this could either be a CRC or checksum , since the files should be identicals or have the same byte sum (i thinks it's impossible for 3 different files).

If you use AMIBCP75 and try to extract a module , then replace the same exact module without modifications and save the bios , what you obtain is an exact copy of the original bios , minus the first 4 bytes , that are overwritten with 0xFF , so , insted of 0x11 0x16 0xDC 0x6e (for bios rev 2.80) the files starts with 0xFF 0xFF 0xFF 0xFF.
The rest of the file , inclusding file size is the same . Just this 4 bytes difference .

I tryed to calculate the CRC and checksum of the file minus those 4 bytes but none of the algo i used produced a correct value.

And for the bios recovery , for Asrock motherboards it's simply not possible (at least not for my model K7S41GX ) since AMIBOOT.ROM method has been disabled by AsRock , so if you flash a wrong bios file the only chance to recover are by using a eeprom programmer (that i don't have ) , or try to reflashing by hot-swap (very risky ).

NIco.

Re: AsRock BIOS MOD

Posted: Fri Nov 26, 2010 10:03 am
by nico
Hi again .

Last night i finally tried to flash the bios .
Is seems that the first 4 bytes in the image are simply not used . Maybe they are there for AsRock to identify a legit bios , but flashing with the bytes set to 0xFF didn't cause any problem.

Unfortunately now i have another problem , i was trying to change DMI data , but after modifying the DMI Data module , inserting into the bios , checking for the bios structure/checsums to be correct , i flashed the modded bios , but after reboot the DMI data structure hasm't changed.
I dumped the data with DMIScope and the old values were still there .
I think that asrock flash tool ASRFlash just didn't update all bios sections .

Can somebody tell me if there's a way to force all bios modules to be updated ?

I had some try with AMIFLASH but it says the chipset and flash rom type are not supported . Also ami flash for windows don't work .

Re: AsRock BIOS MOD

Posted: Fri Nov 26, 2010 3:50 pm
by edwin
What are you trying to achieve?

Oh and you are correct the normal bios tools do not work on Asrock bioses. They modified their version a bit. there's no recovery option.