Physical memory regions can be larger than INT_MAX. Change size1

from an int to a long to avoid printing negative byte and page
counts.
This commit is contained in:
marcel 2007-06-09 01:19:08 +00:00
parent 05cb1f0282
commit c6fba5a928

View File

@ -274,10 +274,11 @@ cpu_startup(dummy)
printf("Physical memory chunk(s):\n");
for (indx = 0; phys_avail[indx + 1] != 0; indx += 2) {
int size1 = phys_avail[indx + 1] - phys_avail[indx];
long size1 = phys_avail[indx + 1] - phys_avail[indx];
printf("0x%08lx - 0x%08lx, %d bytes (%d pages)\n", phys_avail[indx],
phys_avail[indx + 1] - 1, size1, size1 / PAGE_SIZE);
printf("0x%08lx - 0x%08lx, %ld bytes (%ld pages)\n",
phys_avail[indx], phys_avail[indx + 1] - 1, size1,
size1 >> PAGE_SHIFT);
}
}