grub-mod-setup_var icon indicating copy to clipboard operation
grub-mod-setup_var copied to clipboard

setup var3 - expected different var size - continue with care

Open roxxin opened this issue 3 years ago • 2 comments

Hi, I tried to unlock CFG on a Fusion 15 laptop (Tongfang LAPQC71) with AMI BIOS following Dortanias Post Installation CFG Unlock guide. I followed the guide to the letter and acquired the proper offset, but am unsure whether i should run the command "setup_var_3 0x6F0 0x00" due to some warnings I received:

IMG_20210730_124039

setup_var_3 0x6F0 Looking for Setup variable... var name: Setup, var size 12 var guid: ex87d643-eba4-4bb5 - a1-e5-3f-3e-36-b2-0d-a9 GUID does not match expected GUID, taking it nevertheless...
successfully obtained "Setup" variable from VSS (got 7 (0x7) bytes). Too small variable detected ignoring. <--- could that be var 0x6f0? var name Setup, var size 12, var guid: ec87d643-eba4-4bb5 - a1-e5-3f-3e-36-b2-0d-a9 <--- why another var name? is this some random variable instead of 0x6f0? GUID does not match expected GUID, taking it nevertheless... expected a different size of the setup variable (got 4937 (0x1349) bytes). Continue with care... <--- wrong var? successfully obtained "Setup" variable from VSS (got 4937 (0x1349) bytes). <--- can I trust this message, was 0xf60 correctly accessed? (value seems to fit: 0x01) offset 0xf60 is: 0x01

Is this all as expected or should I restrain from running the command "setup_var_3 0x6F0 0x00"?

roxxin avatar Aug 01 '21 16:08 roxxin

Sorry for the late reply, been pretty busy last year...

Too small variable detected ignoring. <--- could that be var 0x6f0? This actually describes a varstore, which is explained more detailed in #5, you may learn more about the varstore layouts. But in short, the 0x6f0 describes an offset location in the "too small variable". Though we call it as a variable, it's actually virtual, and the varstore is the physical variable. As it only have a length of 0x7, it's clear that this is a wrong variable/varstore (0x6f0 > 0x7).

var name Setup, var size 12, var guid: ec87d643-eba4-4bb5 - a1-e5-3f-3e-36-b2-0d-a9 <--- why another var name? is this some random variable instead of 0x6f0? Same as described above, this is the name of what called varstore.

expected a different size of the setup variable (got 4937 (0x1349) bytes). Continue with care... <--- wrong var? That's due to a piece of legacy code, the original programmer expected this tool to only be used with a specific firmware, so it's safe to ignore it now.

successfully obtained "Setup" variable from VSS (got 4937 (0x1349) bytes). <--- can I trust this message, was 0xf60 correctly accessed? (value seems to fit: 0x01) Yes :D

datasone avatar Feb 25 '22 12:02 datasone

Thank you very much for your reply nonetheless. :-) I will read further into varstores and try it out as soon I got some time to spare myself ;)

roxxin avatar Mar 02 '22 13:03 roxxin