datasone / grub-mod-setup_var

A modified grub allowing tweaking hidden BIOS settings.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Does not work on HP Pavilion 14-bf104np

rottenpants466 opened this issue · comments

Hi like others im also having problems trying to turn off Cfg Lock on my laptop. At least it worked on my desktop :) (im using opencore boot loader on a Hackintosh)

I managed to extract the bin file from the .exe HP provided to update the bios. I updated to the latest witch is F.45.

Im getting the following error: error: can't set variable using efi (error: 0x000000000000001a)

error

This is what appears using the latest UEFI Tool. Theres no "setup" folder I think:

setup

After I exported the section FE3542FE-C1D3-4EF8-657C-etc i used ifrextract and got the following: One Of: CFG Lock, VarStoreInfo (VarOffset/VarName): 0x3C

If someone is willing to help me here's the original bios bin file:

083A3.bin.zip

Thank you kindly

Edit: I just checked one of the closed issues here and it seems that my UEFI is locked by the oem?
:(
Is there any other way to get around this? Without disabling Cfg Lock I think cpu power management will not work

Yes, the 0x1a is another issue about firmware (GRUB_EFI_SECURITY_VIOLATION), indicates locked by OEM.
And as for the power management problem, with OpenCore you can use the AppleCpuPmCfgLock and the AppleXcpmCfgLock Quirk located in section 7.7 in its configuration document. Those quirks should enable CPU power management with locked MSR 0xE2.

Yes, the 0x1a is another issue about firmware (GRUB_EFI_SECURITY_VIOLATION), indicates locked by OEM.
And as for the power management problem, with OpenCore you can use the AppleCpuPmCfgLock and the AppleXcpmCfgLock Quirk located in section 7.7 in its configuration document. Those quirks should enable CPU power management with locked MSR 0xE2.

Yeah I had to enable those 2 quirks to be able to boot. Dont really know if it affects cpu power management vs having CFG Lock turned off.

Anyway thank you for providing this tool and the guide :) on my desktop it worked fine

I encountered the same error on an HP Stream 14-cb107nl. BIOS: 084EC.zip

0x40ECE 		One Of: BIOS Lock, VarStoreInfo (VarOffset/VarName): 0x114, VarStore: 0x1234, QuestionId: 0x98, Size: 1, Min: 0x0, Max 0x1, Step: 0x0 {05 91 A2 04 A3 04 98 00 34 12 14 01 10 10 00 01 00}
0x40EDF 			One Of Option: Disabled, Value (8 bit): 0x0 {09 07 7D 00 00 00 00}
0x40EE6 			One Of Option: Enabled, Value (8 bit): 0x1 (default) {09 07 7C 00 30 00 01}
0x40EED 		End One Of {29 02}
0x40EEF 		One Of: RTC Lock, VarStoreInfo (VarOffset/VarName): 0x3FD, VarStore: 0x1234, QuestionId: 0x99, Size: 1, Min: 0x0, Max 0x1, Step: 0x0 {05 91 A4 04 A5 04 99 00 34 12 FD 03 10 10 00 01 00}
0x40F00 			One Of Option: Disabled, Value (8 bit): 0x0 {09 07 7D 00 00 00 00}
0x40F07 			One Of Option: Enabled, Value (8 bit): 0x1 (default) {09 07 7C 00 30 00 01}
0x40F0E 		End One Of {29 02}
0x40F10 		One Of: Flash Protection Range Registers (FPRR), VarStoreInfo (VarOffset/VarName): 0x37E, VarStore: 0x1234, QuestionId: 0x9A, Size: 1, Min: 0x0, Max 0x1, Step: 0x0 {05 91 A0 04 A1 04 9A 00 34 12 7E 03 10 10 00 01 00}
0x40F21 			One Of Option: Disabled, Value (8 bit): 0x0 {09 07 7D 00 00 00 00}
0x40F28 			One Of Option: Enabled, Value (8 bit): 0x1 (default) {09 07 7C 00 30 00 01}
0x40F2F 		End One Of {29 02}
0x40F31 		One Of: TCO Lock, VarStoreInfo (VarOffset/VarName): 0x411, VarStore: 0x1234, QuestionId: 0x9B, Size: 1, Min: 0x0, Max 0x1, Step: 0x0 {05 91 83 05 84 05 9B 00 34 12 11 04 10 10 00 01 00}
0x40F42 			One Of Option: Disabled, Value (8 bit): 0x0 {09 07 7D 00 00 00 00}
0x40F49 			One Of Option: Enabled, Value (8 bit): 0x1 (default) {09 07 7C 00 30 00 01}
0x40F50 		End One Of {29 02}
0x40F52 		One Of: GPIO Lock, VarStoreInfo (VarOffset/VarName): 0x407, VarStore: 0x1234, QuestionId: 0x9C, Size: 1, Min: 0x0, Max 0x1, Step: 0x0 {05 91 EA 02 EB 02 9C 00 34 12 07 04 10 10 00 01 00}
0x40F63 			One Of Option: Disabled, Value (8 bit): 0x0 {09 07 7D 00 00 00 00}
0x40F6A 			One Of Option: Enabled, Value (8 bit): 0x1 (default) {09 07 7C 00 30 00 01}
0x40F71 		End One Of {29 02}

@datasone There's no way around it, right?

If you are willing to poke around, the locked EFI will not prevent you from disabling CFG lock. Here are some IFR snippets for you from a 2018 HP laptop.

VarStore: VarStoreId: 0x1234 [.......], Size: 0x708, Name: SystemConfig //Setup var is referenced using 0x1234

Fan always on is one such setting stored here

Fan Always On, VarStoreInfo (VarOffset/VarName): 0xEA, VarStore: 0x1234, QuestionId: 0x7, Size: 1, Min: 0x0, Max 0x1, Step: 0x0 {....}

One Of Option: Disabled, Value (8 bit): 0x0 {....}
One Of Option: Enabled, Value (8 bit): 0x1 (default) {....}

Notice VarStore 0x1234

Now lets look at CFG lock

One Of: CFG Lock, VarStoreInfo (VarOffset/VarName): 0x3C, VarStore: 0x3, QuestionId: 0x149, Size: 1, Min: 0x0, Max 0x1, Step: 0x0 {....}
One Of Option: Disabled, Value (8 bit): 0x0 {....}
One Of Option: Enabled, Value (8 bit): 0x1 (default) {....}

It uses a different variable entirely called "CpuSetup" referenced by 0x3

You can use ru.exe to set 0x3c in "Cpusetup" to 0x0 no problem here.

TL:DR to set cfglock to disabled, change the Cpu setup variable to 0x0 @ offset 0x3c. Tested on a HP laptop Da0014DX

I have no CFG Lock entry unfortunately, just BIOS Lock. Is it the same?

Section_PE32_image_DriverSampleDxe_SetupUtility_body IFR.txt

Your laptop must not have an option for CFG-LOCK unfortunately.