Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Missing memory and the mystery of MTRRs

178 views
Skip to first unread message

Charlie Gibbs

unread,
Feb 13, 2021, 4:50:05 PM2/13/21
to
[This would probably be an FAQ if I knew the proper incantation...]

I realized recently that a box I've been running for a while isn't
seeing all of its installed memory. The BIOS screens indicate that 8GB
is installed, but Debian (recently upgraded to Buster) only sees a bit
over 3GB.

cjg@dragon:~$ head -1 /proc/meminfo
MemTotal: 3331096 kB

During boot I noticed the following message:

[ 0.012080] WARNING: BIOS bug: CPU MTRRs don't cover all of memory,
losing 4800MB of RAM.

So I guess it's time to start learning about the wonderful world of MTRRs.

cjg@dragon:~$ cat /proc/mtrr
reg00: base=0x000000000 ( 0MB), size= 2048MB, count=1: write-back
reg01: base=0x080000000 ( 2048MB), size= 1024MB, count=1: write-back
reg02: base=0x0c0000000 ( 3072MB), size= 256MB, count=1: write-back
reg03: base=0x0cff00000 ( 3327MB), size= 1MB, count=1: uncachable

cjg@dragon:~$ head -9 /proc/cpuinfo
processor : 0
vendor_id : GenuineIntel
cpu family : 6
model : 15
model name : Intel(R) Core(TM)2 CPU 6300 @ 1.86GHz
stepping : 2
microcode : 0x56
cpu MHz : 1598.388
cache size : 2048 KB

Here's the first part of /var/log/messages:

[ 0.000000] Linux version 4.19.0-6-amd64
(debian...@lists.debian.org) (gcc version 8.3.0 (Debian 8.3.0-6)) #1
SMP Debian 4.19.67-2+deb10u1 (2019-09-20)
[ 0.000000] Command line: BOOT_IMAGE=/boot/vmlinuz-4.19.0-6-amd64
root=UUID=4d3143dd-d732-4755-b832-05753ab9c53a ro quiet
[ 0.000000] x86/fpu: x87 FPU will use FXSAVE
[ 0.000000] BIOS-provided physical RAM map:
[ 0.000000] BIOS-e820: [mem 0x0000000000000000-0x000000000008efff] usable
[ 0.000000] BIOS-e820: [mem 0x000000000008f000-0x000000000009ffff]
reserved
[ 0.000000] BIOS-e820: [mem 0x00000000000e0000-0x00000000000fffff]
reserved
[ 0.000000] BIOS-e820: [mem 0x0000000000100000-0x00000000cfd60fff] usable
[ 0.000000] BIOS-e820: [mem 0x00000000cfd61000-0x00000000cfd6dfff]
reserved
[ 0.000000] BIOS-e820: [mem 0x00000000cfd6e000-0x00000000cfe1efff] usable
[ 0.000000] BIOS-e820: [mem 0x00000000cfe1f000-0x00000000cfee8fff]
ACPI NVS
[ 0.000000] BIOS-e820: [mem 0x00000000cfee9000-0x00000000cfeecfff] usable
[ 0.000000] BIOS-e820: [mem 0x00000000cfeed000-0x00000000cfef1fff]
ACPI data
[ 0.000000] BIOS-e820: [mem 0x00000000cfef2000-0x00000000cfef2fff] usable
[ 0.000000] BIOS-e820: [mem 0x00000000cfef3000-0x00000000cfefefff]
ACPI data
[ 0.000000] BIOS-e820: [mem 0x00000000cfeff000-0x00000000cfefffff] usable
[ 0.000000] BIOS-e820: [mem 0x00000000cff00000-0x00000000cfffffff]
reserved
[ 0.000000] BIOS-e820: [mem 0x00000000fff00000-0x00000000ffffffff]
reserved
[ 0.000000] BIOS-e820: [mem 0x0000000100000000-0x000000022bffffff] usable
[ 0.000000] NX (Execute Disable) protection: active
[ 0.000000] SMBIOS 2.4 present.
[ 0.000000] DMI: /DG965WH, BIOS MQ96510J.86A.1687.2007.0510.0258
05/10/2007
[ 0.000000] tsc: Fast TSC calibration using PIT
[ 0.000000] tsc: Detected 1864.782 MHz processor
[ 0.011112] e820: update [mem 0x00000000-0x00000fff] usable ==> reserved
[ 0.011115] e820: remove [mem 0x000a0000-0x000fffff] usable
[ 0.011126] last_pfn = 0x22c000 max_arch_pfn = 0x400000000
[ 0.011134] MTRR default type: uncachable
[ 0.011135] MTRR fixed ranges enabled:
[ 0.011137] 00000-9FFFF write-back
[ 0.011139] A0000-FFFFF uncachable
[ 0.011140] MTRR variable ranges enabled:
[ 0.011142] 0 base 000000000 mask F80000000 write-back
[ 0.011144] 1 base 080000000 mask FC0000000 write-back
[ 0.011145] 2 base 0C0000000 mask FF0000000 write-back
[ 0.011147] 3 base 0CFF00000 mask FFFF00000 uncachable
[ 0.011148] 4 disabled
[ 0.011149] 5 disabled
[ 0.011149] 6 disabled
[ 0.011150] 7 disabled
[ 0.011968] x86/PAT: Configuration [0-7]: WB WC UC- UC WB WP UC-
WT
[ 0.012074] e820: update [mem 0xcff00000-0x22bffffff] usable ==> reserved
[ 0.012080] WARNING: BIOS bug: CPU MTRRs don't cover all of memory,
losing 4800MB of RAM.

Is there some sort of HOWTO that covers this stuff? Where do I go from
here?

--
cgi...@surfnaked.ca (Charlie Gibbs)

Alexander V. Makartsev

unread,
Feb 14, 2021, 5:50:04 AM2/14/21
to
Even if there is a "HOWTO" to learn some information, are you capable of unpacking, disassembling and patching BIOS of your motherboard and reassemble working image of it to flash into ROM?

I suggest you to fiddle with BIOS settings first. Search for anything that looks like memory related, like "Memory Hole", or something.
If this trial and error approach won't help, you can update your BIOS as a last resort.
Since your motherboard is pretty old, and Intel has dropped all support for Legacy products, you can't download BIOS updates from Intel official source anymore. [1]
But you can still find them on archive sites. [2] I can't vouch for this site, but it looks like genuine BIOS update from Intel.
I have to warn you about security risks, because there could be a small possibility, it was patched with malware, but considering this BIOS is for an ancient hardware I have my doubts and personally I would take the risk.
And besides, there are no other options.


[1] https://www.intel.com/content/www/us/en/support/products/22639/boards-and-kits/desktop-boards/legacy-intel-desktop-boards/intel-desktop-board-dg965wh.html
[2] https://driverscollection.com/?H=DG965WH&By=INTEL&SS=BIOS

-- 
With kindest regards, Alexander.

⢀⣴⠾⠻⢶⣦⠀ 
⣾⠁⢠⠒⠀⣿⡁ Debian - The universal operating system
⢿⡄⠘⠷⠚⠋⠀ https://www.debian.org
⠈⠳⣄⠀⠀⠀⠀ 

Georgi Naplatanov

unread,
Feb 14, 2021, 2:50:05 PM2/14/21
to
Hi Charlie,

try to update your system first.

In your log kernel version is 4.19.67-2+deb10u1 (2019-09-20),
latest in Buster is 4.19.171-2 (2021-01-30).

I am not sure that this update will help you but I guess it won't become
worse.

Kind regards
Georgi

Charles Curley

unread,
Feb 14, 2021, 4:50:06 PM2/14/21
to
On Sat, 13 Feb 2021 13:17:59 -0800
Charlie Gibbs <cgi...@surfnaked.ca> wrote:

> I realized recently that a box I've been running for a while isn't
> seeing all of its installed memory. The BIOS screens indicate that
> 8GB is installed, but Debian (recently upgraded to Buster) only sees
> a bit over 3GB.
>
> cjg@dragon:~$ head -1 /proc/meminfo
> MemTotal: 3331096 kB

Have you run memtest86? You can install i as an apt package, then
reboot to run it.

--
Does anybody read signatures any more?

https://charlescurley.com
https://charlescurley.com/blog/

Henrique de Moraes Holschuh

unread,
Feb 16, 2021, 11:10:06 AM2/16/21
to
On Sat, 13 Feb 2021, Charlie Gibbs wrote:
> [This would probably be an FAQ if I knew the proper incantation...]

Well, sorta....

> I realized recently that a box I've been running for a while isn't seeing
> all of its installed memory. The BIOS screens indicate that 8GB is
> installed, but Debian (recently upgraded to Buster) only sees a bit over
> 3GB.
>
> cjg@dragon:~$ head -1 /proc/meminfo
> MemTotal: 3331096 kB
>
> During boot I noticed the following message:
>
> [ 0.012080] WARNING: BIOS bug: CPU MTRRs don't cover all of memory,
> losing 4800MB of RAM.

1. UPDATE THE BIOS (UEFI), really.

2. Once it is up-to-date, review BIOS settings. You might have
something strange in there. Check stuff like "memory window", anything
that make mentions to "hole" (PCI, memory, etc), and memory set aside
for GPUs, etc.

Maybe reset BIOS/UEFI to defaults, and change one setting at a time
until it is back the way you want it, to isolate what setting might be
causing it. -- be careful to ensure the boot stuff is correct for what
you need, though. Copy the settings you have to paper before you reset.

Only if all else fails, you try the kernel command line switches to mess
with this :-(

> Is there some sort of HOWTO that covers this stuff? Where do I go from
> here?

Try fixing the real problem first (whatever is making your BIOS set
these incorrectly). Your system might become quite unpredictable
otherwise, depending on the reason these MTRRs are set like that.

--
Henrique Holschuh

Paul Duncan

unread,
Feb 22, 2021, 5:20:05 AM2/22/21
to
I have seen a few systems (such as HP Proliant servers) where you need to populate the DIMM slots in order, or it won't necessarily see all the RAM. Wonder if thats the problem.

Back to lurking/clearing my E-mail backlog.

Paul.
--

Paul Duncan

Lead Marine Technician, RV Falkor

SCHMIDT OCEAN INSTITUTE

mobile +1 650 387 4151

VOIP +1 954 672 4943

www.schmidtocean.org

Follow us on Twitter, Facebook and Google+

This email message is for the sole use of the intended recipient(s) and may contain confidential and privileged

information. Any unauthorized review, use, disclosure or distribution is prohibited. If you have received it in

error, please advise the sender by reply email and delete the message and any attachments. Thank you.

0 new messages