- Joined
- Sep 22, 2016
- Messages
- 464
- Motherboard
- Gigabyte Z170X-UD5 TH-Clover
- CPU
- i7-6700K
- Graphics
- Vega 56
- Mac
- Mobile Phone
I suppose you misunderstood patching BIOS and hacking BIOS settings? Which you are talking about?
Actually you can extract your BIOS from motherboard to FAT16/FAT32 drive. Have you tried it? Which version of BIOS you have?
I suppose you misunderstood patching BIOS and hacking BIOS settings? Which you are talking about?
Yeah I probably did. Lets say 'modify' if that works for you?
0x33377 Form: View/Configure CPU Lock Options, FormId: 0x2734 {01 86 34 27 11 07}
0x3337D One Of: CFG Lock, VarStoreInfo (VarOffset/VarName): 0x4EF, VarStore: 0x1, QuestionId: 0x24C, Size: 1, Min: 0x0, Max 0x1, Step: 0x0 {05 91 B4 08 B5 08 4C 02 01 00 EF 04 10 10 00 01 00}
0x3338E One Of Option: Disabled, Value (8 bit): 0x0 {09 07 04 00 00 00 00}
0x33395 One Of Option: Enabled, Value (8 bit): 0x1 (default) {09 07 03 00 30 00 01}
0x3339C End One Of {29 02}
0x3339E One Of: Overclocking Lock, VarStoreInfo (VarOffset/VarName): 0x59E, VarStore: 0x1, QuestionId: 0x24D, Size: 1, Min: 0x0, Max 0x1, Step: 0x0 {05 91 B0 08 B1 08 4D 02 01 00 9E 05 10 10 00 01 00}
0x333AF One Of Option: Disabled, Value (8 bit): 0x0 (default) {09 07 04 00 30 00 00}
0x333B6 One Of Option: Enabled, Value (8 bit): 0x1 {09 07 03 00 00 00 01}
0x333BD End One Of {29 02}
0x333BF End Form {29 02}
It's a huge difference.
As I understand there are actually 2 options available.
If we check CFG lock section in BIOS (version 22g), then we see
- Patching BIOS
- Modify hidden BIOS settings
Code:0x33377 Form: View/Configure CPU Lock Options, FormId: 0x2734 {01 86 34 27 11 07} 0x3337D One Of: CFG Lock, VarStoreInfo (VarOffset/VarName): 0x4EF, VarStore: 0x1, QuestionId: 0x24C, Size: 1, Min: 0x0, Max 0x1, Step: 0x0 {05 91 B4 08 B5 08 4C 02 01 00 EF 04 10 10 00 01 00} 0x3338E One Of Option: Disabled, Value (8 bit): 0x0 {09 07 04 00 00 00 00} 0x33395 One Of Option: Enabled, Value (8 bit): 0x1 (default) {09 07 03 00 30 00 01} 0x3339C End One Of {29 02} 0x3339E One Of: Overclocking Lock, VarStoreInfo (VarOffset/VarName): 0x59E, VarStore: 0x1, QuestionId: 0x24D, Size: 1, Min: 0x0, Max 0x1, Step: 0x0 {05 91 B0 08 B1 08 4D 02 01 00 9E 05 10 10 00 01 00} 0x333AF One Of Option: Disabled, Value (8 bit): 0x0 (default) {09 07 04 00 30 00 00} 0x333B6 One Of Option: Enabled, Value (8 bit): 0x1 {09 07 03 00 00 00 01} 0x333BD End One Of {29 02} 0x333BF End Form {29 02}
As we see here, default state for CFG Lock is Enabled. By patching BIOS we can set default setting Disabled ( 0x0 ). By hacking hidden BIOS setting we can probably modify setting. But I guess that by hacking setting, we lose these if something happens to stored BIOS setting and those are reset for some reason. So the fail safe way is to patch BIOS.'
For Gigabyte Z170X-UD5 TH BIOS version 22g the offset for CFG Lock setting is 0x4EF.
KernelPm patch on Glover is needed for any system that uses XCPM and has MSR_PKG_CST_CONFIG_CONTROL locked.
Starting with Haswell Macs, CPU power management functionality was moved into the kernel (known as XNU CPU Power Management). KernelPm patches the kernel to prevent writes to MSR_PKG_CST_CONFIG_CONTROL (MSR 0xE2), which is frequently locked on many systems (can usually be disabled by disabling the firmware option "CFG Lock"). Without this patch, you will encounter a kernel panic if MSR 0xE2 is locked (which appears to be the case for your system).
Using fixed BIOS settings eliminates need for KernelPm patch. With this patch is possible to get fully native HWP (Intel SpeedShift Technology) CPU Power Management for all Skylake-X processors on all X299 mainboards with unlocked MSR 0xE2 BIOS Register, resulting in absolutely brilliant and top-end CPU performance.
Both BIOS and UEFI store variables in NVRAM - non-volatile RAM. The location of this is platform-specific - early BIOSes used the CMOS. BIOS variables, in CMOS or otherwise, were not standardised. Accessing their location sometimes was possible for the OS, sometimes not. Knowing their meaning meant knowing the BIOS version, potentially to a build level. Clearly, maintaining a catalogue of all BIOSes is untenable. UEFI solves this problem. UEFI provides an extensible, standardised interface to access NVRAM variables - infact, it is one of the few runtime services that UEFI provides, indicating that the variables are not otherwise accessible to the OS. This means that at any point during the OS's execution, it can both get and set these variables.
setup_var 0xDF
setup_var 0xDF 0x00
cd ~/Desktop
mkdir cfglockfix
curl -L http://download.gigabyte.eu/FileList/BIOS/mb_bios_ga-z170x-ud5-th_f22g.zip -o bios.zip -s
unzip -a bios.zip
rm autoexec.bat
rm Efiflash.exe
rm bios.zip
curl -L https://github.com/LongSoft/UEFITool/releases/download/t20181011/UEFITool_NE_A52_mac.zip -o uefitool.zip -s
unzip -a uefitool.zip
rm uefitool.zip
curl -L https://github.com/LongSoft/Universal-IFR-Extractor/releases/download/v0.3.5/ifrextract_v0.3.5.osx.zip -o ifextract.zip -s
unzip -a ifextract.zip
rm ifextract.zip
./UEFITool.app/Contents/MacOS/UEFITool ~/Desktop/cfglockfix/Z17XU5TH.22g
./ifrextract PE32Section.efi PE32Section.txt
0x33377 Form: View/Configure CPU Lock Options, FormId: 0x2734 {01 86 34 27 11 07}
0x3337D One Of: CFG Lock, VarStoreInfo (VarOffset/VarName): 0x4EF, VarStore: 0x1, QuestionId: 0x24C, Size: 1, Min: 0x0, Max 0x1, Step: 0x0 {05 91 B4 08 B5 08 4C 02 01 00 EF 04 10 10 00 01 00}
0x3338E One Of Option: Disabled, Value (8 bit): 0x0 {09 07 04 00 00 00 00}
0x33395 One Of Option: Enabled, Value (8 bit): 0x1 (default) {09 07 03 00 30 00 01}
0x3339C End One Of {29 02}
0x3339E One Of: Overclocking Lock, VarStoreInfo (VarOffset/VarName): 0x59E, VarStore: 0x1, QuestionId: 0x24D, Size: 1, Min: 0x0, Max 0x1, Step: 0x0 {05 91 B0 08 B1 08 4D 02 01 00 9E 05 10 10 00 01 00}
0x333AF One Of Option: Disabled, Value (8 bit): 0x0 (default) {09 07 04 00 30 00 00}
0x333B6 One Of Option: Enabled, Value (8 bit): 0x1 {09 07 03 00 00 00 01}
0x333BD End One Of {29 02}
0x333BF End Form {29 02}
setup_var 0x4EF 0x00
F20
One Of: CFG Lock, VarStoreInfo (VarOffset/VarName): 0x4EF, VarStore: 0x1
F21
One Of: CFG Lock, VarStoreInfo (VarOffset/VarName): 0x4EF, VarStore: 0x1
F22a
One Of: CFG Lock, VarStoreInfo (VarOffset/VarName): 0x4EF, VarStore: 0x1
F22d
One Of: CFG Lock, VarStoreInfo (VarOffset/VarName): 0x4EF, VarStore: 0x1
F22g
One Of: CFG Lock, VarStoreInfo (VarOffset/VarName): 0x4EF, VarStore: 0x1
lsblk --fs
sudo parted -s /dev/sdc print
sudo wipefs -a /dev/sdc
sudo parted -s /dev/sdc print
sudo parted /dev/sdc help mktable
sudo parted /dev/sdc mktable msdos
sudo parted /dev/sdc help mkpart
sudo parted /dev/sdc mkpart primary fat32 0% 100%
sudo mkfs.fat -F 32 /dev/sdc1
sudo parted /dev/sdc set 1 boot on
lsblk --fs
cd /Volumes/NO\ NAME
ls
mkdir -p /Volumes/NO\ NAME/EFI/BOOT
cp -iR ~/Downloads/bootx64.efi /Volumes/NO\ NAME/EFI/BOOT/bootx64.efi
setup_var 0x4EF
setup_var_3 0x4EF
setup_var_3 0x4EF 0x00
I could be wrong so do your own research on the matter, but I think we need to modify the setting once it has been loaded onto the motherboard because if you patch the image, your will get a checksum fail when you try to load it onto the bios.
We have figured out the command to use with modified GRUB Shell for motherboard Z170X-UD5 TH BIOS version f22g:
Code:setup_var 0x4EF 0x00
setup_var (your offset here) 0x0
I'm not at home so I cannot do that at the moment.Yes, this might be true on some cases. I'm not familiar with modified GRUB Shell, so please can you save you BIOS to the disk, zip and upload there to compare it with original BIOS?
I'm curios where it writes modification, into the bios or stored settings.
Thank you in advance!
I'm not at home so I cannot do that at the moment.