Determine configurable aperture size from BIOS file

Sorry for the delayed answer. I’ve managed to work with M-Flash. The 1024MB-Test.7z from #19 worked like a charm. All other previous mods with 2048M failed with the same error: “ ERROR: Insufficient PCI Resources Detected”. So, indeed, 2048 was the culprit ( nice catch @Lost_N_BIOS ) I’ll be back with further details.
Update: The latest mod from #20, with configurable aperture size, works also. But, when trying to select from BIOS 2048, falls back in that very interface, to 1024.

@eurodomenii - It’s OK, and it’s good to hear back from you! Nice that you got M-Flash sorted out too, that is best way to flash when you can. I thought maybe it was the forced 2048 after that info from @BroccoliCheddar (Thanks man )
Also, very nice to see the unlock menu BIOS works for you, and you can set 1024MB there at least! So, now we know, very first BIOS edits worked OK, we just forced an impossible setting for this setup/BIOS/Chipset/CPU (whatever is causing the limit)

Can you test, CSM disabled, 2048 and manually change 4GB MMIO BIOS assignment to Enabled, it’s at Chipset >> System Agent (SA) Configuration (Root)? This way we’re sure it’s being set correctly to be using 2048 if at all possible.
Other than this, I am not sure what would limit some BIOS, chipset, CPU etc to have some boards/BIOS allow 4GB while others limited to 1GB? More research on your desired usage/reasoning may turn up answers.
Does 1024MB work for what you needed to do? What is the reason for needing this raised, are you forced to using onboard graphics, and if yes, can you link me to some discussions about this in your usages area so maybe I can find why some systems might be limited and others aren’t
Maybe then I could sort it out? If not, you may need to ask MSI Directly for a BIOS that would allow it (If they gave you, it would be hidden, but I could unhide again for you)

Once again, you’ve got a very good intuition. Before your message, I’ve already seen an warning message: “Select the Aperture Size Note: Above 4GB MMIO BIOS assignment is automatically enabled when selecting 2048MB aperture. To use this feature, please disable CSM Support.”


But, I couldn’t find how to disable CSM Support. In Settings/ Boot I’ve already had Boot mode select UEFI. This was confusing. Fortunately, this post https://forum-en.msi.com/index.php?topic=269698.0 has enlightened me: “ CSM = Asus
Windows 8.1/10 WHQL Support = MSI”
, which is very counterintuitive, it might be as well Linux.

Afterwards, finally, it’s possible to setup aperture size to 2048 ( Above 4GB MMIO BIOS becomes hidden and enabled) . Congrats for your tenacity, intuition and great work!

lspci -v | less

00:02.0 Display controller: Intel Corporation Device 3e98 (rev 02)
Subsystem: Micro-Star International Co., Ltd. [MSI] Device 7c00
Flags: bus master, fast devsel, latency 0, IRQ 135
Memory at 6013000000 (64-bit, non-prefetchable) [size=16M]
Memory at 4000000000 (64-bit, prefetchable) [size=2G]



ls /sys/bus/pci/devices/0000:00:02.0/mdev_supported_types
i915-GVTg_V5_1 i915-GVTg_V5_2 i915-GVTg_V5_4 i915-GVTg_V5_8

