Resizable Bar working on intel's 3rd Gen Ivy Bridge from 2012

Discussion in 'Processors and motherboards Intel' started by Romulus_ut3, Oct 15, 2022.

  1. Romulus_ut3

    Romulus_ut3 Master Guru

    Messages:
    780
    Likes Received:
    252
    GPU:
    NITRO+ RX5700 XT 8G
    Proof of Resizable Bar working on the Core i7 3770K:

    [​IMG]

    Some quick benchmark numbers:

    Cyberpunk 2077, Custom Medium/High settings, FSR 2.1 applied through Mod, Rebar Off:
    [​IMG]

    Cyberpunk 2077, Custom Medium/High settings, FSR 2.1 applied through Mod, Rebar On:
    [​IMG]

    Cyberpunk 2077, Custom Medium/High settings, 1080p native resolution, Rebar Off:
    [​IMG]

    Cyberpunk 2077, Custom Medium/High settings, 1080p native resolution, Rebar On:
    [​IMG]

    How was this achieved?
    Through a modded motherboard BIOS (ASUS for some reason decided not to make the "Above 4G Decoding" option available) with the insertion of a Resizable Bar DXE driver (Thanks to xCuri0/Kuri0) and applying some registry tweaks to set Resizable Bar working for my Polaris RX 570 4GB, and here we are..

    Current Limitations
    This hack has its limitations, like Ivy Bridge is limited to only 2048 MB of Resizable Bar memory allocation, but it's still a lot better than the 256 MB, and the free performance uplift is just too sweet to pass on! Haswell seems to be capable of allocating up to 8192 MB. This limitation doesn't apply to Linux, but with Windows/UEFI, to get larger sizes working need to patch/replace BIOS PCI driver which does the resource allocation, which is something xCuri0 hasn't been able to figure out yet, but here's hoping there's someone out there who can help us with this.

    I'll provide more details/benchmarks and a guide soon, Ivy Bridge and Haswell owners can rejoice!
     
    Last edited: Oct 15, 2022
    toyo, DanielRX, BuildeR2 and 7 others like this.
  2. sykozis

    sykozis Ancient Guru

    Messages:
    22,492
    Likes Received:
    1,537
    GPU:
    Asus RX6700XT
    How exactly did you get ReBAR working on Polaris? Supposedly it doesn't support ReBAR....
     
  3. BuildeR2

    BuildeR2 Ancient Guru

    Messages:
    3,207
    Likes Received:
    437
    GPU:
    ASUS 4090 TUF OG OC
    What an interesting case! I'm surprised that you get a ~10% uplift with a GPU that does not support ReBAR. More details/benchmarks and a guide soon, please. :D
     
    Romulus_ut3 likes this.
  4. Astyanax

    Astyanax Ancient Guru

    Messages:
    16,998
    Likes Received:
    7,340
    GPU:
    GTX 1080ti
    This hack doesn't enable resizable bar, it enables a static bar value above the default 256MB.
     

  5. Kuri0

    Kuri0 Member

    Messages:
    17
    Likes Received:
    5
    GPU:
    RX 580 8GB
    The graphics driver is free to resize the BAR to smaller sizes if it wants to but can't increase the size which is why you want the BIOS to give the maximum BAR size supported by the GPU. Also to my knowledge graphics drivers (atleast AMD) don't actively change the BAR size as the largest is usually what gives the best performance.

    I think NVIDIA works differently though as they enable it per game and not globally. This should still work with the ReBarUEFI mod if you have it working at the maximum size (8GB on 8GB VRAM etc) but otherwise I'm not sure. Haven't seen any NVIDIA users try the mod yet but AMD works perfectly when using BAR sizes less than the VRAM.
     
    Romulus_ut3 likes this.
  6. Romulus_ut3

    Romulus_ut3 Master Guru

    Messages:
    780
    Likes Received:
    252
    GPU:
    NITRO+ RX5700 XT 8G
    I tested CP77 performance on Linux some time ago and it was actually running better on Linux, now I know why. Linux can use Resizable bar up to 8GB on the very same system with no hacks required whereas Windows/UEFI can't, because we don't know how to configure the proper allocation for the PCI resources yet for Ivy Bridge. On Haswell, this "hack" goes up to 8GB. Real, fake, hack, whatever this is, it works and provides a performance boost, for real.

    A registry hack is all that's required, the AmernimeZ driver has been doing it for quite some time, this works on VEGA too.

    Next week, for sure!
     
  7. aufkrawall2

    aufkrawall2 Ancient Guru

    Messages:
    4,251
    Likes Received:
    1,758
    GPU:
    7800 XT Hellhound
    Makes me wonder if the term "rBAR" isn't actually misleading. From what I've read, it's simply the graphics driver actively taking advantage ("SAM"/"CAM") of BAR > 256MB ("large BAR", Above 4G Decoding on). Well, of course the BAR size can be limited to arbitrary values, but do the Linux driver provide any hints that this actually ever happens?
     
  8. Astyanax

    Astyanax Ancient Guru

    Messages:
    16,998
    Likes Received:
    7,340
    GPU:
    GTX 1080ti
    will have to get a test machine put together.
     
  9. amdgpu reports BAR size in kernel logs, although I don't recall a situation where I've seen it at anything except 256M or 8192M. Although I wonder if using the amdgpu(?) kernel options to limit vram size would also limit the BAR size?
     
    aufkrawall2 likes this.
  10. I'm curious about this too. When I had a RX 580, it would get the large memory on Windows and get the full BAR no problem on Linux implying that the BIOS option did something, but Radeon Control Panel on Windows had the rBAR option grayed out.

    I suspect later graphics drivers may have gotten rid of the "limitation" for Polaris on Windows and actually reports it in-truth?

    Edit: It seems as simple as a registry key change? Is it actually changing how the driver initializes for rBAR support, or just how the control panel presents the option?
     

  11. Romulus_ut3

    Romulus_ut3 Master Guru

    Messages:
    780
    Likes Received:
    252
    GPU:
    NITRO+ RX5700 XT 8G
    Both. There are two workarounds to enable REBAR on unsupported AMD GPUs. One is the "traditional" which will still provide the boost in performance in games, but the option in AMD's control panel/performance tab will remain greyed out, meaning you can't toggle it at will unless you change the registry keys again and do a system restart or disable REBAR from your UEFI. Then there's the "legacy" mode which will allow you to enable/disable it at will using the control panel. The method shown in the screenshot is the legacy mode.
     
  12. DoubleSh0tNine

    DoubleSh0tNine Active Member

    Messages:
    66
    Likes Received:
    25
    GPU:
    Vega 56 Reference
    Kukis on the Amernime Zone discord got me into attempting to mod my x79 sabertooth/Xeon 1650 v2 and all we've managed to pull off is a 1gb Bar due to above 4g decode being unbootable for the time being, but I've seen solid improvements to 1% lows in Battlefield 2042 and Cyberpunk 2077 on my R9 Fury, and my 3dmark Timespy scores went up!
    [​IMG]
    Pre-rebar and GOP update:[​IMG]
    After 1gb rebar and GOP update:
    [​IMG]
     
  13. Astyanax

    Astyanax Ancient Guru

    Messages:
    16,998
    Likes Received:
    7,340
    GPU:
    GTX 1080ti
    these a difference in the PCIE memory layout with Sandy/Ivy E vs non E, there just isn't a way to get a contiguous range higher than 1GB.
     
  14. DoubleSh0tNine

    DoubleSh0tNine Active Member

    Messages:
    66
    Likes Received:
    25
    GPU:
    Vega 56 Reference
    Why is that? Apologies if this is an in-depth question, I'm genuinely curious. I had a suspicion it had to with MMIOH in the revealed settings being capped at 128g when all the ROCM documentation mentioning Above 4g decode kept mentioning sizes of 256/512 MMIOH.

    link below is where I got the idea:
    https://rocmdocs.amd.com/en/latest/GCN_ISA_Manuals/PCIe-features.html
     
  15. Astyanax

    Astyanax Ancient Guru

    Messages:
    16,998
    Likes Received:
    7,340
    GPU:
    GTX 1080ti
    Last edited: Dec 2, 2022

  16. BuildeR2

    BuildeR2 Ancient Guru

    Messages:
    3,207
    Likes Received:
    437
    GPU:
    ASUS 4090 TUF OG OC
    @DoubleSh0tNine That is pretty crazy! The GPU score being higher is always nice, and the better 1% lows even better. I'm wondering how this 1GB ReBAR managed to increase your CPU score by ~25%!!! Did you upgrade CPU's during all this testing or what? :eek:
     
  17. DoubleSh0tNine

    DoubleSh0tNine Active Member

    Messages:
    66
    Likes Received:
    25
    GPU:
    Vega 56 Reference
    Nope, CPU is the same before and after the test, your guess is as good as mine.
     
  18. DoubleSh0tNine

    DoubleSh0tNine Active Member

    Messages:
    66
    Likes Received:
    25
    GPU:
    Vega 56 Reference
    Decided to investigate and it looks like that score doesn't hold up in the past benches I took prior to messing with ReBar. Must not have had my CPU in my high performance power profile. Sorry about that.
    That said, Battlefield 2042 goes from pretty much unplayable thanks to stuttering to smooth as silk with ReBar 1gb, it's a night and day difference for this system.
    I was having crashing issues with MMIO set to 128g so I dialed it back to 64g and hopefully it will be stable from here on.
     

    Attached Files:

  19. Strange Times

    Strange Times Master Guru

    Messages:
    372
    Likes Received:
    110
    GPU:
    RX 6600 XT
    mine rx580 support 8000mb bar size with 8 gen intel
     
  20. DoubleSh0tNine

    DoubleSh0tNine Active Member

    Messages:
    66
    Likes Received:
    25
    GPU:
    Vega 56 Reference
    bit of an update to this, had to drop MMIO to 32g for the crashing to stop. If anyone has any possible explanations for why that worked I'm all ears.
    EDIT: cause turned out to be an unstable CPU OC
     
    Last edited: Dec 21, 2022

Share This Page