ReBarUEFI: Resizable BAR for almost any UEFI system
Recorded: Sept. 22, 2026, 11:10 p.m.
| Original | Summarized |
GitHub - xCuri0/ReBarUEFI: Resizable BAR for (almost) any UEFI system · GitHub Skip to content Navigation MenuSign inAppearance settingsPlatformAI CODE CREATIONGitHub CopilotWrite better code with AIGitHub Copilot appDirect agents from issue to mergeMCP RegistryIntegrate external toolsDEVELOPER WORKFLOWSActionsAutomate any workflowCodespacesInstant dev environmentsIssuesPlan and track workCode ReviewManage code changesCode QualityEnforce quality at mergeAPPLICATION SECURITYGitHub Advanced SecurityFind and fix vulnerabilitiesCode securitySecure your code as you buildSecret protectionStop leaks before they startEXPLOREWhy GitHubDocumentationBlogChangelogMarketplaceView all featuresSolutionsBY COMPANY SIZEEnterprisesSmall and medium teamsStartupsNonprofitsBY USE CASEApp ModernizationDevSecOpsDevOpsCI/CDView all use casesBY INDUSTRYHealthcareFinancial servicesManufacturingGovernmentView all industriesView all solutionsResourcesEXPLORE BY TOPICAISoftware DevelopmentDevOpsSecurityView all topicsEXPLORE BY TYPECustomer storiesEvents & webinarsEbooks & reportsBusiness insightsGitHub SkillsSUPPORT & SERVICESDocumentationCustomer supportCommunity forumTrust centerPartnersView all resourcesOpen SourceCOMMUNITYGitHub SponsorsFund open source developersPROGRAMSSecurity LabMaintainer CommunityGitHub StarsArchive ProgramREPOSITORIESTopicsTrendingCollectionsEnterpriseENTERPRISE SOLUTIONSEnterprise platformAI-powered developer platformAVAILABLE ADD-ONSGitHub Advanced SecurityEnterprise-grade security featuresCopilot for BusinessEnterprise-grade AI featuresPremium SupportEnterprise-grade 24/7 supportPricingSearch/Sign inSign upAppearance settings You signed in with another tab or window. Reload to refresh your session. Dismiss alert xCuri0 ReBarUEFI Public
Notifications
Fork
Star Code Issues Pull requests Discussions Actions Projects Wiki Security and quality Insights
Additional navigation options
Code Issues Pull requests Discussions Actions Projects Wiki Security and quality Insights
masterBranchesTagsGo to fileCodeOpen more actions menuLatest commit History113 Commits113 CommitsFolders and filesNameNameLast commit messageLast commit date.github.github ReBarDxeReBarDxe ReBarStateReBarState UEFIPatchUEFIPatch toolstools .gitignore.gitignore LICENSELICENSE README.mdREADME.md rebar.pngrebar.png View all filesRepository files navigationREADMEMIT licenseMore itemsReBarUEFI 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. If using an NVIDIA Turing GPU (20 or 16 series) see NvStrapsReBar for enabling Resizable BAR on it. (optional) 4G Decoding enabled. See wiki page Enabling hidden 4G decoding if you can't find an option for it. Without 4G Decoding you will be limited to 1GB BAR and in some cases 512MB you can try to increase this upto 2GB by reducing TOLUD Usage Instructions for applying UEFIPatch not included as it isn't required for these X99 motherboards. You can follow them below. <4GB BAR size limit removal Build @dsanke, @cursemex, @dripsnek, @val3nt33n, @Mak3rde and @romulus2k4 for testing/helping develop patches The Linux kernel especially the amdgpu driver EDK2 for the base that all OEM UEFI follows Ghidra which was used to patch UEFI modules to workaround artificial limitations @vit9696 for the NVRAM whitelist patches @ZOXZX for helping with the X79 Above 4G patches @NikolajSchlej for developing UEFITool/UEFIPatch QEMU/OVMF made testing hooking way easier although it didn't have any resizable BAR devices so the only way I could test it was on my actual PC. AboutResizable BAR for (almost) any UEFI systemTopicsdxe-driveredk2efiuefiResourcesReadmeMIT licenseActivityStars2.4k starsWatchers34 watchingForks113 forksReport repositoryReleasesPackagesUsed byContributorsLanguages Footer © 2026 GitHub, Inc. Footer navigation Terms Privacy Security Status Community Docs Contact Manage cookies Do not share my personal information You can’t perform that action at this time. |
The project details a UEFI DXE driver designed to enable Resizable BAR functionality on systems that do not officially support it, aiming to provide performance improvements and optimal operation for Intel Arc GPUs. To achieve this, the system relies on several prerequisites, including optional 4G Decoding and BIOS support for Large BARs, though patches exist to address many associated issues. The implementation involves integrating a module into the UEFI firmware's DXE volume. Specifically, the ReBarDxe module replaces the PreprocessController function within PciHostBridgeResourceAllocationProtocol. This modification allows the driver to inspect the system's Resizable BAR capability and subsequently set the BAR size based on a value retrieved from the ReBarState NVRAM variable after executing the original function. This newly modified PreprocessController function is then called by the PciBus module during PCI enumeration, enabling it to detect the modified BAR size and allocate the necessary resources accordingly. The enabling of Resizable BAR often requires firmware modifications, particularly patches, to resolve limitations inherent in many UEFI firmwares regarding 64-bit BARs and Memory Mapped Input/Output (MMIO) space allocation across various CPU architectures. Several patches have been created to address these limitations for different generations, including removals of BAR size limits for 4GB, 16GB, and 64GB, as well as fixes for preventing 64-bit BARs from being downgraded to 32-bit. Furthermore, patches address MMIO space increases for specific ranges, such as moving from 8-16GB to full utilization of the 512GB/39-bit range for Haswell/Broadwell systems, and specific DSDT modifications required for Sandy/Ivy Bridge systems. Other necessary fixes include resolving issues with USB 3 ports when 4G Decoding is enabled and ensuring the X79 Above 4G Decoding fix. The process of building this driver necessitates specific tools and workflows. The build process involves utilizing a script, such as ffs.py, within an edk2 tree to construct the DXE driver, and the ReBarState variable can be built using CMake, applicable on both Windows and Linux platforms. For comprehensive UEFI patching, tools like UEFIPatch are utilized to apply various fixes, often requiring careful attention to padding files and potential workarounds. The project leverages tools such as EDK2 for the base, Ghidra for patching UEFI modules, and QEMU/OVMF for testing, which facilitates testing the driver in controlled environments. In terms of usage, users following the implementation must ensure that 4G decoding is enabled and that CSM is disabled when running the modified firmware. After running ReBarState, the user can set the desired Resizable BAR size; generally, a size of 32 allows for unlimited BAR allocation, although smaller sizes might be necessary depending on the specific hardware configuration. The project emphasizes that the Linux kernel, particularly the amdgpu driver, is a key component, and alternative methods exist to manage BAR allocation, such as using Linux 4G Decoding and DSDT modification, particularly when BIOS modification is not feasible. Troubleshooting involves clearing the CMOS, and performance is demonstrated through usage metrics, with some users reporting FPS increases, such as up to 12 percent, when utilizing a 2GB BAR size on specific hardware configurations. |