Here is a guide for modifying DSDT for AMI bios. I gathered most information from Kabyl. The orginal plan was to create a nice pdf but I am unable to gather enough time to sit down and create one. So hopefully, this guide will do for now. Feel free to add other bios moding guide here.
WARNING!!! BAD MODIFICATION OF THE ROM FILE AND FLASHING BACK INTO YOUR BIOS CAN KILL YOUR MOTHERBOARD! TRY THIS AT YOUR OWN RISK! I AM NOT RESPOSIBLE FOR ANY DAMAGE!!!!!! IF YOU ARE UNSURE OF WHAT YOU ARE DOING, DO NOT TRY THIS!!
1. Download the AMI bios you wish to modify. It should have the .ROM extension.
2. Run the MMTOOL.EXE from the AMI_DSDT_TOOLS.zip
Click to view attachment3. Click "Load ROM" and choose your bios file.
4. We are now going to extract the DSDT from the ROM. Click on "Extract" tab. Then on the list box on the bottom half of the MMTOOL, select "1B" named "Single Link Arch BIOS".
5. Make sure "In uncompressed form" is selected. Enter a filename in the "Module File" textbox and then click on the "Extract" button (For example "SingleLink.dat")
6. Using WinHex and open up the file you extract ("SingleLink.dat"). We are going to look for the case sensitive string "DSDT". There should be two instance of this in the file. We are only interested in the second instance. So search for "DSDT" twice.
7. Right click on "D" of the "DSDT" and choose "Beginning of block".
8. From this position, search for the hex string 57 41 4B 68 2E (WAKh.)
9. Right click "h" of the "WAKh" and choose "End of block".
10. In the WinHex Menu, select the "Edit" drop down and move down to "Copy Block" then "Into New File" in the new choices. Enter a file name with the .aml extension (ex: mydsdt.aml).
11. Extract iasl.exe from AMI_DSDT_TOOLS.zip into the directory where you saved the .aml file. Open a command prompt and change to the directory where you saved the .aml file. use this command line to decompile the .aml file: "iasl.exe -d mydsdt.aml". "mydsdt.aml" is the .aml you saved earlier.
12. After running "iasl.exe -d mydsdt.aml", it should generate a file name "mydsdt.dsl".
13. Now here is where we start to remove the "Alias" in the dsdt. Use notepad and open the "mydsdt.dsl" you should see lines like:
CODE
Processor (P001, 0x01, 0x00000810, 0x06) {}
Alias (P001, CPU1)
Processor (P002, 0x02, 0x00000000, 0x00) {}
Alias (P002, CPU2)
Processor (P003, 0x03, 0x00000000, 0x00) {}
Alias (P003, CPU3)
Processor (P004, 0x04, 0x00000000, 0x00) {}
Alias (P004, CPU4)
We are going to remove any line that starts with "Alias". After it is removed, save the file.
14. Here is the part where if you have problems with your DSDT, you are going to have problems. There are number of resource on google that can help you debug the issue you will be having. Hopefully, you can don't have any issues. What I would usually do is google "dsdt" and the error message that iasl throws out. Kabyl might have hint on how to recompile the DSDT while ignoring the warnings and errors.
To compile your new mydsdt.dsl use the command line "iasl.exe mydsdt.dsl".
15. After running "iasl.exe mydsdt.dsl" it should produce a file named "DSDT.aml". We are now going to inject this file back into the .dat file we saved earlier ("SingleLink.dat"). In WinHex, open the "DSDT.aml" you compiled. Press "Control A" (Select all). On the lower right hand side of WinHex you should notice a hex representation of the size of the block you have selected (For example "Size: 5AC4"). Make note of this hex size.
16. What we are trying to do here is to insert the DSDT.aml into "SingleLink.dat" without changing the file size of "SingleLink.dat". Since the new DSDT (DSDT.aml) is smaller, we can just replace the DSDT and then pad the rest of the sectors with 00.
17. Go back to the "SingleLink.dat" and hopefully the DSDT block we copied into a new file is still there. If not, then repeat steps 7,8,9 again.
18. Left click on the "D" of the DSDT in the beginning of the block in "SingleLink.dat". In the WinHex "Edit" drop down on top, then select "Fill Block". We are going to "Fill with hex values" of "00".
19. You will see "00" filled block. Your current cursor position should still be where "D" was. Now on top of the WinHex windows, click on "Position" then choose "Goto offset". Select "current position" and put the hex size that you have made a note of in step 15 in "New position" text box. Click okay, and it will take you to the new offset position. Right click on the new position (blinking cursor) and select "End of block".
20. Go back to the beginning of the block where the "D" was before you filled it with 00 and left click on that position. In the WinHex menu on top click on "Edit" and select choose "Remove". You will get a popup box saying removing the current block will decrease the file. Click "yes" to continue
21. Now, goto your DSDT.aml file, select everything in this file by pressing "Control A". Then in the "Edit" menu in WinHex, choose "Copy Block" then click "Normally".
22. Go back to the "SingleLink.dat" file, your cursor should still be where the "D" was. In the WinHex menu on top, choose "Edit", then "Clipboard Data" then "Paste". A popup window will inform you that the data about to be pasted will increase the file size. Click Ok.
23. Goto the end of the block (should end with "WAKh") and make sure there is a hex character of 2E right after "WAKh". If there no 2E, then just modify the character right after "WAKh" to hex 2E.
24. Save the file and now we are ready to insert the file back into the .ROM
25. Go back into the MMTools and choose "Replace" tab. On the list box, chick on "1B | Single Link Arch BIOS". Next to the "Module file:" textbox, there should be a "Browse" button, find the modified "SingleLink.dat". Click on "Replace" button and you should be done.
26. Click on "Save ROM" button and save to a new ROM file. Flash this ROM into your BIOS.
Link to WinHex I found on Google:
WinHexThank you for the instructions. I've successfully modded the bios for my MSI p45 neo2 after reading it. Had to change a few things to make it work though.
Apparently the part to be extracted from the bios is not actually "1B : Single Link Arch BIOS" for me but "10 : ACPI AML". The extracted file is the full DSDT.aml which needed to patched so there's no need to select and copy blocks out of it. The rest is the same as per your instructions.