datasone / grub-mod-setup_var

A modified grub allowing tweaking hidden BIOS settings.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

"setup_var_cv" command does not work [release1.3]

JianyueZ opened this issue · comments

求助大神!我使用 ”setup_var_cv SystemConfig 21C 1 1“ 命令之后,返回的一行显示 “Looking for SystemConfig variables..."。

我又试了试别的 VarStore 的名称,发现不论写啥 VarStore,返回都是 “Looking for XXX variable..."。

我提取的IFR文件里是这样的:
”One Of: TPM/TCM, VarStoreInfo (VarOffset/VarName): 0x21C, VarStore: 0x1234, QuestionId: 0xE063, Size: 1,“
”VarStore: VarStoreId: 0x1234 [A04A27F4-DF00-4D42-B552-39511302113D], Size: 0xE6, Name: SystemConfig {24 23 F4 27 4A A0 00 DF 42 4D B5 52 39 51 13 02 11 3D 34 12 E6 00 53 79 73 74 65 6D 43 6F 6E 66 69 67 00}“


Hey! When I use command "setup_var_cv SystemConfig 21C 1 1", it returns “Looking for SystemConfig variables...".

I tried with other nameOfVarStore and it always returns “Looking for XXX variable...".

My IFR dump:
”One Of: TPM/TCM, VarStoreInfo (VarOffset/VarName): 0x21C, VarStore: 0x1234, QuestionId: 0xE063, Size: 1,“
”VarStore: VarStoreId: 0x1234 [A04A27F4-DF00-4D42-B552-39511302113D], Size: 0xE6, Name: SystemConfig {24 23 F4 27 4A A0 00 DF 42 4D B5 52 39 51 13 02 11 3D 34 12 E6 00 53 79 73 74 65 6D 43 6F 6E 66 69 67 00}“

Also having this issue

This issue is bumped so I will try to explain why there is few things I can do to solve this problem (which is, the program even can't find the VarStore according to the name)

While the VarStore name can be pretty easily found while probing them, there are always some OEM firmwares with different issues. There have been firmware which encodes name of VarStore in 16-bit (e.g. CPU becomes [0x43, 0x00, 0x50, 0x00, 0x55, 0x00]) and firmware which VarStore can't be obtained even using the exact same string as obtained (issue #5).
These are mostly due to OEM's non-standard implementations, grub may change code for those implementation, but that's very inefficient and there is pretty little that this program can do.


因为又有人回复 issue 了所以简单说一下为什么这个问题(找不到 VarStore)很难解决,也一直没有回复。过去已经在这个问题上碰到了很多情况,包括有些 BIOS 把字符编码成 16 位的情况,甚至还有使用完全相同的名字还是获取不到 VarStore 的情况(#5),这种完全就是 OEM 非标准实现的问题。部分问题(16 位字符)可以通过修改 setup_var 的代码解决,但是那样会让代码变得非常复杂。而后面的获取不到的问题可能通过对每个 OEM 的不同实现用针对性的代码在 grub 里能解决,但在 setup_var 里无法解决。