--- //depot/vendor/freebsd_7/src/sys/amd64/amd64/dump_machdep.c 2008/01/30 03:37:00 +++ //depot/yahoo/ybsd_7/src/sys/amd64/amd64/dump_machdep.c 2008/07/31 14:35:19 @@ -177,6 +178,7 @@ uint64_t pgs; size_t counter, sz, chunk; int i, c, error, twiddle; + u_int maxdumppgs; error = 0; /* catch case in which chunk size is 0 */ counter = 0; /* Update twiddle every 16MB */ @@ -184,13 +186,16 @@ va = 0; pgs = mdp->md_size / PAGE_SIZE; pa = mdp->md_start; + maxdumppgs = di->maxiosize / PAGE_SIZE; + if (maxdumppgs == 0) /* seatbelt */ + maxdumppgs = 1; printf(" chunk %d: %ldMB (%ld pages)", seqnr, PG2MB(pgs), pgs); while (pgs) { chunk = pgs; - if (chunk > MAXDUMPPGS) - chunk = MAXDUMPPGS; + if (chunk > maxdumppgs) + chunk = maxdumppgs; sz = chunk << PAGE_SHIFT; counter += sz; if (counter >> 24) { --- //depot/vendor/freebsd_7/src/sys/amd64/amd64/minidump_machdep.c 2008/01/30 03:37:00 +++ //depot/yahoo/ybsd_7/src/sys/amd64/amd64/minidump_machdep.c 2008/07/31 14:35:19 @@ -122,7 +123,11 @@ { size_t len; int error, i, c; + u_int maxdumpsz; + maxdumpsz = di->maxiosize; + if (maxdumpsz == 0) /* seatbelt */ + maxdumpsz = PAGE_SIZE; error = 0; if ((sz % PAGE_SIZE) != 0) { printf("size not page aligned\n"); @@ -143,7 +148,7 @@ return (error); } while (sz) { - len = (MAXDUMPPGS * PAGE_SIZE) - fragsz; + len = maxdumpsz - fragsz; if (len > sz) len = sz; counter += len; @@ -165,7 +170,7 @@ fragsz += len; pa += len; sz -= len; - if (fragsz == (MAXDUMPPGS * PAGE_SIZE)) { + if (fragsz == maxdumpsz) { error = blk_flush(di); if (error) return (error); --- //depot/vendor/freebsd_7/src/sys/i386/i386/dump_machdep.c 2008/01/30 03:37:00 +++ //depot/yahoo/ybsd_7/src/sys/i386/i386/dump_machdep.c 2008/07/31 14:35:19 @@ -177,6 +178,7 @@ uint64_t pgs; size_t counter, sz, chunk; int i, c, error, twiddle; + u_int maxdumppgs; error = 0; /* catch case in which chunk size is 0 */ counter = 0; /* Update twiddle every 16MB */ @@ -184,13 +186,16 @@ va = 0; pgs = mdp->md_size / PAGE_SIZE; pa = mdp->md_start; + maxdumppgs = di->maxiosize / PAGE_SIZE; + if (maxdumppgs == 0) /* seatbelt */ + maxdumppgs = 1; printf(" chunk %d: %lldMB (%lld pages)", seqnr, PG2MB(pgs), pgs); while (pgs) { chunk = pgs; - if (chunk > MAXDUMPPGS) - chunk = MAXDUMPPGS; + if (chunk > maxdumppgs) + chunk = maxdumppgs; sz = chunk << PAGE_SHIFT; counter += sz; if (counter >> 24) { --- //depot/vendor/freebsd_7/src/sys/i386/i386/minidump_machdep.c 2008/01/30 03:37:00 +++ //depot/yahoo/ybsd_7/src/sys/i386/i386/minidump_machdep.c 2008/07/31 14:35:19 @@ -120,7 +121,11 @@ { size_t len; int error, i, c; + u_int maxdumpsz; + maxdumpsz = di->maxiosize; + if (maxdumpsz == 0) /* seatbelt */ + maxdumpsz = PAGE_SIZE; error = 0; if ((sz % PAGE_SIZE) != 0) { printf("size not page aligned\n"); @@ -141,7 +146,7 @@ return (error); } while (sz) { - len = (MAXDUMPPGS * PAGE_SIZE) - fragsz; + len = maxdumpsz - fragsz; if (len > sz) len = sz; counter += len; @@ -163,7 +168,7 @@ fragsz += len; pa += len; sz -= len; - if (fragsz == (MAXDUMPPGS * PAGE_SIZE)) { + if (fragsz == maxdumpsz) { error = blk_flush(di); if (error) return (error);