Usenet comp.os.linux.alpha (1997-2013)
 help / color / mirror / Atom feed
From: "JohnJ" <john.jemiolo@mindspring.com>
Subject: Re: Wrong amount of memory detected on AS1200 / rawhide/tincup
Date: Thu, 28 Feb 2002 20:22:43 -0500	[thread overview]
Message-ID: <a5ml9r$aan$1@slb5.atl.mindspring.net> (raw)
In-Reply-To: j6mf8.13818$R16.2331210@news11-gui.server.ntli.net

Mike,
           I've attached a reply to your problem.  The replies are
interspersed with your observations..



-----Original Message-----
Sent: Thursday, February 28, 2002 11:30 AM
To: Jemiolo, John
Subject: Re: FW: Wrong amount of memory detected on AS1200 /
rawhide/tincup


On Thu, Feb 28, 2002 at 07:41:44AM -0500, Jemiolo, John wrote:
>
> any ideas on this?   I do not have 2g for my 1200 to try it.

Yes, I know why it looks odd, but not why it is failing under 2.4.17.

> Also, the qlogic on the 3300, will not install 7.2, it dies
> restoring the rpm's..  The plugin qlogic (pci) works fine.  I'm
> going to try a narrow drive off the other cable, instead of the
> ultra, and see if it makes a difference to the on-board controller.

> 7.2 installed to a ide on a ds10 no problem, will try my 1200 today.

Yeah, DS10 should be fine under most configurations. 1200 may be a
problem if you've got something like KZPCM (is something with a
bridge) on PCI bus #0, otherwise it should be OK.

You can post my remarks below to c.o.l.a. if you want...

> ----- Original Message -----
> From: "Michael Keller" <m@ike.ch>
> Newsgroups: comp.os.linux.alpha
> Sent: Monday, February 25, 2002 11:41 AM
> Subject: Wrong amount of memory detected on AS1200 / rawhide/tincup
>
>
> > Folks.
> >
> > I've got here a rawhide/tincup having 2 CPUs and 2 GB RAM [1], which
> > shows a strange behaviour concerning the RAM:
> >
> > While booting the 2.2.20 - kernel without a mem= option supplied [2], it
> > first seems to detect all the 2 GB of RAM [2.1], but it then crops it to
> > 1 GB. On the running system, the output of top confirms that only 1 GB
> > RAM is used.
> >
> > With 2.4.17 and the option mem=2048M supplied [3], the system behaves
> > identically, reducing the forced 2 GB to 1 GB [3.1].
> >
> > Finally, 2.4.17 without a mem= option [4] crashes [4.2] after having
> > detected 4 GB RAM and reduced it to 2 [4.1].
> >
> > Does anybody have an idea what could be wrong with my system or the
linux
> > kernel?

Nothing is wrong with your system, and it behaves as I would expect it
to under all cases except the last (2.4.17 with no mem=), when it crashes.

> > P00>>>sho mem
> >
> > Slot    Type       MB     Base
> > ----    ----      ----    --------
> >  0      DIMM       256    0
> >  1      DIMM       256    20000000
> >  2      DIMM       256    40000000
> >  3      DIMM       256    60000000
> >  4      DIMM       256    80000000
> >  5      DIMM       256    a0000000
> >  6      DIMM       256    c0000000
> >  7      DIMM       256    e0000000
> >
> > Total             2048

Notice the mapping; each 256MB DIMM is located in the bottom half of a
512MB area. Thus, of the total 4GB (32-bit) memory address space, only
half is actually populated, ie there are "holes" between each of the
DIMMs' address spaces.

For example, slot #0's 256MB DIMM has an address space of 0 to 0fffffff,
while the total slot #0 address space is 0 to 1fffffff.

When using the "mem=2048M" argument, you are reducing the *total* address
space to 2GB, into which only *half* of the actual memory falls, because
of the "holes", thus the usable memory is 1GB.

