-
Notifications
You must be signed in to change notification settings - Fork 68
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
Z97 board can't allocate above 4G even with above 4g decoding enable in BIOS #10
Comments
I tried looking at the memory range in DSDT but it's using some external symbols that I couldn't find anywhere in the other ACPI tables.
|
After setting pci=realloc at boot it looks like it manages to assign memory to the GPU. I'm still not getting video output, though.
|
Browsing through AMIBCP I found some PCIe settings that don't show up in BIOS. Not sure what these do or how to make them visible. All settings(both visible and hidden) have selected 'Yes' in the Show column. I'm confused why it says 'Yes' when it's hidden. |
@val3nt33n can you also show the Prefetchable Memory description. I think that might be it not Reserved Memory |
@xCuri0 it says "Prefetchable Memory Range for this Root Bridge" |
try changing both to 13 I guess. but i think Prefetchable Memory is more likely the important one |
I tried changing all 3 one by one. No difference. I think some of these settings are hidden because they are not implemented. |
@val3nt33n my system allocates multiple devices in the 64-bit region (gpu not visible in screenshot because it's in large memory) Have you tried with Reserved Memory = 13, Prefetchable Memory = 13 and Prefetchable Memory above 4G = Enabled, all at the same time ? |
I have. No change. |
I have an i5-4690k and ASUS Z97-PRO but I only have Ubuntu 22.04 running on it. Any idea how can I contribute or something? Maybe if there's a H97 mainboard that works. |
Found this while surfing on the web: https://www.bios-mods.com/forum/Thread-GUIDE-How-to-modify-AMI-MSI-BIOS-to-unlock-full-features-UEFI-Aptio4 Step 5 made those options visible in BIOS |
@cursemex yeah, that’s what I did when I tested(it’s enough to set USER on the top menu and it will make everything under it visible). But playing with different setting in these new options didn’t do anything for me. |
@val3nt33n in cursemex's screenshot it shows "PCIE Port 1 is assigned to LAN". The one with the GPU on is what needs to be changed. |
I wonder if we have a working board and is there a difference in the order of assignment? |
They all say that(there is not option to change this). And I changed the settings on all ports. I also noticed that on higher ports there are more extra bus reserved and higher Reserved I/O. Playing with them didn't do anything for me. |
Silly question, but how do I know which "root port" my gpu is connected to? HWinfo doesn't state the gpu to be on a "root port", but does for my sound card. |
here's the hex patch if you want to try it. it probably will work, pcihostbridge seems ok for it but only using 32-64GB range for resource allocation which won't be enough for 32GB BAR cards (eg 3090 or others with more than 16GB of VRAM). They seem to have re-used code from Ivy Bridge because Haswell supports upto 512GB physical address. Still there's a risk of it not working so wouldn't recommend trying on non-dual bios unless you have flasher. in PciBus.efi replace If you want to use UEFIPatch
You'll need to do the fix for pad file problem which is in README |
I was getting ready to re-program the chip in case it doesn't boot anymore and to my surprise I found a tiny chip that I don't think I can program(see macro photo attached). My programmer is for a generic(much bigger chip) with fewer pins. Also I don't have USB flashback. The manual suggests that I can upload a new BIOS from a USB drive but inside the BIOS UI. Looks like I was adventuring in all this without any backup. |
@Tokobotenkai can you try to patch first since your board has dual BIOS? @xCuri0 does the same code exist on Asus Z97-Pro? |
@val3nt33n yes it does (i tried uefipatch it found and patched). There is the pad file problem though but I've written in README how to fix it. Without doing the fix for the pad file you get no boot on Asus boards |
@xCuri0 BTW is there any reason why you are suggesting to use MMTool to do the replacement instead of UEFITool? |
MMTool doesn't mess up the pad file like UEFITool does (broken pad file causes no boot). But MMTool can only replace the FFS unlike UEFITool which lets you replace the PE32 executable inside the FFS. Which is why in the README it says to create your modified FFS with UEFITool. |
I see. When I replaced the NvramSmi module I used UEFITool because MMTool did not show the string for NvramSmi (it was empty at the line where it should have been. If I tried to replace that, it stores only a 24B empty module (similar to a pad, but not a pad). NvramSmi is Combined SMM/DXE type, which looks like MMTool can't replace properly. |
I am going to work soon so probably get back to you guys in about 15-16 hours But great catch @xCuri0 !
@xCuri0 does that mean that I can use a hex editor to modify the existing BIOS? Just search for the string and replace it. |
I confirm that PciBus | Don't downgrade 64-bit BARs to 32-bit (Haswell) patch works. Thanks a lot @xCuri0 |
I tried some games and none of them work. They crash shortly after they start loading to VRAM. |
@val3nt33n does a driver reinstall help ? me and several other amd users don't have any instability but i think you're the first one to try on windows with Arc. |
I did reinstall the driver (after DDU) and no change. I tried lowering the BAR size and only at 1GB is stable. Above 1GB all games crash. |
@val3nt33n can you send a screenshot showing Device Manager Resources of the GPU with 1GB BAR ? To see if 1GB BAR makes it allocated in the 32-bit space |
@cursemex you can try this patch with the 3503 BIOS and 32GB RAM
If that one doesn't work you can try the below one though it's less likely to get 16GB BAR and 32GB RAM working.
|
@val3nt33n send one with 256MB then. if 256MB still crashes then you need to use the stock BIOS. |
Oh well, it was a fun experiment. I don't think this can be fixed. |
I don't have much knowledge about how PCIe devices work/memory attributes etc but I do think with the increased popularity of this module these issues will eventually be figured out by others. |
@xCuri0 Okay, I wasn't crazy. I tried the first patch multiple times and got the gpu failure beeping code even with 16gb of ram. Lo and behold, for some reason 4G decode was off according to GPU-Z even though it is turned on in the bios. The second patch worked with 14-15 values with both 16GB and 24GB of ram respectively. (32GB caused post errors) |
@cursemex does seem like the BIOS doesn't want to allocate to addresses above 64GB (despite haswell supporting upto 512GB). Force enabling 4G decode or anything isn't going to help. It probably could be fixed with a different patch. Atleast the second patch is working with 16/24GB. Getting 16GB BAR working with 32GB RAM is going to be a challenge it looks like |
Sorry for taking so long (shift work). I managed to get another PCIe cable for the A770. For some reason, I could boot with 16GB ReBar size with the Asrock Intel A380 but it doesn't work with both of my A770s (Intel and Acer's). I have to reduce the ReBar size to 8GB else it would not even post and once I switched to an old Nvidia card the error message said that the VGA card is not supported by the UEFI driver and CSM was turned on. I don't have the 16GB patch enabled though. I just did
Does that mean I have to do the 16GB RAM patch? @val3nt33n |
@Tokobotenkai You need the 16GB BAR patch "Remove <16GB BAR size limit" otherwise 16GB and larger BARs don't work |
@xCuri0 Patched and working somewhat. I still get the not detected keyboard issue randomly, not too sure if it is the age of the system. I do get the same UEFI driver errors randomly at 16GB compared to 8GB. @val3nt33n I am able to run SoTR on Linux natively. Anything vulkan related works fine. OpenGL games are horrible. |
@Tokobotenkai Thanks for checking. I only tried Windows gaming. I guess it's worth trying Linux as well. |
@val3nt33n Considering the age of the system, I was actually thinking to try upgrading the RAM from 1333MHz to 2400MHz and maybe the processor to a 4790k. But because I have an existing Ryzen 3600, I wonder if it is worth doing so and instead buy a cheap B450 mainboard+3200MHz RAM because I just want to test the Arc A770 (the former is like 30USD more than the latter). |
@xCuri0 I found the problem that was causing crashes with large BARs. I checked Windows Event log and found that it was running out of virtual memory(pagefile was too small). So, after I increased that no more crashes with 8GB BAR. |
Since everyone here has got resizable BAR working properly I'm closing this issue. @cursemex still has the problem with 32GB RAM + 16GB BAR but that's a different issue and a new issue for that can be created if needed. |
All ASUS 100/200 motherboards which I can find BIOS on ASUS website have the 64-bit downgrade problem(latest BIOS), except Z270-WS and need BIOS version 0602(included) or later. |
Excuse my ignorance this must really be a simple question for you guy. I'm on VII Ranger and I got GetLastError: 5
This is my VII Ranger 3503 with ReBarDxe.ffs so far. Thank you. 😄 |
@DawgNewb apply all the patches not just the ones you listed. There's one for nvram module fixes this issue. And don't forget to check for and fix pad file issue |
Thank you, I am fairly lost in this bios modding scene. A bit more question about NvramSmi in from @cursemex (Asus Z97 VII Hero) and valip (Link) they were mention about it. Since I really don't understand what happening here and I'm Asus as well (Z97 VII Ranger), I wonder if I need. Both UEFIPatch with NvramSmi NVRAM whitelist unlock (by @vit9696) and Older NvramSmi ❤ Thanks again.
That nice. I'll report it again, I'm currently sick and need some rest. 🛌 |
@DawgNewb you only need the UEFIPatch The thing of replacing module with old one was used before the patch was discovered |
System
Description
I modded the BIOS to enable rebar using your instructions but the maximum working BAR size is 1GB. At 2GB the system gets stuck during post, at 4GB and 8GB it boots into the OS(Windows 10 and Ubuntu 20.04) but video output works only from the iGPU.
This is dmesg after booting with 8GB
and /proc/iomem
The text was updated successfully, but these errors were encountered: