4

Possible Duplicate:
Ubuntu only detects 3.1 GB of ram on Ubuntu 64 bit

ISSUE IDENTIFIED: BIOS bug. See dmesg output below.

Question is: How to resolve this? Change made since 2.6.32 have introduced this. Is there a patch Canonical or the kernel maintainers can provide to fix this? Who do I refer this to?

Thanks everyone!

ORIGINAL QUESTION:

I think there is an issue with the 64-bit 2.6.35 kernel that ships with Ubuntu 10.10. I have a Gigabtye GA-970A-UD3 with an AMD FX-8120 processor, 16GB DDR3-1333, nVidia GTX550Ti and an OCZ Agility 3 120GB SSD.

I installed Ubuntu 10.10 on it to get SSD TRIM support with the 2.6.35 kernel. However, after successful OS install, System Monitor only reports 3.2GB. It sees the 8 cores of the FX-8120 and the uname -a reports x86_64. Furthermore, dmidecode shows the four banks of memory being filled. Suspecting memory, I swapped out the 16GB for 8GB from a different manufacturer but still the same issue exists. 10.10 with a 2.6.35 kernel won't see more than 4GB on 64-bit.

I have a 64-bit 10.04 LTS install on an i7-960 with 24GB RAM and it sees all 24GB. When I boot the 64-bit 10.04 LTS on the FX-8120 machine, it sees all 16GB and 8 cores.

Clearly something has changed between 2.6.32 and 2.6.35 to affect the memory support.

I am after the TRIM support of 2.6.35 but not at the cost of losing 75% of my RAM. I am looking for some guidance or suggestions. Is a new kernel flag required or do I need to get a custom build of 2.6.33 onward to resolve the TRIM support and memory issue simultaneously.

Any help appreciated!

UPDATE: The version of 10.04 LTS installed is whatever ISO the Ubuntu download site provides for the 10.04 64-bit release. I have turned on "Download Updates" while installing so whatever 10.04 LTS currently does on a clean install with that ISO is what I am running. I can provide outputs for whatever commands are requested to determine the exact builds/revisions this machine is on. I am also going to test boot 10.10 on my i7-960 to see if it reports 4GB vs. 24GB. This would eliminate chipset support as a potential issue since it would cross architectural boundaries and indicate a kernel issue.

UPDATE 2: It is a BIOS bug.

dmesg output snippet:

[    0.000000] Initializing cgroup subsys cpuset
[    0.000000] Initializing cgroup subsys cpu
[    0.000000] Linux version 2.6.35-22-generic (buildd@allspice) (gcc version 4.4.5 (Ubuntu/Linaro 4.4.4-14ubuntu4) ) #33-Ubuntu SMP Sun Sep 19 20:32:27 UTC 2010 (Ubuntu 2.6.35-22.33-generic 2.6.35.4)
[    0.000000] Command line: BOOT_IMAGE=/boot/vmlinuz-2.6.35-22-generic root=UUID=9129347f-e2a2-4b97-965c-800823aaf090 ro quiet splash
[    0.000000] BIOS-provided physical RAM map:
[    0.000000]  BIOS-e820: 0000000000000000 - 000000000009a000 (usable)
[    0.000000]  BIOS-e820: 000000000009f800 - 00000000000a0000 (reserved)
[    0.000000]  BIOS-e820: 00000000000f0000 - 0000000000100000 (reserved)
[    0.000000]  BIOS-e820: 0000000000100000 - 00000000cfda0000 (usable)
[    0.000000]  BIOS-e820: 00000000cfda0000 - 00000000cfdd1000 (ACPI NVS)
[    0.000000]  BIOS-e820: 00000000cfdd1000 - 00000000cfe00000 (ACPI data)
[    0.000000]  BIOS-e820: 00000000cfe00000 - 00000000cff00000 (reserved)
[    0.000000]  BIOS-e820: 00000000e0000000 - 00000000f0000000 (reserved)
[    0.000000]  BIOS-e820: 00000000fec00000 - 0000000100000000 (reserved)
[    0.000000]  BIOS-e820: 0000000100000000 - 000000042f000000 (usable)
[    0.000000] NX (Execute Disable) protection: active
[    0.000000] DMI 2.4 present.
[    0.000000] e820 update range: 0000000000000000 - 0000000000001000 (usable) ==> (reserved)
[    0.000000] e820 remove range: 00000000000a0000 - 0000000000100000 (usable)
[    0.000000] No AGP bridge found
[    0.000000] last_pfn = 0x42f000 max_arch_pfn = 0x400000000
[    0.000000] MTRR default type: uncachable
[    0.000000] MTRR fixed ranges enabled:
[    0.000000]   00000-9FFFF write-back
[    0.000000]   A0000-BFFFF uncachable
[    0.000000]   C0000-C7FFF write-protect
[    0.000000]   C8000-FFFFF uncachable
[    0.000000] MTRR variable ranges enabled:
[    0.000000]   0 base 000000000000 mask FFFF80000000 write-back
[    0.000000]   1 base 000080000000 mask FFFFC0000000 write-back
[    0.000000]   2 base 0000C0000000 mask FFFFF0000000 write-back
[    0.000000]   3 base 0000CFE00000 mask FFFFFFE00000 uncachable
[    0.000000]   4 disabled
[    0.000000]   5 disabled
[    0.000000]   6 disabled
[    0.000000]   7 disabled
[    0.000000] x86 PAT enabled: cpu 0, old 0x7040600070406, new 0x7010600070106
[    0.000000] e820 update range: 00000000cfe00000 - 000000042f000000 (usable) ==> (reserved)
[    0.000000] WARNING: BIOS bug: CPU MTRRs don't cover all of memory, losing 13040MB of RAM.
[    0.000000] ------------[ cut here ]------------
[    0.000000] WARNING: at /build/buildd/linux-2.6.35/arch/x86/kernel/cpu/mtrr/cleanup.c:971 mtrr_trim_uncached_memory+0x2d8/0x303()
[    0.000000] Hardware name: GA-970A-UD3
[    0.000000] Modules linked in:
[    0.000000] Pid: 0, comm: swapper Not tainted 2.6.35-22-generic #33-Ubuntu
[    0.000000] Call Trace:
[    0.000000]  [<ffffffff8106077f>] warn_slowpath_common+0x7f/0xc0
[    0.000000]  [<ffffffff810607da>] warn_slowpath_null+0x1a/0x20
[    0.000000]  [<ffffffff81af7970>] mtrr_trim_uncached_memory+0x2d8/0x303
[    0.000000]  [<ffffffff81af2910>] setup_arch+0x422/0x79e
[    0.000000]  [<ffffffff815864c9>] ? printk+0x68/0x6f
[    0.000000]  [<ffffffff81aed9f3>] start_kernel+0xdd/0x390
[    0.000000]  [<ffffffff81aed341>] x86_64_start_reservations+0x12c/0x130
[    0.000000]  [<ffffffff81aed43f>] x86_64_start_kernel+0xfa/0x109
[    0.000000] ---[ end trace a7919e7f17c0a725 ]---
[    0.000000] update e820 for mtrr