> > Cropping memory from 3840MB to 2048MB

This is done automatically by the 2.2 kernels, because their drivers are
not capable (on Alpha) of addressing more than 2GB of address space (whether
that space is full of memory OR NOT, as is your case).

> > Linux version 2.4.17 (root@bw138isd) (gcc version 3.0.3) #1 SMP Sat Feb
23
> 18:16:01 CET 2002
> > Booting on Rawhide variation Tincup using machine vector Rawhide from
SRM
> > Command line: ro root=3001 mem=2048M console=ttyS0,9600
> > memcluster 0, usage 1, start        0, end      256
> > memcluster 1, usage 0, start      256, end    32768
> > memcluster 2, usage 0, start    65536, end    98304
> > memcluster 3, usage 0, start   131072, end   163840
> > memcluster 4, usage 0, start   196608, end   229376
> > memcluster 5, usage 0, start   262144, end   294912
> > memcluster 6, usage 0, start   327680, end   360448
> > memcluster 7, usage 0, start   393216, end   425984
> > memcluster 8, usage 0, start   458752, end   491515
> > memcluster 9, usage 1, start   491515, end   491520

The memclusters describe the actuall memory present in the system; you
can see the "holes" here quite clearly.

> > setup: forcing memory size to 2097152K (from 3932120K).
>......
> > Memory: 1008632k/2097152k available (1646k kernel code, 37896k reserved,
> 352k data, 296k init)

Notice that the space is 2GB but the memory only fills half.

> > Linux version 2.4.17 (root@bw138isd) (gcc version 3.0.3) #1 SMP Sat Feb
23
> 18:16:01 CET 2002
>............
> > Memory: 2028480k/3932120k available (1646k kernel code, 66584k reserved,
> 352k data, 296k init)

Here we see nearly all the address space (the code doesn't count the
empty space beyond the last DIMM), and all of the actual memory.

> > DAC960: ***** DAC960 RAID Driver Version 2.4.11 of 11 October 2001 *****
> > DAC960: Copyright 1998-2001 by Leonard N. Zubkoff <lnz@dandelion.com>
> > [4.2]
> > Unable to handle kernel paging request at virtual address
000000000000002c
> > CPU 0 swapper(0): Oops 0
> > pc = [<fffffc00008fc830>]  ra = [<fffffc00008fc5ec>]  ps = 0007    Not
> tainted

Uh, oh.

Assuming that the above pc= is somewhere in the DAC960 driver, I think
you've found a limitation in that driver, ie that it won't work
correctly with more than 2GB of memory address space on Alpha. I just
looked at the sources, and it is using the old "virt_to_bus()" routine
for getting the bus address of the DMA memory, which, on Alpha, uses
the "direct map" technique and is limited to 2GB of address
space. Since your memory occupies nearly 4GB of address space (see
above :-), it is probably attempting to use memory that is located at
an address above the limit.

The driver should be using "pci_map_xx()" and "pci_unmap_xx()"
routines, which are fully capable of handling as much memory as one
can put into an Alpha. This is NOT simply a matter of replacing the
virt_to_bus() calls with calls to pci_map_single(), as one also needs
to release any resources (via pci_unmap_single()) that may have been
allocated by the matching pci_map_single() calls.

Solutions:

1. fix the driver
2. run on your AS1200 with memory space limited to 2G

Good luck.

--Jay++






      reply	other threads:[~2002-03-01  1:22 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2002-02-25 16:41 Wrong amount of memory detected on AS1200 / rawhide/tincup Michael Keller
2002-02-26 12:43 ` Andy Purkiss
2002-02-26 13:20   ` Michael Keller
2002-02-26 17:39     ` Andy Purkiss
2002-02-26 19:41     ` watman
2002-02-27  9:32       ` Michael Keller
2002-02-28  8:43         ` watman
2002-03-01  1:22           ` JohnJ [this message]
read-only archive

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox