Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

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

Open
JianyueZ opened this issue Jun 28, 2021 · 3 comments
Open

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

JianyueZ opened this issue Jun 28, 2021 · 3 comments

Comments

@JianyueZ
Copy link

JianyueZ commented Jun 28, 2021

求助大神!我使用 ”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}“

@JianyueZ JianyueZ changed the title "setup_var_cv" command does not work "setup_var_cv" command does not work [release1.3] Jun 29, 2021
@JianyueZ
Copy link
Author

JianyueZ commented Jun 29, 2021

IMG_20210629_093901

@chrispilot2293
Copy link

Also having this issue

@datasone
Copy link
Owner

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 里无法解决。

# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants