Skip to content
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

MMTool method creates unusable bios, UEFITool OC issue. #98

Closed
4 tasks done
FPSUsername opened this issue Nov 20, 2023 · 19 comments
Closed
4 tasks done

MMTool method creates unusable bios, UEFITool OC issue. #98

FPSUsername opened this issue Nov 20, 2023 · 19 comments

Comments

@FPSUsername
Copy link

FPSUsername commented Nov 20, 2023

System

Description

Unfortunately, this is one of those motherboards that will break overclocking and post issues when the bios get modified by UEFITool. I first found out when I used UBU Tool to update microcode and other firmwares in the past and since just used the 3503 provided by ASUS ROG (original).

I found out about ReBar to add support for my newly acquired RX6600 and went with the normal method of using UEFITool and UEFIPatch. The bios flashes successfully and ReBar works, except overclocking now doesn't work (which is quite essential on DDR3 ram in my case).

I used MMTool 5.0.0.7 and 5.2.0.24 and they both modify the bios in the exact same way (but different to UEFITool of course). After successfully applying the patches with UEFIPatch, the system rejects the bios as an update via the EZ Update tool, nor does it accept via the flashback method (the indicator stays turned on instead of blinking).

Did I miss any step when using MMTool (I followed the steps in the wiki)? Or am I supposed to use MMTool v4.x instead?

@xCuri0
Copy link
Owner

xCuri0 commented Nov 21, 2023

It was fixed here https://winraid.level1techs.com/t/asus-z97-maximus-vii-hero-readjustable-bar/90930/38

@Koekieezz do you remember how you fixed this ? Want to add it to the guide

@FPSUsername
Copy link
Author

FPSUsername commented Nov 21, 2023

Yes! The keyboard bug was indeed present as well on my end as well. The patch seems to be in the nvramsmi module. I'm not sure how to extract it and compare (I wouldn't risk using the patched module from another bios honestly).

@xCuri0
Copy link
Owner

xCuri0 commented Nov 22, 2023

Have you tried other versions of MMTool ?

@FPSUsername
Copy link
Author

FPSUsername commented Nov 22, 2023

It seems that MMTool 4.50.023 generates a different output than 5.0.0.7 (which does the same as 5.2.0.24).
I'll try to flash that later today but I doubt it'll work, as the VII Hero required a patched nvramsmi module, I bet it's the same case here.
I extracted the NvramSmi from the ranger bios using UEFITool A67. The tool reports a different full size, so I think it needs to be patched separately and not replace it with the patched version for the Hero motherboard.
MAXIMUS VII Ranger 3503 NvramSmi.zip

@xCuri0
Copy link
Owner

xCuri0 commented Nov 22, 2023

@FPSUsername don't replace any modules

follow the method in UEFIPatch wiki page so only MMTool 4.5 is used on the final BIOS, preventing any corruption. You should end up replacing your NvramSmi module with your own generated patched one using this method.

@FPSUsername
Copy link
Author

What I did before was to add the rebar through MMTool 5.x and then apply the patch with UEFIpatch v28. The issue is that the bios (either flashback or ez flash) doesn't accept it. I'll try with MMTool 4 later and see if it will be accepted, but I doubt it.

I'm not sure how to modify the NvramSmi as there's no documentation on that and what to change. Koekieezz mentioned that he used UBU Tool to update the microcode, and using only that already causes the overclock issue on the VII Ranger. I believe the NvramSmi needs to be patched either way and that MMTool won't solve the issue in this case.

@xCuri0
Copy link
Owner

xCuri0 commented Nov 22, 2023

@FPSUsername NvramSmi patch is done by UEFIPatch, you don't need to do anything but follow the written pad file workaround in the guide.

NvramSmi patch to resolve an issue that causes ReBarState to not work.

Overclocking issue is something else I think, I asked Koekieezz on Discord if he remembers what was changed and he doesn't.

@FPSUsername
Copy link
Author

FPSUsername commented Nov 22, 2023

