ReBarUEFI: Resizable BAR for almost any UEFI system
ReBarUEFI: Unlocking Resizable BAR for Nearly Any UEFI System
ReBarUEFI is a specialized UEFI DXE driver designed to enable Resizable BAR (ReBar) on hardware that lacks official manufacturer support. This modification is critical for the optimal operation of Intel Arc GPUs and provides general performance enhancements for other compatible graphics cards.
[!IMPORTANT] If you are utilizing an NVIDIA Turing card (RTX 20-series or GTX 16-series), please refer to
NvStrapsReBarto enable this feature.
🛠️ Prerequisites & Setup
To get the most out of ReBar, your system must support 4G Decoding. If this option is missing from your BIOS, check the wiki for "Enabling hidden 4G decoding."
Memory Constraints: Without 4G Decoding, you are typically restricted to a BAR size of (or sometimes ). You may be able to push this to by lowering the TOLUD setting.
Installation Checklist
- Follow the wiki guide for Adding FFS module.
- Apply necessary firmware modifications.
- Ensure
4G Decodingis Enabled. - Ensure
CSM(Compatibility Support Module) is Disabled. - Execute
ReBarState(available in Releases; Linux users should build via CMake). - Set the BAR size (Value
32is typically used for unlimited).
⚙️ How It Works: The Technical Logic
The driver operates by inserting a module into the UEFI firmware's DXE volume, ensuring it runs during every boot sequence.
The ReBarDxe module performs a "hook" on the PciHostBridgeResourceAllocationProtocol. Specifically, it replaces the PreprocessController function.
The logic can be summarized as:
Original PreprocessController Capability Check NVRAM Variable Lookup Allocation.
🩹 UEFI Patching & Fixes
Many older UEFI firmwares struggle with 64-bit BARs. To resolve this, UEFIPatch can be used to apply specific fixes.
| Patch Target | Description |
|---|---|
| Size Limits | Removal of , , and BAR limits. |
| Bit-Depth | Prevents 64-bit BARs from being downgraded to 32-bit. |
| MMIO Space | Increases range to () for Skylake/Kaby/Coffee Lake. |
| MMIO Space | Increases range to () for Haswell/Broadwell. |
| MMIO Space | Increases range to () for Sandy/Ivy Bridge. |
| NVRAM | Removes whitelist to fix ReBarState GetLastError: 5. |
| Hardware | Fixes USB 3 ports in BIOS (Ivy/Haswell/Broadwell) & X79 Above 4G. |
Note: Ensure that "pad files" remain unchanged during patching; otherwise, apply the designated workaround.
💻 Build & Compatibility
Building the Driver
To compile the DXE driver, clone the repository into an edk2 environment and run:
python buildffs.py
System Support
It was previously believed that PCIe Gen2 systems were incompatible, but successful implementation has been confirmed on systems as old as the i5 2500k.

OS-Specific Implementation
- Linux: You can achieve ReBar without BIOS mods if 4G Decoding is on. Recent kernels handle this automatically. If 4G Decoding is missing or DSDT is broken, use the Arch Wiki guide for DSDT patching and boot with the kernel flag
pci=realloc. - Windows: Currently, BIOS modification is mandatory.
❓ FAQ & Troubleshooting
Q: I set an unsupported BAR size and now my system won't boot!
Solution: Clear your CMOS. In some stubborn cases, you may need to physically remove the CMOS battery to reset the settings and disable Resizable BAR.
Q: Does a sub-optimal BAR size still help?
Yes. For example, a system with an i5 3470 and Sapphire Nitro+ RX 580 8GB saw an FPS increase of up to using a BAR.
🤝 Credits & Acknowledgments
Contributors: @dsanke, @cursemex, @dripsnek, @val3nt33n, @Mak3rde, and @romulus2k4.
Tools & Frameworks:
EDK2: The foundation for OEM UEFI.Ghidra: Used for reverse engineering and patching modules.Linux Kernel: Specifically theamdgpudriver.UEFITool/UEFIPatch: Developed by@NikolajSchlej.QEMU/OVMF: Essential for testing the hooking mechanism.- Special thanks to
@vit9696(NVRAM patches) and@ZOXZX(X79 patches).