pmap.h (302408) | pmap.h (305882) |
---|---|
1/*- 2 * Copyright (c) 1991 Regents of the University of California. 3 * All rights reserved. 4 * 5 * This code is derived from software contributed to Berkeley by 6 * the Systems Programming Group of the University of Utah Computer 7 * Science Department and William Jolitz of UUNET Technologies Inc. 8 * --- 16 unchanged lines hidden (view full) --- 25 * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 26 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 27 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 28 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 29 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 30 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 31 * SUCH DAMAGE. 32 * | 1/*- 2 * Copyright (c) 1991 Regents of the University of California. 3 * All rights reserved. 4 * 5 * This code is derived from software contributed to Berkeley by 6 * the Systems Programming Group of the University of Utah Computer 7 * Science Department and William Jolitz of UUNET Technologies Inc. 8 * --- 16 unchanged lines hidden (view full) --- 25 * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 26 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 27 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 28 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 29 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 30 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 31 * SUCH DAMAGE. 32 * |
33 * $FreeBSD: stable/11/sys/arm64/include/pmap.h 297446 2016-03-31 11:07:24Z andrew $ | 33 * $FreeBSD: stable/11/sys/arm64/include/pmap.h 305882 2016-09-16 12:36:11Z andrew $ |
34 */ 35 36#ifndef _MACHINE_PMAP_H_ 37#define _MACHINE_PMAP_H_ 38 39#include <machine/pte.h> 40 41#ifndef LOCORE 42 43#include <sys/queue.h> 44#include <sys/_lock.h> 45#include <sys/_mutex.h> 46 | 34 */ 35 36#ifndef _MACHINE_PMAP_H_ 37#define _MACHINE_PMAP_H_ 38 39#include <machine/pte.h> 40 41#ifndef LOCORE 42 43#include <sys/queue.h> 44#include <sys/_lock.h> 45#include <sys/_mutex.h> 46 |
47#include <vm/_vm_radix.h> 48 |
|
47#ifdef _KERNEL 48 49#define vtophys(va) pmap_kextract((vm_offset_t)(va)) 50 51#endif 52 53#define pmap_page_get_memattr(m) ((m)->md.pv_memattr) 54#define pmap_page_is_write_mapped(m) (((m)->aflags & PGA_WRITEABLE) != 0) --- 20 unchanged lines hidden (view full) --- 75}; 76 77 78struct pmap { 79 struct mtx pm_mtx; 80 struct pmap_statistics pm_stats; /* pmap statictics */ 81 pd_entry_t *pm_l0; 82 TAILQ_HEAD(,pv_chunk) pm_pvchunk; /* list of mappings in pmap */ | 49#ifdef _KERNEL 50 51#define vtophys(va) pmap_kextract((vm_offset_t)(va)) 52 53#endif 54 55#define pmap_page_get_memattr(m) ((m)->md.pv_memattr) 56#define pmap_page_is_write_mapped(m) (((m)->aflags & PGA_WRITEABLE) != 0) --- 20 unchanged lines hidden (view full) --- 77}; 78 79 80struct pmap { 81 struct mtx pm_mtx; 82 struct pmap_statistics pm_stats; /* pmap statictics */ 83 pd_entry_t *pm_l0; 84 TAILQ_HEAD(,pv_chunk) pm_pvchunk; /* list of mappings in pmap */ |
85 struct vm_radix pm_root; /* spare page table pages */ |
|
83}; 84 85typedef struct pv_entry { 86 vm_offset_t pv_va; /* virtual address for mapping */ 87 TAILQ_ENTRY(pv_entry) pv_next; 88} *pv_entry_t; 89 90/* --- 55 unchanged lines hidden (view full) --- 146void pmap_unmapbios(vm_offset_t, vm_size_t); 147 148boolean_t pmap_map_io_transient(vm_page_t *, vm_offset_t *, int, boolean_t); 149void pmap_unmap_io_transient(vm_page_t *, vm_offset_t *, int, boolean_t); 150 151bool pmap_get_tables(pmap_t, vm_offset_t, pd_entry_t **, pd_entry_t **, 152 pd_entry_t **, pt_entry_t **); 153 | 86}; 87 88typedef struct pv_entry { 89 vm_offset_t pv_va; /* virtual address for mapping */ 90 TAILQ_ENTRY(pv_entry) pv_next; 91} *pv_entry_t; 92 93/* --- 55 unchanged lines hidden (view full) --- 149void pmap_unmapbios(vm_offset_t, vm_size_t); 150 151boolean_t pmap_map_io_transient(vm_page_t *, vm_offset_t *, int, boolean_t); 152void pmap_unmap_io_transient(vm_page_t *, vm_offset_t *, int, boolean_t); 153 154bool pmap_get_tables(pmap_t, vm_offset_t, pd_entry_t **, pd_entry_t **, 155 pd_entry_t **, pt_entry_t **); 156 |
157int pmap_fault(pmap_t, uint64_t, uint64_t); 158 |
|
154#define pmap_page_is_mapped(m) (!TAILQ_EMPTY(&(m)->md.pv_list)) 155 156#endif /* _KERNEL */ 157 158#endif /* !LOCORE */ 159 160#endif /* !_MACHINE_PMAP_H_ */ | 159#define pmap_page_is_mapped(m) (!TAILQ_EMPTY(&(m)->md.pv_list)) 160 161#endif /* _KERNEL */ 162 163#endif /* !LOCORE */ 164 165#endif /* !_MACHINE_PMAP_H_ */ |