From mboxrd@z Thu Jan 1 00:00:00 1970 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 111c93,caed2c3ff541b587 X-Google-Attributes: gid111c93,public X-Google-ArrivalTime: 2002-02-28 17:23:08 PST Path: archiver1.google.com!news1.google.com!sn-xit-02!supernews.com!news-x2.support.nl!news-spur1.maxwell.syr.edu!news.maxwell.syr.edu!feed2.news.rcn.net!rcn!newsfeed1.earthlink.net!newsfeed2.earthlink.net!newsfeed.earthlink.net!newsfeed0.news.atl.earthlink.net!news.atl.earthlink.net!news.mindspring.net!not-for-mail From: "JohnJ" Newsgroups: comp.os.linux.alpha Subject: Re: Wrong amount of memory detected on AS1200 / rawhide/tincup Date: Thu, 28 Feb 2002 20:22:43 -0500 Organization: MindSpring Enterprises Message-ID: References: <2977f887.0202260443.58c779f6@posting.google.com> NNTP-Posting-Host: 3f.d6.66.e7 X-Server-Date: 1 Mar 2002 01:25:15 GMT X-Priority: 3 X-MSMail-Priority: Normal X-Newsreader: Microsoft Outlook Express 6.00.2600.0000 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2600.0000 Xref: archiver1.google.com comp.os.linux.alpha:4986 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" > 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 > > [4.2] > > Unable to handle kernel paging request at virtual address 000000000000002c > > CPU 0 swapper(0): Oops 0 > > pc = [] ra = [] 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++