Any way to enable ReBAR for RTX 2080 Ti?

Hello

Is there any way to enable ReBAR on RTX 2080 Ti, if my system (MB + CPU) support it ?

I know NVIDIA does not support ReBAR for RTX 2000 series, and they also encrypt their vBIOS.

But for AMD there are the registry keys that can enable it for older generations (like RX 580), is there something similar for NVIDIA ?

Here is my video BIOS:
TU102.zip (674.3 KB)

@TimothyMadden Hi

If you see Resizable BAR supported in HWInfo but it only shows 256mb and smaller sizes you could try overriding the Resizable BAR supported sizes

To my knowledge GTX 16 series have it with smaller sizes only not sure about RTX 2000. ReBarUEFI is open source you can edit the source code to add a supported sizes override like what is done for the Sapphire 5600 XT Pulse (code is taken from Linux and it had the override for that GPU) ReBarUEFI/ReBar.c at master ¡ xCuri0/ReBarUEFI ¡ GitHub. You can read the PCIe 3.0 spec to see where the bits have to be set in the supported sizes for each size.

Do I recommend doing this ? No it probably won’t work and you shouldn’t try unless you REALLY know what you’re doing

HWiNFO shows my 2080 Ti has:

  • ReBAR Support: Supported
  • ReBAR State: Disabled (256 MB)

So by “supported size override” you mean I could patch ReBarUEFI (the DXE driver), so the motherboard UEFI can limit the BAR size the large values only ? And this will allow me to see if the graphcis card can select a large value and work with it ?

Is the patch to the DXE driver different then setting BAR size with the command line tool provided by ReBarUEFI (ReBarState.exe) ?

you can modify the dxe driver source code to override the supported BAR sizes list or ignore the supported list completely (if you’re doing the 2nd option make sure you only resize the 256MB BAR and not others)

Doing these modifications is completely experimental I would be surprised if it worked at all.

My 2080 Ti GAMING X TRIO has 11GB VRAM.

Can I set a BAR size of 16GB and above, or should I stay at or under 11GB, meaning I should select the 8GB BAR ?

My board appears to have 3 BARs:

If I update UEFI to only support 8 GB /16 GB BAR, will this affect the small BAR0 and BAR1 as well ?

My intuition says I should only increase BAR1, as the smaller BAR0 and BAR2 might be there for internal use by the GPU driver or otherwise for special purposes…

So how do I make sure to only increase the 256MB BAR ? Is there a way to only increase BAR1 ? Is it even possible to increase all 3 of BAR0, BAR1, BAR2 to 8 GB ?

Thank you,
Timothy Madden

@TimothyMadden you’d want to use 16GB BAR since the BAR has to fit all the VRAM typically. When adding the override code you can make it so it only affects BAR1.

This is completely experimental never tried by anyone before so I’d be surprised if it works

Looks like it doesn’t work.

I compiled and flashed the DXE driver with the bellow change:

#define PCI_VENDOR_ID_NV  0x10de
#define PCI_DEVICE_ID_MSI_2080_TI_GAMING_X_TRIO 0x1e07


UINT32 pciRebarGetPossibleSizes(UINTN pciAddress, UINTN epos, UINT16 vid, UINT16 did, UINT8 bar)
{
    INTN pos;
    UINT32 cap;

    pos = pciRebarFindPos(pciAddress, (INTN)epos, bar);
    if (pos < 0)
        return 0;

    pciReadConfigDword(pciAddress, pos + PCI_REBAR_CAP, &cap);
    cap &= PCI_REBAR_CAP_SIZES;

    /* Sapphire RX 5600 XT Pulse has an invalid cap dword for BAR 0 */
    if (vid == PCI_VENDOR_ID_ATI && did == 0x731f &&
        bar == 0 && cap == 0x7000)
        cap = 0x3f000;
    else
		if (vid == PCI_VENDOR_ID_NV && did == PCI_DEVICE_ID_MSI_2080_TI_GAMING_X_TRIO && bar == 1u)
		    cap = 0x3e000;

    return cap >> 4;
}

No effect ! BAR1 size in GPU-Z is still 256MB.

Is that even possible, after the MB UEFI reports to GPU UEFI this size is not supported ?

Is there anything else I could try ?

Can you explain the second option, in which I “ignore the supported list” of BAR sizes ?

Does it matter if the 2080 Ti is the second GPU in my system (first one is Intel Arc) ?

@TimothyMadden

Can you explain the second option, in which I “ignore the supported list” of BAR sizes ?

change if (rBarS & (1 << n)) to if ((rBarS & (1 << n)) || bar == 1) this will ignore the supported sizes for BAR1. so set ReBarState to the size you want.

Now that the NVIDIA vBIOS appears to be unlocked (according to some great and very recent news) … can someone please please find a way to unlock ReBAR on RTX 2000 series … ?

