diff options
author | jake <jake@FreeBSD.org> | 2002-06-25 15:13:09 +0000 |
---|---|---|
committer | jake <jake@FreeBSD.org> | 2002-06-25 15:13:09 +0000 |
commit | e17570ea7d6e727fc62d68f48173e24f2babbb46 (patch) | |
tree | 8367ba0cc3a7c5887d050f7f83b447515f26524a /sys | |
parent | 44b97afa345d1c7a7deafd8814fbc8fbacdfb1ad (diff) | |
download | FreeBSD-src-e17570ea7d6e727fc62d68f48173e24f2babbb46.zip FreeBSD-src-e17570ea7d6e727fc62d68f48173e24f2babbb46.tar.gz |
pmap_kremove can no longer be used to remove the magic device mappings
installed with pmap_kenter_flags, since the physical addresses may not
have an associated vm_page. Add a function to do this.
Tested by: Tomi Vainio <Tomi.Vainio@Sun.COM>
Diffstat (limited to 'sys')
-rw-r--r-- | sys/sparc64/include/pmap.h | 1 | ||||
-rw-r--r-- | sys/sparc64/sparc64/bus_machdep.c | 2 | ||||
-rw-r--r-- | sys/sparc64/sparc64/pmap.c | 14 |
3 files changed, 16 insertions, 1 deletions
diff --git a/sys/sparc64/include/pmap.h b/sys/sparc64/include/pmap.h index d347fc8..1a8803a 100644 --- a/sys/sparc64/include/pmap.h +++ b/sys/sparc64/include/pmap.h @@ -76,6 +76,7 @@ void pmap_bootstrap(vm_offset_t ekva); void pmap_context_rollover(void); vm_offset_t pmap_kextract(vm_offset_t va); void pmap_kenter_flags(vm_offset_t va, vm_offset_t pa, u_long flags); +void pmap_kremove_flags(vm_offset_t va); void pmap_qenter_flags(vm_offset_t va, vm_page_t *m, int count, u_long fl); int pmap_cache_enter(vm_page_t m, vm_offset_t va); diff --git a/sys/sparc64/sparc64/bus_machdep.c b/sys/sparc64/sparc64/bus_machdep.c index ab53c8a..897e04d 100644 --- a/sys/sparc64/sparc64/bus_machdep.c +++ b/sys/sparc64/sparc64/bus_machdep.c @@ -580,7 +580,7 @@ sparc64_bus_mem_unmap(void *bh, bus_size_t size) sva = trunc_page((vm_offset_t)bh); endva = sva + round_page(size); for (va = sva; va < endva; va += PAGE_SIZE) - pmap_kremove(va); + pmap_kremove_flags(va); tlb_range_demap(kernel_pmap, sva, sva + size - 1); kmem_free(kernel_map, sva, size); return (0); diff --git a/sys/sparc64/sparc64/pmap.c b/sys/sparc64/sparc64/pmap.c index 97f085e..6df4225 100644 --- a/sys/sparc64/sparc64/pmap.c +++ b/sys/sparc64/sparc64/pmap.c @@ -718,6 +718,20 @@ pmap_kremove(vm_offset_t va) } /* + * Inverse of pmap_kenter_flags, used by bus_space_unmap(). + */ +void +pmap_kremove_flags(vm_offset_t va) +{ + struct tte *tp; + + tp = tsb_kvtotte(va); + CTR3(KTR_PMAP, "pmap_kremove: va=%#lx tp=%p data=%#lx", va, tp, + tp->tte_data); + TTE_ZERO(tp); +} + +/* * Map a range of physical addresses into kernel virtual address space. * * The value passed in *virt is a suggested virtual address for the mapping. |