xCuri0 / ReBarUEFI

Resizable BAR for (almost) any UEFI system
MIT License
1.41k stars 63 forks source link

Cannot correct padding error on Asus Maximus V Gene #220

Open kcajjones opened 1 month ago

kcajjones commented 1 month ago

System

Description

I have succesfully injected the RebarDxe FFS module, modified the BIOS menu to show PCI Settings -> Above 4G Decoding option but cannot use UEFIPatch to correct the various issues with limited BAR size on my Ivy Bridge / Z77 platform. As described in the guide, the patches are applied but padding errors are introduced. I have tried to follow the further "fixes" but these lead to a Hex edit to move the changes from the patched (but glitched) file to the original file. This does not work as the PciBus and PciHostBridge modules are compressed and the file sizes are different. If I extract the "Body only" with UEFITool then I can see that the body data is the same size, with the hex editor confirming the correct changes, however the header/compression (?) has somehow been altered and the total size is different so the whole structure beyond the PciBus module is corrupt, including the padding errors.

I've not been able to work out how to fix this issue as MMTool does the exact same thing.

I see in the list of compatible motherboards that a user (who is no longer an active username on github?!) has confirmed this motherboard works with UEFIPatch. I can confirm Resizable BAR is enabled, but limited to 2GB until I can get the UEFI patches to work.

Any help would be greatly appreciated as I have Rebar enabled with 2GB but the system fails to boot if I set it to >=4GB.

Ruffy47 commented 1 month ago

Hey I tried to modify the BIOS file from Asus. I don´t own this board and can´t test it, but you can try if you want. I added the NVME5 and NVStrapsRebar module too.

https://easyupload.io/ievkuc

kcajjones commented 1 month ago

Hey I tried to modify the BIOS file from Asus. I don´t own this board and can´t test it, but you can try if you want. I added the NVME5 and NVStrapsRebar module too.

https://easyupload.io/ievkuc

Thanks for trying, but on inspection with UEFITool, this is not correct. There are padding errors.

Upon inspection, the PciBus and PciHostBridge modules are different sizes from the original BIOS, with the PciBus module not having a compressed section at all. I (think) this is what causes the padding errors.

Ruffy47 commented 1 month ago

I checked again right now and the padding looks the same like in the original BIOS file from Asus. Where do you see the errors?

kcajjones commented 1 month ago

I'm using UEFITool 0.28 but it also shows the same in UEFITool NE A68. What are you using?

Original: image

Yours: image

Ruffy47 commented 1 month ago

Can you try BIOS flashback? Then I can upload the cap file for you and you can test it and flash your original if it doesn´t work.

https://easyupload.io/q6zamf

Ruffy47 commented 1 month ago

I just downloaded the original file from ASUS and there it looks exactly the same like in my modified file.

kcajjones commented 1 month ago

I just downloaded the original file from ASUS and there it looks exactly the same like in my modified file.

How does it look exactly the same? Via which app?

Ruffy47 commented 1 month ago

UEFI Tool

Ruffy47 commented 1 month ago

Ok anyway, you can try the mod file if you want or not. That´s ok too of course, I just tried to help. :)

kcajjones commented 1 month ago

UEFI Tool

Which version? Can you show a screenshot comparison to confirm your modified version has the correct padding?