@Kuri0 Hey man, I’m bringing this thread up once again since I’m currently tinkering with my 2080 Ti myself and am trying to find a way to hack the feature into the card.

I’m on a Asus Z390 E which on the latest BIOS releases is even officially REBAR supported although the BIOS doesn’t let you manually override the BAR size but just lets you set disabled or enabled on auto

That being said though, older BIOSes for that board have no REBAR implemented so the DXE patch method could still be viable.

I’ve tried running the card on the REBAR enabled bios but the card still runs on 256MB BAR size

What concerns me the most is the card’s VBIOS which doesn’t seem very cooperative on enabling REBAR

Anyways, do you have any idea on what i can try? maybe there’s a way to override the BAR size on the official REBAR BIOS

Thanks :slight_smile:

@Cancretto Nvidia does not support rebar for Turing (2000 series) so there is nothing you can do to enable it.

Nvidia (and its partners) would have to release a new VBIOS with rebar enabled for every model of card and at this point it’s safe to say it will never happen.

@Cancretto I think someone tried the override on a laptop and it didn’t do anything.

See Laptop Support ¡ Issue #16 ¡ xCuri0/ReBarUEFI ¡ GitHub someone tried the override method

Another method tried on Pascal, BAR gets resized by driver doesn’t work well with it. nvsmi result showing 256MB · xCuri0/ReBarUEFI · Discussion #89 · GitHub

1 Like

@Kuri0 Hey, thanks a lot for the sources, I’ll also be following Xelafic’s thread about his tests.

I got curious again about enabling REBAR on older gens since in august on Techpowerup we got 2 releases of modded nvflash one of which apparently manages to pull a rather suspicious command which is

–gpumode physical_display_enabled_8GB_bar1

which unfortunately so far just results in an unsupported error for older cards

I think what we need to enable REBAR on Turing and below is mainly a way to edit this part of the VBIOS in the first place and then possibly face NV drivers to make the edit work

PS @chinobino sorry forgot to reply to you :sweat_smile: anyways, yes I agree that’s extremely unlikely NV ever makes VBIOS updates to older gens, that’s why i’m hoping some point, us the community might be able at to crack trough all these annoying NV soft locks

2 Likes

@Cancretto I had a read through of the Techpowerup thread for ‘(omg)vflash’ before the OP left but it seems that nothing new was discovered as crossflashing was already possible with the modified nvflash.

I have a 2070 with rebar support in my Z370 BIOS but have given up on Nvidia ever adding Turing support.

I too wish the modding community could do something but it seems to be quite locked down.

@chinobino Yeah the tool was interesting but expectations were probably a bit too high for it, we still have Kefi’s nvflasK and his whole NV modding project which hopefully turns out to be really good.

I have a 2070 with rebar support in my Z370 BIOS but have given up on Nvidia ever adding Turing support.

What do you mean by that? Have you managed to mod the 2070 VBIOS or override in some way the 256MB BAR on the card itself?

@Cancretto Sorry I should have worded that better - I just mean that I am stuck with a motherboard that supports rebar but a graphics card that does not.

1 Like

It could be possible that the method tried by Xelafic on GitHub works on Turing with Windows driver. But it’s hard to setup and test.

But it’s quite complicated to do unlike Resizable BAR (which is just one write to PCIe config space), it requires that the GPU BAR and PCI Bridge both be assigned before PCI allocation to set the BAR size to 16GB or whatever before setting them both back to previous values.

Xelafic’s code is in assembly which I hardly understand.

I think we may atleast see it working on Linux soon because the driver can be modified there (open source).

2 Likes

Remember the NVIDIA driver can enable ReBAR per-game or globally using the NVIDIA Profile Inspector. Of course the feature is meant for RTX 3000 cards, since RTX 2000 has not been unlocked (to use ReBAR). But somehow I expect there’s a chance the Profile Inspector would enable ReBAR in the driver anyway, even for RTX 2000, if ever unlocked…

Maybe the method by Xelafic works with the drivers on Turing even though it doesn’t on Pascal.

But as I’ve mentioned it’s complicated to setup and try.

Here is my translation of the assembly from @Xelafic to plain C:

Warning: this is hardware-specific and I did not test this, looks like I found a bug in there when configuring GTX 1080…

There is one instruction I have skipped, since it changes a local variable on the stack, that is then never used: mov [rsp+0x30],rax

I don’t quite understand much what the resulting code does anyway: looks like the straps bits, documented in envytools and linked by Xelafic, would be able to configure ReBAR.

But before accessing the straps bits some setup is necessary for both the (south / north ?) bridge on the PCI and the PCI GPU, just to expose those bits at their known address.

This setup must immediately be restored after the straps bits (with the ReBAR size) where set.

Let me know if you understand the hard-coded numbers for the bridge … or if you know some MMIO documentation involving the low-level port I/O