Re: Missing memory and the mystery of MTRRs
On 14.02.2021 02:17, Charlie Gibbs
wrote:
[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-kernel@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?
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
⠈⠳⣄⠀⠀⠀⠀
Reply to: