summaryrefslogtreecommitdiffstats
path: root/sys/powerpc/powerpc
diff options
context:
space:
mode:
authorjhibbits <jhibbits@FreeBSD.org>2015-12-24 04:30:15 +0000
committerjhibbits <jhibbits@FreeBSD.org>2015-12-24 04:30:15 +0000
commita56b695591d54aeb8a2bfff084697f6e9493855c (patch)
tree4bad651440260b722d33601cfacf24834ea26a65 /sys/powerpc/powerpc
parent760c079f38ca83ef18d4cef550918dc730e818a6 (diff)
downloadFreeBSD-src-a56b695591d54aeb8a2bfff084697f6e9493855c.zip
FreeBSD-src-a56b695591d54aeb8a2bfff084697f6e9493855c.tar.gz
Extend Book-E to support >4GB RAM
Summary: With some additional changes for AIM, that could also support much larger physmem sizes. Given that 32-bit AIM is more or less obsolete, though, it's not worth it at this time. Differential Revision: https://reviews.freebsd.org/D4345
Diffstat (limited to 'sys/powerpc/powerpc')
-rw-r--r--sys/powerpc/powerpc/machdep.c20
-rw-r--r--sys/powerpc/powerpc/platform.c4
-rw-r--r--sys/powerpc/powerpc/pmap_dispatch.c2
3 files changed, 14 insertions, 12 deletions
diff --git a/sys/powerpc/powerpc/machdep.c b/sys/powerpc/powerpc/machdep.c
index 781a3f6..dea3461 100644
--- a/sys/powerpc/powerpc/machdep.c
+++ b/sys/powerpc/powerpc/machdep.c
@@ -176,8 +176,8 @@ cpu_startup(void *dummy)
#ifdef PERFMON
perfmon_init();
#endif
- printf("real memory = %lu (%lu MB)\n", ptoa(physmem),
- ptoa(physmem) / 1048576);
+ printf("real memory = %ju (%ju MB)\n", ptoa((uintmax_t)physmem),
+ ptoa((uintmax_t)physmem) / 1048576);
realmem = physmem;
if (bootverbose)
@@ -193,23 +193,25 @@ cpu_startup(void *dummy)
printf("Physical memory chunk(s):\n");
for (indx = 0; phys_avail[indx + 1] != 0; indx += 2) {
- vm_offset_t size1 =
+ vm_paddr_t size1 =
phys_avail[indx + 1] - phys_avail[indx];
#ifdef __powerpc64__
- printf("0x%016lx - 0x%016lx, %ld bytes (%ld pages)\n",
+ printf("0x%016jx - 0x%016jx, %jd bytes (%jd pages)\n",
#else
- printf("0x%08x - 0x%08x, %u bytes (%lu pages)\n",
+ printf("0x%09jx - 0x%09jx, %ju bytes (%ju pages)\n",
#endif
- phys_avail[indx], phys_avail[indx + 1] - 1, size1,
- size1 / PAGE_SIZE);
+ (uintmax_t)phys_avail[indx],
+ (uintmax_t)phys_avail[indx + 1] - 1,
+ (uintmax_t)size1, (uintmax_t)size1 / PAGE_SIZE);
}
}
vm_ksubmap_init(&kmi);
- printf("avail memory = %lu (%lu MB)\n", ptoa(vm_cnt.v_free_count),
- ptoa(vm_cnt.v_free_count) / 1048576);
+ printf("avail memory = %ju (%ju MB)\n",
+ ptoa((uintmax_t)vm_cnt.v_free_count),
+ ptoa((uintmax_t)vm_cnt.v_free_count) / 1048576);
/*
* Set up buffers, so they can be used to read disk labels.
diff --git a/sys/powerpc/powerpc/platform.c b/sys/powerpc/powerpc/platform.c
index 4698ed2..8168758 100644
--- a/sys/powerpc/powerpc/platform.c
+++ b/sys/powerpc/powerpc/platform.c
@@ -86,8 +86,8 @@ static void
memr_merge(struct mem_region *from, struct mem_region *to)
{
vm_offset_t end;
- end = ulmax(to->mr_start + to->mr_size, from->mr_start + from->mr_size);
- to->mr_start = ulmin(from->mr_start, to->mr_start);
+ end = uqmax(to->mr_start + to->mr_size, from->mr_start + from->mr_size);
+ to->mr_start = uqmin(from->mr_start, to->mr_start);
to->mr_size = end - to->mr_start;
}
diff --git a/sys/powerpc/powerpc/pmap_dispatch.c b/sys/powerpc/powerpc/pmap_dispatch.c
index 4e31a53..2082ba0 100644
--- a/sys/powerpc/powerpc/pmap_dispatch.c
+++ b/sys/powerpc/powerpc/pmap_dispatch.c
@@ -74,7 +74,7 @@ struct msgbuf *msgbufp;
vm_offset_t msgbuf_phys;
vm_offset_t kernel_vm_end;
-vm_offset_t phys_avail[PHYS_AVAIL_SZ];
+vm_paddr_t phys_avail[PHYS_AVAIL_SZ];
vm_offset_t virtual_avail;
vm_offset_t virtual_end;
OpenPOWER on IntegriCloud