ReBarUEFI
ReBarUEFI copied to clipboard
Boots into windows but unable to access bios with ReBAR at or greater than 4gb
- Motherboard: Gigabyte z170x-Gaming 7 rev. 1.0
- BIOS Version: F22m
- GPU: Radeon RX6800
Easily managed to set it up and get it running. After some quick testing I found out that...
1gb = According to Radeon drivers (ver22.10.2) and GPU-Z, ReBAR gets enabled, works as expected. 2gb = Halts on bootlogo, unable to enter bios. Need to reset bios. 4gb+ = Boots into Windows but unable to see bootlogo during boot and unable to enter bios, trying to enter bios using the Windows troubleshooting menu also fails. (tested up to 16gb with the same behavior)
Did some benchmarks on 4gb and 16gb to test for system instability, all seemed fine except that I was unable to see the bootlogo on boot or access the bios which can be confusing because during the whole booting process it does seem like the computer has failed to post.
CSM is off right ? Don't believe what GPU-Z says about CSM or 4G decode because it's often wrong
Yes, verified that CSM is off and 4G decode is enabled.
I do get a performance boost when its set to 4gb+, its just that I'm unable to enter the bios and the screens stay off during boot until windows logon screen shows.
Just noticed on your winraid forum post that someone else is having a similar problem with the same board, just diff gpu.
@SqueakyAlex yeah the bios probably needs patching. I had to patch my bios (gigabyte b75m-d3h) to get BARs over 2GB to work. But I haven't made a patch to fix this issue since I don't have it.
Can you send a screenshot of Device Manager resources tab for your GPU when using 1GB BAR ?
1GB Bar
Some unrequested extras
4GB Bar
16GB Bar
Had not noticed before, high definition audio bus gets disabled when using 4GB+ bar.
@SqueakyAlex the issue of High Definition Audio Bus not having enough resources can be fixed by patching the PciHostBridge module's call to AddMemorySpace to increase the size it uses (and DSDT QWordMemory too if needed).
EDIT: This isn't the case, AddMemorySpace adds a 64GB region which is more than enough

Assuming your patches would not work for Skylake, I spent a few hours checking pcihostbrige on ghidra and came to the conclusion that I don’t know what I’m looking for and that I know nothing about assembly.
Eventually I did try your patches and as expected the result was "No patches can be applied to input file"
I did manage to extract my DSDT and found this
CreateDWordField (BUF0, \_SB.PCI0._Y0E._MIN, M1MN) // _MIN: Minimum Base Address
CreateDWordField (BUF0, \_SB.PCI0._Y0E._MAX, M1MX) // _MAX: Maximum Base Address
CreateDWordField (BUF0, \_SB.PCI0._Y0E._LEN, M1LN) // _LEN: Length
Store (M32L, M1LN) /* \_SB_.PCI0._CRS.M1LN */
Store (M32B, M1MN) /* \_SB_.PCI0._CRS.M1MN */
Subtract (Add (M1MN, M1LN), One, M1MX) /* \_SB_.PCI0._CRS.M1MX */
If (LGreaterEqual (OSYS, 0x07D6))
{
If (LEqual (M64L, Zero))
{
CreateQWordField (BUF0, \_SB.PCI0._Y0F._LEN, MSLN) // _LEN: Length
Store (Zero, MSLN) /* \_SB_.PCI0._CRS.MSLN */
}
Else
{
CreateQWordField (BUF0, \_SB.PCI0._Y0F._LEN, M2LN) // _LEN: Length
CreateQWordField (BUF0, \_SB.PCI0._Y0F._MIN, M2MN) // _MIN: Minimum Base Address
CreateQWordField (BUF0, \_SB.PCI0._Y0F._MAX, M2MX) // _MAX: Maximum Base Address
Store (M64L, M2LN) /* \_SB_.PCI0._CRS.M2LN */
Store (M64B, M2MN) /* \_SB_.PCI0._CRS.M2MN */
Subtract (Add (M2MN, M2LN), One, M2MX) /* \_SB_.PCI0._CRS.M2MX */
}
}
@SqueakyAlex Just send a screenshot of Device Manager showing Resources By Type Large Memory it will show how much the space the DSDT gives.
The only patches I developed are for Ivy Bridge systems and maybe a few Haswell ones which is why it finds nothing to patch. I hope that more patches are contributed in the future because I can't test hardware that I don't have.
If I didnt mess up, thats about 64GB?
Hi, Looks, like I'm having the same issue on X99 platform, maybe there is something, that could be helpful.
- CPU: Intel Xeon E5-2697 v3 2.6GHz
- Motherboard: ASRock X99 Extreme4
- BIOS Version: 3.60 (with Turbo Unlock mod)
- GPU: AMD Radeon RX 6700 XT 12GB
Behaviour is the same as in this thread after applying ReBAR patch: up to 1024M (2^10) - ReBAR seems to be working as intended 2048M (2^11) - system doesn't post at all, speaker gives 8 beeps (AFAIK it indicates GPU error). CMOS reset needed. 4096M (2^12) and above - unable to enter BIOS, no Post Screen, speaker gives 5 beeps, PC boots directly into Windows and ReBAR seems to be working. AMD HD Audio is broken (error code: 12). Performance has increased a bit.

CSM disabled, 4G decode enabled.
If there is anything useful, that I could provide to resolve the issue, tell me. Thanks for your work!
If anyone wants to try and develop patches to fix it you can search for "ffffffff000" in the PciBus module on your disassembler to find the code that reads the BAR size and categorizes them as 32-bit (4/5) or 64-bit (6/7).
My High Definition Audio Bus got disabled too

