logo
Kurashizu Blogwhere ideas flow
  • Home
  • News
  • Blog
  • About
  • Home
  • News
  • Blog
  • About

© 2026 Kurashizu. All rights reserved.

Admin·New Post·Service Status
Powered by Cloudflare·30.10.26
← Back to news

ReBarUEFI: Resizable BAR for almost any UEFI system

Original article
github.com|216 points|68 comments|by nateb2022|Sep 21, 2026

ReBarUEFI: Unlocking Resizable BAR for Nearly Any UEFI System

GitHub Actions ReBarDxe GitHub Actions ReBarState Downloads

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 NvStrapsReBar to 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 1GB1\text{GB}1GB (or sometimes 512MB512\text{MB}512MB). You may be able to push this to 2GB2\text{GB}2GB by lowering the TOLUD setting.

Installation Checklist

  • Follow the wiki guide for Adding FFS module.
  • Apply necessary firmware modifications.
  • Ensure 4G Decoding is Enabled.
  • Ensure CSM (Compatibility Support Module) is Disabled.
  • Execute ReBarState (available in Releases; Linux users should build via CMake).
  • Set the BAR size (Value 32 is 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 →\rightarrow→ Capability Check →\rightarrow→ NVRAM Variable Lookup →\rightarrow→ 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 TargetDescription
Size LimitsRemoval of 4GB4\text{GB}4GB, 16GB16\text{GB}16GB, and 64GB64\text{GB}64GB BAR limits.
Bit-DepthPrevents 64-bit BARs from being downgraded to 32-bit.
MMIO SpaceIncreases range to 512GB512\text{GB}512GB (39-bit39\text{-bit}39-bit) for Skylake/Kaby/Coffee Lake.
MMIO SpaceIncreases range to 512GB512\text{GB}512GB (39-bit39\text{-bit}39-bit) for Haswell/Broadwell.
MMIO SpaceIncreases range to 64GB64\text{GB}64GB (36-bit36\text{-bit}36-bit) for Sandy/Ivy Bridge.
NVRAMRemoves whitelist to fix ReBarState GetLastError: 5.
HardwareFixes 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.

Resizable BAR on LGA 2011-3 X99

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 ≈12%\approx 12\%≈12% using a 2GB2\text{GB}2GB 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 the amdgpu driver.
  • UEFITool/UEFIPatch: Developed by @NikolajSchlej.
  • QEMU/OVMF: Essential for testing the hooking mechanism.
  • Special thanks to @vit9696 (NVRAM patches) and @ZOXZX (X79 patches).