kernel - Fix physmap base calculation for x86-64
authorMatthew Dillon <dillon@apollo.backplane.com>
Thu, 3 Feb 2011 18:52:34 +0000 (10:52 -0800)
committerMatthew Dillon <dillon@apollo.backplane.com>
Thu, 3 Feb 2011 18:52:34 +0000 (10:52 -0800)
Reported-by: luxh, tuxillo
sys/platform/pc64/x86_64/machdep.c

index 3396e4d..9fbdcbe 100644 (file)
@@ -1626,7 +1626,7 @@ getmemsize(caddr_t kmdp, u_int64_t first)
                                phys_avail[pa_indx++] = pa;
                                phys_avail[pa_indx] = pa + PHYSMAP_ALIGN;
                        }
-                       physmem++;
+                       physmem += PHYSMAP_ALIGN / PAGE_SIZE;
 do_dump_avail:
                        if (dump_avail[da_indx] == pa) {
                                dump_avail[da_indx] += PHYSMAP_ALIGN;