Date: Thu, 24 Feb 2000 21:27:19 +0000 (GMT) From: Doug Rabson <dfr@nlsystems.com> To: Andrew Gallatin <gallatin@cs.duke.edu> Cc: mjacob@feral.com, Vladimir Kravchuk <adm@smr.ru>, freebsd-alpha@FreeBSD.ORG Subject: Re: UP2000/DP264 Message-ID: <Pine.BSF.4.21.0002242124500.8714-100000@salmon.nlsystems.com> In-Reply-To: <14517.40509.360595.957164@grasshopper.cs.duke.edu>
next in thread | previous in thread | raw e-mail | index | archive | help
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
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?Pine.BSF.4.21.0002242124500.8714-100000>