[Offer] reBART - Resiz. BAR Module for Intel 8-Series MBs

reBART is a UEFI DXE driver I wrote to give Resizable BAR support to Intel 8 series (Lynx Point) chipset motherboards

I was trying to get above 4G decoding working on my old B85 and just couldn’t get it to take. Looking around, hardly anyone has managed to get it working on their 8 series mobos.
So I went digging into the firmware and found it never open any memory space above 4GB. The code for it just isn’t there!
It looks like intel left the above 4G path out of the 8 series platform code. every vendor I checked inherited the same gap, they’re all missing the exact same code block.
“Above 4G Decoding” switch found in some 8 series mobo bioses most likely does nothing, it has no effect on decoding above 4G.

reBART moves the GPU’s memory window above the 4 GB line where the full framebuffer fits.
It finds the discrete GPU, places its memory window high in the address space, opens the bridge and moves the display’s framebuffer along at the ReadyToBoot UEFI event.

Unlike ReBarUEFI, module patching is not required. Only DSDT patching is required
Follow the instructions in github GitHub - roschank/reBART: Resizable BAR support for Intel 8 series chipset (Haswell/Lynx Point) motherboards · GitHub
Use same ReBarUEFI’s ReBarState utility to set the BAR size

DL: Releases · roschank/reBART · GitHub



Edit by Fernando: Thread title customized and shortened

2 Likes

I’ve tried to patch my ASUS Z87 plus bios. When i patch DSDT, the bios is not booting. The motherboard switching between CPU led and Memory led. Insert reBART.ffs driver work. So i think this is not compatible with ASUS. What do you think ?

can you upload the modded bios?

Yes, of course. You will find attached here.
Z87PL.rar (4.8 MB)

rebart_dsdt_patch.exe binary I published is not the final version it seems. Please grab the updated one. My mistake

Thx. I will try it when i have some time and give a feedback just after

I’ve tried the updated version. Same thing come again. I give you my updated bios version if you want to check something.
Z87PL.rar (4.8 MB)

Could you try replacing with this AmiBoardInfo module

AmiBoardInfomod.zip (23.0 KB)

@roschank But, is it okay to use ReBarUEFI uefipatches, and then use this ffs for the purpose instead of rebardxe? Is your .ffs is sufficient OR i need to use ReBarDxe/NvStrapsRebar? Say if i have B85 with RTX 2060 and want to do rebar..

Also in the git page i noticed that you need to insert it after PciBus dxe driver, so, in some cases (Notably asus bios) i usually do a workaround for pad files dissapearing/appearing, by either extract the patched pcibus with latest UEFITool NE → delete PciBus with MMTool → “Insert After” the dxe driver before where PciBus was located using UEFITool 0.25.0, so basically “re insert the same patched module” with UefiTool, or just Extract the patched PciBus module, delete it in the bios file using mmtool, and “Insert After” below the dxe driver after the last padfiles in the dxe driver partition, basically trying to make the pad file in tact.

@Sweet_Kitten in dm also taught me that sometimes dxe driver can be relocated anywhere within the designated partition where it is from, which aligns with the method i did. It worked, i put the PciBus to the end of the dxe drivers partition and the bios boots just fine and no quirks with anything, i even put pcibus, amiboardinfo, and pcihostbridge to the very low part of the dxe driver partition, and it still runs fine. So basically, my question is: Does it HAVE to be exactly after PciBus, or can it be anywhere as long as it is below PciBus? Can NvStrapsRebar also be used with this?

@Koekieezz The way ReBarDxe/NvStrapsRebar and this module handle rebar is quite different. You shouldnt use them together. The patches; from what i see should be harmless but futile

Module position within the volume doesnt matter. the dispatcher run them by their dependency expressions (when dependencies are satisfied). see bottom line in reBART.inf

Rebart has got essential turing support

1 Like

@roschank Wow thanks for quick reply!!!

So basically, i can use the ReBarUefi.exe and NvStrapsRebar.exe with only reBART.ffs inserted? As in this reBART.ffs replaces the need of ReBarDxe.ffs and NvStrapsRebar.ffs present in the bios, since reBART.ffs do use the calls from both exe rather than it’s own?

I’ve tried this file. The MB is still not booting but this time, stuck on VGA led.
If you have a idea ?

@Koekieezz yes this is a standalone module

@BrN sent you a DM

1 Like

@roschank Is it fine to do the regular dsdt patch which is adding:

QWordMemory (ResourceProducer, PosDecode, MinFixed, MaxFixed, Cacheable, ReadWrite,
    0x0000000000000000, // Granularity
    0x0000000000010000, // Range Minimum
    0x000000000001FFFF, // Range Maximum
    0x0000000000000000, // Translation Offset
    0x0000000000010000, // Length
    ,, _Y0F, AddressRangeMemory, TypeStatic)

and

CreateQWordField (BUF0, \_SB.PCI0._YAF._LEN, M2LN)  // _LEN: Length
CreateQWordField (BUF0, \_SB.PCI0._YAF._MIN, M2MN)  // _MIN: Minimum Base Address
CreateQWordField (BUF0, \_SB.PCI0._YAF._MAX, M2MX)  // _MAX: Maximum Base Address
M2MX = 0x8000000000 - One
If ((TUUD >= 0x1000))
{
    M2MN = (TUUD << 0x14)
}
Else
{
    M2MN = 0x100000000
}

M2LN = ((M2MX - M2MN) + One)

Then Compile it as DSDTMod.asl/.aml and then rename it as DSDT.aml (deleting both original DSDT.aml and DSDTMod.dsl), and then use the modified DSDT.aml with the rebart_dsdt_patch.exe from your git page?

Some asrock motherboards might need some lines to be deleted (usually If (_OSI… lines) to make it able for wrapping it up with amiboardinfotool because PE32 Image isn’t adjustable, needs to decrease some part of the lines.

Oh also, can it be used on MSI 6 and 7 series board? Most of the lga 1155 msi board doesn’t have above 4g decoding option in the bios… maybe you have an insight for this?

@Koekieezz if its a 8 series mboard i would recommend using the rebart_dsdt_patch to patch the .aml. it adds only 46 bytes to the file. decompile-recompile usually increases the file size by 500+ bytes

6,7 series should work but i cant say for sure

1 Like

@roschank Okay, but i did the ReBarUefi patch, and use the already modified DSDT.aml (in this case i had done the dsdt patch way before reBART, so i just extract PE32 of the already modified AmiBoardInfo), is it still fine to use that?

if your board is 6 or 7th series the mod in ReBarUEFI guide is ok

if its 8 series asl should be

QWordMemory (ResourceProducer, PosDecode, MinFixed, MaxFixed, Cacheable, ReadWrite,
    0x0000000000000000, // Granularity
    0x0000000A00000000, // Range Minimum
    0x0000007FFFFFFFFF, // Range Maximum
    0x0000000000000000, // Translation Offset
    0x0000007600000000, // Length
    ,, _Y0F, AddressRangeMemory, TypeStatic)
1 Like

@roschank Let’s focus the topic to 8 Series since im talking about 8 Series

Since some 9 series board have Above 4G Decoding toggle but lacks the propper DSDT, it needs to add:

QWordMemory (ResourceProducer, PosDecode, MinFixed, MaxFixed, Cacheable, ReadWrite,
    0x0000000000000000, // Granularity
    0x0000000000010000, // Range Minimum
    0x000000000001FFFF, // Range Maximum
    0x0000000000000000, // Translation Offset
    0x0000000000010000, // Length
    ,, _Y0F, AddressRangeMemory, TypeStatic)

and sometimes also add:

CreateQWordField (BUF0, \_SB.PCI0._YAF._LEN, M2LN)  // _LEN: Length
CreateQWordField (BUF0, \_SB.PCI0._YAF._MIN, M2MN)  // _MIN: Minimum Base Address
CreateQWordField (BUF0, \_SB.PCI0._YAF._MAX, M2MX)  // _MAX: Maximum Base Address
M2MX = 0x8000000000 - One
If ((TUUD >= 0x1000))
{
    M2MN = (TUUD << 0x14)
}
Else
{
    M2MN = 0x100000000
}

M2LN = ((M2MX - M2MN) + One)

So, for 8 series, since the DSDT Structure is similiar to 7 series, is only modifying/adding your mentioned lines sufficient/needed:

QWordMemory (ResourceProducer, PosDecode, MinFixed, MaxFixed, Cacheable, ReadWrite,
    0x0000000000000000, // Granularity
    0x0000000A00000000, // Range Minimum
    0x0000007FFFFFFFFF, // Range Maximum
    0x0000000000000000, // Translation Offset
    0x0000007600000000, // Length
    ,, _Y0F, AddressRangeMemory, TypeStatic)

and adding the QWordField lines are not needed, due to lack of Above 4G Decoding structure as per what you’ve discovered and explained in your git page?

I would love to listen to your elaborative explanation :smiley:

Your second code block (CreateQWordField..), dynamic calculation matters if BAR is placed right above RAM in physical address space. I’m mapping the BAR at top of the physical space. so its not required

1 Like

@roschank Thank you for your explanation, anyways i’ve read that you did put the Range Minimum at A00000000 (which is 40GiB), is this a universal patch btw? I mean as in starting from address A00000000 as the lowest, Most of the motherboards didnt touch address A00000000, hence it is safe to use that. Is it like that?