dmidecode -t memory:

# dmidecode 2.9
SMBIOS 2.4 present.

Handle 0x0005, DMI type 5, 24 bytes
Memory Controller Information
    Error Detecting Method: 64-bit ECC
    Error Correcting Capabilities:
        None
    Supported Interleave: One-way Interleave
    Current Interleave: One-way Interleave
    Maximum Memory Module Size: 1024 MB
    Maximum Total Memory Size: 4096 MB
    Supported Speeds:
        70 ns
        60 ns
    Supported Memory Types:
        Standard
        EDO
    Memory Module Voltage: 3.3 V
    Associated Memory Slots: 4
        0x0006
        0x0007
        0x0008
        0x0009
    Enabled Error Correcting Capabilities:
        None

Handle 0x0006, DMI type 6, 12 bytes
Memory Module Information
    Socket Designation: A0
    Bank Connections: 1
    Current Speed: 53 ns
    Type: Other Unknown EDO
    Installed Size: 4096 MB (Double-bank Connection)
    Enabled Size: 4096 MB (Double-bank Connection)
    Error Status: OK

Handle 0x0007, DMI type 6, 12 bytes
Memory Module Information
    Socket Designation: A1
    Bank Connections: 2
    Current Speed: 53 ns
    Type: Other Unknown EDO
    Installed Size: 4096 MB (Double-bank Connection)
    Enabled Size: 4096 MB (Double-bank Connection)
    Error Status: OK

Handle 0x0008, DMI type 6, 12 bytes
Memory Module Information
    Socket Designation: A2
    Bank Connections: 3
    Current Speed: 53 ns
    Type: Other Unknown EDO
    Installed Size: 4096 MB (Double-bank Connection)
    Enabled Size: 4096 MB (Double-bank Connection)
    Error Status: OK

Handle 0x0009, DMI type 6, 12 bytes
Memory Module Information
    Socket Designation: A3
    Bank Connections: 4
    Current Speed: 53 ns
    Type: Other Unknown EDO
    Installed Size: 4096 MB (Double-bank Connection)
    Enabled Size: 4096 MB (Double-bank Connection)
    Error Status: OK

Handle 0x0029, DMI type 16, 15 bytes
Physical Memory Array
    Location: System Board Or Motherboard
    Use: System Memory
    Error Correction Type: None
    Maximum Capacity: 16 GB
    Error Information Handle: Not Provided
    Number Of Devices: 4

