hn.today

ReBarUEFI: Resizable BAR for almost any UEFI system

github.com40 points12 comments
Screenshot of ReBarUEFI: Resizable BAR for almost any UEFI system

A UEFI DXE driver plus companion utility that enables Resizable BAR (ReBAR) on systems without official firmware support. The driver (ReBarDxe) is injected into the firmware's DXE volume and hooks the PciHostBridgeResourceAllocationProtocol PreprocessController function to detect and program GPU BAR capability from a ReBarState NVRAM variable during PCI enumeration. Installation requires adding the module to the firmware image (wiki covers adding an FFS module), enabling 4G decoding and disabling CSM in firmware, then running ReBarState (provided releases or built with CMake) to set the BAR size; “32” is recommended for unlimited BAR. Note: NVIDIA Turing cards use a different method (NVStrapsReBar).

Firmware-side limitations are addressed with UEFIPatchable fixes included: removal of 4GB/16GB/64GB BAR limits, prevention of downgrading 64-bit BARs to 32-bit, and MMIO range expansions for various Intel microarchitectures; additional patches remove NVRAM whitelists and fix USB3/Above-4G issues. BUILDFFS.PY builds the DXE driver inside an edk2 tree. Linux kernels with 4G decoding can resize without BIOS mods; Windows requires firmware changes. Incorrect BAR sizes can prevent booting and require CMOS clearing. Real-world testing reports up to 12% FPS gain on an i5-3470 with an RX 580 using a 2GB BAR.

Read on github.com12 comments on Hacker News

Summary generated by AI from the linked article. hn.today is not affiliated with Hacker News or Y Combinator.

More in Hardware

The daily digest

Today's best Hacker News stories, summarized and screenshotted, one email a day.