Volker Armin Hemmann posted on Fri, 07 Jan 2011 00:42:01 +0100 as
> On Thursday 06 January 2011 23:32:01 Enrico Weigelt wrote:
>> * Volker Armin Hemmann <volkerarmin@...> wrote:
>> > > Apropos total memory: on my box w/ 4GB, it only shows up 3GB.
>> > >
>> > > On bootup, kernel (built w/ CONFIG_HIGHMEM4G=y) says:
>> > > 2119MB HIGHMEM available. 887MB LOWMEM available.
Just so we're clear here, CONFIG_HIGHMEM4G only applies to 32-bit, as does
low and high memory since 64-bit is flat memory addressing up into the
PiBytes (IIRC). You don't say whether the box is running amd64 (64-bit)
or x86 (32-bit) (and for that matter, you don't say Gentoo either), but
the assumption on this list would be Gentoo/amd64, so 64-bit.
But you're obviously running x86 32-bit on that box. Again, just to make
it clear as you didn't.
>> > > Who's eating up a whole GB ? BIOS ? GPU ?
>> > bios
>> BIOS really eats it all up, or maybe some misconfiguration that causes
>> memory hidden from the OS ?
> the misconfiguration is done by the bios, mapping pcispace&co into the
> 3-4gb range
Even in 64-bit machines, many legacy 32-bit-only PCI devices can't handle
IO-address-space configured above the 4-gig 32-bit memory barrier. As a
result, there's a "memory hole", usually half a gig to a gig in size, just
below the 4-gig barrier, that's address space reserved for 32-bit-PCI-IO.
Of course it's only relatively recently that people began having memory of
several gigs and thus running into the problem, but what happens when
someone has > 3 gigs RAM in a machine is that unless the BIOS is equipped
with memory remapping functionality to map the real memory behind that PCI-
reserved area up above the 4 GB barrier, that IO-region covers the real
memory, which then cannot be accessed.
Since AFAIK (and I might be wrong) 32-bit MS Windows doesn't have the
to-64-gig PAE capacities that Linux has, there was no pressure for systems
designed to be sold with it to have that remapping, since I don't believe
they could make use of it anyway on 32-bit MS. They were simply limited
to 3-3.5GB of usable memory. Of course, machines designed to run 64-bit
versions of whatever OS could and should have had BIOSs with this
remapping functionality, but some didn't -- I imagine the BIOS companies
(Phoenix, Award, AMI...) were charging extra for the feature or something,
back then, and for all I know, might still charge extra for it.
Even on the ones that have the feature, it's often configurable. I know
there are two options related to that in my BIOS (for dual-socket original
3-digit AMD Opterons, AMD 8xxx chipset, PCI-X, before PCI-E), but they're
not documented in the print-manual as they were added in a BIOS update
after the manual was printed (but IIRC the BIOS shipped had the options,
or at least they were there by the time I upgraded from a gig to 8 gig of
memory and could actually use them). I had read about the issue, and
found the BIOS options that controlled it, but didn't quite understand
them and more or less simply messed with them until I got the desired
effect -- the BIOS detecting memory above the 4-GB barrier and Linux
seeing it as well. IIRC the one option configures the remapping itself,
while the other configures how the MMTs see and describe the hole, caching-
FWIW, any decent mobo manufacturer should either list the feature, or have
a disclaimer about BIOS mapped memory being limited to 3-3.5 gigs, if you
lookup the mobo specs on their site. I imagine systems integrators will
likewise have the info available, but don't know as I've only ever bought
two whole systems, my original 486sx25 back in '93 or so, and more
recently, my netbook. The rest of the time I simply upgrade in-place.
But of course many of the buyers really haven't a clue what that language
is talking about anyway, if they even check the tech-specs to that degree,
so many end up finding out about it the hard way and never really know why
it can't see all the memory, only that it doesn't.
Duncan - List replies preferred. No HTML msgs.
"Every nonfree program has a lord, a master --
and if you use the program, he is your master." Richard Stallman