home | list info | list archive | date index | thread index

Re: [OCLUG-Tech] Understanding 64bit memory addressing

  • Subject: Re: [OCLUG-Tech] Understanding 64bit memory addressing
  • From: Martin Hicks <mort [ at ] bork [ dot ] org>
  • Date: Tue, 8 Jan 2008 09:35:53 -0500
On Tue, Jan 08, 2008 at 01:36:39AM -0800, Bruce Miller wrote:
> Can anyone point me to a *_very elementary_* article/tutorial on
> 64-bit memory addressing?

I can give you a brief overview, based on what I have run into.

You're asking VERY architecture specific questions.

> 
> The purpose in asking is dead-simple and practical. My brand-new 64bit
> desktop computer has a bad memory module. I had repeated kernel panics
> last weekend. When I ran memtest+, the screen lit up in red like an
> angry police cruiser. But I did not understand the address it pointed
> to. I cannot quote the exact address (I am in Halifax this morning and
> the misbehaving computer is in Ottawa.). but the hex address began
> with 00109xxxx(etc) and the "tranlated" address was 4345MB. The system
> has 4,096MB of RAM installed; some interpretation is necessary. Is all
> memory installed from a base address of zero?

Okay, so you're right.  Things aren't necessarily linear.  You have 4GB
of physical RAM, but lots of IO cards are braindead and can only DMA
into the lower 32bits.  (and PC BIOS is even dumber....Thanks for that
intro to the world of HELL that is real mode x86, Bart)

There is likely room set aside in the memory map of the first 4GB for
things like PCI registers, AGP aperture space, etc, etc.

BUT, in general x86 PCs have memory that does stretch from 0x0 onwards.

A counter example is SGI's Altix ia64 computers.  There are massive
Single System Image (SSI) machines.  A full machine (at least at one
point) took up 16 racks.  I think they've increased density since then
into blade-type environment.

On these machines part of the memory address indicated on which node in
the SSI the memory resides.  Thus, if due to partitioning, you don't
have "node0" in your system, then you also don't have memory starting at
0.  This broke all kinds of assumptions in the kernel, which needed to
be fixed before altix would boot.

*also*, there are HUGE gaps in the memory map.  When the kernel used to
build the map of where the memory was located, it would just incorporate
these "empty" spaces in the map because they were sufficiently small.
Altix broke this too.  Scanning memory through the whole 61bit (arch
limit...I think) address space of the ia64 processor and finding bits of
memory scattered here & there took excruciatingly long.


Another example is an HP rx2600 ia64 machine that I have.  It has 12GB
of RAM and there are gaps and holes all over the place.  I think there
is memory from 0-1GB and then a gap until 4GB or something like that...

> While my immediate goal is to tell the shop where I bought the
> computer which module they must replace, I would also like to
> understand the addressing better. Any ideas?

Its likely in the last DIMM.  I would expect there to be much less than
1GB of "reserved" in the first 4GB.  Switch the modules around, see if the
address becomes consistent. 

Install one DIMM at a time....see if the machine will pass with all but
one module.

mh

-- 
Martin Hicks || mort [ at ] bork [ dot ] org || PGP/GnuPG: 0x4C7F2BEE