@prazola yeah it’s right. the weird thing is 16gb should work too because i’ve made it able to use the whole range from 0x420000000 to 0xfe0000000 which has more than enough space. but it doesn’t
my guess is that another driver (not PciHostBridge) or PciBusDxe gets called and it doesn’t properly support 16GB BARs because I see PciHostBridge uses DXE services table to call another driver
EDIT: Looks like it calls AddIoSpace and SetMemorySpaceAttributes in the order of the screenshot. My guess is that AddIoSpace has some sort of artificial limit on it.
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.
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.
@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
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.
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!
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.
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.