2005-05-16 14:04:44

by Christian Parpart

[permalink] [raw]
Subject: I'm having 4GB RAM, but Linux sees just 3GB???

Hi all,

I was asking this in gentoo-server mailing list before, however, they finally
pointed me to this place as it could also be a bug in the kernel.

I'm having a TYAN board with two AMD Opteron 248 and 4x 1GB ECC RAM on it. The
BIOS reflects what I've plugged in, however, the operating system does not.

my `uname -a` output is:
Linux battousai 2.6.11-gentoo-r8 #1 SMP Sat May 14 02:42:15 CEST 2005 x86_64
AMD Opteron(tm) Processor 248 AuthenticAMD GNU/Linux

and my `dmidecode` output is located at [0]. For ANY reason, dmidecode even
knows about my 4GB RAM, but `free -m` nor `kinfocenter` of KDE claims to see
just 3GB.

free -m:
total used free shared buffers cached
Mem: 3015 2993 22 0 15 2638
-/+ buffers/cache: 338 2677
Swap: 511 1 510

This is rather sad to see 1GB RAM plugged in for nothing.

Has anyone a hint for my WHY this is happening and HOW I could get rid of it?

Thanks in advance,
Christian Parpart.

[0] http://dev.gentoo.org/~trapni/dmidecode.txt

--
Netiquette: http://www.ietf.org/rfc/rfc1855.txt
15:59:12 up 54 days, 5:05, 0 users, load average: 0.77, 0.51, 0.41


Attachments:
(No filename) (1.20 kB)
(No filename) (189.00 B)
Download all attachments

2005-05-16 14:43:30

by Brian Gerst

[permalink] [raw]
Subject: Re: I'm having 4GB RAM, but Linux sees just 3GB???

Christian Parpart wrote:
> Hi all,
>
> I was asking this in gentoo-server mailing list before, however, they finally
> pointed me to this place as it could also be a bug in the kernel.
>
> I'm having a TYAN board with two AMD Opteron 248 and 4x 1GB ECC RAM on it. The
> BIOS reflects what I've plugged in, however, the operating system does not.
>
> my `uname -a` output is:
> Linux battousai 2.6.11-gentoo-r8 #1 SMP Sat May 14 02:42:15 CEST 2005 x86_64
> AMD Opteron(tm) Processor 248 AuthenticAMD GNU/Linux
>
> and my `dmidecode` output is located at [0]. For ANY reason, dmidecode even
> knows about my 4GB RAM, but `free -m` nor `kinfocenter` of KDE claims to see
> just 3GB.
>
> free -m:
> total used free shared buffers cached
> Mem: 3015 2993 22 0 15 2638
> -/+ buffers/cache: 338 2677
> Swap: 511 1 510
>
> This is rather sad to see 1GB RAM plugged in for nothing.
>
> Has anyone a hint for my WHY this is happening and HOW I could get rid of it?
>
> Thanks in advance,
> Christian Parpart.
>
> [0] http://dev.gentoo.org/~trapni/dmidecode.txt
>

Are you running a 64-bit kernel? What does "dmesg | grep e820" show?

--
Brian Gerst

2005-05-16 15:07:58

by Christian Parpart

[permalink] [raw]
Subject: Re: I'm having 4GB RAM, but Linux sees just 3GB???

