ReBarUEFI README

The project's README from github.com/xCuri0/ReBarUEFI. As one markdown file: README.md.

ReBarUEFI

GitHub Actions ReBarDxe GitHub Actions ReBarState 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

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 I get an upto 12% FPS increase with 2GB BAR size.

Credit

ReBarUEFI (xCuri0/ReBarUEFI)

Searching Database…

这是干什么的?ReBarUEFI 是一个 UEFI DXE 驱动,可以在固件官方不支持 Resizable BAR 的系统上启用它——这是免费的性能提升,在游戏中尤其明显。
那我是要在 Windows 里安装它,还是它是 BIOS 本身的一部分?它存在于你的 UEFI 固件里:模块被添加到 DXE 卷中,每次开机都会运行。然后由一个小的配套工具 ReBarState(可在 Windows 或 Linux 上构建)通过一个 NVRAM 变量来设置 BAR 大小。
我怎么把它装到我的电脑上?按照 wiki 指南 Adding FFS module 把驱动注入到你的固件中,确认 4G decoding 已开启、CSM 已关闭,然后运行 Releases 里的 ReBarState(或者用 CMake 自己编译)来设置 BAR 大小。
我的硬件需要满足什么特殊条件才能用?需要开启 4G Decoding——不开的话 BAR 最大只有 1GB(有时是 512MB)。BIOS 对 Large BAR 的支持也有帮助,不过 UEFIPatch 补丁可以解决大部分这方面的问题。
如果我选了一个系统承受不了的 BAR 大小会怎样?系统将无法启动。清除 CMOS 后 Resizable BAR 会被禁用——遇到顽固的情况,你可能得物理取下 CMOS 电池才能重置。
能不能完全不刷改版 BIOS 就用上 Resizable BAR?在 Linux 上,只要 4G Decoding 开启,较新版本会自动调整并分配 GPU 的 BAR。在 Windows 上目前除了改 BIOS 之外没有已知的方法。
这到底能多多少帧?作者实测在 i5-3470 配 Sapphire Nitro+ RX 580 8GB 上使用 2GB BAR 时,帧数最多提高了 12%,而且就算 BAR 大小不太理想,帧数也仍有提升。
我的是 NVIDIA Turing 显卡——对我也有用吗?光靠这个驱动不行:对于 Turing 架构的 GPU(RTX 20 / GTX 16 系列),作者指向另一个项目 NvStrapsReBar,用它来在这些显卡上启用 Resizable BAR。
我的电脑很老——PCIe Gen2 的主板上有希望用吗?出人意料的是可以:之前大家认为不可能,但有一位用户在 i5-2500k 的系统上成功用上了。UEFIPatch 补丁还覆盖了从 Sandy Bridge 到 Coffee Lake 的 MMIO 限制。
Secure Boot 会不会拦截打过补丁的固件?通常不会——大多数固件在 Secure Boot 开启时也接受未签名或打过补丁的模块,所以你运行某些游戏时不会遇到问题。
Creator
xCuri0
Size
0.9 MB
Stars
2.6K
Age
4y
Commits · 90 Days