From owner-freebsd-alpha Thu Feb 24 13:24:51 2000 Delivered-To: freebsd-alpha@freebsd.org Received: from anchor-post-32.mail.demon.net (anchor-post-32.mail.demon.net [194.217.242.90]) by hub.freebsd.org (Postfix) with ESMTP id C2D5D37BBEA for ; Thu, 24 Feb 2000 13:24:34 -0800 (PST) (envelope-from dfr@nlsystems.com) Received: from nlsys.demon.co.uk ([158.152.125.33] helo=herring.nlsystems.com) by anchor-post-32.mail.demon.net with esmtp (Exim 2.12 #1) id 12O5kC-000NWQ-0W; Thu, 24 Feb 2000 21:24:20 +0000 Received: from salmon.nlsystems.com (salmon.nlsystems.com [10.0.0.3]) by herring.nlsystems.com (8.9.3/8.8.8) with ESMTP id VAA57967; Thu, 24 Feb 2000 21:27:27 GMT (envelope-from dfr@nlsystems.com) Date: Thu, 24 Feb 2000 21:27:19 +0000 (GMT) From: Doug Rabson To: Andrew Gallatin Cc: mjacob@feral.com, Vladimir Kravchuk , freebsd-alpha@FreeBSD.ORG Subject: Re: UP2000/DP264 In-Reply-To: <14517.40509.360595.957164@grasshopper.cs.duke.edu> Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: owner-freebsd-alpha@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.org On Thu, 24 Feb 2000, Andrew Gallatin wrote: > > Matthew Jacob writes: > > fWIW, I see 2GB fine on an alpha 8200. > > > > As do the TestDrive people on their XP1000. > > I think the problem might be that we unconditionally return 1 in > pmap_uses_prom_console(). > > I might be missing something in a quick read, but I do not see how we > can go back & read a second MDDT_SYSTEM cluster after we've read the > first system cluster and physmem has been set to a non-zero value. I > think this guy's problem might be that he's got his 2GB spread across > 2 clusters with system tags. > > The patch I mailed him makes pmap_uses_prom_console return 0 in his > case, which should allow the detection of a second system cluster. The code in machdep.c is convoluted and looks wrong whatever pmap_uses_prom_console() is returning. Perhaps this (untested) patch would work as well: Index: machdep.c =================================================================== RCS file: /home/ncvs/src/sys/alpha/alpha/machdep.c,v retrieving revision 1.67 diff -u -r1.67 machdep.c --- machdep.c 2000/02/13 03:31:48 1.67 +++ machdep.c 2000/02/24 21:26:47 @@ -859,57 +859,55 @@ * XXX memory after the kernel in the first system segment, * XXX to avoid clobbering prom mapping, data, etc. */ - if (!pmap_uses_prom_console() || physmem == 0) { - physmem += memc->mddt_pg_cnt; - pfn0 = memc->mddt_pfn; - pfn1 = memc->mddt_pfn + memc->mddt_pg_cnt; - if (pfn0 <= kernendpfn && kernstartpfn <= pfn1) { - /* - * Must compute the location of the kernel - * within the segment. - */ -#ifdef DEBUG_CLUSTER - printf("Cluster %d contains kernel\n", i); -#endif - if (!pmap_uses_prom_console()) { - if (pfn0 < kernstartpfn) { - /* - * There is a chunk before the kernel. - */ + physmem += memc->mddt_pg_cnt; + pfn0 = memc->mddt_pfn; + pfn1 = memc->mddt_pfn + memc->mddt_pg_cnt; + if (pfn0 <= kernendpfn && kernstartpfn <= pfn1) { + /* + * Must compute the location of the kernel + * within the segment. + */ #ifdef DEBUG_CLUSTER - printf("Loading chunk before kernel: " - "0x%lx / 0x%lx\n", pfn0, kernstartpfn); + printf("Cluster %d contains kernel\n", i); #endif - phys_avail[phys_avail_cnt] = alpha_ptob(pfn0); - phys_avail[phys_avail_cnt+1] = alpha_ptob(kernstartpfn); - phys_avail_cnt += 2; - } - } - if (kernendpfn < pfn1) { - /* - * There is a chunk after the kernel. - */ + if (!pmap_uses_prom_console()) { + if (pfn0 < kernstartpfn) { + /* + * There is a chunk before the kernel. + */ #ifdef DEBUG_CLUSTER - printf("Loading chunk after kernel: " - "0x%lx / 0x%lx\n", kernendpfn, pfn1); + printf("Loading chunk before kernel: " + "0x%lx / 0x%lx\n", pfn0, kernstartpfn); #endif - phys_avail[phys_avail_cnt] = alpha_ptob(kernendpfn); - phys_avail[phys_avail_cnt+1] = alpha_ptob(pfn1); + phys_avail[phys_avail_cnt] = alpha_ptob(pfn0); + phys_avail[phys_avail_cnt+1] = alpha_ptob(kernstartpfn); phys_avail_cnt += 2; } - } else { + } + if (kernendpfn < pfn1) { /* - * Just load this cluster as one chunk. + * There is a chunk after the kernel. */ #ifdef DEBUG_CLUSTER - printf("Loading cluster %d: 0x%lx / 0x%lx\n", i, - pfn0, pfn1); + printf("Loading chunk after kernel: " + "0x%lx / 0x%lx\n", kernendpfn, pfn1); #endif - phys_avail[phys_avail_cnt] = alpha_ptob(pfn0); + phys_avail[phys_avail_cnt] = alpha_ptob(kernendpfn); phys_avail[phys_avail_cnt+1] = alpha_ptob(pfn1); phys_avail_cnt += 2; - } + } else { + /* + * Just load this cluster as one chunk. + */ +#ifdef DEBUG_CLUSTER + printf("Loading cluster %d: 0x%lx / 0x%lx\n", i, + pfn0, pfn1); +#endif + phys_avail[phys_avail_cnt] = alpha_ptob(pfn0); + phys_avail[phys_avail_cnt+1] = alpha_ptob(pfn1); + phys_avail_cnt += 2; + } } phys_avail[phys_avail_cnt] = 0; -- Doug Rabson Mail: dfr@nlsystems.com Nonlinear Systems Ltd. Phone: +44 181 442 9037 To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-alpha" in the body of the message