-
Notifications
You must be signed in to change notification settings - Fork 64
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Missing 4G decoding on Gigabyte Z97X-Gaming 3 #14
Comments
seems like the it is not included in the setup configuration in the bios... and only counted as a Bios String... |
I checked older bioses. F8d and F7 do not include 4G Decod as a string. F6 have one mention, but still not included in txt output. |
My motherboard is MSI B75A-G43. GPU-Z says above 4G decode is disabled and I found "Above 4G" in step 1 but nothing in step 4. Is this mean there's is no way to make rebar work? |
My Gigabyte B85M-D3H(rev.1.2) has the same issue. "4G Decod" string exist but IRFExtractor can not extract it to txt. |
Update: when I locate the offset in hex-editor which has been found in UEFITool, I can see a string "Above 4G Decoding. Enables or Disables 64bit capable Devices to be Decoded in Above 4G Address Space". It looks like just a description string but not a configuration. 97E409E6-4CC1-11D9-81F6-000000000000_Setup_Setup_body.zip BTW, actually the Resizable BAR is working(<= 1G) after I added the FFS module, even if Above 4G decoding is disable. |
Unfortunately, I have not been able to get ReBar to run above 1GB. Nevertheless I have a higher minimum FPS. |
A guy on winraid has added options from strings into his settings https://winraid.level1techs.com/t/add-option-in-ami-uefi-bios-menu-how-to/31609/15 Perhaps we can do the same for 4g decode? |
@NoUserNameForYou Can you try this in grub-mod-setup_var
Make sure you're running patched BIOS also before doing this. There's also another method directly manipulating PCH and PCI setup variables to enable 4G decoding which we can try if this doesn't work |
@NoUserNameForYou don't really think anything more can be tried other than swapping pcihostbridge or maybe pcibus modules with a similar motherboard that supports 4g decoding. asm patching is complicated because it would require addition of code which isn't easy |
The Grub mod setup var method did not unlock 4G Decoding. I also discovered a strange bug with Unreal Engine games. When I have ReBar enabled for 1GB, games on UE can only allocate 1GB of VRAM, causing performance to drop dramatically. It affected Sea of Thieves, Contraband Police and Chernobylite, propably every UE4 games. Other engine e.g: Dying Light 2 gain performance and the game can allocate more than 6+GB VRAM, as it should. EDIT: I did more tests. Other ReBar size for example manual 256MB, 512MB causing 256MB and 512MB max allocation of memory in Unreal Engine games. |
@BartekJablonski I've seen others report similar issues on Polaris GPUs but didn't know it happened on RDNA too. Also 2GB does have this issue too just that it will happen at 2GB VRAM. Sucks that AMD doesn't allow for per game rebar like NVIDIA so this issue could be mitigated |
It was a fun adventure to squeeze the last sweat out of that Broadwell. I am glad that I was able to participate in this :) |
@BartekJablonski You mention 256mb causes the issue, but isn't that the default size no rebar ? |
I'll straighten the whole thing out a bit EDIT: I'm curious about the difference in performance with ReBar 8 and ReBar 0. The difference is in the BAR1 values. |
Source 2 games are also affected to this VRAM allocation bug. |
Unity Engine game are also affected to this VRAM allocation bug, but i find out workaround for this. DXVK fixed it. Contraband Police (Unity Game) had this bug. I tried DXVK and now game can utilize more than 1GB VRAM :p |
Yeah, DXVK also fixed allocation bug in Sea of Thieves (UE4 game) |
@BartekJablonski dxvk often reduces performance tho, we are enabling rebar to get more fps |
I know that, but it depends on hardware. Obviously im cpu bottlenecked and take f.e Contraband Police. |
DSDT.aml.zip I7-4770 Haswell CPU Thanks! |
试试 UEFITool 替换附件中 pcibus模块 我的主板用的是同样技嘉品牌Z97-HD3 2.1 可以打开1G 以上 Bar 这个模块是我从华擎Z97-EXTREME 中已启用 Bar 中提取 这似乎是技嘉主板PCIBUS模块的问题 地址是:https://winraid.level1techs.com/t/request-resizable-bar-added-to-asrock-z97-extreme-6-v2-80a/91036/2 |
@xYuuna go to the lines mentioned and remove Arg0, it says this at the bottom of the DSDT editing wiki page. |
If anyone wants to try a project of getting 4G decoding on these motherboards here's what you have to do Here are comparisons of BIOS with vs without 4G decodingYou can see the check for 4G decoding Also in the main function you can see the AddMemorySpace (0x18) doesn't add the Above 4GB MMIO region. ASRock IMB-180 (Bad), there's an error with the disassembly on 32-bit AddMemorySpace but it doesn't matter. These are the hooks needed, you can find alot of examples on hooking UEFI services. AddMemorySpace hookCheck if it is type 3 (MMIO) to additionally add another It should check if the new memory space was already added as the function gets called multiple times, if so it should not add it again. AllocateMemorySpace hookCheck an NVRAM variable which can be configured by user, similar to ReBarState (can also take the CMOS reset protection from ReBarUEFI too) and check if enabled. If so, when type is 3 (MMIO) and maximum address equals This will allocate resources in the 64-bit region added by the previous hook. It needs to be user configurable with NVRAM variable to allow CSM to be disabled in BIOS before. Last (and easiest) step would be adding the DSDT for it which you can find in the wiki. @sidex15 @ysc3839 @magicalz @NoUserNameForYou @xYuuna @AbraxasVi @LordAdo96 |
I'm too much of a brainlet to make any sense out of this but thank you for your discoveries. BTW, sorry I had to delete my discord account. |
@xCuri0 thanks for that write up, really appreciate you taking the time. Though this is way beyond my level, I don't even know where to begin. Hopefully someone with more expertise tries this and figures out an easier way to patch/add this :) |
@xCuri0 :) I'm also unable to find the 4G Decode option with UEFITool. The stock DSDT seems to account for 4G Decoding, but when I bypass that M64L conditional I get the expanded root bus in the OS, but anything above 1G resizebar won't POST. I'm guessing that M64L bit needs to be actually toggled somehow, instead of bypassed in order for the PCIBus to work? Either that or find/hack together a PCIBus module? Stock DSDT section:
My attempt at bypassing:
|
MOBO: GA-X99-Gaming 5 Same issue, stuck on finding the '4G Decod in txt' step. I've added my extracted text. Perhaps it could serve as an example of how to trace the '4g decod' flag? |
@jakeman2048 aren't you then missing Also, after removing the stray Arg0, I still can't compile:
Is it safe to force with -f? Or should I be doing something with these:
Since I'm using a 4gb rx480, I was hoping reducing tolud would be enough for 2gb rebar. I have tolud set to 1gb (minimum option), but still no post :( |
I've attempted to replace the pcibus module in the Z97-HD3 firmware; however, I'm still unable to set BAR larger than 1G. Could you provide a more detailed explanation on how to successfully implement this? |
@ZLHuo there a bunch of other modules too not just pcibus i think pcihostbridge and some sa related module. i dont think it will be easy to implement tbh |
@xCuri0 |
Hi, |
if you're using linux you don't need to even flash rebardxe, there's a linux section on dsdt patching wiki just follow that |
@xCuri0 Can you tell me about method directly manipulating PCH and PCI setup variables to enable 4G decoding? |
@ivan49k someone tried and it doesn't work, the uefi has been built without the code for 4g decoding. |
MOBO: Gigabyte Z97X-Gaming 3
BIOS: F8e (not available on GB page, i got it from Support. This bios add TPM 2.0)
CPU: Intel Xeon E3-1285L v4
GPU: RX 6900XT
CSM disabled, SecureBoot enabled, TPM 2.0 Enabled
Im curious to check if Re-Bar can work on my motherboard using this instruction:
https://github.com/xCuri0/ReBarUEFI/wiki/Enabling-hidden-4G-decoding
Im stuck on 4 step. I find 4G Decod using UEFITOOL, extracted body, next i used [IRFExtractor_0.3.6] to save output file.
Output file doesn't contain "4G Decod".
I attached original bios file and txt output.
Z97XGAMING3.zip
Section_Freeform_subtype_GUID_97E409E6-4CC1-11D9-81F6-000000000000_Setup_Setup_body IFR.txt
The text was updated successfully, but these errors were encountered: