# 4GB RAM issues

## papahuhn

Hello,

I've upgraded to 4GB RAM today. Currently I'm running x86 on a Core2Duo. free and top say that I have a total of 3.2GB.

I tried Highmem Support in the Kernel (64GB), but still 3.2 GB. Then I tried the amd64 live-cd. Therein free and top still say

3.2 GB. Did I miss something?

Thx.

----------

## linuxtuxhellsinki

Hardware limitations.

----------

## cach0rr0

shared video memory?

----------

## papahuhn

Hardware limitations of what kind?

video memory can be the reason for 3.2GB on x86, but why on the amd64 live-cd?

I have a PCIe Card with own memory.

----------

## bbgermany

Do you have an option like "Memory Hole" in your BIOS? Set this to enabled. Usually you need this with a x64 system.

bb

----------

## eccerr0r

What chipset and motherboard?  Older chipsets don't map memory completely, I'm surprised a PCIe one wouldn't...

Definitely should try BIOS options dealing with memory hole (not the 15/16M one, that's different... I'd be surprised if this still exists on newer machines though as this was for ISA).

What does your memory map look like (see your dmesg startup)?  Unfortunately I'd have to reboot my 4G box to see the BIOS memory map, but it looks something like this (on a 2G box):

```
BIOS-provided physical RAM map:

 BIOS-e820: 0000000000000000 - 000000000009e800 (usable)

 BIOS-e820: 000000000009f800 - 00000000000a0000 (reserved)

 BIOS-e820: 00000000000f0000 - 0000000000100000 (reserved)

 BIOS-e820: 0000000000100000 - 000000007f5e0000 (usable)

 BIOS-e820: 000000007f5e0000 - 000000007f5e3000 (ACPI NVS)

 BIOS-e820: 000000007f5e3000 - 000000007f5f0000 (ACPI data)

 BIOS-e820: 000000007f5f0000 - 000000007f600000 (reserved)

 BIOS-e820: 00000000c0000000 - 00000000d0000000 (reserved)

 BIOS-e820: 00000000fec00000 - 0000000100000000 (reserved)

1141MB HIGHMEM available.

896MB LOWMEM available.

```

One thing to check, you mention that you have high memory enabled.  There's the CONFIG_HIGHMEM4G and CONFIG_HIGHMEM64G options, double check you really got the 64G one set.

If it's working a 4G x86 machine should look something like:

```
ouka:~$ free

             total       used       free     shared    buffers     cached

Mem:       4141624    4094872      46752          0     216848    3665520

-/+ buffers/cache:     212504    3929120

Swap:       987988         72     987916

```

Do other distributions'/Gentoo's livecd/installcd show all memory?

----------

## papahuhn

Unfortunately, the kernel still says

```
[    0.000000] 2436MB HIGHMEM available.

[    0.000000] 889MB LOWMEM available.
```

I tried the 15-16 memory hole (have no other option), but that didn't work. It even kills the Live-CD kernel.

But I looked in /proc/config.gz of the Live-CD, and there is no highmem entry. I'm burning a Ubuntu CD right now.

Lets see if that works.

Thanks so far.

----------

## papahuhn

Nope, does not work in Ubuntu either.

----------

## DaggyStyle

 *papahuhn wrote:*   

> Hello,
> 
> I've upgraded to 4GB RAM today. Currently I'm running x86 on a Core2Duo. free and top say that I have a total of 3.2GB.
> 
> I tried Highmem Support in the Kernel (64GB), but still 3.2 GB. Then I tried the amd64 live-cd. Therein free and top still say
> ...

 

that is your problem, you need amd64

----------

## bbgermany

 *DaggyStyle wrote:*   

>  *papahuhn wrote:*   Hello,
> 
> I've upgraded to 4GB RAM today. Currently I'm running x86 on a Core2Duo. free and top say that I have a total of 3.2GB.
> 
> I tried Highmem Support in the Kernel (64GB), but still 3.2 GB. Then I tried the amd64 live-cd. Therein free and top still say
> ...

 

Nope, you can run 64GB RAM on x86 as well. But its useless in some cases, since a single application can allocate 4GB as maximum and too much application will slow down you system, coz the "memory window" needs to move a lot for the apps.

bb

----------

## DaggyStyle

 *bbgermany wrote:*   

