version 1.55, 2013/10/17 20:59:16 |
version 1.55.6.2, 2015/12/27 12:09:45 |
|
|
|
|
#if defined(_KERNEL) |
#if defined(_KERNEL) |
#include <sys/kcpuset.h> |
#include <sys/kcpuset.h> |
|
#include <uvm/pmap/pmap_pvt.h> |
|
|
/* |
/* |
* pmap data structures: see pmap.c for details of locking. |
* pmap data structures: see pmap.c for details of locking. |
Line 243 extern long nkptp[PTP_LEVELS]; |
|
Line 244 extern long nkptp[PTP_LEVELS]; |
|
void pmap_activate(struct lwp *); |
void pmap_activate(struct lwp *); |
void pmap_bootstrap(vaddr_t); |
void pmap_bootstrap(vaddr_t); |
bool pmap_clear_attrs(struct vm_page *, unsigned); |
bool pmap_clear_attrs(struct vm_page *, unsigned); |
|
bool pmap_pv_clear_attrs(paddr_t, unsigned); |
void pmap_deactivate(struct lwp *); |
void pmap_deactivate(struct lwp *); |
void pmap_page_remove (struct vm_page *); |
void pmap_page_remove(struct vm_page *); |
|
void pmap_pv_remove(paddr_t); |
void pmap_remove(struct pmap *, vaddr_t, vaddr_t); |
void pmap_remove(struct pmap *, vaddr_t, vaddr_t); |
bool pmap_test_attrs(struct vm_page *, unsigned); |
bool pmap_test_attrs(struct vm_page *, unsigned); |
void pmap_write_protect(struct pmap *, vaddr_t, vaddr_t, vm_prot_t); |
void pmap_write_protect(struct pmap *, vaddr_t, vaddr_t, vm_prot_t); |
Line 258 void pmap_emap_enter(vaddr_t, paddr_t, |
|
Line 261 void pmap_emap_enter(vaddr_t, paddr_t, |
|
void pmap_emap_remove(vaddr_t, vsize_t); |
void pmap_emap_remove(vaddr_t, vsize_t); |
void pmap_emap_sync(bool); |
void pmap_emap_sync(bool); |
|
|
|
#define __HAVE_PMAP_PV_TRACK 1 |
|
void pmap_pv_init(void); |
|
void pmap_pv_track(paddr_t, psize_t); |
|
void pmap_pv_untrack(paddr_t, psize_t); |
|
|
void pmap_map_ptes(struct pmap *, struct pmap **, pd_entry_t **, |
void pmap_map_ptes(struct pmap *, struct pmap **, pd_entry_t **, |
pd_entry_t * const **); |
pd_entry_t * const **); |
void pmap_unmap_ptes(struct pmap *, struct pmap *); |
void pmap_unmap_ptes(struct pmap *, struct pmap *); |
Line 359 pmap_page_protect(struct vm_page *pg, vm |
|
Line 367 pmap_page_protect(struct vm_page *pg, vm |
|
} |
} |
|
|
/* |
/* |
|
* pmap_pv_protect: change the protection of all recorded mappings |
|
* of an unmanaged page |
|
*/ |
|
|
|
__inline static void __unused |
|
pmap_pv_protect(paddr_t pa, vm_prot_t prot) |
|
{ |
|
if ((prot & VM_PROT_WRITE) == 0) { |
|
if (prot & (VM_PROT_READ|VM_PROT_EXECUTE)) { |
|
(void) pmap_pv_clear_attrs(pa, PG_RW); |
|
} else { |
|
pmap_pv_remove(pa); |
|
} |
|
} |
|
} |
|
|
|
/* |
* pmap_protect: change the protection of pages in a pmap |
* pmap_protect: change the protection of pages in a pmap |
* |
* |
* => this function is a frontend for pmap_remove/pmap_write_protect |
* => this function is a frontend for pmap_remove/pmap_write_protect |