Handle 0x002A, DMI type 17, 27 bytes
Memory Device
    Array Handle: 0x0029
    Error Information Handle: Not Provided
    Total Width: 64 bits
    Data Width: 64 bits
    Size: 4096 MB
    Form Factor: DIMM
    Set: None
    Locator: A0
    Bank Locator: Bank0/1
    Type: Unknown
    Type Detail: None
    Speed: 1333 MHz (0.8 ns)
    Manufacturer:  
    Serial Number:  
    Asset Tag:  
    Part Number:  

Handle 0x002B, DMI type 17, 27 bytes
Memory Device
    Array Handle: 0x0029
    Error Information Handle: Not Provided
    Total Width: 64 bits
    Data Width: 64 bits
    Size: 4096 MB
    Form Factor: DIMM
    Set: None
    Locator: A1
    Bank Locator: Bank2/3
    Type: Unknown
    Type Detail: None
    Speed: 1333 MHz (0.8 ns)
    Manufacturer:  
    Serial Number:  
    Asset Tag:  
    Part Number:  

Handle 0x002C, DMI type 17, 27 bytes
Memory Device
    Array Handle: 0x0029
    Error Information Handle: Not Provided
    Total Width: 64 bits
    Data Width: 64 bits
    Size: 4096 MB
    Form Factor: DIMM
    Set: None
    Locator: A2
    Bank Locator: Bank4/5
    Type: Unknown
    Type Detail: None
    Speed: 1333 MHz (0.8 ns)
    Manufacturer:  
    Serial Number:  
    Asset Tag:  
    Part Number:  

Handle 0x002D, DMI type 17, 27 bytes
Memory Device
    Array Handle: 0x0029
    Error Information Handle: Not Provided
    Total Width: 64 bits
    Data Width: 64 bits
    Size: 4096 MB
    Form Factor: DIMM
    Set: None
    Locator: A3
    Bank Locator: Bank6/7
    Type: Unknown
    Type Detail: None
    Speed: 1333 MHz (0.8 ns)
    Manufacturer:  
    Serial Number:  
    Asset Tag:  
    Part Number:  

uname -a

Linux artemis 2.6.35-22-generic #33-Ubuntu SMP Sun Sep 19 20:32:27 UTC 2010 x86_64 GNU/Linux
2
  • 1
    Hi Matt and welcome to [AskUbuntu]. Can you please make sure which versions you are using, cause you say 10.10 LTS and in the second half you say 10.04 LTS. 10.04 is a LTS release, and can you edit the question to say which version of 10.04 version you are using? Like 10.04.2 or something? Also the 10.10 is NOT a LTS release. So please edit your question to be more clear. Thanks! Feb 23, 2012 at 16:07
  • It's a BIOS bug. dmesg output:
    – Matt
    Feb 24, 2012 at 1:53

1 Answer 1

0

The issue in question with AMD FX processor support is due to changes in the Linux kernel starting with 2.6.33. The 2.6.32 kernel that ships with 10.04 works correctly with the hardware in seeing all of the available memory.

I started with a 10.04 LTS build that is seeing 16GB RAM. Then I upgraded to a 2.6.33 kernel via kernel.ubuntu.com and memory fell to 3.2GB. dmesg output reports:

WARNING: BIOS bug: CPU MTRRs don't cover all of memory, losing 13040MB of RAM

Followed by the kernel trace information for the exact area of the kernel source code that has the issue.

At this point, it no longer matter whether I am on 10.04 or 10.10. Once the kernel version passes 2.6.32, this issue manifests. It is not a problem with the FX processor. Even the 2.6.32 kernel recognizes it correctly with the proper number of cores. The Gigabyte GA-970A-UD3 BIOS does not have an option to perform memory remapping so it is probably doing it by default.

Booting Ubuntu 11 on a 3.0 kernel causes the machine to freeze on hardware detection. I have not yet tried the 12.04 alpha release.

The logical solution to allow 2.6 kernels to run on bugged hardware like my motherboard is to patch arch/x86/kernel/cpu/mtrr/cleanup.c in later kernels to use the older 2.6.32 code that doesn't perform the MTRR check. Research indicates the MTRRs are legacy components via the BIOS and appear to be safe to disable.

This will also allow users of newer hardware to running the older Linux 2.6 based systems with later drivers and support SSDs correctly.

My next step is to pull down the sources for the 2.6.33 kernel I am using along with 2.6.32 and look into performing the patch to see what happens. Note that I am not a kernel developer and my C is rusty but I can work well enough to give this a try. Should it work, I will see into posting a patch to the kernel maintainers.

1
  • Opened bug #941032 with Ubuntu kernel team.
    – Matt
    Feb 25, 2012 at 20:24

Not the answer you're looking for? Browse other questions tagged .