ReBAR Support

For 11th gen, the command should be:

setup_var.efi 0x431 0x1 -n SaSetup

The idea is taken from https//ristovski.github.io/posts/inside-insydeh2o, but instead of dumping the BIOS I’ve download the EFI Bios update zip which contains a ~34 MB file called hx20_capsule_3.10.bin or firmware.cap. This file can be opened in GitHub - LongSoft/UEFITool: UEFI firmware image viewer and editor Using this tool you can extract the PE Image Section of a DXE Driver called DriverSampleDxe and having the text SetupUtility. After dumping this file you can use GitHub - LongSoft/IFRExtractor-RS: Rust utility to extract UEFI IFR data into human-readable text to extract a list of text files containing definitions of the BIOS setup menu including the hidden menu’s and options. For example in one of the text files you will find for 12th gen:

		OneOf Prompt: "PCIE Resizable BAR Support", Help: "Enable/Disable PCIE Resizable BAR Support", QuestionFlags: 0x10, QuestionId: 0x444, VarStoreId: 0x2, VarOffset: 0x42B, Flags: 0x10, Size: 8, Min: 0x0, Max: 0x2, Step: 0x0
			OneOfOption Option: "Auto" Value: 2, Default, MfgDefault
			OneOfOption Option: "Enabled" Value: 1
			OneOfOption Option: "Disabled" Value: 0
		End 

The VarStoreId is a reference to a VarStoreEFI definition in the top of the text file

VarStoreEfi Guid: 72C5E28C-7783-43A1-8767-FAD73FCCAFA4, VarStoreId: 0x2, Attributes: 0x7, Size: 0x578, Name: "SaSetup"

So based on this information you know you have to change byte 0x42B (VarOffset) to the value 1 in SaSetup (Name of VarStoreEfi) to set ReBAR support from Auto (default) to Enabled. To change it back you have set it back to 2. Notice on 11th gen you can only disable or enable ReBAR support.

For changing the values I use setup_var.efi which you can run from within an EFI shell but there are also patches for Grub to add the setup_var command.