English Community

  • 1
  • 2
Go to page

Re: L530 2481-3SG - First 1.4 GB RAM of 4 GB 'reserved by hardware' and now 2.2 GB? BIOS/UEFI problem?

Hello,

 

 

Using a Thinkpad L530 which is a few weeks more than a year old now (-> warranty expired). Running Windows 7 64-bit on it (in BIOS compatibility mode).

 

Four months ago, about at the time (cannot say for sure) when I installed a BIOS update (which skipped several versions), afterwards suddenly my resource monitor showed 1.4GB of memory reserved by hardware.

 

 

I did some search and also called the Lenovo Germany support hotline (as they don't have email support) as my device was still in warranty at that time, but the helpful guys could not help me get the memory back - the conclusion we reached was that for some reason, that BIOS update must have changed how intel's integrated graphics memory is handled (no longer dynamic size). Due to the fact that a BIOS downgrade was impossible (due to some changes), they also offered me to replace the mainboard with one of an older BIOS revision, but I declined (I though that it won't help much since I'd have to upgrade the BIOS later anyway, and I really did not want to miss my primary work machine).

 

However, yesterday, after having done nothing more than trying out a few different operating system live CDs and definitely not having installed any new BIOS update or similar, suddenly the hardware reserved memory was 2.2GB (I can say 100% certainty that on Monday it was not, since I was unable to resume a VirtualBox VM paused on Monday because of that memory configuration change - and just to make sure, I also did not install any drivers or BIOS updates since Monday).

 

So, I'm now pretty sure that this problem (and probably also the other one I had before) was not caused by a BIOS upgrade or some changes how Intel integrated graphics is handled, but more likely some BIOS/Firmware bug.

 

Also, the missing memory does not show only in Windows 7, but also when I boot a Linux live CD or when booting memtest86.

 

So I investigated a bit, and found out, that if I boot a Linux live CD (that supports it) in UEFI mode (with legacy CSM support disabled), I can suddenly use most of my 4GB of RAM again. But only there, and I'd like to use it in Windows, and not by re-installing a Windows 8 license in UEFI mode...

 

Some information I collected (like EFI memory map, and memory map when booting Windows and Linux and UEFI Linux, and screenshots from Windows) are available in that post in another forum: http://superuser.com/questions/746497/what-hardware-device-used-to-eat-up-1-4gb-of-my-4gb-ram-and-now-suddenly-after?noredirect=1#comment963048_746497

 

Does anybody have any suggestions

- how to find out where that memory went?

- why the memory maps differ so much between UEFI and BIOS/CSM boot

- how to get the memory back (without replacing hardware)

 

As I heard about lots of UEFI problems (not only for Lenovo but also from other vendors) are caused by some invalid EFI variables, is there a way to reset all the EFI variables on my notebook (I'm aware that I may have to reconfigure boot settings afterwards)? I've already tried reflashing the BIOS (one version down and back again) and loading setup defaults, or resetting Secure Boot settings, but that did not help for my problem.

 

 

 

1
1
Solution

Re: L530 2481-3SG - First 1.4 GB RAM of 4 GB 'reserved by hardware' and now 2.2 GB? BIOS/UEFI proble

consider this solved :)

 

The final confirmation that my approach should be correct is this code from TianoCore (an open source partial reference implementation of UEFI):

 

https://github.com/tianocore/edk2/blob/master/IntelFrameworkModulePkg/Library/GenericBdsLib/BdsMisc.c#L1425

 

This code is triggered whenever the system is about to boot a boot option, and it verifies that the different UEFI memory regions have less allocated pages than stored in MemoryTypeInformation. If not, the memory map is incorrect and the variable is updated (with 125% of what is currently allocated) and a reboot is triggered, so that the memory map can be rebuilt from the latest data. Note that the implementation will never decrease any cached size for any memory type, so any change here will be permanent.

 

The problem here is that if UEFI boot fails, it will put you back into the boot selection menu (or in case it was a device on the default boot order, the next device is tried). As most UEFI boot loaders do not clean up after themselves in case of boot failure, as soon as the next menu is booted, this code will detect that some more memory has been allocated and therefore decides it has to update the memory map so that the following OS will not get into trouble. Unfortunately this repeats for every boot failure so that eventually there is a "hard limit" of how often you can fail booting :-(

 

The code in TianoCore also has fallback options in case the variable is missing or malformed (which, if I understand the code correctly may cost you up to two extra reboots, though), but considering the fact that Lenovo even included a Backup variable (which does not exist in TianoCore) , I decided not to trust this fallback and reverted to the oldest backup I had, minus 800 MB for the LoaderData type, which gives me an effective 667 MB hardware reserved memory (good enough for now). And it works :)

 

screenshot.png

 

Suggestions for Lenovo Bios Engineers:

- I am not sure if it is feasible, but caching the entire memory map before starting to boot, and restoring it in case of a boot failure should solve this problem (assuming it cannot happen that library code allocates more memory during boot)

- Remember that an UEFI boot has been tried and in case the code for updating the MemoryTypeInformation triggers after it failed on a subsequent retry, do not update the MemoryTypeInformation but first try to do a reboot. Probably needs some fallback code though so that in case the boot order is CD, HDD and a CDROM with failing boot code is in the drive, eventually the hard drive gets tried.

- Probably the easiest solution: Reset the MemoryTypeInformation to some known good value (hard-coded in BIOS) whenever loading BIOS defaults. As after loading default, there are at least two reboots anyway, a third one (if needed) will kill nobody.

 

Or probably I missed something obvious.

 

Anyway, case closed, and I really appreciate Mark_Lenovo's effort in trying to get this resolved :-)

0
0

Was this solution helpful?

Your feedback helps us improve!
Replies

L530 2481-3SG - First 1.4 GB RAM of 4 GB 'reserved by hardware' and now 2.2 GB? BIOS/UEFI problem?

Re: L530 2481-3SG - First 1.4 GB RAM of 4 GB 'reserved by hardware' and now 2.2 GB? BIOS/UEFI proble

Tried today to unplug CMOS battery and replug (you see, I'm getting desparate and try stuff that I myself don't believe that may help), but except that I had to re-set date&time it did not have any effects for my broken BIOS memory map.

 

 

 

Ok, I was a bit surprised to see a lot of dark/oily/greasy fingerprints on the inside of the "bottom door" (https://twitter.com/mihi42/status/461891357192105984)  - as this was the first time I opened it, they must have been there still from the manufacturing process?

 

And I also don't know why the maintenance manual says you have to remove keybord bezel (as opposed to only the keyboard) if you want to swap second memory module, because it looks very reachable for me (but I did not try since I don't have any other compatible memory modules to try anyway, and I doubt it helps to try to boot without any RAM installed at all...)

 

Anyway, now this issue and before the DIV/0 bluescreens in the ElanTech touchpad driver (which I fortunately got resolved after writing a few dozen emails to ElanTech support - it helps if you can include disassembly from WinDbg dumps (and annotate them with where the divide instruction is and which path the zero came) apparently, since if you just send them the minidump they (ElanTech) seem to not believe that you are competent and they treat you like an idiot) makes this particular model the worst notebook I ever had - and considering that the (subjectively) "best" notebook I ever had  was a ThinkPad R60 really makes me think what make/model my next notebook should become...

 

 

0
0

Re: L530 2481-3SG - First 1.4 GB RAM of 4 GB 'reserved by hardware' and now 2.2 GB? BIOS/UEFI proble

mihi,

 

Thanks for the tweet alerting us to your thread here.  You certainly seem very technically advanced, and I appreciate the details that you have shared here.

 

I'll ask one of our engineers who is more familiar with the BIOS and implications of UEFI to have a look at your thread and see if he has additional suggestions.

 

You could try going to BIOS and reloading defaults (F9 I believe) and save and exit.  Sometimes with a BIOS upgrade, some values need to be re-written after the update.  

 

Stay tuned...

 

Mark

1
1

Re: L530 2481-3SG - First 1.4 GB RAM of 4 GB 'reserved by hardware' and now 2.2 GB? BIOS/UEFI proble

Hello Mark,

 

thank you for your help. It is really appreciated.

 

About that F9 thing: This is what I meant when I wrote I tried reloading setup defaults. And in fact I've tried it more than once.

 

 

If your engineers need any additional information (like some memory dumps from EFI shell or some other information I can obtain from my machine) do not hesitate to ask for it. I'll be very glad to help resolving this issue. Just keep in mind that my Internet uplink bandwidth is limited, so uploading 10 or 20MB is no problem, but uploading a whole 4GB memory dump is outside my capabilities.

 

 

Thanks again,

 

mihi

 

0
0

Re: L530 2481-3SG - First 1.4 GB RAM of 4 GB 'reserved by hardware' and now 2.2 GB? BIOS/UEFI proble

Were you able to find anything out?

 

At least I found out something that looks strange to me.

 

When looking through UEFI memory dumps, I found out that the relevant record of the BIOS memory map (57D32000-DAE9EFFF) exists in memory, along with the other lines - even when booting in UEFI mode. Not strange so far, probably the BIOS is initializing it somehwere during the boot process "just in case" it will need it later to boot from CSM.

 

000FBAD0: 00 20 D3 57 00 00 00 00-00 D0 16 83 00 00 00 00 *. .W............*

 

Interpreted as two 64-bit little endian integer values this is the start offset and the length of the memory range.

 

It also appears in BIOS mode at the equivalent 16-bit address F000:BAD0 (no, although the address spells BAD, I don't think it is :D)

 

So, what happens if I patch this value in memory and then chain-boot into some other OS like Windows, will it fix the memory map for me (or will it crash or whatever)?

 

Turns out, that this memory region is (at least it appears so to both EFI shell and DEBUG.EXE in DOS booted via CSM) mapped from ROM/Flash and therefore cannot be changed at runtime.

 

So to summarize

- The value that tells where the "strange reserved memory region" starts is actually present in the main BIOS/UEFI ROM (or somehow mapped there by hardware, but why?)

- This value changed at least twice for me; at least for the second case no BIOS update happened at the same time - although it is ROM.

- It is very unlikely for me that some other hardware outside the BIOS was able to change that value somehow at runtime, since it is not RAM but ROM.

- This value is read-only (as ROM is, unless you reflash it), so the obvious solution that some driver accidentally wrote there due to a bug is also out of question (unless there is some situation in which this memory area is suddenly writable). So either a bug in the UEFI/BIOS (which accidentally flashes over that value when saving something else) or some software that intentionally over-flashed that value (but why?). (I scanned my machine with antivirus, and it did not find anything. Yes, I'm aware that targeted attacks cannot be found by antivirus).

- Another open question is what value is in ROM on a "normal" machine of same model that does not show this bug. And why re-flashing the same BIOS version does not notice that this ROM is "changed" somehow and re-flashes it.

 

 

Any insights?

 

mihi

0
0

Re: L530 2481-3SG - First 1.4 GB RAM of 4 GB 'reserved by hardware' and now 2.2 GB? BIOS/UEFI proble

mihi,

 

I asked one of our techs to have a look and here is a screen shot of one of our L530 with BIOS 2.61,EC 1.14, and running Windows 7 64 bit preload.  Could you share a snapshot of your system?  Also, can you confirm the BIOS version you have installed?

 

BIOS 2.61 Resouces.jpg

1
1

Re: L530 2481-3SG - First 1.4 GB RAM of 4 GB 'reserved by hardware' and now 2.2 GB? BIOS/UEFI proble

 

 

 

 

Here is a screenshot of my resource monitor - the one of your tech definitely looks more healthy:

 

resmon.png

 

Current BIOS version installed is 2.60:

 

I will 

msinfo.png

 

I will upgrade to 2.61 (which came out last week) now and report afterwards if anything changed (except the version number).

 

If you need anything else (did you refer to a screenshot by snapshot or something else?), feel free to ask.

 

If you think it helps you, I can try to remove (end user removable) devices like hard disk or optical drive and try if I can still reproduce it (As long as I can boot from USB, I should be able to get hold of the memory map somehow).

 

 

Thanks for your support.

 

 

mihi

0
0

Re: L530 2481-3SG - First 1.4 GB RAM of 4 GB 'reserved by hardware' and now 2.2 GB? BIOS/UEFI proble

After the BIOS upgrade, the memory usage still looks the same :(

 

msinfo.png

 

 

0
0

Re: L530 2481-3SG - First 1.4 GB RAM of 4 GB 'reserved by hardware' and now 2.2 GB? BIOS/UEFI proble

OK I can also confirm (what I already assumed) that the issue also happens without any hard drive attached.

 

How I tested it:

 

Downloaded Hardware Detection Tool (direct link to v0.5.2 ISO file) and burnt it onto a (rewritable) CD

 

Booted from it (with the hard drive still attached), selected Menu Mode, and navigated the Menu to the Memory submenu (which shows the usable memory amount as 1906 MB) and then to the BIOS e820 memory map (which shows that starting at 57D32000 there is a hardware reserved memory region of 8316D000 size (2097 MB)). So, the results of this tool are consistent with what I see in Windows.

 

Here is a photo of the HDT screen:

 

 Link to picture

 

Then I powered the device down, removed the hard drive and repeated the procedure of booting from CD and navigating through the HDT menus. The 1906 MB memory and the reserved memory range is still the same.

 

Another photo (the removed HD is visible in the lower right corner):

 

Link to picture

 

If you want other information, feel free to ask.

 

Regards,

 

mihi

 

Moderator note; picture(s) converted to link(s) About Posting Pictures In The Forums

0
0

Re: L530 2481-3SG - First 1.4 GB RAM of 4 GB 'reserved by hardware' and now 2.2 GB? BIOS/UEFI proble

Mihi,

 

Thanks for the details - I've passed these along and will see what further thoughts we have.

 

Best regards,

 

Mark

1
1
  • 1
  • 2
Go to page

Identify Your Device

OR

Don't want to provide your serial number? You can also Browse by product

Find your Device

Problem solved or need help? Click here.