Can Resizable BAR Support be ported to older Intel Chipsets?

@mooms Yep, you sure can → 9900K on Z170

I’m running a QQLS (9900K equivalent) on my Z170 Pro Gaming, with a RTX 3070, so resizable Bar would be great

Hello guys, when I was experimenting with a CoffeeMod BIOS on my Asrock Z170G K4, I erroneously flashed a BIOS from the similar Asrock board (B360 or something like this), strangely the PC booted and I noticed a few interesting things:
- Native Z170G K4 BIOS is laggy and has a tendency to hang from time to time in random places, being it the HW monitoring or any other tab, not even related to overclocking - while B360 one works smoothly and much faster than the original;
- There was a setting non-existing in native BIOS - not yet a ReBAR but some prerequisite to it, unfortunately don’t recall the name. Given the fact it works with my mobo, it should be somehow possible to extract and embed it into the older Z170 generation of motherboards. I see that most manufacturers started to add such settings to their Z370 series (Asus, Gigabyte, some other) so apparently when Asrock manages to deploy their Z370 BIOSes, it would worth giving it a try, especially if one’s mobo has dual BIOS so you can safely play with it not ruining the functioning system.

Interesting.

Was the BIOS fully functional?
Did the card boot Windows?

Now I’m wondering if I can boot my Z170 with a Z370 BIOS.

Well, BIOS itself ran awesome, all settings worked and were saved. Windows didn’t boot due to the fact NVMe controllers of my board and B360 are different hence there’s simply no module to support mine. I didn’t try to set up a system to SATA SSD (was quite limited on time) but when exiting BIOS it gave a message that “No bootable disk is found”, so I assume if I had a spare SSD to play with, it would boot just fine.
N.B. Please make backups before you try something like this as there’s absolutely no warranty it would even work, I was just lucky enough that it went up afterwards :slight_smile:

I created a DXE driver that gets Resizable BAR working on older chipsets (Ivy Bridge and newer). However these motherboards often have a BIOS which artificially limits the MMIOH size (PCI resources). This makes it not possible to get fully working Resizable BAR without further modification to fix that.

My Gigabyte B75M-D3H limits the MMIOH size to 16GB when in reality Ivy Bridge CPUs are capable of 64GB (Haswell and newer 512GB) - TOUUD which would be around 55GB of MMIOH size with 8GB RAM. In fact you can edit DSDT QWordMemory to increase its size and see Linux use the additional MMIOH space.

Here is the thread which has link to the open source DXE driver for anyone interested. I was only able to test 512mb BAR due to MMIOH size limitations but larger sizes should work.

UPDATE: There are now several patches to remove artificial limitations like this

[Experimental] Resizable BAR DXE driver

3 Likes

I have an Asus Z170 Deluxe Mobo. It is very close to the x99 and the x99 guide is out. Does anyone have any idea how this would work on a Z170? I have an Arc card that I want to try out and I do not have rebar on my test rig and i’m not taking apart my battlestation to test a GPU that can’t repeat the performance of my 3070. I have an Arc A750. I already asked in the Insider’s Discord and they have ZERO plans of making these cards work without ReBar as they were not designed to do so from jump. It is a completely forward looking GPU. Help.

You could try this, but you need to enable Above 4G Decoding. I dont enable it since it might defaults at CSM/Legacy, so it is better to flash this bios, then turn Off CSM, make everything in the bios UEFI (pure UEFI), and do the steps below to enable Above 4G. You need to use Bios Flashback. DWYOR
Z170-DELUXE-ASUS-3801.rar (7.1 MB)

Your Above 4G Decoding offset is at 0x7B9:

How to Enable:

GRUBShell.efi: Releases · datasone/grub-mod-setup_var · GitHub

RebarState.exe: https://github.com/xCuri0/ReBarUEFI/releases/download/0.2/ReBarState.exe (you would need to make sure that Above 4G Decoding is ENABLED before using this, if its enabled on gpuz, and you could see the bar size, you could proceed open this app and set it at 32, and reboot)

Source: Enabling hidden 4G decoding · xCuri0/ReBarUEFI Wiki · GitHub

If you do this, i’ll be waiting for your results.

1 Like

I am going to try this mod on my ASUS Maximus VIII Ranger (Z170) motherboard. Only one question, the ReBarState application that is there, since we are setting NVARs separately, will a CMOS reset need us to run the ReBarState application again?
If yes, is there a way to set the ReBarState variable to 32 always?

Will a CMOS reset need us to run the ReBarState application again

On most motherboards yes because they clear the NVRAM variables with CMOS reset. If it doesn’t clear NVRAM then you will most likely need to boot without GPU because CSM will be on and 4G will be off by default.

If yes, is there a way to set the ReBarState variable to 32 always?

By compiling it to always be 32. I wouldn’t recommend this because 4G decoding is disabled by default and CSM is enabled by default so you won’t be able to boot.

Still working on it.

Hi there, thanks for the info.
I have modded the BIOS using AMIBCP such that CSM is disabled, 4G decoding is enabled by default (and also some other parameters like TPM and Secure Boot for native Win11 support) and hence was wondering if I can set the ReBarState variable to 32 always. If yes, how can I set it?

@itsakjt you can build from source and remove the getvariable call and make it just read hardcoded rebarstate = 32 instead

1 Like

Anyone know if anyone had successfully gotten RBar working on an MSI X99a Raider MB? That is a Haswell-E CPU Board
The board does have Above 4G decoding. so in theory it should be able to.

@Nmbr5 X99 is pretty much guaranteed to work

I’m dev of ReBarUEFI and it’s been found to work on every motherboard with functioning 4G decode so far.

Try flash this bios, if flash successful, disable CSM and enable Above 4G Decoding, then Run this app as admin and set to 32, enter and reboot.
X99ARaiderMOD.rar (6.0 MB)

Hello, Ive got an asus maximus IXformula z270 board, is there anyway of being able to flash a modified bios of the maximus X formula board for the z370 to have resizeable bar, as the boards are almost identical, or will modifiying the current bios work. also, im a little stuck as its in a watercooled build and getting access to anything is a ballache, so can this just be flashed without any issues using bios flashback, as i guerss it will fail with bios utility ? ive already enabled most things needed just the bios now i guess ? thanks in advance

Hello @Danielwhitt,

ReBar can be added, see here for the mod guide.

See the Guide for Asus mainboards here

If you get stuck, i’m sure some kind person will help.

Best regards,

-68k

So i tried to modify the bios as per the instructions and everything went as per the the instructions, flashed via bios flashback, but how do i know it actually worked ? it still says resizable bar disabled ? the only odd thing was after the bios flash the pc restarted three times and then booted ? not sure if thats correct ? or does that mean its recovering from a bad flash ?

Hello @Danielwhitt,

Have you run ReBARState.exe to set the BAR Size?