Modding hidden Insyde BIOS options
This tutorial was originally posted by me as a Gist. It is modified from a tutorial I found on Reddit.
Warning: BIOS modding can be dangerous. You run the risk of bricking your device. I am not responsible for broken devices.
Note: I tested this procedure on my HP Pavilion 15 cs3065cl, running Insyde F.16 Rev.A
Finding variables
The first thing we need to do is find the variable we want to change.
Let’s clear up some terms we’re going to use.
Terminology
- Variable Store (varstore)
- a block of memory that contains the current values of variables Offset
- the offset within the varstore where the variable is located Possible Values
- these are the possible values that a variable can be set to
Note: In this guide, I’m going to specifically mention finding the variable to control “DVMT pre-allocation”. However, it’s a generic process, any you should be able to follow along by substituting “DVMT pre-alloc” with whatever variable you want to change.
Extracting information
We can extract all the information we need from the BIOS update provided on the manufacture’s website.
Extracting the .bin
file from the updater
Some manufactures package BIOS updates into self-contained executables. Luckily, most of them have an option to “extract BIOS update” into a file when you run it.
(Rewrite in progress)
Finding variable
We need to find the offset, varstore, and possible values for the DVMT pre-alloc.
Extracting BIOS
- Download the BIOS updater from your manufacture’s website.
- Run the updater. Look for an option to extract the update file.
- Extract the bin file.
Extracting config section
- Open your bin file in UEFITool.
- Search for the string “DVMT” in UEFITool.
- It should highlight a section named “Setup” or similar. (Or not, mine was named something else.)
- Right-click and extract it as a bin or sct file.
Extracting IFR text
- Using IFR Extractor, extract the bin or sct file to a txt file.
Finding variable
- Open the text file in an editor and search for “DVMT”.
- Look for the offset and the value corresponding to your desired option. Take the varstore id and go to the table in the beginning, looking up it’s name.
If you got the offset value, you can download RU.
You can find it here: http://ruexe.blogspot.com/
Don’t try to use the exe file, it’s for DOS, not Windows. What we need is the RU.efi file.
Now, follow these steps:
-
Grab an USB drive, 100 mb is enough but it needs to be empty.
- Format it as MBR, fat32. You can use Rufus on Windows, or Disk Utility on macOS.
Note: GPT works too but you’ll need an EFI partition on your drive for it.
-
You now have an empty USB drive. Create a folder called “EFI” and in that folder, create another folder called “BOOT”. In “BOOT”, paste RU.efi and rename it to bootx64.efi. The file tree should thus look like this:
On GPT, this would be in the hidden EFI folder, and then pasted in the (normally) already present BOOT folder. You can also temporarily use your OpenCore/Clover boot USB since those already have the EFI partition. Just replace the bootx64.efi with RU.efi and also rename it. After we’re done, you can place the old bootx64.efi back. This method is possible but I wouldn’t recommend it.
-
Make sure secure boot is disabled in your BIOS and boot to the USB drive. You’ll be greeted with a screen like this.
Just press enter. Now, we’ll go to a screen to edit UEFI variables. Press alt + =. You should get a screen like this.
Note: You can navigate in the tool by using the bar at the top. Press alt + First letter of a word in the bar to go to there. For example, by pressing alt + C, you’ll go to the “CONFIG” tab. Press f1 to know more about key shortcuts.
-
Now, search the list till you find “CPUSetup”.
Press enter.
-
If everything’s right, you should get a screen that looks like this.
Now, remember the value from the dortania guide? We’ll need that here. For example, my offset value is
0x3C
. Finding that value is easy. In my example,0030
is for the3
, and0C
is for theC
. In the upper left corner you should be able to comfirm it’s the right value. For me, it’s displayed as003C
.Note: if you can’t find your value, chances are it’s on a different page. You can scroll through the pages with ctrl + pg up/pg down
As you can see, the value set is
01
. Set that to whatever value you got from above, that corresponds with the desired DVMT value. Again,0x3C
is for my pc specific, yours will probably be different. So press enter, and just type it (numlock might be enabled, be aware of that). If everything goes right, that value should be highlighted now.Press again enter to finish the editing.
- Press ctrl + W to save. Press alt + Q to quit and turn the computer off. Done!
The DVMT value should be modifed now. Not sure how to verify it, other than trying to boot macOS and seeing if it works. Be aware that resetting your BIOS will also reset the DVMT configuration, and you will need to do this over again. So, it can be handy to write that value down somewhere. Also, note that this value may change with BIOS updates.
If something isn’t clear, leave a comment.
Sources:
Comments