2GB aperture size is very relevant for creating more Intel GVT virtual machines ( see https://github.com/intel/gvt-linux/issue…mment-353817255 )
-------------------------------------

BTW, somehow off topic ( or actually, this was the initial name of this topic ), how can I determine, from the latest BIOS, if the motherboard has the aperture size configurable from interface, or hidden?

Analyzing https://www.msi.com/Motherboard/MAG-Z390M-MORTAR latest bios, obtained with extractor, I see that aperture size belongs to Form: Graphics Configuration, FormId: 0x274A {01 86 4A 27 14 0B}.

I was trying to follow the markup Suppress If {0A 82}/ End If {29 02}, but Aperture size seems to be in the visible part.

0x590AE One Of: Aperture Size, VarStoreInfo (VarOffset/VarName): 0x968, VarStore: 0x1, QuestionId: 0x2746, Size: 1, Min: 0x0, Max 0xF, Step: 0x0 {05 91 BF 0B C0 0B 46 27 01 00 68 09 14 10 00 0F 00}
0x590BF One Of Option: 128MB, Value (8 bit): 0x0 {09 07 C1 0B 00 00 00}
0x590C6 One Of Option: 256MB, Value (8 bit): 0x1 {09 07 C2 0B 00 00 01}
0x590CD One Of Option: 512MB, Value (8 bit): 0x3 {09 07 C3 0B 00 00 03}
0x590D4 One Of Option: 1024MB, Value (8 bit): 0x7 {09 07 C4 0B 00 00 07}
0x590DB One Of Option: 2048MB, Value (8 bit): 0xF (default) {09 07 C5 0B 30 00 0F}
0x590E2 End One Of {29 02}


Yet, you needed to modify the BIOS, in order to expose this setting. There’s a catch I’am missing!

BTW, the latest BIOS from https://www.asus.com/Motherboards/ROG-ST…/HelpDesk_BIOS/ (the motherboard that I’m planning to buy ) has the aperture size option hidden or visible?

@eurodomenii - Good you found CSM, yes, some BIOS just roll that all up into a Win8-10 or not type setting, while others have CSM and Windows type setting separately or only one or the others.

So, sweet, you got it enabled now to 2048MB, correct?? Sorry, I can’t tell, not familiar with Linux so the readout above looks alien to me (no 2048MB shown either, so makes me really lost )

On your second post (I’ll merge with first after typing this out). Do you mean can we tell if Aperture is a visible BIOS setting in other board BIOS, just by looking at BIOS?
If that is what you mean, no, I usually can’t tell, you’d have to look for board reviews and check the BIOS images and see. Luckily, most board review sites show plenty of BIOS images, but sadly sometimes not all is shown so would be hard to know for sure on ones where you don’t see it shown.
Maybe hunt down board owners on this forum, or others and ask them in a private message.

For your BIOS mod, the Aperture setting was not hidden, but the entire root menu it was inside of was hidden (Chipset). So you could tell in that way when looking at other BIOS, if you only see it within the root of a known missing from BIOS images section of the BIOS (such as chipset, which is often hidden)
Other times though it may only be in Advanced, and there is often a hidden advanced too, you can tell them apart by hidden one usually has many more submenus than the visible one.
On the Asus Strix Z390-E, I looked at BIOS and could not be sure. Location >> Advanced >> System Agent >> Graphics Config.
There is only one Advanced, and in those cases it’s usually visible but with some submenus hidden, so I had to check reviews for BIOS images
Here we see System Agent is visible - https://www.kitguru.net/wp-content/uploa…iew-UEFI-14.jpg

But, no reviews I found show inside System Agent. Anyway, if hidden I can modify this BIOS easily for you, much less hassle with Asus BIOS than MSI BIOS
I checked setup, it’s not suppressed, and due to that, if it’s not visible then it only takes one byte change to Access Level setting to make it visible.



Yes. 2048MB is available now. The bigger aperture size, the more virtual machine with high resolution are available. See printscreen or https://github.com/intel/gvt-linux/wiki/…vgpu-kvmgt-only.





Since I’ve returned the trial & test MSI mobo, now I’m looking forward to Asus Strix Z390-E, planning to buy in Jan 2020. Could you post a clarifying HxD printscreen, like in #5, regarding the byte change at Access Level, in order to make aperture size configuration visible? Hopefully, no more AMITSE/SetupData or NVRAM edits would be required in this case. 

Thanks!

@eurodomenii - Ahhh! You ended up sending this MSI board back? If so, at least we still have a known tested and working BIOS mod from it’s use in this thread for others now

For Aperture visibility in Asus Strix Z390-E Gaming BIOS 0805, with UEFITool 51-56, extract AMITSE/SetupData (BODY), then byte change is as shown below
Ignore “Default” info, it can be default show yes, and not suppressed, and still be hidden from user (due to however they program the “Default” itself)

Strix-Z390-E-Gaming0805-ApertureEdit.png



This assumes you can already see >> Advanced >> System Agent (SA) Configuration >> Graphics Configuration submenu, if not then that submenu will also need unsuppressed via “Setup PE32” (As-IS) edit as shown below
*Edit - @eurodomenii << See edit below, I missed some earlier!


The one directly below this sentence also need unsuppressed too, in order to unsuppress Graphics config, since it encompasses all three settings/menus here
then each individual one has it’s own suppression also (Well at least 4G decoding and graphics config do)
Suppress If {0A 82}
0x6E078 64 Bit Unsigned Int: 0x0 {45 8A 00 00 00 00 00 00 00 00} << Change to FF
0x6E082 64 Bit Unsigned Int: 0x1 {45 0A 01 00 00 00 00 00 00 00} << Change to FF
0x6E08C Equal {2F 02}
0x6E08E End {29 02}
0x6E090 Suppress If {0A 82}
0x6E092 QuestionId: 0x2747 equals value 0xF {12 06 47 27 0F 00}
0x6E098 One Of: Above 4G Decoding, VarStoreInfo (VarOffset/VarName): 0x949, VarStore: 0x1, QuestionId: 0x327, Size: 1, Min: 0x0, Max 0x1, Step: 0x0 {05 91 84 08 85 08 27 03 01 00 49 09 10 10 00 01 00} << Search this string in hex, above it will be edits above
0x6E0A9 One Of Option: Enabled, Value (8 bit): 0x1 {09 07 9C 00 00 00 01}
0x6E0B0 One Of Option: Disabled, Value (8 bit): 0x0 (default) {09 07 9D 00 30 00 00}
0x6E0B7 End One Of {29 02}
0x6E0B9 End If {29 02}
0x6E0BB Ref: Memory Configuration, VarStoreInfo (VarOffset/VarName): 0xFFFF, VarStore: 0x0, QuestionId: 0x328, FormId: 0x2748 {0F 0F 5E 04 5F 04 28 03 00 00 FF FF 00 48 27}
0x6E0CA Suppress If {0A 82}
0x6E0CC 64 Bit Unsigned Int: 0x1 {45 8A 01 00 00 00 00 00 00 00} << Change to FF
0x6E0D6 64 Bit Unsigned Int: 0x0 {45 0A 00 00 00 00 00 00 00 00} << Change to FF
0x6E0E0 Equal {2F 02}
0x6E0E2 End {29 02}
0x6E0E4 Ref: Graphics Configuration, VarStoreInfo (VarOffset/VarName): 0xFFFF, VarStore: 0x0, QuestionId: 0x329, FormId: 0x274A {0F 0F E7 05 E7 05 29 03 00 00 FF FF 00 4A 27} << Search this string in hex, above it will be edits above

Supress-Edit.png

Hi there, i have a same situation as mr. eurodomenii
Could you help me modifi my bios that help get 1024 Mb UmaVideoMemory