Not sure what to do as I am new to bios modding
Try booting Linux with 4GB+ BAR and seeing what dmesg says.
Try booting Linux with 4GB+ BAR and seeing what dmesg says.
Unrelated to your ReBarUEFI, but while testing different Above 4G settings to do comparisons on PCIe Root Port default allocations between AMI BIOS and Coreboot to track a bug, I discovered that recent amdgpu versions can enable Above 4G Decoding and ReBAR completely OS side even if they're disabled on Firmware: https://github.com/Dasharo/dasharo-issues/issues/245 This means than with AMD cards is a hit-or-miss to check Linux unless you're paying attention to original allocations before amdgpu forces a PCI MMIO reconfiguration. Or maybe if amdgpu has a parameter to disable this default behavior and obey Firmware resource allocation.
One Asrock X99 Taichi user on win-raid found this out

So try disabling the option Above 4G Decoding Patch using the IFR method if it's hidden
can anyone tell me how to disable Above 4g Decoding Patch? what line should i edit and what?
i extracted body from my bios where search find 4g decoding but im unable to find any string related to above 4g decoding patch. is that mean i cant disable 4g Decoding patch or ?
@Dadovvv please read wiki common issues and fixes. if you can't find the string then the setting doesn't exist
One Asrock X99 Taichi user on win-raid found this out
So try disabling the option Above 4G Decoding Patch using the IFR method if it's hidden
This works only for mobos that don't have native Above 4G Decoding option or i should try this even if i have the switch in my mobo?
Disabling Above 4G Decoding option in GA-Z170m-D3H bios while ReBarState is on leads me to B1InitializeLirary failed 0xc00000bb code on a distorted and freezed BIOS splash screen (first seconds screen is normal and i can enter bios but the OS won't load further).
Hi, I have a H110M-R which has a LGA1151 socket. For me, display blacks out mid way through the booting process (it's past the boot screen with del for bios and then past the asus logo with win11 spin). My CPU does has an iGPU but the problem is I didn't build this PC myself and the motherboard IO shield has something physically blocking the port from being used. Is there anyway around this or do I have to remove the motherboard from the case and remove the blocker? I'm not sure if this is relevant but the mouse and keyboard are still receiving power and it shuts down normally upon pressing the power button on the case.
Strangely, after writing this comment it works? It's booted to windows normally and display and sound work fine through HDMI. I will add to working motherboards in a sec.
FWIW I had found out that when I'm just using the igp of my i5-9600K (on a Z390 GAMING X with F10i bios) I'm getting a black screen with aperture sizes higher than 1024MB.
One Asrock X99 Taichi user on win-raid found this out一位 ASRock X99 Taichi 用户在 win-raid 上发现了这一点
So try disabling the option Above 4G Decoding Patch using the IFR method if it's hidden因此,如果该选项被隐藏了,尝试使用 IFR 方法禁用“大于 4G 解码补丁”选项
I have the same case, I can not boot into bios when rebar unlimited . There is an option Above 4G Decoding on my bios。
“Try disable the option”, Did I see it wrong? @xCuri0
GPU: RX6950 xt Motherboard: EPC621D8A
I believe this issue is more severe on Intel GPUs, as referenced in #66 and corroborated by my own testing.
System Specifications:
- Motherboard: Gigabyte Z170x-Gaming 3 (rev. 1.0)
- BIOS Version: Modified 22j with Coffee Lake support
- GPU: Intel Arc A770
I’ve ensured that:
- CSM support is disabled.
- Above 4G Decoding is enabled.
Steps Taken:
-
I followed the BIOS modification instructions from the wiki and successfully enabled ReBar at 1GB.
-
GPU-Z correctly reports that ReBar is enabled at 1GB.
-
Despite this, Intel’s driver still shows ReBar support as disabled.
-
In Device Manager, ReBar at 1GB shows correctly, but when I try settings of 4GB or higher, the GPU stops working. I lose display output, but the system still boots fine into Windows, and I have to use the iGPU to access the system. In Device Manager, the Arc A770 shows error code 12: “This device cannot find enough free resources...”.
Device manager at 1GB:
4GB or higher:
-
I’ve attempted:
- Reinstalling drivers
- Disabling iGPU
- Connecting both iGPU and GPU at the same time
- Nothing has worked.
I also experimented with a 2GB ReBar size for fun, and as expected, it failed:
Intel Arc GPUs need ReBar enabled to be fully functional, so this issue is really a bummer. Maybe consider adding Intel GPU not working to the Common Issues list under the LGA1151 various issues for now. I really want to fix this and if there's anything else I can provide please let me know!
Edit: Searching through the issue again I came across this reply by the owner: https://github.com/xCuri0/ReBarUEFI/issues/11#issuecomment-2253718768 So apparently 64GB of ram is not working with 16GB A770.
Edit Edit: Just checked that 32GB RAM(16GB x2) is not working on my PC too. Single 16GB RAM is also not working.
Edit Edit Edit: I was able to find a Sapphire RX580 Nitro+ and use that to test since @xCuri0 used this card. I was then able to confirmed that ReBar indeed works just not with A770. I even have HD Audio working:
I quickly patch the registry and enabled ReBar in driver without issue:
So it seems that there really is a compatible issue with Intel GPUs on Gigabyte LGA 1151 platforms.