On Monday 16 May 2005 4:44 pm, Brian Gerst wrote:
> Christian Parpart wrote:
> > Hi all,
> >
> > I was asking this in gentoo-server mailing list before, however, they
> > finally pointed me to this place as it could also be a bug in the kernel.
> >
> > I'm having a TYAN board with two AMD Opteron 248 and 4x 1GB ECC RAM on
> > it. The BIOS reflects what I've plugged in, however, the operating system
> > does not.
> >
> > my `uname -a` output is:
> > Linux battousai 2.6.11-gentoo-r8 #1 SMP Sat May 14 02:42:15 CEST 2005
> > x86_64 AMD Opteron(tm) Processor 248 AuthenticAMD GNU/Linux
> >
> > and my `dmidecode` output is located at [0]. For ANY reason, dmidecode
> > even knows about my 4GB RAM, but `free -m` nor `kinfocenter` of KDE
> > claims to see just 3GB.
> >
> > free -m:
> > total used free shared buffers cached
> > Mem: 3015 2993 22 0 15 2638
> > -/+ buffers/cache: 338 2677
> > Swap: 511 1 510
> >
> > This is rather sad to see 1GB RAM plugged in for nothing.
> >
> > Has anyone a hint for my WHY this is happening and HOW I could get rid of
> > it?
> >
> > Thanks in advance,
> > Christian Parpart.
> >
> > [0] http://dev.gentoo.org/~trapni/dmidecode.txt
>
> Are you running a 64-bit kernel? What does "dmesg | grep e820" show?

BIOS-e820: 0000000000000000 - 0000000000094800 (usable)
BIOS-e820: 0000000000094800 - 00000000000a0000 (reserved)
BIOS-e820: 00000000000c2000 - 0000000000100000 (reserved)
BIOS-e820: 0000000000100000 - 00000000bff20000 (usable)
BIOS-e820: 00000000bff20000 - 00000000bff2e000 (ACPI data)
BIOS-e820: 00000000bff2e000 - 00000000bff80000 (ACPI NVS)
BIOS-e820: 00000000bff80000 - 00000000c0000000 (reserved)
BIOS-e820: 00000000e0000000 - 00000000f0000000 (reserved)
BIOS-e820: 00000000fec00000 - 00000000fec00400 (reserved)
BIOS-e820: 00000000fee00000 - 00000000fee01000 (reserved)
BIOS-e820: 00000000fff80000 - 0000000100000000 (reserved)

hmm... what does this mean?

Well, yeah, the whole system is 64bit compiled.

Regards,
Christian Parpart.

--
Netiquette: http://www.ietf.org/rfc/rfc1855.txt
17:00:30 up 54 days, 6:06, 0 users, load average: 0.64, 0.45, 0.46


Attachments:
(No filename) (2.19 kB)
(No filename) (189.00 B)
Download all attachments

2005-05-16 17:15:15

by Peter Buckingham

[permalink] [raw]
Subject: Re: I'm having 4GB RAM, but Linux sees just 3GB???

Christian Parpart wrote:
> Has anyone a hint for my WHY this is happening and HOW I could get rid of it?

This is because there is a PCI memory hole of about 1GB of space on the
x86_64 platform. Basically it overlays the address space of the RAM that
you have.

You can try to enable memory hoisting (it may be called software memory
hole in your bios). This will try to remap you RAM above the 4GB
boundary so that the PCI space and your RAMs address space do not
conflict. Unfortunately, this does not work particularly well...

peter

2005-05-16 17:47:43

by Brian Gerst

[permalink] [raw]
Subject: Re: I'm having 4GB RAM, but Linux sees just 3GB???

Christian Parpart wrote:
> On Monday 16 May 2005 4:44 pm, Brian Gerst wrote:
>
>>Christian Parpart wrote:
>>
>>>Hi all,
>>>
>>>I was asking this in gentoo-server mailing list before, however, they
>>>finally pointed me to this place as it could also be a bug in the kernel.
>>>
>>>I'm having a TYAN board with two AMD Opteron 248 and 4x 1GB ECC RAM on
>>>it. The BIOS reflects what I've plugged in, however, the operating system
>>>does not.
>>>
>>>my `uname -a` output is:
>>>Linux battousai 2.6.11-gentoo-r8 #1 SMP Sat May 14 02:42:15 CEST 2005
>>>x86_64 AMD Opteron(tm) Processor 248 AuthenticAMD GNU/Linux
>>>
>>>and my `dmidecode` output is located at [0]. For ANY reason, dmidecode
>>>even knows about my 4GB RAM, but `free -m` nor `kinfocenter` of KDE
>>>claims to see just 3GB.
>>>
>>>free -m:
>>> total used free shared buffers cached
>>>Mem: 3015 2993 22 0 15 2638
>>>-/+ buffers/cache: 338 2677
>>>Swap: 511 1 510
>>>
>>>This is rather sad to see 1GB RAM plugged in for nothing.
>>>
>>>Has anyone a hint for my WHY this is happening and HOW I could get rid of
>>>it?
>>>
>>>Thanks in advance,
>>>Christian Parpart.
>>>
>>>[0] http://dev.gentoo.org/~trapni/dmidecode.txt
>>
>>Are you running a 64-bit kernel? What does "dmesg | grep e820" show?
>
>
> BIOS-e820: 0000000000000000 - 0000000000094800 (usable)
> BIOS-e820: 0000000000094800 - 00000000000a0000 (reserved)
> BIOS-e820: 00000000000c2000 - 0000000000100000 (reserved)
> BIOS-e820: 0000000000100000 - 00000000bff20000 (usable)
> BIOS-e820: 00000000bff20000 - 00000000bff2e000 (ACPI data)
> BIOS-e820: 00000000bff2e000 - 00000000bff80000 (ACPI NVS)
> BIOS-e820: 00000000bff80000 - 00000000c0000000 (reserved)
> BIOS-e820: 00000000e0000000 - 00000000f0000000 (reserved)
> BIOS-e820: 00000000fec00000 - 00000000fec00400 (reserved)
> BIOS-e820: 00000000fee00000 - 00000000fee01000 (reserved)
> BIOS-e820: 00000000fff80000 - 0000000100000000 (reserved)
>
> hmm... what does this mean?

It means that there is a hole at 00000000c0000000 - 0000000100000000
(3GB-4GB) for PCI memory-mapped devices. The 4th GB of RAM should be
remapped by the BIOS to 4GB-5GB, but isn't. Your BIOS is either buggy
or misconfigured.

--
Brian Gerst

2005-05-16 18:00:36

by Christian Parpart

[permalink] [raw]
Subject: Re: I'm having 4GB RAM, but Linux sees just 3GB???

(oops)

On Monday 16 May 2005 7:48 pm, Brian Gerst wrote:
> > BIOS-e820: 0000000000000000 - 0000000000094800 (usable)
> > BIOS-e820: 0000000000094800 - 00000000000a0000 (reserved)
> > BIOS-e820: 00000000000c2000 - 0000000000100000 (reserved)
> > BIOS-e820: 0000000000100000 - 00000000bff20000 (usable)
> > BIOS-e820: 00000000bff20000 - 00000000bff2e000 (ACPI data)
> > BIOS-e820: 00000000bff2e000 - 00000000bff80000 (ACPI NVS)
> > BIOS-e820: 00000000bff80000 - 00000000c0000000 (reserved)
> > BIOS-e820: 00000000e0000000 - 00000000f0000000 (reserved)
> > BIOS-e820: 00000000fec00000 - 00000000fec00400 (reserved)
> > BIOS-e820: 00000000fee00000 - 00000000fee01000 (reserved)
> > BIOS-e820: 00000000fff80000 - 0000000100000000 (reserved)
> >
> > hmm... what does this mean?
>
> It means that there is a hole at 00000000c0000000 - 0000000100000000
> (3GB-4GB) for PCI memory-mapped devices. The 4th GB of RAM should be
> remapped by the BIOS to 4GB-5GB, but isn't. Your BIOS is either buggy
> or misconfigured.

Aiiii, that's good news.

I found a "Memhole" area. But I never used to change these items.
Unfortunately, my TYAN board reference guide isn't telling me what to change
there for good - so - can you tell me where to find more information about
there?

If I remember correctly, it provided me the options ("Automatic"/"Manual") and
a value list with the following items:
? 64MB 128MB, 256MB, 512MB, 1024MB 2048MB, 3G, 3.5G.

and another list I can't remember by now.

but *playing* around with these values didn't help much (I just reduced my
memory in linux down to 2GB once but didn't find the right values for getting
4GB).

So, what should I do then?

Best reagrds,
Christian Parpart.

--
Netiquette: http://www.ietf.org/rfc/rfc1855.txt
?19:52:02 up 54 days, ?8:58, ?0 users, ?load average: 0.67, 0.64, 0.62


