[Release] Resizable BAR BIOS EFI Module

thanks for your replay , then i’ll keep on try to enable above 4g

Trying to patch DSDT in my case for one bios.
Original bios link here: https://www.gigabyte.com/Mini-PcBarebone/GB-BSi3A-6100-rev-10/support#support-dl-bios

But I cannot find AmiBoardInfo but only AmiBoardInfo2

However, after extracted that AmiBoardInfo.efi and try to get DSDT:

C:\AmiBoardInfoTool -a AmiBoardInfo.efi -d DSDT.aml
Extracting DSDT from AmiBoardInfo.efi to DSDT.aml
ERROR: DSDT wasn’t found in AmiBoardInfo

And I managed extract DSDT info from running OS and looks like it is able to decompile.

Just want to know:

1, should I still use ‘AmiBoardInfoTool -a AmiBoardInfo.efi -d DSDTMod.aml -o AmiBoardInfoMod.efi’ to insert modified DSDT to AmiBoardInfo.efi and replace that one in bios?

2, looks like in my case, the DSDT stored in DsdtAsl module, shall I replace this module as well? or I just need to replace this DsdtAsl module but no need to do modification on AmiBoardInfoTool as in above 1?

Thanks

Read the wiki again it says only replace the DsdtAsl module on boards like this

1 Like

Thank you Kuri0,

after flashed DSDT patched bios in, I can boot into linux and sudo dmesg | grep "root bus resource" looks like give me a maximum range of 0x7fffffffff (was 0xfefffff befor DSDT patching),
however, when I boot in to windows 10 (and other windows PEs), it give me a BSOD STOP - ACPI BIOS ERROR .

Any more guidance?

Below is the DSDT patch code I applied.

1, I have reduced aml file size by removing ADBG lines - 129k, original one is 130k and after patching one without shrink is 131k.
2, is that windows BSOD related to “Above 4GB MMIO BIOS assignment” setting? because so far i do not have a confidence way and find a proper way to to enable this option yet because my bios setup screen refuse to show me this option, even i change it to USER level.

                DWordMemory (ResourceProducer, PosDecode, MinFixed, MaxFixed, NonCacheable, ReadWrite,
                    0x00000000,         // Granularity
                    0x00000000,         // Range Minimum
                    0xDFFFFFFF,         // Range Maximum
                    0x00000000,         // Translation Offset
                    0xE0000000,         // Length
                    ,, _Y0E, AddressRangeMemory, TypeStatic)
                QWordMemory (ResourceProducer, PosDecode, MinFixed, MaxFixed, NonCacheable, ReadWrite,
                    0x0000000000000000, // Granularity
                    0x0000000000010000, // Range Minimum
                    0x000000000001FFFF, // Range Maximum
                    0x0000000000000000, // Translation Offset
                    0x0000000000010000, // Length
                    ,, _Y0F, AddressRangeMemory, TypeStatic)
                DWordMemory (ResourceProducer, PosDecode, MinFixed, MaxFixed, NonCacheable, ReadWrite,
                    0x00000000,         // Granularity
                    0xFD000000,         // Range Minimum
                    0xFE7FFFFF,         // Range Maximum
                    0x00000000,         // Translation Offset
                    0x01800000,         // Length
                    ,, , AddressRangeMemory, TypeStatic)
//<inserted >-------	
		QWordMemory (ResourceProducer, PosDecode, MinFixed, MaxFixed, Cacheable, ReadWrite,
                    0x0000000000000000, // Granularity
                    0x0000000000010000, // Range Minimum
                    0x000000000001FFFF, // Range Maximum
                    0x0000000000000000, // Translation Offset
                    0x0000000000010000, // Length
                    ,, _YAF, AddressRangeMemory, TypeStatic)
            })
//<e_inserted >-------	
// <Omitted >-------

                If ((PM0H == One))
                {
                    CreateBitField (BUF0, \_SB.PCI0._Y0D._RW, F0RW)  // _RW_: Read-Write Status
                    F0RW = Zero
                }

                CreateDWordField (BUF0, \_SB.PCI0._Y0E._MIN, M1MN)  // _MIN: Minimum Base Address
                CreateDWordField (BUF0, \_SB.PCI0._Y0E._MAX, M1MX)  // _MAX: Maximum Base Address
                CreateDWordField (BUF0, \_SB.PCI0._Y0E._LEN, M1LN)  // _LEN: Length
                M1LN = M32L /* External reference */
                M1MN = M32B /* External reference */
                M1MX = ((M1MN + M1LN) - One)
//<inserted >-------				
                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				
				
				// 39-bit for Haswell and up
                M2MX = 0x8000000000 - One
                If ((TUUD >= 0x1000))
                {
                    M2MN = (TUUD << 0x14)
                }
                Else
                {
                    M2MN = 0x100000000
                }

                M2LN = ((M2MX - M2MN) + One)
