From owner-svn-src-all@FreeBSD.ORG Fri Jan 29 04:05:18 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 1D32B1065672; Fri, 29 Jan 2010 04:05:18 +0000 (UTC) (envelope-from rrs@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 0CF888FC19; Fri, 29 Jan 2010 04:05:18 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o0T45HEr046258; Fri, 29 Jan 2010 04:05:17 GMT (envelope-from rrs@svn.freebsd.org) Received: (from rrs@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o0T45HfH046256; Fri, 29 Jan 2010 04:05:17 GMT (envelope-from rrs@svn.freebsd.org) Message-Id: <201001290405.o0T45HfH046256@svn.freebsd.org> From: Randall Stewart Date: Fri, 29 Jan 2010 04:05:17 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r203150 - head/sys/mips/rmi X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 29 Jan 2010 04:05:18 -0000 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; }