diff options
author | cognet <cognet@FreeBSD.org> | 2005-03-06 21:10:31 +0000 |
---|---|---|
committer | cognet <cognet@FreeBSD.org> | 2005-03-06 21:10:31 +0000 |
commit | 5e08d267b58f1da6c9bba7002210bc1e1a40880f (patch) | |
tree | 48d970dfac53cf9f6c38fc729202abff5ca095f8 | |
parent | ca187f3a652a0464e9b9b960a27e659150aec435 (diff) | |
download | FreeBSD-src-5e08d267b58f1da6c9bba7002210bc1e1a40880f.zip FreeBSD-src-5e08d267b58f1da6c9bba7002210bc1e1a40880f.tar.gz |
Make sure ARM_TP_ADDRESS is accessible right now by calling pmap_fault_fixup,
as we can't rely on a trap happening, as it is done normally.
While I'm there, uncomment the call to cpu_dcache_wbinv_range() in
pmap_kenter_internal, as we don't call cpu_dcache_wbinv_all() there anymore.
-rw-r--r-- | sys/arm/arm/pmap.c | 12 |
1 files changed, 9 insertions, 3 deletions
diff --git a/sys/arm/arm/pmap.c b/sys/arm/arm/pmap.c index 76489a1..beb2167 100644 --- a/sys/arm/arm/pmap.c +++ b/sys/arm/arm/pmap.c @@ -2392,7 +2392,8 @@ pmap_bootstrap(vm_offset_t firstaddr, vm_offset_t lastaddr, struct pv_addr *l1pt virtual_avail = firstaddr; kernel_pmap = &kernel_pmap_store; kernel_pmap->pm_l1 = l1; -/* + + /* * Scan the L1 translation table created by initarm() and create * the required metadata for all valid mappings found in it. */ @@ -2806,9 +2807,7 @@ pmap_kenter_internal(vm_offset_t va, vm_offset_t pa, int flags) PDEBUG(1, printf("pmap_kenter: pte = %08x, opte = %08x, npte = %08x\n", (uint32_t) pte, opte, *pte)); if (l2pte_valid(opte)) { -#if 0 cpu_dcache_wbinv_range(va, PAGE_SIZE); -#endif cpu_tlb_flushD_SE(va); cpu_cpwait(); } else { @@ -2833,7 +2832,14 @@ pmap_kenter(vm_offset_t va, vm_paddr_t pa) void pmap_kenter_user(vm_offset_t va, vm_paddr_t pa) { + pmap_kenter_internal(va, pa, KENTER_CACHE|KENTER_USER); + /* + * Call pmap_fault_fixup now, to make sure we'll have no exception + * at the first use of the new address, or bad things will happen, + * as we use one of these addresses in the exception handlers. + */ + pmap_fault_fixup(pmap_kernel(), va, VM_PROT_READ|VM_PROT_WRITE, 1); } /* |