Contribute
Register

Extracting DVMT variable offset

Status
Not open for further replies.

the-braveknight

Moderator
Joined
Nov 24, 2015
Messages
1,220
Motherboard
Lenovo Legion Y520 (Clover)
CPU
i7-7700HQ
Graphics
HD 630 (1920x1080) + Nvidia GTX 1060
Mac
  1. MacBook Air
Mobile Phone
  1. iOS
Hello all,
I've been trying to extract the DVMT-prealloc variable offset from my BIOS dump without success. After extracting the 'DXE Core' and opening the relevant file with Universal IFR Extractor, the program (Universal IFR Extractor) hangs up ends up creating an unending file.

My current BIOS link: https://download.lenovo.com/consumer/mobiles/5XCN20WW.exe
The new BIOS Link (I will update if I get the variable offset from it): https://download.lenovo.com/consumer/mobiles/5XCN24WW.exe

I am also attaching my current BIOS dump. I would be very thankful if you could help.
 

Attachments

  • BIOS.zip
    3.9 MB · Views: 151
This is the .ROM file containing the DVMT setting. When I extract it with Universal IFR Extractor, it hangs up creating an endless file like this:

I found an up to date fork of Universal IFR Extractor, but it still creates the same endless file. Here is the repo: https://github.com/LongSoft/Universal-IFR-Extractor

I'll be thankful if someone can look at the source code and maybe provides a fix for this bug?
 

Attachments

  • Screen Shot 2018-09-01 at 5.39.57 PM.png
    Screen Shot 2018-09-01 at 5.39.57 PM.png
    115 KB · Views: 185
  • FE3542FE-C1D3-4EF8-657C-8048606FF670_901.ROM.zip
    238.5 KB · Views: 89
So... I am not really a C/C++ expert but I simply added these lines of code to this else-if statement just to ignore the "Latency" part of the BIOS setup which is causing the problem. I compiled the binary and could get an IFR extract that contains the DVMT prealloc offset settings. I just don't know whether what I did is correct. Can you please check, @RehabMan?
 

Attachments

  • Screen Shot 2018-09-01 at 6.11.32 PM.png
    Screen Shot 2018-09-01 at 6.11.32 PM.png
    56.1 KB · Views: 175
  • IFR.txt
    1.5 MB · Views: 601
So... I am not really a C/C++ expert but I simply added these lines of code to this else-if statement just to ignore the "Latency" part of the BIOS setup which is causing the problem. I compiled the binary and could get an IFR extract that contains the DVMT prealloc offset settings. I just don't know whether what I did is correct. Can you please check, @RehabMan?

I guess you'll find out when you interrogate the DVMT offset in the shell...
 
I guess you'll find out when you interrogate the DVMT offset in the shell...
How do I actually get the value (not set) for the offset via setup_var?
 
Don't provide the parameter for new_value.
I typed 'setup_var 0xDF' and got the following output. I don't think it corresponds to the data in IFR.txt attached in post #3. (Default value should be 0x1). Can you please check?
 

Attachments

  • IMG_2210.JPG
    IMG_2210.JPG
    2 MB · Views: 201
I typed 'setup_var 0xDF' and got the following output. I don't think it corresponds to the data in IFR.txt attached in post #3. (Default value should be 0x1). Can you please check?

Hard to know whether the OEM actually set to default or what the value 0 might mean.
 
Hard to know whether the OEM actually set to default or what the value 0 might mean.
There are 4 search results that come up if I try to look for "(VarOffset/VarName): 0xDF" in the IFR.txt file. What does that tell us?
 
Update: Looking at 'setup_var2 0xDF' output, it shows that its value is 0x01 which appears to be correct.
Also, 'setup_var2 0xE0' shows a value of 0x02' which also appears to be correct.
 
Status
Not open for further replies.
Back
Top