//<e_inserted >-------					
                If ((M64L == Zero))
                {
                    CreateDWordField (BUF0, \_SB.PCI0._Y0F._LEN, MSLN)  // _LEN: Length
                    MSLN = Zero
                }
                Else
                {

//<commented >-------		
/* 
below commented out lines are in original configure, if not comment these out, iasl will complain 
Section_Raw_DsdtAsl_body.dsl   4056:                     CreateQWordField (BUF0, \_SB.PCI0._Y0F._LEN, M2LN)  // _LEN: Length
Error    6074 -                                 Name already exists in scope ^  (M2LN)
*/		
                //    CreateQWordField (BUF0, \_SB.PCI0._Y0F._LEN, M2LN)  // _LEN: Length
                //    CreateQWordField (BUF0, \_SB.PCI0._Y0F._MIN, M2MN)  // _MIN: Minimum Base Address
                //    CreateQWordField (BUF0, \_SB.PCI0._Y0F._MAX, M2MX)  // _MAX: Maximum Base Address
                //    M2LN = M64L /* External reference */
                //    M2MN = M64B /* External reference */
                //    M2MX = ((M2MN + M2LN) - One)
//<e_commented >-------	                
				}

                Return (BUF0) /* \_SB_.PCI0.BUF0 */
            }

@ananyone if your board already has CreateQWordField M2LN then why are you editing the DSDT ? There is no reason to edit it

Read the wiki it says how you can enable 4G decode

1 Like

the reason I try to patch DSDT it is because I can not see the Large Memory in Windows Device Manager by selecting select View → Resources by Type, and in linux sudo dmesg | grep "root bus resource" give me an output maximum 0xfefffff - i am not sure that is the correct value,

and if I try to find a way to enable “Above 4GB MMIO BIOS assignment” and Above 4G Decoding in original bios, no matter i using modGRUBShell.efi commands:

“setup_var 0x487 0x1” # in this board Above 4GB MMIO VarOffset: 0x487
“setup_var_cv PCI_COMMON 0x3 0x1 0x1”
or
tools like AMIBCP5.exe try to enable setting options in bios setup screen , it just doesn’t woking.

out of ideas i guess it might DSDT related😂…

is that means if i can see CreateQWordField M2LN exists in DSDT, it means i can enable 4G decode somehow - do not need to patch DSDT?

You do not need to patch DSDT just figure out how to enable 4G decode @ananyone

1 Like

I have done all steps except from enabling “Above 4G Decode”, I have a Dell Precision M4800 laptop, but I have a hidden “Max TOLUD” setting, will that be useful? It has different values ranging from 1 GB to 3.25 GB, it also has a “Dynamic” value.

@H3ADROOM do you not have a 4G Decode setting or what ?

Set TOLUD to the lowest value if you can’t enable 4G Decode. You should be able to use 1GB or even 2GB BAR possibly

1 Like

@Kuri0 Looks like it, searching for a “above 4G” actually shows "OneOf Prompt: "Memory Remap", Help: "Enable or disable memory remap above 4G.", which is not a thing that we actually need. Closest thing that can be found is Max TOLUD. So yeah, I will tinker with that then, thank you) :sparkling_heart:

@H3ADROOM Memory Remap is not 4G Decoding. Leave it as is because disabling it will cause issues with more than 4GB RAM

2 Likes

Few other settings you need to change mmmio size (someone correct the name if not right)
Small
Large
Dynamic

Yer boot time for me is loooong with the arc a770 bitfircation set to x16 if you can
Mine runs at pci 3.0 x16 but power is a problem I have a 825w and either bad gpu rail or not enough juice

1 Like

I did it on dell precision t7810 it’s a few bios edits but it’s not hard

1 Like

I’ll take that in mind, I am also working on unlocking hidden options in BIOS

so are a few of us working on the dell bios what options you looking for as we have a few figured out

Hi,
I have a P9X79-PRO board with i7-3930K, the CPU is “Sandy Bridge-E”. the board does support “Above 4G”. I wanted to know if it is possible to user ReBar with this CPU please (cause this is the architecture before “Ivy Bridge”).
Thanks in advance for all helpers!

Edit: Here is some proof that my motherboard is capable


@Blizz
For AMI IV core bios AMIBCP, mostly still works, for AMI V core bios use:
[TOOL] UEFI Editor - BIOS/UEFI Modding / BIOS Modding Guides and Problems - Win-Raid Forum (level1techs.com)
or
Enabling hidden 4G decoding · xCuri0/ReBarUEFI Wiki (github.com)

1 Like

There are no limitations by CPU architecture. The only thing you need is UEFI and optionally 4G decode to use full BAR size.

1 Like

Right, sorry. Got confused for a second there and ran to post.

hi sorry for the late but i did some more test. about the intel a770 on the poweredge r730 looks like resizable bar is active, but in the info i see only 16gb, while i tried an rtx 3080 and i got 3 line on gpu.-z; 1st is 32mb, 2nd is 16gb and 3rd is 16mb :expressionless:
really strange thing is that in benchmark i got not good results… im still testing, but after setup fan speed to 15% and setup max performance in bios , got almost good score in unigine 2 with gpu utilization to max 60/70% and cpu freq to 1.99ghz, while before those 2 change i got cpu at 1.3ghz and gpu at 50%… maybe my psu arent good enought and are throttling power