xCuri0/ReBarUEFI

▲ 94 stars today★ 2,503⑂ 116

Resizable BAR for (almost) any UEFI system

About xCuri0/ReBarUEFI

xCuri0/ReBarUEFI is an open-source project on GitHub, mainly written in C. Resizable BAR for (almost) any UEFI system It currently holds 2,503 stars and 116 forks with 60 open issues, and was last pushed on 2025-12-01 (repository created 2022-07-12).

Project Overview

Git Homed tracks it on the Today's Trending board, currently at rank #43 with 94 new stars today.

GitHub Repository Details

Repository xCuri0/ReBarUEFI · default branch master · size 936 KB · watchers 34 · source: GitHub REST API and repository README

README

ReBarUEFI

https://github.com/xCuri0/ReBarUEFI/blob/HEAD/GitHub Actions ReBarDxe https://github.com/xCuri0/ReBarUEFI/blob/HEAD/GitHub Actions ReBarState https://github.com/xCuri0/ReBarUEFI/blob/HEAD/Downloads

A UEFI DXE driver to enable Resizable BAR on systems which don't support it officially. This provides performance benefits and is even required for Intel Arc GPUs to function optimally.

screenshot showing cpu-z, gpu-z and amd software

If using an NVIDIA Turing GPU (20 or 16 series) see NvStrapsReBar for enabling Resizable BAR on it.

Requirements

Usage

Follow the wiki guide Adding FFS module and continue through the steps. It covers adding the module and the additional modifications needed if required.

Once running the modified firmware make sure that 4G decoding is enabled and CSM is off.

Next run ReBarState which can be found in Releases (if you're on Linux build with CMake) and set the Resizable BAR size. In most cases you should be able to use ``32` (unlimited) without issues but you might need to use a smaller BAR size if `32`` doesn't work

If Resizable BAR works for you reply to List of working motherboards so I can add it to the list. Most firmware will accept unsigned/patched modules with Secure Boot on so you won't have any problems running certain games.

If you have any issues after enabling Resizable BAR see Common Issues (and fixes))

How it works

The module is added to the UEFI firmware's DXE volume so it gets executed on every boot. The ReBarDxe module replaces the function ``PreprocessController` of `PciHostBridgeResourceAllocationProtocol` with a function that checks for Resizable BAR capability and then sets it to the size from the `ReBarState`` NVRAM variable after running the original function.

The new ``PreprocessController` function later gets called during PCI enumeration by the `PciBus`` module which will detect the new BAR size and allocate it accordingly.

AliExpress X99 Tutorial by Miyconst

[Resizable BAR on LGA 2011-3 X99](http://www.youtube.com/watch?v=vcJDWMpxpjEE "Resizable BAR on LGA 2011-3 X99")

Instructions for applying UEFIPatch not included as it isn't required for these X99 motherboards. You can follow them below.

UEFI Patching

Most UEFI firmwares have problems handling 64-bit BARs so several patches were created to fix these issues. You can use UEFIPatch to apply these patches located in the UEFIPatch folder. See wiki page Using UEFIPatch for more information on using UEFIPatch. Make sure to check that pad files aren't changed and if they are use the workaround

Working patches

Build

Use the provided buildffs.py script after cloning inside an edk2 tree to build the DXE driver. ReBarState can be built on Windows or Linux using CMake. See wiki page Building for more information.

FAQ

Will it work on a PCIe Gen2 system ?

Previously it was thought that it won't work on PCIe Gen2 systems but one user had it work with an i5 2500k.

Can I use Resizable BAR on my system without modifying BIOS ?

You can use Linux with 4G Decoding on, recent versions will automatically resize and allocate GPU BARs. If your BIOS doesn't have the 4G decoding option (make sure to check hidden) or DSDT is faulty you can then follow the Arch wiki guide for DSDT modification using modifications from DSDT Patching and boot with
pci=realloc``` in your kernel command line. Currently there is no known method to get it on Windows without BIOS modification

I set an unsupported BAR size and my system won't boot

Clear CMOS and Resizable BAR should be disabled. In some cases it may be necessary to remove the CMOS battery for Resizable BAR to disable.

Will less than optimal BAR sizes still give a performance increase ?

On my system with an i5 3470 and Sapphire Nitro+ RX 580 8GB with Resizable BAR enabled in driver#how-do-i-enable-resizable-bar-on-unsupported-amd-gpus-) I get an upto 12% FPS increase with 2GB BAR size.

Credit

GitHub Stars & Activity

2,503Stars
116Forks
60Open issues
CLanguage

GitHub Popularity

GitHub stars2,503
Forks116
Open issues60
Primary languageC
LicenseMIT
Stars gained today94
Created2022-07-12
Last pushed2025-12-01

Trending History

Daily boardrank #43 · ▲ 94 stars

Related GitHub Projects

1

DeusData / codebase-memory-mcp

C★ 44,480⑂ 3,631▲ 266 stars
2

obra / superpowers

Shell★ 290,622⑂ 26,005▲ 485 stars
3

mattpocock / skills

Shell★ 268,429⑂ 22,633▲ 719 stars
4

f / prompts.chat

HTML★ 171,111⑂ 21,982▲ 131 stars
5

clash-verge-rev / clash-verge-rev

Rust★ 146,827⑂ 10,544▲ 395 stars
6

Comfy-Org / ComfyUI

Python★ 134,710⑂ 15,949▲ 203 stars
7

nodejs / node

JavaScript★ 122,051⑂ 37,548▲ 33 stars
8

microsoft / generative-ai-for-beginners

Jupyter Notebook★ 120,376⑂ 63,363▲ 92 stars

More Trending Repositories