pmap.h revision 21673
1139825Simp/* 21541Srgrimes * Copyright (c) 1991, 1993 3174167Srwatson * The Regents of the University of California. All rights reserved. 4174167Srwatson * 5174167Srwatson * This code is derived from software contributed to Berkeley by 61541Srgrimes * The Mach Operating System project at Carnegie-Mellon University. 71541Srgrimes * 81541Srgrimes * Redistribution and use in source and binary forms, with or without 91541Srgrimes * modification, are permitted provided that the following conditions 101541Srgrimes * are met: 111541Srgrimes * 1. Redistributions of source code must retain the above copyright 121541Srgrimes * notice, this list of conditions and the following disclaimer. 131541Srgrimes * 2. Redistributions in binary form must reproduce the above copyright 141541Srgrimes * notice, this list of conditions and the following disclaimer in the 151541Srgrimes * documentation and/or other materials provided with the distribution. 161541Srgrimes * 3. All advertising materials mentioning features or use of this software 171541Srgrimes * must display the following acknowledgement: 181541Srgrimes * This product includes software developed by the University of 191541Srgrimes * California, Berkeley and its contributors. 201541Srgrimes * 4. Neither the name of the University nor the names of its contributors 211541Srgrimes * may be used to endorse or promote products derived from this software 221541Srgrimes * without specific prior written permission. 231541Srgrimes * 241541Srgrimes * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND 251541Srgrimes * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 261541Srgrimes * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 271541Srgrimes * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE 281541Srgrimes * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 291541Srgrimes * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 301541Srgrimes * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 311541Srgrimes * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 3250477Speter * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 331541Srgrimes * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 341541Srgrimes * SUCH DAMAGE. 352165Spaul * 362165Spaul * from: @(#)pmap.h 8.1 (Berkeley) 6/11/93 372165Spaul * 381541Srgrimes * 3955205Speter * Copyright (c) 1987, 1990 Carnegie-Mellon University. 401541Srgrimes * All rights reserved. 4118207Sbde * 421541Srgrimes * Author: Avadis Tevanian, Jr. 431541Srgrimes * 441541Srgrimes * Permission to use, copy, modify and distribute this software and 451541Srgrimes * its documentation is hereby granted, provided that both the copyright 4692047Sdd * notice and this permission notice appear in all copies of the 4781202Sjhb * software, derivative works or modified versions, and any portions 4876166Smarkm * thereof, and that both notices appear in supporting documentation. 4911913Sphk * 5012685Speter * CARNEGIE MELLON ALLOWS FREE USE OF THIS SOFTWARE IN ITS "AS IS" 5112685Speter * CONDITION. CARNEGIE MELLON DISCLAIMS ANY LIABILITY OF ANY KIND 5212685Speter * FOR ANY DAMAGES WHATSOEVER RESULTING FROM THE USE OF THIS SOFTWARE. 5312685Speter * 5455205Speter * Carnegie Mellon requests users of this software to return to 5534924Sbde * 561541Srgrimes * Software Distribution Coordinator or Software.Distribution@CS.CMU.EDU 5734924Sbde * School of Computer Science 5834924Sbde * Carnegie Mellon University 591541Srgrimes * Pittsburgh PA 15213-3890 6034924Sbde * 61174167Srwatson * any improvements or extensions that they make and grant Carnegie the 62174167Srwatson * rights to redistribute these changes. 63174167Srwatson * 641541Srgrimes * $FreeBSD: head/sys/vm/pmap.h 21673 1997-01-14 07:20:47Z jkh $ 651541Srgrimes */ 6669896Smckusick 6769896Smckusick/* 68147188Sgad * Machine address mapping definitions -- machine-independent 69147188Sgad * section. [For machine-dependent section, see "machine/pmap.h".] 70147188Sgad */ 71147188Sgad 72147188Sgad#ifndef _PMAP_VM_ 73147188Sgad#define _PMAP_VM_ 74147188Sgad 75147188Sgad/* 76130825Sgad * Each machine dependent implementation is expected to 77147188Sgad * keep certain statistics. They may do this anyway they 78147188Sgad * so choose, but are expected to return the statistics 79147188Sgad * in the following structure. 80147188Sgad */ 81147188Sgadstruct pmap_statistics { 82147188Sgad long resident_count; /* # of pages mapped (total) */ 83147188Sgad long wired_count; /* # of pages wired */ 84147188Sgad}; 8511865Sphktypedef struct pmap_statistics *pmap_statistics_t; 86193255Srwatson 87147188Sgad#include <machine/pmap.h> 88194498Sbrooks 89130825Sgad#ifdef KERNEL 90130825Sgadvoid pmap_change_wiring __P((pmap_t, vm_offset_t, boolean_t)); 91147188Sgadvoid pmap_clear_modify __P((vm_offset_t pa)); 9271040Smjacobvoid pmap_clear_reference __P((vm_offset_t pa)); 93130825Sgadvoid pmap_copy __P((pmap_t, pmap_t, vm_offset_t, vm_size_t, 94158581Scognet vm_offset_t)); 9577956Sbennovoid pmap_copy_page __P((vm_offset_t, vm_offset_t)); 96130825Sgadvoid pmap_destroy __P((pmap_t)); 97147188Sgadvoid pmap_enter __P((pmap_t, vm_offset_t, vm_offset_t, vm_prot_t, 9874022Sdfr boolean_t)); 99130825Sgadvm_offset_t pmap_extract __P((pmap_t, vm_offset_t)); 100147188Sgadvoid pmap_growkernel __P((vm_offset_t)); 101130825Sgadvoid pmap_init __P((vm_offset_t, vm_offset_t)); 102178660Sgonzoboolean_t pmap_is_modified __P((vm_offset_t pa)); 103178660Sgonzoboolean_t pmap_ts_referenced __P((vm_offset_t pa)); 104178660Sgonzovoid pmap_kenter __P((vm_offset_t, vm_offset_t)); 105130825Sgadvoid pmap_kremove __P((vm_offset_t)); 106147188Sgadvm_offset_t pmap_map __P((vm_offset_t, vm_offset_t, vm_offset_t, int)); 107130825Sgadvoid pmap_object_init_pt __P((pmap_t pmap, vm_offset_t addr, 108130825Sgad vm_object_t object, vm_pindex_t pindex, vm_offset_t size, 109147188Sgad int pagelimit)); 110130825Sgadboolean_t pmap_page_exists __P((pmap_t, vm_offset_t)); 111130825Sgadvoid pmap_page_protect __P((vm_offset_t, vm_prot_t)); 112130825Sgadvoid pmap_pageable __P((pmap_t, vm_offset_t, vm_offset_t, 113130825Sgad boolean_t)); 114130825Sgadvm_offset_t pmap_phys_address __P((int)); 11569896Smckusickvoid pmap_pinit __P((pmap_t)); 116104387Sjhbvoid pmap_protect __P((pmap_t, vm_offset_t, vm_offset_t, 117154535Sjulian vm_prot_t)); 11881759Spetervoid pmap_qenter __P((vm_offset_t, vm_page_t *, int)); 119130726Sgadvoid pmap_qremove __P((vm_offset_t, int)); 12081759Spetervoid pmap_reference __P((pmap_t)); 12169896Smckusickvoid pmap_release __P((pmap_t)); 12211865Sphkvoid pmap_remove __P((pmap_t, vm_offset_t, vm_offset_t)); 12369896Smckusickvoid pmap_remove_pages __P((pmap_t, vm_offset_t, vm_offset_t)); 12472415Sphkvoid pmap_zero_page __P((vm_offset_t)); 12569896Smckusickvoid pmap_prefault __P((pmap_t pmap, vm_offset_t addra, 12669896Smckusick vm_map_entry_t entry, vm_object_t object)); 12769896Smckusickint pmap_mincore __P((pmap_t pmap, vm_offset_t addr)); 12869896Smckusickvoid pmap_new_proc __P((struct proc *p)); 12969896Smckusickvoid pmap_dispose_proc __P((struct proc *p)); 13069896Smckusickvoid pmap_swapout_proc __P((struct proc *p)); 13169896Smckusickvoid pmap_swapin_proc __P((struct proc *p)); 13269896Smckusick 13369896Smckusick#endif /* KERNEL */ 13469896Smckusick 13569896Smckusick#endif /* _PMAP_VM_ */ 13669896Smckusick