Attachments:
(No filename) (1.80 kB)
(No filename) (189.00 B)
Download all attachments

2005-05-16 18:01:57

by Christian Parpart

[permalink] [raw]
Subject: Re: I'm having 4GB RAM, but Linux sees just 3GB???

On Monday 16 May 2005 7:15 pm, Peter Buckingham wrote:
> Christian Parpart wrote:
> > Has anyone a hint for my WHY this is happening and HOW I could get rid of
> > it?
>
> This is because there is a PCI memory hole of about 1GB of space on the
> x86_64 platform. Basically it overlays the address space of the RAM that
> you have.
>
> You can try to enable memory hoisting (it may be called software memory
> hole in your bios). This will try to remap you RAM above the 4GB
> boundary so that the PCI space and your RAMs address space do not
> conflict. Unfortunately, this does not work particularly well...

Yeah, ("software"/"hardware"/"disabled") has been the other dropdown list in
my BIOS (i remember now;) however, it's been 'disabled' as I touched my host
first, and playing around didn't help *yet". although here, the BIOS
reference book just didn't talk about this area either.

I'll try once again, thx all ;)

Regards,
Christian Parpart.

--
Netiquette: http://www.ietf.org/rfc/rfc1855.txt
19:59:46 up 54 days, 9:06, 0 users, load average: 0.66, 0.61, 0.61


Attachments:
(No filename) (1.05 kB)
(No filename) (189.00 B)
Download all attachments

2005-05-17 06:34:59

by Denis Vlasenko

[permalink] [raw]
Subject: Re: I'm having 4GB RAM, but Linux sees just 3GB???

On Monday 16 May 2005 20:59, Christian Parpart wrote:
> (oops)
>
> On Monday 16 May 2005 7:48 pm, Brian Gerst wrote:
> > > BIOS-e820: 0000000000000000 - 0000000000094800 (usable)
> > > BIOS-e820: 0000000000094800 - 00000000000a0000 (reserved)
> > > BIOS-e820: 00000000000c2000 - 0000000000100000 (reserved)
> > > BIOS-e820: 0000000000100000 - 00000000bff20000 (usable)
> > > BIOS-e820: 00000000bff20000 - 00000000bff2e000 (ACPI data)
> > > BIOS-e820: 00000000bff2e000 - 00000000bff80000 (ACPI NVS)
> > > BIOS-e820: 00000000bff80000 - 00000000c0000000 (reserved)
> > > BIOS-e820: 00000000e0000000 - 00000000f0000000 (reserved)
> > > BIOS-e820: 00000000fec00000 - 00000000fec00400 (reserved)
> > > BIOS-e820: 00000000fee00000 - 00000000fee01000 (reserved)
> > > BIOS-e820: 00000000fff80000 - 0000000100000000 (reserved)
> > >
> > > hmm... what does this mean?
> >
> > It means that there is a hole at 00000000c0000000 - 0000000100000000
> > (3GB-4GB) for PCI memory-mapped devices. The 4th GB of RAM should be
> > remapped by the BIOS to 4GB-5GB, but isn't. Your BIOS is either buggy
> > or misconfigured.
>
> Aiiii, that's good news.
>
> I found a "Memhole" area. But I never used to change these items.
> Unfortunately, my TYAN board reference guide isn't telling me what to change
> there for good - so - can you tell me where to find more information about
> there?
>
> If I remember correctly, it provided me the options ("Automatic"/"Manual") and
> a value list with the following items:
> ? 64MB 128MB, 256MB, 512MB, 1024MB 2048MB, 3G, 3.5G.
>
> and another list I can't remember by now.
>
> but *playing* around with these values didn't help much (I just reduced my
> memory in linux down to 2GB once but didn't find the right values for getting
> 4GB).
>
> So, what should I do then?

You should boot with different BIOS options and examine e820 map after
each boot, looking for setup where there is 1 Gig of RAM at 4G mark.

Also google for 'e820' to get some info on this stuff.
--
vda