--- //depot/vendor/freebsd/src/sys/amd64/amd64/machdep.c 2006/06/19 22:39:16 +++ //depot/projects/smpng/sys/amd64/amd64/machdep.c 2006/07/21 18:25:14 @@ -951,13 +951,6 @@ (boothowto & RB_VERBOSE)) printf("Physical memory use set to %ldK\n", Maxmem * 4); - /* - * If Maxmem has been increased beyond what the system has detected, - * extend the last memory segment to the new limit. - */ - if (atop(physmap[physmap_idx + 1]) < Maxmem) - physmap[physmap_idx + 1] = ptoa((vm_paddr_t)Maxmem); - /* call pmap initialization to make new kernel address space */ pmap_bootstrap(&first); --- //depot/vendor/freebsd/src/sys/i386/i386/machdep.c 2006/07/12 21:25:59 +++ //depot/projects/smpng/sys/i386/i386/machdep.c 2006/07/21 18:25:14 @@ -1633,7 +1633,7 @@ getmemsize(int first) { int i, physmap_idx, pa_indx, da_indx; - int hasbrokenint12; + int hasbrokenint12, has_smap; u_long physmem_tunable; u_int extmem; struct vm86frame vmf; @@ -1742,6 +1742,7 @@ if (boothowto & RB_VERBOSE) printf("SMAP type=%02x base=%016llx len=%016llx\n", smap->type, smap->base, smap->length); + has_smap = 1; if (smap->type != 0x01) continue; @@ -1888,10 +1889,11 @@ printf("Physical memory use set to %ldK\n", Maxmem * 4); /* - * If Maxmem has been increased beyond what the system has detected, - * extend the last memory segment to the new limit. + * If Maxmem has been increased beyond what the system has detected + * and we didn't get the memory layout via SMAP, extend the last + * memory segment to the new limit. */ - if (atop(physmap[physmap_idx + 1]) < Maxmem) + if (!has_smap && atop(physmap[physmap_idx + 1]) < Maxmem) physmap[physmap_idx + 1] = ptoa((vm_paddr_t)Maxmem); /* call pmap initialization to make new kernel address space */