Contribute
Register

[TOOL] Virtual Bios Mod without flashing

Joined
Oct 19, 2019
Messages
692
Motherboard
Asus ROG Strix G531GT
CPU
i7-9750H/HM370
Graphics
GTX 1650, UHD 630
Mac
  1. MacBook
  2. MacBook Pro
Classic Mac
  1. PowerBook
Mobile Phone
  1. Android
  2. iOS
  3. Other
Your 0x32316 is an offset from the internal forms representation and should not be used, you need to look for VarOffset/VarName pairs
for example VarStoreInfo (VarOffset/VarName): 0xA54, VarStore: 0x1
Which mean that the value it is stored at offset 0xA54 in variable 0x1 which is Setup variable, note the used value in this example is not what you looking for, it is just an example

Code:
0x3229A         Form: OverClocking Performance Menu, FormId: 0x2799 {01 86 99 27 A2 13}
0x322A0                 Subtitle: Statement.Prompt: OverClocking Performance Menu, Flags: 0x0 {02 87 A2 13 00 00 00}
0x322A7                 End {29 02}
0x322A9                 Subtitle: Statement.Prompt: , Flags: 0x0 {02 87 02 00 00 00 00}
0x322B0                 End {29 02}
0x322B2                 One Of: OverClocking Feature, VarStoreInfo (VarOffset/VarName): 0x858, VarStore: 0x1, QuestionId: 0x2E8, Size: 1, Min: 0x0, Max 0x1, Step: 0x0 {05 91 A4 13 A5 13 E8 02 01 00 58 08
0x322C3                         Default: DefaultId: 0x0, Value (8 bit): 0x0 {5B 06 00 00 00 00}
0x322C9                         One Of Option: Disabled, Value (8 bit): 0x0 (default MFG) {09 07 04 00 20 00 00}
0x322D0                         One Of Option: Enabled, Value (8 bit): 0x1 {09 07 03 00 00 00 01}
0x322D7                 End One Of {29 02}
0x322D9                 Suppress If {0A 82}
0x322DB                         QuestionId: 0xD96 equals value 0x2 {12 06 96 0D 02 00}
0x322E1                         One Of: WDT Enable, VarStoreInfo (VarOffset/VarName): 0xB54, VarStore: 0x1, QuestionId: 0x2E9, Size: 1, Min: 0x0, Max 0x1, Step: 0x0 {05 91 A8 13 A9 13 E9 02 01 00 54 0B 10
0x322F2                                 One Of Option: Disabled, Value (8 bit): 0x0 {09 07 04 00 00 00 00}
0x322F9                                 One Of Option: Enabled, Value (8 bit): 0x1 (default) {09 07 03 00 30 00 01}
0x32300                         End One Of {29 02}
0x32302                         Suppress If {0A 82}
0x32304                                 QuestionId: 0x2E8 equals value 0x0 {12 06 E8 02 00 00}
0x3230A                                 Suppress If {0A 82}
0x3230C                                         QuestionId: 0xD96 equals value 0x1 {12 86 96 0D 01 00}
0x32312                                                 Not {17 02}
0x32314                                         End {29 02}
0x32316                                         Text: Statement.Prompt: BCLK Frequency (pcode), TextTwo: 100.00 MHz {03 08 92 14 5C 04 93 14}
0x3231E                                 End If {29 02}
0x32320                                 One Of: XTU Interface, VarStoreInfo (VarOffset/VarName): 0x859, VarStore: 0x1, QuestionId: 0x2EA, Size: 1, Min: 0x0, Max 0x1, Step: 0x0 {05 91 A6 13 A7 13 EA 02 01
0x32331                                         Default: DefaultId: 0x0, Value (8 bit): 0x0 {5B 06 00 00 00 00}
0x32337                                         One Of Option: Disabled, Value (8 bit): 0x0 (default MFG) {09 07 04 00 20 00 00}
0x3233E                                         One Of Option: Enabled, Value (8 bit): 0x1 {09 07 03 00 00 00 01}
0x32345                                 End One Of {29 02}
0x32347                                 One Of: BCLK Aware Adaptive Voltage, VarStoreInfo (VarOffset/VarName): 0x8A7, VarStore: 0x1, QuestionId: 0x2EB, Size: 1, Min: 0x0, Max 0x1, Step: 0x0 {05 91 CE 13 C
0x32358                                         One Of Option: Disabled, Value (8 bit): 0x0 {09 07 04 00 00 00 00}
0x3235F                                         One Of Option: Enabled, Value (8 bit): 0x1 (default) {09 07 03 00 30 00 01}
0x32366                                 End One Of {29 02}
0x32368                         End If {29 02}
0x3236A                         Suppress If {0A 82}
0x3236C                                 QuestionId: 0x2E8 equals value 0x0 {12 06 E8 02 00 00}
0x32372                                 Ref: Processor, VarStoreInfo (VarOffset/VarName): 0xFFFF, VarStore: 0x0, QuestionId: 0x2EC, FormId: 0x279A {0F 0F AC 13 AD 13 EC 02 00 00 FF FF 00 9A 27}
0x32381                                 Ref: Ring, VarStoreInfo (VarOffset/VarName): 0xFFFF, VarStore: 0x0, QuestionId: 0x2ED, FormId: 0x279C {0F 0F AF 13 B0 13 ED 02 00 00 FF FF 00 9C 27}
0x32390                                 Ref: GT, VarStoreInfo (VarOffset/VarName): 0xFFFF, VarStore: 0x0, QuestionId: 0x2EE, FormId: 0x279D {0F 0F 75 14 76 14 EE 02 00 00 FF FF 00 9D 27}
0x3239F                                 Ref: Uncore, VarStoreInfo (VarOffset/VarName): 0xFFFF, VarStore: 0x0, QuestionId: 0x2EF, FormId: 0x279E {0F 0F 8E 14 8F 14 EF 02 00 00 FF FF 00 9E 27}
0x323AE                                 Ref: Voltage PLL Trim Controls, VarStoreInfo (VarOffset/VarName): 0xFFFF, VarStore: 0x0, QuestionId: 0x2F0, FormId: 0x27A2 {0F 0F AA 13 AB 13 F0 02 00 00 FF FF 00 A
0x323BD                                 Ref: Platform Voltage Overrides, VarStoreInfo (VarOffset/VarName): 0xFFFF, VarStore: 0x0, QuestionId: 0x2F1, FormId: 0x279F {0F 0F D7 13 D8 13 F1 02 00 00 FF FF 00
0x323CC                         End If {29 02}
0x323CE                 End If {29 02}
0x323D0                 Suppress If {0A 82}
0x323D2                         QuestionId: 0x2E8 equals value 0x0 {12 06 E8 02 00 00}
0x323D8                         Ref: Memory, VarStoreInfo (VarOffset/VarName): 0xFFFF, VarStore: 0x0, QuestionId: 0x2F2, FormId: 0x27A0 {0F 0F 02 14 03 14 F2 02 00 00 FF FF 00 A0 27}
0x323E7                 End If {29 02}
0x323E9         End Form {29 02}
 
Joined
Aug 22, 2018
Messages
365
Motherboard
Asus ROG Strix G531GT
CPU
i7-9750H/HM370
Graphics
GTX 1650, UHD 630
Mac
  1. MacBook Air
Mobile Phone
  1. Android
  2. iOS
There isn't a Varname for 0x32316 and it isn't just a 0x0 or 0x1. It is readable code.
 
Joined
Oct 19, 2019
Messages
692
Motherboard
Asus ROG Strix G531GT
CPU
i7-9750H/HM370
Graphics
GTX 1650, UHD 630
Mac
  1. MacBook
  2. MacBook Pro
Classic Mac
  1. PowerBook
Mobile Phone
  1. Android
  2. iOS
  3. Other
There isn't a Varname for 0x32316 and it isn't just a 0x0 or 0x1. It is readable code.
Then you probably need to dig deeper, the 0x32316 is not a variable to be changed, at that line you can see it is something else.
 
Joined
Oct 19, 2019
Messages
692
Motherboard
Asus ROG Strix G531GT
CPU
i7-9750H/HM370
Graphics
GTX 1650, UHD 630
Mac
  1. MacBook
  2. MacBook Pro
Classic Mac
  1. PowerBook
Mobile Phone
  1. Android
  2. iOS
  3. Other
@macciemacmac did you tried to enable turbo mode?

Code:
0x2C859                 One Of: Boot performance mode, VarStoreInfo (VarOffset/VarName): 0x6C0, VarStore: 0x1, QuestionId: 0xD3, Size: 1, Min: 0x0, Max 0x2, Step: 0x0 {05 91 78 02 79 02 D3 00 01 00 C0 06
0x2C86A                         Default: DefaultId: 0x0, Value (8 bit): 0x1 {5B 06 00 00 00 01}
0x2C870                         One Of Option: Max Battery, Value (8 bit): 0x0 {09 07 7A 02 00 00 00}
0x2C877                         One Of Option: Max Non-Turbo Performance, Value (8 bit): 0x1 {09 07 7B 02 00 00 01}
0x2C87E                         One Of Option: Turbo Performance, Value (8 bit): 0x2 (default) {09 07 7C 02 30 00 02}

Write 0x02 at 0x6C0 offset hmmm, this seems a default value :D however useful to see how it works
 
Joined
Aug 22, 2018
Messages
365
Motherboard
Asus ROG Strix G531GT
CPU
i7-9750H/HM370
Graphics
GTX 1650, UHD 630
Mac
  1. MacBook Air
Mobile Phone
  1. Android
  2. iOS
As far as i know, turbo mode is automatically on. We have a very smart laptop, in Armoury Crate, you can see that there exists a ROG Boost OC (overclock, not OpenCore) which turns the CPU up to 4,20 GHz and in some cases 4,50GHz. If you search our CPU, you can find that it supports up to 4,5GHz which means that it isn't an overclock at all. Still nice but not an overclock. The website (first one) you linked requires a compatible BIOS (possible via bios mod which we are trying to avoid with VBM) and CPU. The Multiplier is locked on our CPU and Intel Extreme Tuning Tool says that it isn't compatible (see screenshot). Silent mode is clocked at 1,28GHz and Performance at 2,28GHz. Maybe we can take advantage of that and turn it up. For example the Turbo boost (only via charger available) has enough cooling to handle an overclock. Standard is Turbo mode clocked at 4,20GHz.
 
Joined
Aug 22, 2018
Messages
365
Motherboard
Asus ROG Strix G531GT
CPU
i7-9750H/HM370
Graphics
GTX 1650, UHD 630
Mac
  1. MacBook Air
Mobile Phone
  1. Android
  2. iOS
Screenshots of ROG Boost O.C. and Intel Extreme Tuning Utility.

1597075389071.png


1597075448084.png
 
Joined
Oct 19, 2019
Messages
692
Motherboard
Asus ROG Strix G531GT
CPU
i7-9750H/HM370
Graphics
GTX 1650, UHD 630
Mac
  1. MacBook
  2. MacBook Pro
Classic Mac
  1. PowerBook
Mobile Phone
  1. Android
  2. iOS
  3. Other
Hmmm, yeah, it seems that the default it runs at 2.6Ghz while intel specs say about max 4.5Ghz, however, this is CPU alone, it counts where it is installed.
 
Joined
Aug 22, 2018
Messages
365
Motherboard
Asus ROG Strix G531GT
CPU
i7-9750H/HM370
Graphics
GTX 1650, UHD 630
Mac
  1. MacBook Air
Mobile Phone
  1. Android
  2. iOS
I made a new mod to VBM which enables a overclock performance menu in the BIOS. Located at 0x858, after some stupid mistakes i came to the following error:

matthijs@ubuntu:~/Desktop/virtualbiosmod$ make
cc -nostdlib -fno-stack-protector -fno-strict-aliasing -fno-builtin -fpic -fshort-wchar -mno-red-zone -Wall -DEFI_FUNCTION_WRAPPER -I/usr/include/efi -I/usr/include/efi/x86_64 -I/usr/include/efi/protocol -c -o VirtualBiosMod.o VirtualBiosMod.c
In file included from VirtualBiosMod.c:26:
functions.c: In function ‘draw_box_menu’:
functions.c:174:25: warning: initialization of ‘CHAR8’ {aka ‘unsigned char’} from ‘char *’ makes integer from pointer without a cast [-Wint-conversion]
174 | CHAR8 menu_item_0 = "item 0";
| ^~~~~~~~
functions.c:175:25: warning: initialization of ‘CHAR8’ {aka ‘unsigned char’} from ‘char *’ makes integer from pointer without a cast [-Wint-conversion]
175 | CHAR8 menu_item_1 = "item 1";
| ^~~~~~~~
functions.c:176:25: warning: initialization of ‘CHAR8’ {aka ‘unsigned char’} from ‘char *’ makes integer from pointer without a cast [-Wint-conversion]
176 | CHAR8 menu_item_2 = "item 2";
| ^~~~~~~~
functions.c:176:11: warning: unused variable ‘menu_item_2’ [-Wunused-variable]
176 | CHAR8 menu_item_2 = "item 2";
| ^~~~~~~~~~~
functions.c:175:11: warning: unused variable ‘menu_item_1’ [-Wunused-variable]
175 | CHAR8 menu_item_1 = "item 1";
| ^~~~~~~~~~~
functions.c:174:11: warning: unused variable ‘menu_item_0’ [-Wunused-variable]
174 | CHAR8 menu_item_0 = "item 0";
| ^~~~~~~~~~~
functions.c:173:9: warning: unused variable ‘menu_index’ [-Wunused-variable]
173 | int menu_index = 0;
| ^~~~~~~~~~
functions.c:141:11: warning: unused variable ‘pos’ [-Wunused-variable]
141 | UINTN pos = v;
| ^~~
functions.c:135:19: warning: unused variable ‘KeyReset’ [-Wunused-variable]
135 | EFI_INPUT_KEY KeyReset = {0};
| ^~~~~~~~

VirtualBiosMod.c: In function ‘efi_main’:
VirtualBiosMod.c:149:81: error: expected expression before ‘>’ token
149 | rapper(ST->ConOut->SetCursorPosition, 3, ST->ConOut, 3, 10); >
| ^

VirtualBiosMod.c:152:81: error: expected expression before ‘>’ token
152 | rapper(ST->ConOut->SetCursorPosition, 3, ST->ConOut, 3, 10); >
| ^


In file included from VirtualBiosMod.c:26:
At top level:
functions.c:132:19: warning: ‘draw_box_menu’ defined but not used [-Wunused-function]
132 | static EFI_STATUS draw_box_menu(CHAR16 *title, int lines, int h, int v ) {
| ^~~~~~~~~~~~~
functions.c:125:19: warning: ‘GetCursorPosition’ defined but not used [-Wunused-function]
125 | static EFI_STATUS GetCursorPosition( IN UINTN *h, IN UINTN *v) {
| ^~~~~~~~~~~~~~~~~

make: *** [<builtin>: VirtualBiosMod.o] Error 1
 
Joined
Oct 19, 2019
Messages
692
Motherboard
Asus ROG Strix G531GT
CPU
i7-9750H/HM370
Graphics
GTX 1650, UHD 630
Mac
  1. MacBook
  2. MacBook Pro
Classic Mac
  1. PowerBook
Mobile Phone
  1. Android
  2. iOS
  3. Other
Maybe you add the source file? Or check to see if you have both { } in the new if loop
 
Top