After flashing that BIOS. I recommend you compile the tool RebarState from source code ReBarState.cpp · GitHub because it’s most likely going to set off antivirus warnings since it writes to UEFI variables. If you don’t want to compile it you can find it in the ZIP below.
Start by setting it to 9 and reboot. Keep increasing it by 1 until either you get Resizable BAR full size (16GB for you) or you get black screen/POST error (this means PciHostBridge needs patching).
Always make sure 4G decoding is enabled if RebarState is set or you will get black screen
If you get black screen/POST error you can fix it by booting without GPU inserted and setting RebarState to 0. Or restore the previous BIOS through flashing or swapping chip.
@prazola
Using Visual Studio ? I don’t get any errors building it on Visual Studio 2022. SetFirmwareEnvironmentVariableEx is included in the Windows.h header
If you want for safety i can mod your modded bios with default option above 4g to always enabled.
because if you reset the bios the setup_var will be changed and you will take black screen or i am wrong?
No, I think Kuri0’s BIOS is already defaulting on 4G enabled. Thak you anyway!
The cherry on top would be the BIOS submenu, so I could switch the setting to test the performance impact.
And maybe it’s possible to hardcode the 8GB BAR into the BIOS?
i believe that the setup var will change when you reset the bios. Lets wait @Kuri0 .
If that the case i can unlock the submenu and change above 4g to default to enabled.
This is nice.
Another thing is that this motherboard has code that if has csm disabled and don’t found a monitor it enable csm automatically. This may skrew the modification. I search for this a long time and i didn’t find a solution.
so this fix @Kuri0 did is hard coding the thing in the bios? so u flashed that BIOS and it worked 8gb? oh and also, what happens if u disable it, say from all stock with 4G decode disabled will it still work?
im kinda curious if all u need is just to toggle the 4G Decode option (cause it’s alrd coded in the bios the rebar thing) to make it enable the rebar
the best SAFE option would be fixed dsdt in bios and default csm to enabled and above 4g to disabled.
So if you reset the bios you can enable it by disabling csm and enabling above 4g decoding manually.
oh so the 8gb was added? i was curious of the changes he has done, if you could take the time maybe compare the stock bios vs the final modded bios? and say what changes he did and which to change/replace?
It’s all in the thread, Kuri0’s BIOS has 4G deconding enabled, DSDT hard corded and REBAR DXE driver.
You set the BAR size via windows CLI with ReBarState.
@prazola Looks like the limit in PciHostBridge needs modification for 16GB BAR to work. A screenshot of Device Manager → Resource by Type → Memory (not Large Memory) showing the last items would be helpful. And also a screenshot of Large Memory (with the 8GB BAR)
For anyone with assembly experience here’s the part of PciHostBridge which I think is relevant to patching (in Ghidra). The first 2 lines are for reading the TOUUD afaik.