>  *DaggyStyle wrote:*    *papahuhn wrote:*   Hello,
> 
> I've upgraded to 4GB RAM today. Currently I'm running x86 on a Core2Duo. free and top say that I have a total of 3.2GB.
> 
> I tried Highmem Support in the Kernel (64GB), but still 3.2 GB. Then I tried the amd64 live-cd. Therein free and top still say
> ...

 

I know, using PAE, but I never saw it in action.

----------

## eccerr0r

 *DaggyStyle wrote:*   

> I know, using PAE, but I never saw it in action.

 

Well, this can be synthesized but if people would trust:

```
ouka:~$ uname -a

Linux ouka 2.6.21-core2 #1 SMP PREEMPT Thu May 29 17:28:57 MDT 2008 i686 Intel(R) Core(TM)2 CPU 6700 @ 2.66GHz GenuineIntel GNU/Linux

ouka:~$ free

             total       used       free     shared    buffers     cached

Mem:       4141624    3850760     290864          0     214368    3424032

-/+ buffers/cache:     212360    3929264

Swap:       987988         72     987916

ouka:~$ zcat /proc/config.gz |grep HIGH

CONFIG_HIGH_RES_TIMERS=y

# CONFIG_NOHIGHMEM is not set

# CONFIG_HIGHMEM4G is not set

CONFIG_HIGHMEM64G=y

CONFIG_HIGHMEM=y

CONFIG_HIGHPTE=y

# CONFIG_DEBUG_HIGHMEM is not set

ouka:~$ cat /proc/mtrr 

reg00: base=0x100000000 (4096MB), size= 512MB: write-back, count=1

reg01: base=0x120000000 (4608MB), size= 256MB: write-back, count=1

reg02: base=0x00000000 (   0MB), size=2048MB: write-back, count=1

reg03: base=0x80000000 (2048MB), size=1024MB: write-back, count=1

reg04: base=0xc0000000 (3072MB), size= 256MB: write-back, count=1

reg05: base=0xcf800000 (3320MB), size=   8MB: uncachable, count=1

reg06: base=0xcf700000 (3319MB), size=   1MB: uncachable, count=1

ouka:~$ zcat /proc/config.gz |head -10

#

# Automatically generated make config: don't edit

# Linux kernel version: 2.6.21-core2

# Thu May 29 17:21:33 2008

#

CONFIG_X86_32=y

CONFIG_GENERIC_TIME=y

CONFIG_CLOCKSOURCE_WATCHDOG=y

CONFIG_GENERIC_CLOCKEVENTS=y

CONFIG_GENERIC_CLOCKEVENTS_BROADCAST=y

ouka:~$ 

```

and it works just fine.  Just was wonderring what table the BIOS e820 call generated for papahuhn...  As seen on my mtrr map there's a considerable amount of memory above the 0xffffffff (4GB-1) line - the chipset and BIOS need to remap that memory that would normally be 'hidden' by PCI address space.  For reference, this is a microatx PCIe board -- a Foxconn G9657MA board using the Intel G965 chipset.  Which is another venue to try -- upgrade your firmware if there's one available.  Sometimes it's a simple software fix to get the chipset to remap memory above the 4G mark.

(and please, nobody complain about how old that kernel is... there's already a thread about it and no need to replicate it...)

----------

## papahuhn

I have a Foxconn 945G7MD and took a BIOS upgrade today. It also didn't help, as there is no additional memory remapping option in the BIOS, and the kernel still says 3.2x GB.

```
~ $ 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
```

*sigh*

----------

## papahuhn

Now I wiped my Windows partition for debian-502a-amd64. Still 3.2 GB. Wtf.

----------

## eccerr0r

Allright this is not the first time I've heard of a 945 not able to map all 4G of space...  you might be out of luck here and need to upgrade the m/b to a newer chipset.  Any mentions of maximum memory in the motherboard manual?

Addendum:

http://www.intel.com/Assets/PDF/prodbrief/945P-prodbrief.pdf

Says maximum addressability is 4GB.  This is memory + MMIO so it looks like there's a high probability that 3.25GB is all you're getting...  The product brief for my G965 says 8GB, so I suspect if I stick in 8GB into my G965 I'll get 7.25GB...

Fortunately I don't have the DIMMs to try yet... I only have 1G DIMMs ..

----------

## papahuhn

Ok, thanks a lot.

----------

