xCuri0 / ReBarUEFI

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

GA-X79-UP4 (Sandy Bridge-E) semi-working with ReBAR ≤1GB #9

Closed aquamacho1 closed 6 months ago

aquamacho1 commented 1 year ago

Hi, so i did manage to unlock ReBAR on my Sandy Bridge - E motherboard (GA-X79-UP4), by modding bios with UEFITool, but values greater than 1GB = my motherboard just straight trying recovery from second bios, which it fails, then reboots and tries again to ∞, until i manually do recovery by pressing reset and power buttons at the same time for 10 seconds, then it flashes 2nd bios to M.

I've also tried those secret setup_var's

setup_var 0x12E 0x1
setup_var 0x9 0x1
setup_var 0xF 0x1
setup_var 0x16 0x1
setup_var 0x1C 0x2
setup_var 0x4F 0x2
setup_var 0x6C 0x0
setup_var 0x4 0x1
setup_var 0xC 0x5
setup_var 0xD 0x5
setup_var 0x17 0x1
setup_var 0xF5 0x0
setup_var 0xD8 0x1
setup_var 0x55 0x1

PCIe Sub Decode, VarStoreInfo (VarOffset/VarName): 0x12E
Relaxed Ordering, VarStoreInfo (VarOffset/VarName): 0x9
Extended Synch, VarStoreInfo (VarOffset/VarName): 0xF
AtomicOp Requester Enable, VarStoreInfo (VarOffset/VarName): 0x16
Target Link Speed, VarStoreInfo (VarOffset/VarName): 0x1C
Server Class, VarStoreInfo (VarOffset/VarName): 0x4F
Energy Performance, VarStoreInfo (VarOffset/VarName): 0x6C
Above 4G Decoding, VarStoreInfo (VarOffset/VarName): 0x4
Maximum Payload, VarStoreInfo (VarOffset/VarName): 0xC
Maximum Read Request, VarStoreInfo (VarOffset/VarName): 0xD
AtomicOp Egress Blocking, VarStoreInfo (VarOffset/VarName): 0x17
DRAM RAPL BWLIMIT, VarStoreInfo (VarOffset/VarName): 0xF5
DCA Support, VarStoreInfo (VarOffset/VarName): 0xD8
Local APIC Mode, VarStoreInfo (VarOffset/VarName): 0x55

explorer_r9nwFCwmuy

xCuri0 commented 1 year ago

@aquamacho1 With 4G decode on and BAR set to 4GB or larger it will show in Large Memory.

Also DSDT editing won't fix POST issues, only if you can't boot Windows it's DSDT related.

Try setting these BIOS settings:

4G Decode: On Full Screen LOGO Show: On CSM Support: Never Boot Mode Selection: UEFI Storage Boot Option Control: UEFI Only Display Boot Option Control: UEFI Only PCI Device ROM Priority: UEFI OpRom

aquamacho1 commented 1 year ago

4G Decode: On Full Screen LOGO Show: On CSM Support: Never Boot Mode Selection: UEFI Storage Boot Option Control: UEFI Only Display Boot Option Control: UEFI Only PCI Device ROM Priority: UEFI OpRom

I had these enabled like this from the start

aquamacho1 commented 1 year ago

@xCuri0 Does it matter in which PCI slot my gpu is plugged in? All this time my gpu was in slot 5 (second x16 slot) Untitled

xCuri0 commented 1 year ago

@aquamacho1 i don't think so but sometimes these HEDT boards have different MMIO allocation per slot

xCuri0 commented 1 year ago

@aquamacho1 you can try these patches

# PciBus | Increase 256 byte configuration space limit to 4096 byte allowing access to PCIe extended configuration space
3C1DE39F-D207-408A-AACC-731CFB7F1DD7 10 P:FF000000760B48B8:00100000760B48B8

# Runtime | Remove 4GB limit for CpuIo2 (Fixes 4G Decoding USB issues)
CBC59C4A-383A-41EB-A8EE-4498AEA567E4 10 P:B9FFFFFFFF490FAFC14903C0483BC1776C:6690669090490FAFC14903C06690906690

# PciHostBridge | Remove 4GB limit for PciRootBridgeIo.Mem (Fixes 4G Decoding USB isues)
8D6756B9-E55E-4D6A-A3A5-5E4D72DDF772 10 P:493B4C24C0771B:66906690669090
8D6756B9-E55E-4D6A-A3A5-5E4D72DDF772 10 P:493B4C24C0771C:66906690669090

maybe it will get video output working

aquamacho1 commented 1 year ago

@xCuri0 Im sorry, but i can't test this right now, that X79 board currently not in use anymore. I`ve bought myself an X99 board not long ago, and rebuild my PC around that using spare parts from X79 system (ram cooler etc.).

But i can tell atleast that patches are working on X79 bios file using UEFIPatch. Безымянный

ZOXZX commented 1 year ago

Hello!

Also trying to enable greater than 1GB ReBar on x79. I have dual BIOS MSI X79A GD65 board. With 3C1DE39F patch from above and 4G enabled, I can boot into Windows and connect remotely (no display).

Screenshot_20230612_175325

As you can see, only PCI Bus is in large memory area.

With ReBar size of 16GB, I can see low res windows boot screen and can get display out, although probably 640x480 black and white. Anyway this happens:

Screenshot_20230612_181039

Some parts of GPU are in large area, some not.

As mentioned, I have dual BIOS and CH341 so if you think we can work this out, I'm willing to test.

Thank you!

xCuri0 commented 1 year ago

@ZOXZX

I can see low res windows boot screen and can get display out, although probably 640x480 black and white.

Disable CSM and all legacy stuff

Some parts of GPU are in large area, some not.

This is normal

You need to figure out why it's code 43ing, maybe Linux dmesg can help

ZOXZX commented 1 year ago

Sorry for delay, I'm short on time. I'll have some free time from next tuesday and then I'll sent diagnostics ...

xCuri0 commented 6 months ago

I'm closing this because I think we've solved it at #48