# kernel not recognising 4GB of physical RAM

## rolypoly

I just upgraded the RAM in my laptop (Toshiba Satellite P100) from 2GB RAM to 4GB RAM.

The BIOS recognises the full 4GB, but when booting into linux, only 3GB shows up. I'm running a 64 bit kernel.

Here is the output of 'cat /proc/cpuinfo'

```
$ cat /proc/cpuinfo 

processor       : 0               

vendor_id       : GenuineIntel    

cpu family      : 6               

model           : 15              

model name      : Intel(R) Core(TM)2 CPU         T7200  @ 2.00GHz

stepping        : 6                                              

cpu MHz         : 1000.000                                       

cache size      : 4096 KB                                        

physical id     : 0                                              

siblings        : 2                                              

core id         : 0                                              

cpu cores       : 2                                              

apicid          : 0                                              

initial apicid  : 0                                              

fpu             : yes                                            

fpu_exception   : yes                                            

cpuid level     : 10                                             

wp              : yes                                            

flags           : fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush dts acpi mmx fxsr sse sse2 ss ht tm pbe syscall nx lm constant_tsc arch_perfmon pebs bts rep_good pni dtes64 monitor ds_cpl vmx est tm2 ssse3 cx16 xtpr pdcm lahf_lm tpr_shadow                         

bogomips        : 4013.77                                                                                                                            

clflush size    : 64                                                                                                                                 

cache_alignment : 64                                                                                                                                 

address sizes   : 36 bits physical, 48 bits virtual                                                                                                  

power management:                                                                                                                                    

                                                                                                                                                     

processor       : 1                                                                                                                                  

vendor_id       : GenuineIntel                                                                                                                       

cpu family      : 6                                                                                                                                  

model           : 15                                                                                                                                 

model name      : Intel(R) Core(TM)2 CPU         T7200  @ 2.00GHz                                                                                    

stepping        : 6                                                                                                                                  

cpu MHz         : 1000.000                                                                                                                           

cache size      : 4096 KB                                                                                                                            

physical id     : 0                                                                                                                                  

siblings        : 2                                                                                                                                  

core id         : 1                                                                                                                                  

cpu cores       : 2                                                                                                                                  

apicid          : 1                                                                                                                                  

initial apicid  : 1                                                                                                                                  

fpu             : yes                                                                                                                                

fpu_exception   : yes                                                                                                                                

cpuid level     : 10                                                                                                                                 

wp              : yes                                                                                                                                

flags           : fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush dts acpi mmx fxsr sse sse2 ss ht tm pbe syscall nx lm constant_tsc arch_perfmon pebs bts rep_good pni dtes64 monitor ds_cpl vmx est tm2 ssse3 cx16 xtpr pdcm lahf_lm tpr_shadow                         

bogomips        : 4012.85                                                                                                                            

clflush size    : 64                                                                                                                                 

cache_alignment : 64                                                                                                                                 

address sizes   : 36 bits physical, 48 bits virtual                                                                                                  

power management: 
```

And here is 'cat /proc/meminfo'

```
# cat /proc/meminfo

MemTotal:        3088796 kB

MemFree:         2432972 kB

Buffers:           23120 kB

Cached:           243796 kB

SwapCached:            0 kB

Active:           377312 kB

Inactive:         198692 kB

Active(anon):     309372 kB

Inactive(anon):        0 kB

Active(file):      67940 kB

Inactive(file):   198692 kB

Unevictable:           0 kB

Mlocked:               0 kB

SwapTotal:       1004052 kB

SwapFree:        1004052 kB

Dirty:                76 kB

Writeback:             0 kB

AnonPages:        309108 kB

Mapped:            91964 kB

Slab:              32644 kB

SReclaimable:      15716 kB

SUnreclaim:        16928 kB

PageTables:        16380 kB

NFS_Unstable:          0 kB

Bounce:                0 kB

WritebackTmp:          0 kB

CommitLimit:     2548448 kB

Committed_AS:     641496 kB

VmallocTotal:   34359738367 kB

VmallocUsed:      308856 kB

VmallocChunk:   34359419387 kB

DirectMap4k:       31296 kB

DirectMap2M:     3112960 kB

```

Is there a kernel switch I need to enable a different memory mode?

The output from cat /proc/cpuinfo suggests I'm using PSE36/PEA ie: 36 physical address lines and 48 virtual. Shouldn't this be 64 bits?

Can anyone help?

Thanks,

Roland.

----------

## Hypnos

First, are you sure you're running a 64-bit kernel?  If you are, it will say "x86_64" in the output of "arch".

Next, do you have PAE enabled in your BIOS?  If so, turn that off and see how that works.

I don't think the CPU address sizes are relevant.

Hopefully, your motherboard actually supports 4GB of RAM ...

EDIT: typo

----------

## s4e8

Toshiba Satellite P100 use an ancient i945 chipset, there's no such 4G memory support, 3G is all you get.

----------

## Peach

 *s4e8 wrote:*   

> Toshiba Satellite P100 use an ancient i945 chipset, there's no such 4G memory support, 3G is all you get.

 

 :Shocked:   how does a GPU relate to the RAM limit?

@rolypoly: please check High Memory Support, under Processor type and features (should be CONFIG_HIGHMEM4G)

----------

## rolypoly

@hypnos - my bios doesn't have an option for PAE.

Output of uname -a is:

```
Linux speedy 2.6.29-gentoo-r5 #2 SMP PREEMPT Wed Jun 17 21:55:15 NZST 2009 x86_64 Intel(R) Core(TM)2 CPU T7200 @ 2.00GHz GenuineIntel GNU/Linux

```

Note the x86_64  :Smile: 

According to the Toshiba website, my laptop, PSPA6A, does support 4GB of RAM. For what it's worth, this particular laptop doesn't use an i945 graphics chip but an nvidia go 7900 GTX.

I haven't tried a 64bit live cd yet, so I suppose I ought to try that too.

@Peach, my kernel .config doesn't have that option! I think that must be a feature of running 64bit, as I DO have that option on another x86 laptop.

----------

## rolypoly

I have also read that I can add a kernel boot switch of mem=4G to try and force the kernel to recognise the full amount of RAM, so will try that next, then the live cd.

----------

## Peach

 *rolypoly wrote:*   

> I haven't tried a 64bit live cd yet, so I suppose I ought to try that too.

 

livecd ??? you cannot chroot from a 32bit livecd to a 64bit system, do I miss anything?

 *rolypoly wrote:*   

> @Peach, my kernel .config doesn't have that option! I think that must be a feature of running 64bit, as I DO have that option on another x86 laptop.

 

you're right. I forgot it: it's only on x86 kernels.

----------

## s4e8

Full 4G RAM support require memory remap (or memory hole) support, remap PCI overlayed RAM address to address above 4G.

First Intel north bridge(chipset) supporting this feature is 965 family.

----------

## rolypoly

I was going to use a 64bit live cd, rather than a 32bit live cd, assuming I can find one  :Smile: 

Here is the output of lspci:

```
speedy linux # lspci

00:00.0 Host bridge: Intel Corporation Mobile 945GM/PM/GMS, 943/940GML and 945GT Express Memory Controller Hub (rev 03)

00:01.0 PCI bridge: Intel Corporation Mobile 945GM/PM/GMS, 943/940GML and 945GT Express PCI Express Root Port (rev 03)

00:1b.0 Audio device: Intel Corporation 82801G (ICH7 Family) High Definition Audio Controller (rev 02)

00:1c.0 PCI bridge: Intel Corporation 82801G (ICH7 Family) PCI Express Port 1 (rev 02)

00:1c.1 PCI bridge: Intel Corporation 82801G (ICH7 Family) PCI Express Port 2 (rev 02)

00:1c.2 PCI bridge: Intel Corporation 82801G (ICH7 Family) PCI Express Port 3 (rev 02)

00:1d.0 USB Controller: Intel Corporation 82801G (ICH7 Family) USB UHCI Controller #1 (rev 02)

00:1d.1 USB Controller: Intel Corporation 82801G (ICH7 Family) USB UHCI Controller #2 (rev 02)

00:1d.2 USB Controller: Intel Corporation 82801G (ICH7 Family) USB UHCI Controller #3 (rev 02)

00:1d.3 USB Controller: Intel Corporation 82801G (ICH7 Family) USB UHCI Controller #4 (rev 02)

00:1d.7 USB Controller: Intel Corporation 82801G (ICH7 Family) USB2 EHCI Controller (rev 02)

00:1e.0 PCI bridge: Intel Corporation 82801 Mobile PCI Bridge (rev e2)

00:1f.0 ISA bridge: Intel Corporation 82801GBM (ICH7-M) LPC Interface Bridge (rev 02)

00:1f.2 IDE interface: Intel Corporation 82801GBM/GHM (ICH7 Family) SATA IDE Controller (rev 02)

00:1f.3 SMBus: Intel Corporation 82801G (ICH7 Family) SMBus Controller (rev 02)

01:00.0 VGA compatible controller: nVidia Corporation GeForce Go 7900 GTX (rev a1)

02:00.0 Ethernet controller: Intel Corporation 82573L Gigabit Ethernet Controller

03:00.0 Network controller: Intel Corporation PRO/Wireless 3945ABG Network Connection (rev 02)

0a:04.0 CardBus bridge: Texas Instruments PCIxx12 Cardbus Controller

0a:04.1 FireWire (IEEE 1394): Texas Instruments PCIxx12 OHCI Compliant IEEE 1394 Host Controller

0a:04.2 Mass storage controller: Texas Instruments 5-in-1 Multimedia Card Reader (SD/MMC/MS/MS PRO/xD)

0a:04.3 SD Host controller: Texas Instruments PCIxx12 SDA Standard Compliant SD Host Controller

```

