[Request] Above 4G decoding for AsRock z97 Extreme 9 and Asus P8P67 evo

Here is BIOS with PciHostBridge limit increased from 16GB to 480GB. Should get 16GB BAR working

Z97Ex9_480GB.zip (4.4 MB)

There’s a possibility that it might not work so be ready to restore the previous BIOS.

Changes done in assembly:

1 Like

Nope, not working with 14 or 13.

13 was working before right ? If so then just go back to previous BIOS don’t really know any other ways to patch PciHostBridge for now

EDIT: I think problem is PciHostBridge is only made to handle addresses upto 64GB. Don’t know how to actually fix that but could try and make the most of 64GB space

Yes it was working, I already flashed the the old version. :slight_smile:

As a last try I modified PciHostBridge so it properly uses the 64GB region because it seems like it won’t allocate devices above that (even tho Haswell can do 512GB). It should give around 48GB of MMIO space on your system which is enough for a 16GB BAR.

Z97Ex9Fixed.zip (4.4 MB) (use this for now)

Nope, still nothing above 13 :frowning:

13 still works though unlike the previous one right ? If it does then it would be helpful to send a screenshot of memory and large memory in device manager

Here you go:
image


image

@prazola Looks like even 8Gb (13) not enabled in this screenshot is it because it doesn’t work ? If that’s the case then the issue is address alignment which I probably can fix.

However the rest of the mod (making more room for 16GB bar) looks working

Let me check again in a couple of hour

@Kuri0 this should be the right one:


1 Like

@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.

Don’t worry, you did enough. Ty :wink:

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

1 Like

Nope, still 8GB max.


@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 :smiley:

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!