Don’t worry, you did enough. Ty
Tried the PciHostBridge and DSDT modification on my PC (Gigabyte B75M-D3H RX 580 8GB). Modification works properly (can see in the screenshot it’s using right at the edge of 36 bit limit) so there should be more than enough space for 8GB BAR.
But the largest BAR size that works is 2GB (11) even though I’ve given it 50+GB of BAR space
Even using the default 16GB BAR region there should be more than enough space for a 4GB BAR. It looks like there’s a limit on BAR size somewhere and on your board it’s 8GB max while on mine it’s 2GB max.
Also I the only way I could reset the RebarState variable was booting with iGPU only and setting it to 0, CMOS reset didn’t do anything. Was it the same for you ?
I don’t think there any active users on this forum which have good reverse engineering skills in order to remove the limit but in case anyone is interested feel free to reply about it.
No, CMOS worked for me. Could it be some kind of partitioning between iGPU and dGPU?
@prazola PciHostBridge was calling AllocateMemorySpace with possibly wrong alignment when using large BAR sizes (above 4GB). I fixed that and made a BIOS with it
Z97Ex9ALIGN.zip (4.4 MB) (no difference)
Hope it gets 16GB working. There might be a possibility of it not working so be ready to restore backup BIOS
@prazola Possible that the BIOS messes up the alignment with large sizes so I made it just calculate it from BAR size which also works.
Z97Ex9_ALIGNSIZE.zip (4.4 MB) (doesn’t work don’t use)
If this still doesn’t work there’s one last thing I can try which is fixing the function it uses to get the alignment size. Currently it seems to be 1 more than necessary which I don’t think is a problem but can’t be sure.
Nope, BIOS bricked. Blinking white stripes at boot.
I’m trying to recover it
sorry that it did not boot. hope BIOS recovery goes well
I did it without a BIOS flasher and without BIOS flashback support!
I switched frome the backup BIOS to the corrupted one during POST and launched the Instant flash utility.
Back on main BIOS chip!
@prazola I finally figured out the actual BAR limit in the BIOS (PciBus DXE) by looking at leaked AMI source code.
The 0x3fffffffe is just below 0x400000000 (16GB) and this makes it disable all BARs over that limit. This explains why 16GB BAR didn’t work no matter what.
I’ll later send a modified BIOS with this fixed. Also did 4GB BAR size work for you ? Because looking at the AMI source code it looks like it’s possibly bugged and 4GB doesn’t work for me.
@prazola if you have time for it test 4GB. Will be able to see if it needs patching then as there are some users of the rebar mod with 4GB cards.
@prazola
Z97Ex9PciBusFix.zip (4.4 MB)
BIOS with PciBusDxe fixed to allow 16GB and larger BARs + fixed PciHostBridge to allow more MMIO space.
Should get 16GB BAR working finally.
Great! I’ll test it in 3 hour.
@prazola Finally it’s working.
Do send a screenshot of large memory in device manager. I want to see how the allocation turned out
If you have time for it you could do some FPS comparisons between on and off. @Romulus_ut3 tried the mod and was able to get a significant FPS boost in Cyberpunk 2077 with just 2GB BAR so with 16GB/full VRAM it should be even bigger.
I’ll make a seperate post on the forum on how to patch PciHostBridge and PciBus to remove the BAR size limitations.
I’ll upload some bench asap. I must check what I have locally to install as my connection is very very slow so new triple A games requires a lot of time to download.
Feedbacks:
RDR2 1440p all maxed out (advanced settings also) with TAA max:
default 81 FPS
rebar 92.2 FPS
Now we need other Haswell owners to step up to the plate and try their hand at modding Resizable Bar support for their system.