So, is Intel 82801 (ICH7 Familly) good enough?

----------

## Hypnos

You need to know what precise chipset you have here (seen from "lscpi").  

If you have the 945GM, it only supports 2GB system RAM.  It may see all 4GB of RAM, but some block of addresses corresponding to ~1GB will be reserved for mmap'ed devices.  (More here.)

The problem is that it can address only a certain amount.  A chipset that supports 4GB of RAM, such as the 965, can address more than that.

----------

## x22

Some BIOSes have a setting which must be enabled (or disabled?) to work with 4GB or more physical RAM (usually called "memory remap").

----------

## x22

 *Hypnos wrote:*   

> 
> 
> If you have the 945GM, it only supports 2GB system RAM.  

 

Wikipedia says that it supports 4GB.

----------

## Hypnos

 *x22 wrote:*   

> Some BIOSes have a setting which must be enabled (or disabled?) to work with 4GB or more physical RAM (usually called "memory remap").

 

Yes, that moves the "memory hole" (the addresses reserved for mmap'ed devices) above 4GB.  But if your chipset doesn't support 4GB RAM, that option won't exist.

 *x22 wrote:*   

>  *Hypnos wrote:*   
> 
> If you have the 945GM, it only supports 2GB system RAM.   
> 
> Wikipedia says that it supports 4GB.

 

I'm going by Intel's datasheet -- is this the wrong one?

----------

## rolypoly

Well, using the mem=4G kernel boot parameter didn't help.

Booting from a Fedora 11 x86_64 boot CD still only shows 3GB available.

I suspect, after looking at some other similar posts elsewhere, I have a buggy (windows only) BIOS. Before a previous BIOS update, I had to follow the instructions on modifying the DSDT just to get sound working, so it's no surprise to me that there is something stopping me using the full 4GB under linux.

I notice there is a newer BIOS version available on the Toshiba website, but in best Toshiba fashion, there is no description of what's changed. And it's a Windows only executable. I don't really want to install Windows just do flash the BIOS, so I might see if I can use a Windows PE boot CD.

----------

## Hypnos

Does Windows see 4GB of RAM?  You might not have to install Windows to determine this, just boot up with an install/recovery CD.

----------

## rolypoly

Good idea. I'll check as soon as I can find a windows CD. Strangely I don't have many of those lying around  :Smile: 

----------

## x22

 *Hypnos wrote:*   

> 
> 
> I'm going by Intel's datasheet -- is this the wrong one?

 

That datasheet says 4GB (page 23, section 1.1.2).  

But  in section 1.1.1 it says that the memory interface (to CPU) is only 32-bit. 36-bit addressing is required to address whole 4GB of RAM and additional address space for memory-mapped I/O. So in reality it does not support full 4GB of RAM.

----------

## oRDeX

Yes, i think that "supports" means "you can install up to..", but doesn't mean "you can use all the ram up to.."   :Razz: 

----------

## Hypnos

Yes, I was using "see" and "address" in the sense that the technical manual uses "support."  I should have explained that more clearly.  Obviously, the OP's chipset isn't the 945GU/GSE which can only address 2GB (meant for netbooks), but it's useful to know that it's not the 943/940GML, either.  So ~3GB of RAM is supported in the sense of being available to the OS.

I stumbled across something that is new to me:  when you look at cpuinfo, the listing of "physical" address size does tell you the maximum system memory your architecture can handle.  So while the instruction set is full 64-bit, if your OS tries to allocate RAM with addresses beyond the maximum physical address the CPU will raise a general protection fault.  For 36-bit physical address size (most x86_64 CPUs) the maximum system RAM is 64GB.

This indeed has little to do with PAE, but is interesting nonetheless.

----------

## rolypoly

OK, looks like I'm gonna have to settle for 3GB  :Sad: 

I've flashed the bios to the latest level and it still shows 3GB.

Maybe at some point I'll get a spare hard drive and install a 64bit flavour of windows and see what that does.

Thanks for help and suggestions.

Roland.

----------

## Evincar

I have an Aspire 5672, which is based on the same chipset, I think, and I can confirm that the BIOS will not see anything above 3G. Doesn't matter what you do in the kernel, because the hardware can not use more.

----------

## energyman76b

I am not conviced about that - look at dmesg - the first stuff after the kernel is loaded is about memory.

I am sure the bios know about 4gb - but everything between 3gb and 4gb is reserved for pci space, dma etc pp.

----------

## rolypoly

I've spoken to a Toshiba product manager about this issue and he says under Windows 64bit, the whole 4GB should be available. He's got no experience with linux so can't comment about that, but says any 64bit OS should see the full 4GB.

I'll have a look at the start of dmesg next time I boot and see what I can find. Maybe I'll ask the LKML?

Since updating the BIOS, the fan on my nvidia chipset is no longer working, which causes excessive heat and eventually screen corruption and shutdown, so now I've got to downgrade by BIOS to the previous level too  :Sad:  That's assuming the Toshiba product manager can find a copy for me, since their website only provides the latest.

----------

## Hypnos

It's rather mysterious how a 64-bit OS would be able to use 4GB when the chipset can only address 32-bit and there must be ~1GB of addresses reserved for mmap'ped devices.

The only thing I can think of is that the chipset does "support" (in the sense of available to the OS) 4GB of RAM, there exists a memory remap option as x22 wrote, and you have to enable it.

Keep us posted!

----------

## gentoo_ram

I agree, you're only going to see 3GB in the O.S.  It's a limitation of the hardware addressing of the chipset.  Keep in mind if you were to try Vista SP1, it would report "4GB" since it reports installed RAM, not usable RAM.  But, again, only a little over 3GB would be usable.  So it would appear that Windows sees all 4GB, but it won't use it for the same reasons Linux can't.  The hardware.

----------

## Evincar

 *energyman76b wrote:*   

> I am not conviced about that - look at dmesg - the first stuff after the kernel is loaded is about memory.
> 
> I am sure the bios know about 4gb - but everything between 3gb and 4gb is reserved for pci space, dma etc pp.

 

The BIOS may adress 4 GB total, and (if it is anything like mine), 1 GB is reserved for non-RAM stuff, and there's no way to change that. Product managers are in the inmense majority of the instances, completely clueless.

----------

## rolypoly

Hmm, probably should have seen this sooner. In the P100 User Guide (who reads them anyway?) it says that although 4GB can be installed, not all of it may be available to the OS. DOH!   :Embarassed: 

Just for the hell of it, I installed Windows 7 RC1 6bit to see what it would make of it, and it says "4GB installed (3GB usable)".

Unfortunately, updating the BIOS seemed to cause a problem with ACPI and specifically the fan on the graphics chipset, to the extent it may have cooked it! I've gone back to the previous version of the BIOS and it's now being a bit inconsistent. First time it booted, the fan wasn't working so I rebooted with acpi=off kernel switch. The fan was on constantly, as expected. Rebooted again without the acpi switch and the fan is still on constantly + plus I have all the acpi benefits. Bit noisy though...

Fortunately this laptop is still under warranty, so time to load the WinXP recovery CD onto a different hard drive, and send it back to be 'fixed'  :Smile: 

Thanks for everyones help/suggestions.

Roland.

----------

## Hypnos

 *rolypoly wrote:*   

> Hmm, probably should have seen this sooner. In the P100 User Guide (who reads them anyway?) it says that although 4GB can be installed, not all of it may be available to the OS. DOH!  

 

That may end up being the most valuable contribution of the thread:  RTFM.    :Razz: 

Good luck getting your machine straightened out!

----------

