[HELP] Enabling 4G Decoding/Resizable BAR on Lenovo P310

Hello,

I recently picked up a Intel ARC a750 for really cheap to use for h265 encoding. I’m running it in a Lenovo P310 (30AT000GUS). With the latest drivers from Intel installed I’m getting a bunch of wacky issues, like the display freezing but still allowing input, artifact, and random other things. Running an older version of the driver seems to keep the major stuff at bay, but I imagine this is all due to not having resizable BAR enabled.

Here’s where my journey starts. I followed the ReBarUEFI guide using the [atest BIOS image from Lenovo and was able to find the offset for 4G decoding is 0x03.

VarStore Guid: ACA9F304-21E2-4852-9875-7FF4881D67A5, VarStoreId: 0xCCCC, Size: 0x6, Name: "PCI_COMMON"
	Form FormId: 0x1, Title: "PCI Subsystem Settings"
		Subtitle Prompt: "00.00", Help: "", Flags: 0x0
		End 
		Subtitle Prompt: "", Help: "", Flags: 0x0
		End 
		Subtitle Prompt: "PCI Settings Common for all Devices:", Help: "", Flags: 0x0
		End 
		CheckBox Prompt: "Above 4G Decoding", Help: "Globally Enables or Disables 64bit capable Devices to be Decoded in Above 4G Address Space (Only if System Supports 64 bit PCI Decoding).", QuestionFlags: 0x10, QuestionId: 0x7006, VarStoreId: 0xCCCC, VarOffset: 0x3, Flags: 0x0, Default: Disabled, MfgDefault: Disabled
		End 

So using the command

setup_var 0x03

Returns 0x01, showing it’s enabled. In the guide it mentions that if you get 0x01, even though it’s not enabled, you can set it to 0x0, reboot, then set it to 0x1 to enable it.

Having that enabled doesn’t seem to make the Intel Arc Control happy about the resizable BAR being enabled, so I’m sure it’s not actually enabled.

This is where I go into the rest of the guide where it describes how to patch it all. So long story short, I was able to create a patched version of the ROM, but now I’m running into an issue with flashing it.

Using the official BIOS flashing tool from Lenovo returns a “18 - Error: Secure Flash Rom Verify fail”. I also tried the AMI Firmware Update Utility (v5.15.03.0081), it returns the same error. Using the older version of AMI FUU (3.05) that supports /GAN, it doesn’t seem to recognize the BIOS to even attempt to flash it.

I’m sure I’m skipping some stuff I did, I’ve been on and off trying to get this to work for a few days now. Hopefully some one can help me flash this BIOS.

Appreciate the help.

edit:
Added more details

when you use setup_var or setup_var _3, did you reboot using ctrl alt del or type reboot and enter? because the first time i use it, it just wont save, but then i repeat those steps on modgrub, and type reboot and enter to actually set it.

Normally I was pressing CTRL+ALT+DEL

I just redid the process with the reboot command, as you noted, and loading up GPU-Z shows the 4G decoding and ReBAR is still “No”

@WarlockSyno it’s mentioned multiple times in the guide GPU-Z 4G decoding is wrong. You need to check for Large Memory in Device Manager → View → Resources by type.

Even if 4G decoding is on it’s useless without ReBarDxe unless you use Linux.

Right, which is why I’m reaching out here to see if any one knows a way to flash the patched BIOS.

Okay, with the help of @68k-dude, I was able to flash the BIOS to use 4G decoding.

Here’s the sauce.

After LOTS of trial and error we tried something similar to this post, where we took the BIOS section from the P320 BIOS ROM that you can download from Lenovo and replaced the entire BIOS section of my BIOS that I read with CH341A.

The P320 has the code and the option to enable the 4G decoding. So after patching that frankenbios with ReBAR I was able to set it to Unlimited.

Modding the CH341a to use 3.3v

The MX25L12873F in question that needed flashed

And after it’s all said and done:

With that done Borderlands 3 got a 25% FPS boost.
Before:


After:

1 Like

hi there , would you mind sharing your modded frankenbios, as I ´own the same P310 in an SFF case und the same motherbord using a RTX A2000 12GB. ch 341 black prommer is available to put the file into the bios chip .

greets chris