Forum RSS Feed Follow @ Twitter Follow On Facebook

Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
[-]
Welcome
You have to register before you can post on our site.

Username:


Password:





[-]
Latest Threads
[REQUEST] HP Pavilion G42-272BR Whitelis...
Last Post: eepromm
Yesterday 01:55 AM
» Replies: 0
» Views: 82
[REQUEST] Lenovo G710 BIOS Whitelist Rem...
Last Post: voyageur
11-21-2024 04:33 PM
» Replies: 475
» Views: 167190
[REQUEST] Acer Aspire 5738(G,Z): CPU Upg...
Last Post: DeathBringer
11-21-2024 03:44 PM
» Replies: 49
» Views: 32851
[REQUEST] HP Mini 110-4100 BIOS Unlock
Last Post: DSI INF
11-21-2024 09:24 AM
» Replies: 7
» Views: 239
[REQUEST] Lenovo IdeaPad U310 & U410 (65...
Last Post: Dudu2002
11-21-2024 03:11 AM
» Replies: 1780
» Views: 494239
Lenovo ThinkCentre M715q 2nd Gen & AMD R...
Last Post: Elmurley
11-20-2024 09:37 PM
» Replies: 2
» Views: 1290
[REQUEST] Lenovo Y50-70 (9ECNxxWW) White...
Last Post: SWZSSR
11-20-2024 09:34 PM
» Replies: 1775
» Views: 553622
[REQUEST] Lenovo Thinkpad X240 (GIETxxWW...
Last Post: Dudu2002
11-20-2024 04:58 PM
» Replies: 337
» Views: 143326
Unlock bios insyde
Last Post: Matox3140
11-19-2024 03:40 PM
» Replies: 0
» Views: 206
Whitelist WIFI card removal Lenovo Yoga ...
Last Post: Dudu2002
11-19-2024 12:58 PM
» Replies: 1
» Views: 214
[REQUEST] H310 MSI Gaming Infinite S (MS...
Last Post: awittyusername
11-19-2024 09:21 AM
» Replies: 10
» Views: 131
[REQUEST] Gigabyte GA-B85M-HD3 Rev 2.0 u...
Last Post: Maduli
11-19-2024 02:22 AM
» Replies: 0
» Views: 157
[REQUEST] Lenovo Ideapad 330-15ICH BIOS ...
Last Post: Dudu2002
11-18-2024 01:25 PM
» Replies: 8
» Views: 1905
[REQUEST] Lenovo ThinkPad Edge E330 (H3E...
Last Post: Dudu2002
11-18-2024 01:23 PM
» Replies: 640
» Views: 220991
[Request] Unlocked Bios for Asus TUF FX5...
Last Post: FlT4ever
11-18-2024 01:05 PM
» Replies: 1
» Views: 422
[REQUEST] Lenovo ThinkPad Edge E125(v1.1...
Last Post: kamome74
11-18-2024 10:43 AM
» Replies: 0
» Views: 199
[REQUEST] Xpg 15g 4070 2023ver InsydeH20...
Last Post: MireVelli
11-18-2024 07:26 AM
» Replies: 2
» Views: 199
Please help me recover my bios
Last Post: FuryOP
11-17-2024 12:37 PM
» Replies: 0
» Views: 215
[Request-Camilo] Sony Vaio SA/SB/SC/SD/S...
Last Post: edit
11-17-2024 12:13 PM
» Replies: 107
» Views: 136952
[REQUEST] Lenovo Thinkpad Edge E440 & E5...
Last Post: Dudu2002
11-17-2024 06:50 AM
» Replies: 196
» Views: 92013

Multiple Options Use The Same Adress
#1
Hey guys,
Recently I am trying to  enable the PCIE ASPM and PCIE Native Control on my MSI GE62MVR which may allow CPU to get into deeper package c state and extend its battery life. I plan to do this by changing bios settings in NVRAM/COMS by a EFI Shell called GRUB, but when I am looking into the address of those setting I notice several settings are using the same address.


  1. I extracted Setup_PE32_image_section.sct from BIOS backup using UEFITool_0.22.1.exe
  2. I generate Setup_PE32_image_section IFR.txt from the .sct file above by Universal IFR Extractor.exe

    Here are parts of the code in Setup_PE32_image_section IFR.txt:
Code:
0x2B01D         Suppress If: {0A 82}
0x2B01F             Variable 0x3D9 equals 0x0 {12 06 D9 03 00 00}
0x2B025             Setting: Native PCIE Enable, Variable: 0x4 {05 91 CC 00 CD 00 38 00 01 00 04 00 10 10 00 01 00}
0x2B036                 Option: Disabled, Value: 0x0 {09 07 BC 00 30 00 00}
0x2B03D                 Option: Enabled, Value: 0x1 {09 07 BB 00 00 00 01}
0x2B044             End of Options {29 02}
0x2B046         End If {29 02}
Code:
0x2C05D             Suppress If: {0A 82}
0x2C05F                 Variable 0xCA7 equals 0x0 {12 06 A7 0C 00 00}
0x2C065                 Setting: SMM Use SMM en-US Indication, Variable: 0x4 {05 91 81 03 82 03 87 00 13 00 04 00 10 10 00 01 00}
0x2C076                     Option: Disabled, Value: 0x0 {09 07 04 00 30 00 00}
0x2C07D                     Option: Enabled, Value: 0x1 {09 07 03 00 00 00 01}
0x2C084                 End of Options {29 02}
0x2C086             End If {29 02}
Code:
0x47153         Suppress If: {0A 82}
0x47155             Variable 0xADC equals 0x0 {12 86 DC 0A 00 00}
0x4715B                 Variable 0xADA equals 0x0 {12 06 DA 0A 00 00}
0x47161                 Or {16 02}
0x47163                 Variable 0xAD6 equals 0x0 {12 06 D6 0A 00 00}
0x47169                 Or {16 02}
0x4716B             End {29 02}
0x4716D             Numeric: Spread % (74872343805068669-74872343805068669) , Variable: 0x4 {07 91 05 14 06 14 B7 27 16 00 04 00 04 10 00 FF 01}
0x4717E                 Default: 8 Bit, Value: 0x0 {5B 06 00 00 00 00}
0x47184             End {29 02}
0x47186         End If {29 02}
Code:
0x49480         Suppress If: {0A 82}
0x49482             Variable 0xB66 equals 0x0 {12 06 66 0B 00 00}
0x49488             Numeric: PXE boot wait time (74872343805068669-74872343805068669) , Variable: 0x4 {07 91 4A 14 4B 14 69 0B 23 00 04 00 10 10 00 05 01}
0x49499                 Default: 8 Bit, Value: 0x1 {5B 06 00 00 00 01}
0x4949F                 Default: 8 Bit, Value: 0x1 {5B 06 01 00 00 01}
0x494A5             End {29 02}
0x494A7         End If {29 02}
Code:
0x4997E             Grayout If: {19 82}
0x49980                 Variable 0xBC5 equals 0x1 {12 06 C5 0B 01 00}
0x49986                 Setting: , Variable: 0x4 {05 91 F2 14 0E 15 77 0B 25 00 04 00 10 10 00 03 00}
0x49997                     Option: Auto, Value: 0x0 {09 07 09 15 30 00 00}
0x4999E                     Option: Floppy, Value: 0x1 {09 07 0F 15 00 00 01}
0x499A5                     Option: Forced FDD, Value: 0x2 {09 07 10 15 00 00 02}
0x499AC                     Option: Hard Disk, Value: 0x3 {09 07 11 15 00 00 03}
0x499B3                 End of Options {29 02}
0x499B5             End If {29 02}
Code:
0x4C1F3             Numeric: en-US (74872343805068669-74872343805068669) , Variable: 0x4 {07 91 00 00 00 00 D4 0B 27 00 04 00 00 10 00 FF 00}
0x4C204             End {29 02}

As you can see they share the same variable address:0x4, I think if I directly use Steup_Var 0x4 0x1 will mess up other options. And I also use the commad Setup_Var 0x4 to read the value in it, I was surprised because it told me offset 0x4 is 0x00 and 0x01 at the same time, how can that be possible?

[Image: 901ea08fly1fwx39em3toj23402c07wk.jpg]

Do anyone can help me with this? Thanks.
find
quote
#2
Upload the setup file, that looks possibly incomplete IFR. Also, to save time so I don't have to request later in case I need another part of the setup, please go ahead and upload the entire BIOS file.

You should be looking for VarName/VarOffset "Variables", not the variable shown in what you pasted above (unless you edited out the VarName/VarOffset before each of those? All that's shown above is the default used variable, what you change in grub but only along with the VarName/VarOffset variable ID

>> Random Example
One Of: PERR# Generation, VarStoreInfo (VarOffset/VarName): 0x3 (This is what You use in grub), VarStore: 0x1, QuestionId: 0xA, Size: 1, Min: 0x0, Max 0x0, Step: 0x0 {05 A6 35 0D 36 0D 0A 00 01 00 03 00 10 10 00}
One Of Option: Disabled, Value (8 bit): 0x0 (default) {09 0E 05 00 30 00 00 00 00 00 00 00 00 00}
One Of Option: Enabled, Value (8 bit): 0x1 {09 0E 04 00 00 00 01 00 00 00 00 00 00 00}

Grub Prompt >> Setup_Var 0x3 0x1 << This changes the above variable ID 0x3 to default 0x0 instead of 0x1

Ohh! Wait! I see now! Those where you have "Variable 0x4" are the values, but without a variable name ID shown in front of that.
Like this >> Numeric: Spread % (95982967058349882-95982967058349882) , Variable: 0x4 {07 91 05 14 06 14 B7 27 16 00 04 00 04 10 00 FF 01}
Above is missing the VarName/VarOffset ID, that your other ones DO show correct ID, Example >>
0x49980 Variable 0xBC5 equals 0x1 {12 06 C5 0B 01 00}
0x49986 Setting: , Variable: 0x4 {05 91 F2 14 0E 15 77 0B 25 00 04 00 10 10 00 03 00}

In the above setting, you'd type this at Grub to change >> Setup_Var 0xBC5 0x1, 0x2, or 0x3

Looks like the middle and last one are the only ones missing names/correct VarName/VarOffset ID variables. Shoot me the BIOS and I'll check it out for you, and if necessary send you an updated IFR app. Some BIOS have names/ID's removed like that, so you can't easily edit.


Your IFR may be valid and correct above, but it looks confusing how it's shown, so I posted all this just in case it's wrong, so you can see what you should be expecting to look for to change.
find
quote
#3
(11-05-2018, 12:56 AM)Lost_N_BIOS Wrote: Upload the setup file, that looks possibly incomplete IFR.  Also, to save time so I don't have to request later in case I need another part of the setup, please go ahead and upload the entire BIOS file.

You should be looking for VarName/VarOffset "Variables", not the variable shown in what you pasted above (unless you edited out the VarName/VarOffset before each of those?  All that's shown above is the default used variable, what you change in grub but only along with the VarName/VarOffset variable ID  

>>  Random Example
One Of: PERR# Generation, VarStoreInfo (VarOffset/VarName): 0x3  (This is what You use in grub), VarStore: 0x1, QuestionId: 0xA, Size: 1, Min: 0x0, Max 0x0, Step: 0x0 {05 A6 35 0D 36 0D 0A 00 01 00 03 00 10 10 00}
One Of Option: Disabled, Value (8 bit): 0x0 (default) {09 0E 05 00 30 00 00 00 00 00 00 00 00 00}
One Of Option: Enabled, Value (8 bit): 0x1 {09 0E 04 00 00 00 01 00 00 00 00 00 00 00}

Grub Prompt >> Setup_Var 0x3 0x1   << This changes the above variable ID 0x3 to default 0x0 instead of 0x1

Ohh! Wait!  I see now!  Those where you have "Variable 0x4" are the values, but without a variable name ID shown in front of that.
Like this >> Numeric: Spread % (95982967058349882-95982967058349882) , Variable: 0x4 {07 91 05 14 06 14 B7 27 16 00 04 00 04 10 00 FF 01}
Above is missing the VarName/VarOffset ID, that your other ones DO show correct ID, Example >>
0x49980                 Variable 0xBC5 equals 0x1 {12 06 C5 0B 01 00}
0x49986                 Setting: , Variable: 0x4 {05 91 F2 14 0E 15 77 0B 25 00 04 00 10 10 00 03 00}

In the above setting, you'd type this at Grub to change >> Setup_Var 0xBC5 0x1, 0x2, or 0x3

Looks like the middle and last one are the only ones missing names/correct VarName/VarOffset ID variables.   Shoot me the BIOS and I'll check it out for you, and if necessary send you an updated IFR app.  Some BIOS have names/ID's removed like that, so you can't easily edit.


Your IFR may be valid and correct above, but it looks confusing how it's shown, so I posted all this just in case it's wrong, so you can see what you should be expecting to look for to change.

There were some structral problem with the codes I post, they are correct now, sorry for the confusion.
My BIOS is in the attachment below:

.zip   afuwin.zip (Size: 3.42 MB / Downloads: 3)
find
quote
#4
Thanks, I find similar! I think something has to be done with VarStore in the command, like Varstore + Var ID, but I am not sure what. I've always seen this 0x0 or 0x1, but in your BIOS, especially where there is same ID 0x4 you mentioned, the VarStore ID is different.

Here is IFR I generated, maybe with more info it can help. I also included the tool I used, probably same as yours but updated version
https://www.sendspace.com/file/2rqms4

You'll have to google around about using VarStore with VarName/VarOffset
find
quote
#5
(11-05-2018, 03:50 AM)Lost_N_BIOS Wrote: Thanks, I find similar!  I think something has to be done with VarStore in the command, like Varstore + Var ID, but I am not sure what.  I've always seen this 0x0 or 0x1, but in your BIOS, especially where there is same ID 0x4 you mentioned, the VarStore ID is different.

Here is IFR I generated, maybe with more info it can help.  I also included the tool I used, probably same as yours but updated version
https://www.sendspace.com/file/2rqms4

You'll have to google around about using VarStore with VarName/VarOffset

Your IFR is very helpful! I realized that these options are stored in different segments correspond to their VarStore ID, and the VarOffset is their addresses inside their own segments, on top of the IFR document I can find each segment with their VarStore ID, Name and GUID.

For example:

Code:
0x2B025             One Of: Native PCIE Enable, VarStoreInfo (VarOffset/VarName): 0x4, VarStore: 0x1, QuestionId: 0x38, Size: 1, Min: 0x0, Max 0x1, Step: 0x0


'VarStore: 0x1' means this option is stored in the segment whose VarStore ID=0x1

Code:
0x29D19     VarStore: VarStoreId: 0x1 [EC87D643-EBA4-4BB5-A1E5-3F3E36B20DA9], Size: 0xFFA, Name: Setup

Find it!, the name of this segment is 'Setup', its GUID is 'EC87D643-EBA4-4BB5-A1E5-3F3E36B20DA9', you can see it perfectly matches the green underline in my screenshot below. 

[Image: 901ea08fly1fwxgcjoy8wj21kw16o7wk.jpg]

But wait! it says there is another ‘setup’ whose GUID is '80e1202e....' , but I can't find this GUID anywhere in IFR, it also mentioned GUID does not match expected GUID, what command should I use in order to specify one? I checked the grub help command, the structure is like this:
setup_var setup_var offset [setval]
find
quote
#6
I have seen the GUID does not match error and had no problems before, but as we've noted this BIOS is different due to the way it's setup.
The alternate Setup is probably one contained in NVRAM, which does not dump IFR and needs to be changed via SCEWin, or by using a modified grub loader

Here is two modified grub's to try, one has a config_var, and you can use Setup_Var2 which will correspond to the hidden GUID setups hopefully
https://github.com/datasone/grub-mod-setup_var

Link to second modified one with Setup_Var2 is in first sentence, one with Setup_var3 is in releases tab
Actually, here's the link, you'll have to translate page - https://habr.com/post/190354/

I will send you PM about the other mentioned tool
find
quote
#7
But for now everything I want to edit is in the first setup (GUID:EC87D643-EBA4-4BB5-A1E5-3F3E36B20DA9) , I don't know what is it in the hidden one, but if I simply use Setup_Var command it will change both setup, which is the situation I am trying to prevent.
Update:

Code:
0xD4B9     VarStore: VarStoreId: 0x1 [80E1202E-2697-4264-9CC9-80762C3E5863], Size: 0x7, Name: Setup
0xD4D5     VarStore: VarStoreId: 0x2 [80E1202E-2697-4264-9CC9-80762C3E5863], Size: 0x1, Name: Setup2


I find where the second setup is, it's in  the Section_PE32_image_ReFlash_ReFlash.sct, I put it to the attachment below:

.txt   Section_PE32_image_ReFlash_ReFlash IFR.txt (Size: 10.31 KB / Downloads: 1)
find
quote
#8
Run the tool I sent you in PM, maybe you can change that way and not have to worry about doing this grub stuff.

As for grub, there must be some way to specify Varstore ID when entering a command, but I don't know enough about that. Maybe some of the Russian linked info above can help, did you translate it yet?

What I think you may be able to do, use normal grub to edit one (effectively editing both) then use setup_Grub2 modified one to edit only the hidden one back to what you want it to be, last.
find
quote
#9
I tried all of the SCEWIN with 32/64 command in admin, but none of them work, some said driver not accessable and others said not support BIOS, most of them output an nvram.txt file only with head like below:



Code:
// Script File Name : nvram.txt
// Created on 11/06/18 at 13:14:15    
// Copyright (c)2013 American Megatrends, Inc.
// AMISCE Utility. Ver 5.00.1048


The modified grub I am using right now is the first one by brainsucker, I tried the Stup_var2 command but it will still change both offset. I haven't tried the second one yet. but I find another efi shell called RU.EFI, is it possible to help?
find
quote
#10
I don't know about the RU.EFI. I did think of something though, if you only want one changed, you can simply direct edit the setup module and put back in BIOS to reflash. Then only that one will have the changed values.

Example - Swap enabled/disabled values (Only part of the value, as shown)
One Of: SMM Use SMM en-US Indication, VarStoreInfo (VarOffset/VarName): 0x4, VarStore: 0x13, QuestionId: 0x87, Size: 1, Min: 0x0, Max 0x1, Step: 0x0 {05 91 81 03 82 03 87 00 13 00 04 00 10 10 00 01 00}
One Of Option: Disabled, Value (8 bit): 0x0 (default) {09 07 04 00 30 00 00}
One Of Option: Enabled, Value (8 bit): 0x1 {09 07 03 00 00 00 01}

[Image: bvCQjGt.png]

Change to via hex edit to setup module file, this will change the "Default" value, you can verify by new IFR output on the edited module
One Of: SMM Use SMM en-US Indication, VarStoreInfo (VarOffset/VarName): 0x4, VarStore: 0x13, QuestionId: 0x87, Size: 1, Min: 0x0, Max 0x1, Step: 0x0 {05 91 81 03 82 03 87 00 13 00 04 00 10 10 00 01 00}
One Of Option: Disabled, Value (8 bit): 0x0 (default) {09 07 04 00 00 00 01} << Will no longer be default, value will be 0x1, see IFR output below
One Of Option: Enabled, Value (8 bit): 0x1 {09 07 03 00 30 00 00} << Will now be default and 0x0, see IFR output below

[Image: bK8UsIb.png]

If you then find, you don't want this one to be "The one" changed, put back default setup module instead, and then make same change in AMIBCP instead (This changes the other one, stored in NVRAM)
And, along those lines, you could also just edit the BIOS itself, to enable all these settings to be visible for you in the BIOS instead of messing with it all like this, that would probably be a lot easier for you in the long run
If you want to do that, please zip some images of your BIOS for me, one showing Main section, another showing all visible sub-sections/sub-menu entries in Advanced (If you have advanced), and chipset if you have that one.
Make sure at least one or all of the images also show all current visible tabs/sections you have in the BIOS, I'll see what I can do to enable it all to be visible for you.
find
quote


Forum Jump:


Users browsing this thread: 11 Guest(s)