diff options
Diffstat (limited to 'sys/arch/amd64/include/pmap.h')
-rw-r--r-- | sys/arch/amd64/include/pmap.h | 43 |
1 files changed, 8 insertions, 35 deletions
diff --git a/sys/arch/amd64/include/pmap.h b/sys/arch/amd64/include/pmap.h index fc40806932b..eeb26c3fdbd 100644 --- a/sys/arch/amd64/include/pmap.h +++ b/sys/arch/amd64/include/pmap.h @@ -1,4 +1,4 @@ -/* $OpenBSD: pmap.h,v 1.5 2004/08/06 22:39:12 deraadt Exp $ */ +/* $OpenBSD: pmap.h,v 1.6 2005/05/27 19:32:39 art Exp $ */ /* $NetBSD: pmap.h,v 1.1 2003/04/26 18:39:46 fvdl Exp $ */ /* @@ -350,36 +350,6 @@ struct pv_entry { /* locked by its list's pvh_lock */ }; /* - * pv_entrys are dynamically allocated in chunks from a single page. - * we keep track of how many pv_entrys are in use for each page and - * we can free pv_entry pages if needed. there is one lock for the - * entire allocation system. - */ - -struct pv_page_info { - TAILQ_ENTRY(pv_page) pvpi_list; - struct pv_entry *pvpi_pvfree; - int pvpi_nfree; -}; - -/* - * number of pv_entry's in a pv_page - * (note: won't work on systems where NPBG isn't a constant) - */ - -#define PVE_PER_PVPAGE ((PAGE_SIZE - sizeof(struct pv_page_info)) / \ - sizeof(struct pv_entry)) - -/* - * a pv_page: where pv_entrys are allocated from - */ - -struct pv_page { - struct pv_page_info pvinfo; - struct pv_entry pvents[PVE_PER_PVPAGE]; -}; - -/* * pmap_remove_record: a record of VAs that have been unmapped, used to * flush TLB. if we have more than PMAP_RR_MAX then we stop recording. */ @@ -452,6 +422,8 @@ void pmap_tlb_shootnow(int32_t); void pmap_do_tlb_shootdown(struct cpu_info *); void pmap_prealloc_lowmem_ptps(void); +void pagezero(vaddr_t); + #define PMAP_GROWKERNEL /* turn on pmap_growkernel interface */ /* @@ -596,10 +568,11 @@ void pmap_ldt_cleanup(struct proc *); */ /* #define POOL_VTOPHYS(va) vtophys((vaddr_t) (va)) */ -#define pmap_map_direct(pg) \ - ((vaddr_t)PMAP_DIRECT_BASE + VM_PAGE_TO_PHYS(pg)) -#define pmap_unmap_direct(va) \ - PHYS_TO_VM_PAGE(va - PMAP_DIRECT_BASE) +#define PMAP_DIRECT_MAP(pa) ((vaddr_t)PMAP_DIRECT_BASE + pa) +#define PMAP_DIRECT_UNMAP(va) ((paddr_t)va - PMAP_DIRECT_BASE) + +#define pmap_map_direct(pg) PMAP_DIRECT_MAP(VM_PAGE_TO_PHYS(pg)) +#define pmap_unmap_direct(va) PHYS_TO_VM_PAGE(PMAP_DIRECT_UNMAP(va)) #define __HAVE_PMAP_DIRECT |