image
Unfortunately the bios is rejected when patching with MMTool 4.50.023 and using UEFIPatch afterwards. If it's rejected by EZ Flash, it's rejected by flashback.

I attached the original, modified and patched bios files.

The patches that were applied

parseImageFile: Aptio capsule signature may become invalid after image modifications
patch: replaced 16 bytes at offset B80h 3BC3771548BE000000C00F000000482B -> 3BC3771548BE0000000010000000482B
patch: replaced 11 bytes at offset 87F7h B8FFFFFFFF030000004C3B -> B8FFFFFFFFFFFFFF004C3B
patch: replaced 22 bytes at offset 710Ah 833E067506C70604000000833E077506C70605000000 -> 66906690669066906690669066906690669066906690
patch: replaced 5 bytes at offset 6A5h 9801000072 -> 0000000072
patch: replaced 7 bytes at offset 1922h 493B4C24C0771B -> 66906690669090
patch: replaced 7 bytes at offset 19C9h 493B4C24C0771C -> 66906690669090
Image patched

VII Ranger 3503 ReBar MMTool 4.50.023.zip

@xCuri0
Copy link
Owner

xCuri0 commented Nov 22, 2023

@FPSUsername You should NOT run UEFIPatch directly on the BIOS you're going to flash because it will cause issues like what you have with OC.

https://github.com/xCuri0/ReBarUEFI/wiki/Using-UEFIPatch#pad-file-issue-workaround this is what you should do so the BIOS you flash only get's touched by MMTool, and make sure you insert ReBarDxe with MMTool too

Use version 4.5.023 it's what others have been successful with

@FPSUsername
Copy link
Author

@xCuri0 It doesn't seem to matter. I created the patched bios files with MMTool 4.50 and UEFITool v28 method and both generate the exact same file before patching with UEFIPatch. The hashes are the same, pad file is not altered.

So it seems like the VII Ranger is not affected by the bug, however, the OC issue still stands.

Continuing from the pad file workaround, I extracted the PciBus and PciHostBridge from the patched bios and replaced the PciBus and PciHostBridge from the bios with ReBar injection via MMTool and just to try, also the stock bios.

Reopening the bios files in UEFITool to verify, the PciBus full size and body size is different on the files with the patched ffs injected via MMTool. I'll try to flash both and see what happens.

To clarify, ReBar does work, but altering the bios in any way breaks overclocking and adds the no keyboard bug found in the VII Hero motherboard, before Kookieezz found a solution.

@xCuri0
Copy link
Owner

xCuri0 commented Nov 23, 2023

@FPSUsername It's a know issue that UEFITool causes stuff like this.

If you can figure out how to flash the MMTool BIOS it will most likely work

@FPSUsername
Copy link
Author

@xCuri0 UEFITool causes issues, but if the finalized bios is exactly the same (matching SHA256) using MMTool 4.50, then the same issue (OC) will exist. I'll try to start from a clean slate and do everything with MMTool 4.50 again and see if I can get OC to work after adding ReBar.

I really hope Koekieezz can help with the NvramSmi for this motherboard, because I believe that's where a potential fix is. I have little knowledge about bios modding, I hope to figure out extracting the NvramSmi from the VII Hero bios and compare it to the modified variant to get some more insight in what changed.

@xCuri0
Copy link
Owner

xCuri0 commented Nov 23, 2023

@FPSUsername Your issue is not NvramSmi, that module only handles NVRAM like ReBarState and gets fixed by UEFIPatch.

If you do MMTool 4.5 like I said you're BIOS will probably work with OC and everything, not just Z97 I saw this exact issue on a Z170 board too fixed by using MMTool exclusively.

@FPSUsername
Copy link
Author

FPSUsername commented Nov 25, 2023

I've used this bios as a base (as it's updated and it works with overclocking), then did the following:

  1. Add ReBar to the PCIe bus with MMTool v4.50.023
  2. Ran UEFIPatch with the patch.txt from this repo
  3. Opened the .patched bios in UEFITool A67 and extracted "as is" the PCIeBus and PCIeHostBridge
  4. Opened the ReBar bios (from step 1) in MMTool v4.50.23 and replaced the PCIeBus and PCIeHostBridge with the extracted ffs files.
  5. Save as M7R.CAP and flash
  6. Overclocking works, rebar doesn't as it shows not enabled in BIOS.

