# weired memory size

## kluvo

Hi folks,

I've upgraded my gentoo server from 1G memory to 4G, but the free outputs only 3G

```

# free -m

             total       used       free     shared    buffers     cached

Mem:          2962       2332        629          0        151       1580

-/+ buffers/cache:        601       2361

Swap:         2047          0       2047

#
```

some memory is eaten byt the onboard graphics card, but sure not 1G.

lshw outputs that there is 4G memory in system....

```

  *-memory

       description: System Memory

       physical id: 1c

       slot: System board or motherboard

       size: 4GiB

     *-bank:0

          description: DIMM

          product: None

          vendor: None

          physical id: 0

          serial: None

          slot: A0

          size: 2GiB

          width: 64 bits

     *-bank:1

          description: DIMM

          product: None

          vendor: None

          physical id: 1

          serial: None

          slot: A1

          size: 2GiB

          width: 64 bits

```

Any ideas ??

----------

## alex.blackbit

you have to build a kernel that support more than 3G memory.

you seem to have

```
CONFIG_NOHIGHMEM=y

# CONFIG_HIGHMEM4G is not set

# CONFIG_HIGHMEM64G is not set
```

also take a look at CONFIG_X86_PAE.

----------

## kluvo

kernel is build with himem 4G support

```

# CONFIG_NOHIGHMEM is not set

CONFIG_HIGHMEM4G=y

# CONFIG_HIGHMEM64G is not set

```

and the CONFIG_X86_PAE can't be enabled together with CONFIG_HIGHMEM4G=y

```

Symbol: X86_PAE [=n]

 Prompt: PAE (Physical Address Extension) Support

   Defined at arch/i386/Kconfig:604

   Depends on: !HIGHMEM4G

   Location:

     -> Processor type and features

   Selects: RESOURCES_64BIT

   Selected by: HIGHMEM64G && <choice> && !M386 && !M486

```

and I'm not sure if it will help to set CONFIG_HIGHMEM64G to y, because I have no more then 4G   :Sad: 

----------

## alex.blackbit

and you are sure that you are actually running a kernel with this option set?

```
$ zgrep HIGHMEM /etc/config.gz
```

examine the output of dmesg, maybe it says something interesting.

----------

## dmpogo

 *alex.blackbit wrote:*   

> and you are sure that you are actually running a kernel with this option set?
> 
> ```
> $ zgrep HIGHMEM /etc/config.gz
> ```
> ...

 

you may (if it was enabled) do 

less /proc/config.gz

to see running kernel configuration

----------

## dmpogo

Also check in BIOS that the 'remapping' of memory hole is enabled

----------

## kluvo

I can confirm that current configuration on which the kernel is running as was listed previously:

```

# zgrep HIGHMEM /proc/config.gz

# CONFIG_NOHIGHMEM is not set

CONFIG_HIGHMEM4G=y

# CONFIG_HIGHMEM64G is not set

CONFIG_HIGHMEM=y

# CONFIG_DEBUG_HIGHMEM is not set

```

but with the BIOS settings it will be a little difficult as long there is no monitor and keyboard next to the server, but I hope I could manage this during next weekend somehow.

----------

## kluvo

well still no change, I've set the "Memory hole remapping" to on.

I've also upgraded bios to latest version, which was v1.8 for the board Msi K9VGM-V.

next weird thing is that when starting system on first screen I can see the bios was upgraded to v1.8

but system is reporting that there is still version v1.2

```

BIOS Information

        Vendor: Phoenix Technologies, LTD

        Version: V1.2

        Release Date: 03/06/2008

        Address: 0xE0000

        Runtime Size: 128 kB

        ROM Size: 512 kB

```

and it doesn't matter if I use dmidecode or lshw

```

     *-firmware

          description: BIOS

          vendor: Phoenix Technologies, LTD

          physical id: 0

          version: V1.2 (03/06/2008)

          size: 128KiB

          capacity: 448KiB

          capabilities: isa pci pnp apm upgrade shadowing cdboot bootselect socketedrom edd int13floppy360 int13floppy1200 int13floppy720 int13floppy2880 int5printscreen int9keyboard int14serial int17printer int10video acpi usb agp ls120boot zipboot biosbootspecification

```

there is one truth, the release date has changed, previous release date was JAN 2007.

But anyway, still no change bios is reporting 3G+64M (onboard video) and also kernel reports only 3G

```

BIOS-provided physical RAM map:

 BIOS-e820: 0000000000000000 - 000000000009f000 (usable)

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

 BIOS-e820: 00000000000f0000 - 0000000000100000 (reserved)

 BIOS-e820: 0000000000100000 - 00000000bafb0000 (usable)

 BIOS-e820: 00000000bafb0000 - 00000000bafb3000 (ACPI NVS)

 BIOS-e820: 00000000bafb3000 - 00000000bafc0000 (ACPI data)

 BIOS-e820: 00000000e0000000 - 00000000f0000000 (reserved)

 BIOS-e820: 00000000fec00000 - 0000000100000000 (reserved)

2095MB HIGHMEM available.

896MB LOWMEM available.

```

any suggestion is welcomeLast edited by kluvo on Tue Dec 02, 2008 11:23 am; edited 1 time in total

----------

## x22

 *kluvo wrote:*   

> 
> 
> and I'm not sure if it will help to set CONFIG_HIGHMEM64G to y, because I have no more then 4G  

 

It will help. Some memory addresses are used for memory mapped I/O so together with real memory it is more than 4GB.

----------

## kluvo

one more question, do I need to heva a 64-bit OS or there is enough to have support in kernel for 4G memory (or 64G)?

but anyway, bios should print 4G in any way, if it's 32bit OS or no

----------

## alex.blackbit

it is indeed not unlikely that the bios version reported to the OS is wrong.

they simple forgot to update that field.

bios developers are strange people.

----------

## eccerr0r

On my 4G x86 machine, I'm using 64GB PAE option.  Slows things down slightly but not too big a deal, key thing is that it has space to map memory and still have space for memory-mapped io.  Either use this option or you'll have to run a 64-bit kernel, which has its own issues.

```
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    4072888      68736          0     340968    3275252

-/+ buffers/cache:     456668    3684956

Swap:       987988     987988          0

```

----------

## kluvo

thank you all guys for your help, but there is still no change.

currently I'm using also 64GB PAE option, but the I have still the same amount of memory  :Sad: 

this looks like issue with the motherboard.

anyway using this setting the vmware virtual machine won't start, so it looks like I need to stay by the 3G and be happy about it, true is that 3G is better then 1G  :Smile: 

If anyone has any experiences with MSI K9VGM-V mainboard using 4G RAM, suggestions will be very welcome.

----------

