Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 29 Jan 2010 04:05:17 +0000 (UTC)
From:      Randall Stewart <rrs@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   svn commit: r203150 - head/sys/mips/rmi
Message-ID:  <201001290405.o0T45HfH046256@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: rrs
Date: Fri Jan 29 04:05:17 2010
New Revision: 203150
URL: http://svn.freebsd.org/changeset/base/203150

Log:
  Its possible that our RMI box has memory extending
  above 4Gig. If so when we add the base address with
  the size we will wrap. So for now we just ignore
  such memory and only use what we can. When we
  get 64 bit working then we will be much better ;->

Modified:
  head/sys/mips/rmi/xlr_machdep.c

Modified: head/sys/mips/rmi/xlr_machdep.c
==============================================================================
--- head/sys/mips/rmi/xlr_machdep.c	Fri Jan 29 04:03:36 2010	(r203149)
+++ head/sys/mips/rmi/xlr_machdep.c	Fri Jan 29 04:05:17 2010	(r203150)
@@ -456,6 +456,9 @@ platform_start(__register_t a0 __unused,
 				}
 				phys_avail[1] = boot_map->physmem_map[0].addr +
 				    boot_map->physmem_map[0].size;
+				printf("First segment: addr:%p -> %p \n",
+				       (void *)phys_avail[0], 
+				       (void *)phys_avail[1]);
 
 			} else {
 /*
@@ -467,9 +470,19 @@ platform_start(__register_t a0 __unused,
 				    boot_map->physmem_map[i].addr;
 				phys_avail[j + 1] = phys_avail[j] +
 				    boot_map->physmem_map[i].size;
-#if 0				/* FIXME TOD0 */
-				phys_avail[j] = phys_avail[j + 1] = 0;
-#endif
+				if (phys_avail[j + 1] < phys_avail[j] ) {
+					/* Houston we have an issue. Memory is
+					 * larger than possible. Its probably in
+					 * 64 bit > 4Gig and we are in 32 bit mode.
+					 */
+					phys_avail[j + 1] = 0xfffff000;
+					printf("boot map size was %llx\n", boot_map->physmem_map[i].size);
+					boot_map->physmem_map[i].size = phys_avail[j + 1] - phys_avail[j];
+					printf("reduced to %llx\n", boot_map->physmem_map[i].size);
+				}
+				printf("Next segment : addr:%p -> %p \n",
+				       (void *)phys_avail[j], 
+				       (void *)phys_avail[j+1]);
 			}
 			physsz += boot_map->physmem_map[i].size;
 		}



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201001290405.o0T45HfH046256>