Module Name:    src
Committed By:   cliff
Date:           Thu Jun 10 00:37:58 UTC 2010

Modified Files:
        src/sys/arch/mips/mips [matt-nb5-mips64]: pmap.c

Log Message:
in pmap_bootstrap:
- increase Sysmapsize to allow mapping all memory (e.g. for big tmpfs)
- when calculating mips_virtual_end, cast Sysmapsize to vaddr_t
before multiplying by NBPG to avoid overflow


To generate a diff of this commit:
cvs rdiff -u -r1.179.16.24 -r1.179.16.25 src/sys/arch/mips/mips/pmap.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/sys/arch/mips/mips/pmap.c
diff -u src/sys/arch/mips/mips/pmap.c:1.179.16.24 src/sys/arch/mips/mips/pmap.c:1.179.16.25
--- src/sys/arch/mips/mips/pmap.c:1.179.16.24	Tue May  4 17:15:36 2010
+++ src/sys/arch/mips/mips/pmap.c	Thu Jun 10 00:37:58 2010
@@ -1,4 +1,4 @@
-/*	$NetBSD: pmap.c,v 1.179.16.24 2010/05/04 17:15:36 matt Exp $	*/
+/*	$NetBSD: pmap.c,v 1.179.16.25 2010/06/10 00:37:58 cliff Exp $	*/
 
 /*-
  * Copyright (c) 1998, 2001 The NetBSD Foundation, Inc.
@@ -67,7 +67,7 @@
 
 #include <sys/cdefs.h>
 
-__KERNEL_RCSID(0, "$NetBSD: pmap.c,v 1.179.16.24 2010/05/04 17:15:36 matt Exp $");
+__KERNEL_RCSID(0, "$NetBSD: pmap.c,v 1.179.16.25 2010/06/10 00:37:58 cliff Exp $");
 
 /*
  *	Manages physical address maps.
@@ -518,7 +518,11 @@
 	Sysmapsize += poolpage.size;
 #endif
 	/* XXX: else runs out of space on 256MB sbmips!! */
+#ifdef _LP64
+	Sysmapsize += physmem;
+#else
 	Sysmapsize += 20000;
+#endif
 
 	/*
 	 * Initialize `FYI' variables.	Note we're relying on
@@ -528,7 +532,7 @@
 	 */
 	mips_avail_start = vm_physmem[0].start << PGSHIFT;
 	mips_avail_end = vm_physmem[vm_nphysseg - 1].end << PGSHIFT;
-	mips_virtual_end = VM_MIN_KERNEL_ADDRESS + Sysmapsize * NBPG;
+	mips_virtual_end = VM_MIN_KERNEL_ADDRESS + (vaddr_t)Sysmapsize * NBPG;
 #ifndef _LP64
 	if (mips_virtual_end > VM_MAX_KERNEL_ADDRESS) {
 		mips_virtual_end = VM_MAX_KERNEL_ADDRESS;

Reply via email to