With a modified GRUB shell it's possible to change the value of the variable previously found.
Fire up modGRUBShell.efi:
- from a UEFI shell and navigate the FS (with
cdandlsbasic UNIX navigation commands) and find theEFI partitionwhere it's locatedmodGRUBShell.efi. - from OpenCore start the boot entry
modGRUBShell.efi(by adding it toconfig.plistunderMisc/Toolscontext)
You'll end up in a custom shell
There are different ways to interact with the desired offset, by using different commands. I'll list them below:
The syntax of the command is as it follows: setup_var <OFFSET>
Run it but in case you get an error like error: offset 0xXYZ is out of range use the following commands:
setup_var2 0xXYZ(if this doesn't work go with the next)setup_var_3 0xYXZ
The difference between each of these commands is the VarStore name where the offset are looked in:
setup_varlooks insideSetupsetup_var2looks insideCustom(usually shittyInsydeH2OBIOS may have it)setup_var3looks insideSetupbut discards variables that are too small (currently the threshold is0x10bytes), which allows skipping dummy varstores
Recent firmwares often stores BIOS settings into multiple varstores, and sometimes most of them are not in default "Setup" name. setup_var_cv allows accessing varying size variables in varstore with the given name.
The usage is as it follows:
setup_var_cv nameOfVarStore offsetInVarStore [optional variable size] [optional value to write]
e.g. CFG Lock offset is 0x527 under Setup VarStoreName, with size of 1 and 0x0 as the value to write in the offset.
The resulting command will be setup_var_cv CpuSetup 0x43 0x01 0x00
I'd recommend starting from setup_var(2/_3) and in case you have issues use setup_var_cv.
Once changed the offset value turn off your PC and turn it on again. Soft-reboot are not valid, therefore you need a cold reboot.