summaryrefslogtreecommitdiffstats
path: root/sys/powerpc/booke/pmap.c
diff options
context:
space:
mode:
authorjhibbits <jhibbits@FreeBSD.org>2015-07-04 19:00:38 +0000
committerjhibbits <jhibbits@FreeBSD.org>2015-07-04 19:00:38 +0000
commitce6959baeb3e18d94c715ab309cf2e66192d3708 (patch)
treef00c6b35ae5574e3963f4747a2454441b9622391 /sys/powerpc/booke/pmap.c
parent5bb6cc922befd55376911ec9427b7a5036ee050f (diff)
downloadFreeBSD-src-ce6959baeb3e18d94c715ab309cf2e66192d3708.zip
FreeBSD-src-ce6959baeb3e18d94c715ab309cf2e66192d3708.tar.gz
Use the correct type for physical addresses.
On Book-E, physical addresses are actually 36-bits, not 32-bits. This is currently worked around by ignoring the top bits. However, in some cases, the boot loader configures CCSR to something above the 32-bit mark. This is stage 1 in updating the pmap to handle 36-bit physaddr.
Diffstat (limited to 'sys/powerpc/booke/pmap.c')
-rw-r--r--sys/powerpc/booke/pmap.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/sys/powerpc/booke/pmap.c b/sys/powerpc/booke/pmap.c
index c5e3bf3..fc6917f 100644
--- a/sys/powerpc/booke/pmap.c
+++ b/sys/powerpc/booke/pmap.c
@@ -194,7 +194,7 @@ static tlbtid_t tid_alloc(struct pmap *);
static void tlb_print_entry(int, uint32_t, uint32_t, uint32_t, uint32_t);
-static int tlb1_set_entry(vm_offset_t, vm_offset_t, vm_size_t, uint32_t);
+static int tlb1_set_entry(vm_offset_t, vm_paddr_t, vm_size_t, uint32_t);
static void tlb1_write_entry(unsigned int);
static int tlb1_iomapped(int, vm_paddr_t, vm_size_t, vm_offset_t *);
static vm_size_t tlb1_mapin_region(vm_offset_t, vm_paddr_t, vm_size_t);
@@ -392,7 +392,7 @@ static mmu_method_t mmu_booke_methods[] = {
MMU_DEF(booke_mmu, MMU_TYPE_BOOKE, mmu_booke_methods, 0);
static __inline uint32_t
-tlb_calc_wimg(vm_offset_t pa, vm_memattr_t ma)
+tlb_calc_wimg(vm_paddr_t pa, vm_memattr_t ma)
{
uint32_t attrib;
int i;
@@ -3016,7 +3016,7 @@ size2tsize(vm_size_t size)
* kept in tlb1_idx) and are not supposed to be invalidated.
*/
static int
-tlb1_set_entry(vm_offset_t va, vm_offset_t pa, vm_size_t size,
+tlb1_set_entry(vm_offset_t va, vm_paddr_t pa, vm_size_t size,
uint32_t flags)
{
uint32_t ts, tid;
@@ -3160,7 +3160,7 @@ tlb1_init()
tlb1[i].phys = mas3 & MAS3_RPN;
if (i == 0)
- kernload = mas3 & MAS3_RPN;
+ kernload = tlb1[i].phys;
tsz = (mas1 & MAS1_TSIZE_MASK) >> MAS1_TSIZE_SHIFT;
tlb1[i].size = (tsz > 0) ? tsize2size(tsz) : 0;
OpenPOWER on IntegriCloud