diff options
author | cognet <cognet@FreeBSD.org> | 2006-11-07 22:35:30 +0000 |
---|---|---|
committer | cognet <cognet@FreeBSD.org> | 2006-11-07 22:35:30 +0000 |
commit | d086fc78afc2c572fa519d63af4bbf99705a4ca8 (patch) | |
tree | 3ffb70128042b1911f33fc928a08afd16d08834c /sys/arm | |
parent | 794ab15a9974ad3547afb7166b85e6bbb46ea277 (diff) | |
download | FreeBSD-src-d086fc78afc2c572fa519d63af4bbf99705a4ca8.zip FreeBSD-src-d086fc78afc2c572fa519d63af4bbf99705a4ca8.tar.gz |
In the ARM_USE_SMALL_ALLOC case, vm_page_t may have an address < KERNBASE,
so adjust the KASSERT to reflect this.
Diffstat (limited to 'sys/arm')
-rw-r--r-- | sys/arm/arm/pmap.c | 14 | ||||
-rw-r--r-- | sys/arm/arm/vm_machdep.c | 2 |
2 files changed, 14 insertions, 2 deletions
diff --git a/sys/arm/arm/pmap.c b/sys/arm/arm/pmap.c index 3c239f5..43abb7d 100644 --- a/sys/arm/arm/pmap.c +++ b/sys/arm/arm/pmap.c @@ -278,6 +278,8 @@ struct msgbuf *msgbufp = 0; extern void bcopy_page(vm_offset_t, vm_offset_t); extern void bzero_page(vm_offset_t); +extern vm_offset_t alloc_firstaddr; + char *_tmppt; /* @@ -2784,6 +2786,11 @@ pmap_remove_pages(pmap_t pmap) KASSERT(l2b != NULL, ("No L2 bucket in pmap_remove_pages")); pt = &l2b->l2b_kva[l2pte_index(pv->pv_va)]; m = PHYS_TO_VM_PAGE(*pt & L2_ADDR_MASK); +#ifdef ARM_USE_SMALL_ALLOC + KASSERT((vm_offset_t)m >= alloc_firstaddr, ("Trying to access non-existent page va %x pte %x", pv->pv_va, *pt)); +#else + KASSERT((vm_offset_t)m >= KERNBASE, ("Trying to access non-existent page va %x pte %x", pv->pv_va, *pt)); +#endif *pt = 0; PTE_SYNC(pt); npv = TAILQ_NEXT(pv, pv_plist); @@ -4563,7 +4570,7 @@ pmap_map_section(vm_offset_t l1pt, vm_offset_t va, vm_offset_t pa, /* * pmap_link_l2pt: * - * Link the L2 page table specified by "pa" into the L1 + * Link the L2 page table specified by l2pv.pv_pa into the L1 * page table at the slot for "va". */ void @@ -4574,7 +4581,12 @@ pmap_link_l2pt(vm_offset_t l1pt, vm_offset_t va, struct pv_addr *l2pv) proto = L1_S_DOM(PMAP_DOMAIN_KERNEL) | L1_C_PROTO; +#ifdef VERBOSE_INIT_ARM + printf("pmap_link_l2pt: pa=0x%x va=0x%x\n", l2pv->pv_pa, l2pv->pv_va); +#endif + pde[slot + 0] = proto | (l2pv->pv_pa + 0x000); + PTE_SYNC(&pde[slot]); SLIST_INSERT_HEAD(&kernel_pt_list, l2pv, pv_list); diff --git a/sys/arm/arm/vm_machdep.c b/sys/arm/arm/vm_machdep.c index a445f19..5c250a4 100644 --- a/sys/arm/arm/vm_machdep.c +++ b/sys/arm/arm/vm_machdep.c @@ -456,7 +456,7 @@ struct mtx smallalloc_mtx; MALLOC_DEFINE(M_VMSMALLALLOC, "vm_small_alloc", "VM Small alloc data"); -static vm_offset_t alloc_firstaddr; +vm_offset_t alloc_firstaddr; vm_offset_t arm_ptovirt(vm_paddr_t pa) |