svn commit: r256672 - head/sys/arm/arm

Olivier Houchard cognet at FreeBSD.org
Thu Oct 17 09:57:10 UTC 2013


Author: cognet
Date: Thu Oct 17 09:57:09 2013
New Revision: 256672
URL: http://svnweb.freebsd.org/changeset/base/256672

Log:
  If we avoid to use the page at addr 0, we should adjust the size to reflect it.

Modified:
  head/sys/arm/arm/machdep.c

Modified: head/sys/arm/arm/machdep.c
==============================================================================
--- head/sys/arm/arm/machdep.c	Thu Oct 17 09:45:03 2013	(r256671)
+++ head/sys/arm/arm/machdep.c	Thu Oct 17 09:57:09 2013	(r256672)
@@ -1169,11 +1169,15 @@ physmap_init(struct mem_region *availmem
 		 */
 		if (availmem_regions[i].mr_start > 0 ||
 		    availmem_regions[i].mr_size > PAGE_SIZE) {
+			vm_size_t size;
 			phys_avail[j] = availmem_regions[i].mr_start;
-			if (phys_avail[j] == 0)
+
+			size = availmem_regions[i].mr_size;
+			if (phys_avail[j] == 0) {
 				phys_avail[j] += PAGE_SIZE;
-			phys_avail[j + 1] = availmem_regions[i].mr_start +
-			    availmem_regions[i].mr_size;
+				size -= PAGE_SIZE;
+			}
+			phys_avail[j + 1] = availmem_regions[i].mr_start + size;
 		} else
 			j -= 2;
 	}


More information about the svn-src-head mailing list