summaryrefslogtreecommitdiffstats
path: root/sys/powerpc/booke
diff options
context:
space:
mode:
authorian <ian@FreeBSD.org>2014-05-13 16:59:50 +0000
committerian <ian@FreeBSD.org>2014-05-13 16:59:50 +0000
commit3d20d204d8598105e6dd4fb0d595e33d2461a02b (patch)
treea0ed8fb1178d7a67da2987bec28b68a4a0cbc9c2 /sys/powerpc/booke
parent788d947f59320093c08b42453a93721d4d0d5a5c (diff)
downloadFreeBSD-src-3d20d204d8598105e6dd4fb0d595e33d2461a02b.zip
FreeBSD-src-3d20d204d8598105e6dd4fb0d595e33d2461a02b.tar.gz
MFC r256814, r256816, r256818, r256846, r256855, r256864 (by nwhitehorn):
- Handle 2GB of ram - Allow the OFW interrupt mapping code to work with PCI devices not enumerated by Open Firmware, as in the case of FDT. - Provide an interface for PCI bus drivers that need some of ofw_pci's metadata during attach. - Use standard ofw_bus helpers instead of reinventing the wheel. - Make hard-wired TLB allocations be at minimum one page.
Diffstat (limited to 'sys/powerpc/booke')
-rw-r--r--sys/powerpc/booke/machdep.c9
-rw-r--r--sys/powerpc/booke/pmap.c2
2 files changed, 7 insertions, 4 deletions
diff --git a/sys/powerpc/booke/machdep.c b/sys/powerpc/booke/machdep.c
index e9a2d52..340c7a0d 100644
--- a/sys/powerpc/booke/machdep.c
+++ b/sys/powerpc/booke/machdep.c
@@ -192,7 +192,8 @@ extern int elf32_nxstack;
static void
cpu_booke_startup(void *dummy)
{
- int indx, size;
+ int indx;
+ unsigned long size;
/* Initialise the decrementer-based clock. */
decr_init();
@@ -200,7 +201,7 @@ cpu_booke_startup(void *dummy)
/* Good {morning,afternoon,evening,night}. */
cpu_setup(PCPU_GET(cpuid));
- printf("real memory = %ld (%ld MB)\n", ptoa(physmem),
+ printf("real memory = %lu (%ld MB)\n", ptoa(physmem),
ptoa(physmem) / 1048576);
realmem = physmem;
@@ -210,7 +211,7 @@ cpu_booke_startup(void *dummy)
for (indx = 0; phys_avail[indx + 1] != 0; indx += 2) {
size = phys_avail[indx + 1] - phys_avail[indx];
- printf("0x%08x - 0x%08x, %d bytes (%ld pages)\n",
+ printf("0x%08x - 0x%08x, %lu bytes (%lu pages)\n",
phys_avail[indx], phys_avail[indx + 1] - 1,
size, size / PAGE_SIZE);
}
@@ -218,7 +219,7 @@ cpu_booke_startup(void *dummy)
vm_ksubmap_init(&kmi);
- printf("avail memory = %ld (%ld MB)\n", ptoa(cnt.v_free_count),
+ printf("avail memory = %lu (%ld MB)\n", ptoa(cnt.v_free_count),
ptoa(cnt.v_free_count) / 1048576);
/* Set up buffers, so they can be used to read disk labels. */
diff --git a/sys/powerpc/booke/pmap.c b/sys/powerpc/booke/pmap.c
index 7b9a5d3..9406a4a 100644
--- a/sys/powerpc/booke/pmap.c
+++ b/sys/powerpc/booke/pmap.c
@@ -2613,6 +2613,8 @@ mmu_booke_mapdev(mmu_t mmu, vm_paddr_t pa, vm_size_t size)
va = (pa >= 0x80000000) ? pa : (0xe2000000 + pa);
res = (void *)va;
+ if (size < PAGE_SIZE)
+ size = PAGE_SIZE;
do {
sz = 1 << (ilog2(size) & ~1);
OpenPOWER on IntegriCloud