image

It is recommended to first try smaller sizes above 256MB in case BIOS doesn't support large BARs.

Enter ReBarState Value
0: Disabled
Above 0: Maximum BAR size set to 2^x MB
32: Unlimited BAR size                                        

13
Writing value of 13 / 8192 MB to ReBarState        

Failed to write ReBarState UEFI variable
GetLastError: 5
You can close the app now

@xCuri0
Copy link
Owner

xCuri0 commented Nov 25, 2023

@FPSUsername You have to do the same thing you did with PciBus to NvramSmi.

It will work then, that's the module causing this error.

@xCuri0
Copy link
Owner

xCuri0 commented Nov 25, 2023

Also later once you have it all working can you test using UEFITool for the first step only (adding ReBarDxe) and the same MMTool steps for the rest ?

I want to know if I have to update first step of guide to say use MMTool on ASUS.

@FPSUsername
Copy link
Author

image
I had to do the same to NvramSmi to get ReBar working. Overclock & ReBar.

I did get the no keyboard bug. I'll investigate it later and also using UEFITool. The issue I believe is UEFIPatch, because UEFITool makes identical files compared to MMTool 4.50.23.

So a preliminary conclusion: for ASUS motherboards, you'll have to replace the modules with MMTool after extracting them from a patched version.

@xCuri0
Copy link
Owner

xCuri0 commented Nov 25, 2023

I'll investigate it later and also using UEFITool. The issue I believe is UEFIPatch, because UEFITool makes identical files compared to MMTool 4.50.23.

If that's the case then there's no need to do what I said.

About the keyboard bug did you apply this patch
image

It modifies PciBus btw, so you will need to apply both patches before extracting the PciBus module for using in MMTool

@FPSUsername
Copy link
Author

FPSUsername commented Nov 25, 2023

@xCuri0 Thank you for guiding me through, it worked!

To make things easier in the future, I believe the trick is as following:

  1. Inject/update/do anything with UEFITool/MMTool/UBU and save the bios
  2. Apply patches with UEFIPatch
  3. Extract what's patched and the NvramSmi using UEFITool from the patched bios
  4. Open the BIOS from step 1 with MMTool 4.50.023 and replace the modules with the extracted ffs modules

So this bios can also be added to the list:

User Motherboard GPU BAR size tested UEFIPatch req (Y/N) Notes
@FPSUsername ASUS VII Ranger RX 6600 8GB 8GB Y Need to extract PCIeBus, PCIeHostBridge and NvramSmi from the UEFIPatch patched bios and replace the modules in an unpatched bios. BdwUSB3.txt patch must also be included.

As a treat, here is the modified ReBar bios with the following changes (Thanks to voron00 for updating the BIOS in 2019 with pretty much the final updates).

Modules:

  • OROM IRST RAID for SATA v13.0.0.2075 -> v14.8.2.2397
  • EFI IRST RAID for SATA v13.0.0.2075 -> v14.8.2.2397
  • EFI GOP Driver HSW-BDW v5.5.1024 -> v5.5.1034
  • OROM Intel Boot Agent GE v1.5.47 -> v1.5.62
  • EFI Intel PRO/1000 UNDI v6.0.03 -> v6.6.04
  • ReBarDxe -> v0.3

Microcode:

  • Haswell: 27 - cpu306C3_plat32_ver00000027_2019-02-26_PRD_4F5914B9.bin
  • Broadwell: 20 - cpu40671_plat22_ver00000020_2019-03-07_PRD_5246E87E.bin

MAXIMUS-VII-RANGER-ASUS-3503-REBAR.zip

SHA256 from M7R.CAP 4CCCB56ABB490E7A0745E1D2C8F90EB9B4BA582169524754314F32F06ECBD9AF

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants