1*5de1d0f0Smiod /* $OpenBSD: uvm_param.h,v 1.18 2015/02/07 08:21:24 miod Exp $ */ 21414b0faSart /* $NetBSD: uvm_param.h,v 1.5 2001/03/09 01:02:12 chs Exp $ */ 3b3bcc5cbSart 4b3bcc5cbSart /* 5b3bcc5cbSart * Copyright (c) 1991, 1993 6b3bcc5cbSart * The Regents of the University of California. All rights reserved. 7b3bcc5cbSart * 8b3bcc5cbSart * This code is derived from software contributed to Berkeley by 9b3bcc5cbSart * The Mach Operating System project at Carnegie-Mellon University. 10b3bcc5cbSart * 11b3bcc5cbSart * Redistribution and use in source and binary forms, with or without 12b3bcc5cbSart * modification, are permitted provided that the following conditions 13b3bcc5cbSart * are met: 14b3bcc5cbSart * 1. Redistributions of source code must retain the above copyright 15b3bcc5cbSart * notice, this list of conditions and the following disclaimer. 16b3bcc5cbSart * 2. Redistributions in binary form must reproduce the above copyright 17b3bcc5cbSart * notice, this list of conditions and the following disclaimer in the 18b3bcc5cbSart * documentation and/or other materials provided with the distribution. 1929295d1cSmillert * 3. Neither the name of the University nor the names of its contributors 20b3bcc5cbSart * may be used to endorse or promote products derived from this software 21b3bcc5cbSart * without specific prior written permission. 22b3bcc5cbSart * 23b3bcc5cbSart * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND 24b3bcc5cbSart * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 25b3bcc5cbSart * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 26b3bcc5cbSart * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE 27b3bcc5cbSart * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 28b3bcc5cbSart * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 29b3bcc5cbSart * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 30b3bcc5cbSart * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 31b3bcc5cbSart * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 32b3bcc5cbSart * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 33b3bcc5cbSart * SUCH DAMAGE. 34b3bcc5cbSart * 35b3bcc5cbSart * @(#)vm_param.h 8.2 (Berkeley) 1/9/95 36b3bcc5cbSart * 37b3bcc5cbSart * 38b3bcc5cbSart * Copyright (c) 1987, 1990 Carnegie-Mellon University. 39b3bcc5cbSart * All rights reserved. 40b3bcc5cbSart * 41b3bcc5cbSart * Authors: Avadis Tevanian, Jr., Michael Wayne Young 42b3bcc5cbSart * 43b3bcc5cbSart * Permission to use, copy, modify and distribute this software and 44b3bcc5cbSart * its documentation is hereby granted, provided that both the copyright 45b3bcc5cbSart * notice and this permission notice appear in all copies of the 46b3bcc5cbSart * software, derivative works or modified versions, and any portions 47b3bcc5cbSart * thereof, and that both notices appear in supporting documentation. 48b3bcc5cbSart * 49b3bcc5cbSart * CARNEGIE MELLON ALLOWS FREE USE OF THIS SOFTWARE IN ITS "AS IS" 50b3bcc5cbSart * CONDITION. CARNEGIE MELLON DISCLAIMS ANY LIABILITY OF ANY KIND 51b3bcc5cbSart * FOR ANY DAMAGES WHATSOEVER RESULTING FROM THE USE OF THIS SOFTWARE. 52b3bcc5cbSart * 53b3bcc5cbSart * Carnegie Mellon requests users of this software to return to 54b3bcc5cbSart * 55b3bcc5cbSart * Software Distribution Coordinator or Software.Distribution@CS.CMU.EDU 56b3bcc5cbSart * School of Computer Science 57b3bcc5cbSart * Carnegie Mellon University 58b3bcc5cbSart * Pittsburgh PA 15213-3890 59b3bcc5cbSart * 60b3bcc5cbSart * any improvements or extensions that they make and grant Carnegie the 61b3bcc5cbSart * rights to redistribute these changes. 62b3bcc5cbSart */ 63b3bcc5cbSart 64b3bcc5cbSart /* 65b3bcc5cbSart * Machine independent virtual memory parameters. 66b3bcc5cbSart */ 67b3bcc5cbSart 68b3bcc5cbSart #ifndef _VM_PARAM_ 69b3bcc5cbSart #define _VM_PARAM_ 70b3bcc5cbSart 71e6c6495dSderaadt #ifdef _KERNEL 72e6c6495dSderaadt 73b3bcc5cbSart #include <machine/vmparam.h> 74b3bcc5cbSart 75b3bcc5cbSart typedef int boolean_t; 76b3bcc5cbSart #define TRUE 1 77b3bcc5cbSart #define FALSE 0 78b3bcc5cbSart 79b3bcc5cbSart #define DEFAULT_PAGE_SIZE 4096 80b3bcc5cbSart 8117a34a4cSmickey #define atop(x) ((x) >> PAGE_SHIFT) 82db039a03Skettenis #define ptoa(x) ((paddr_t)(x) << PAGE_SHIFT) 83b3bcc5cbSart #define round_page(x) (((x) + PAGE_MASK) & ~PAGE_MASK) 84b3bcc5cbSart #define trunc_page(x) ((x) & ~PAGE_MASK) 85b3bcc5cbSart 86*5de1d0f0Smiod #if !defined(VM_KERNEL_SPACE_SIZE) 87*5de1d0f0Smiod #define VM_KERNEL_SPACE_SIZE (VM_MAX_KERNEL_ADDRESS - VM_MIN_KERNEL_ADDRESS) 88*5de1d0f0Smiod #endif 89*5de1d0f0Smiod 90b3bcc5cbSart #endif /* _KERNEL */ 91b3bcc5cbSart #endif /* _VM_PARAM_ */ 92