vmparam.h revision 170277
1129198Scognet/* $NetBSD: vmparam.h,v 1.26 2003/08/07 16:27:47 agc Exp $ */ 2129198Scognet 3139735Simp/*- 4129198Scognet * Copyright (c) 1988 The Regents of the University of California. 5129198Scognet * All rights reserved. 6129198Scognet * 7129198Scognet * Redistribution and use in source and binary forms, with or without 8129198Scognet * modification, are permitted provided that the following conditions 9129198Scognet * are met: 10129198Scognet * 1. Redistributions of source code must retain the above copyright 11129198Scognet * notice, this list of conditions and the following disclaimer. 12129198Scognet * 2. Redistributions in binary form must reproduce the above copyright 13129198Scognet * notice, this list of conditions and the following disclaimer in the 14129198Scognet * documentation and/or other materials provided with the distribution. 15129198Scognet * 3. Neither the name of the University nor the names of its contributors 16129198Scognet * may be used to endorse or promote products derived from this software 17129198Scognet * without specific prior written permission. 18129198Scognet * 19129198Scognet * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND 20129198Scognet * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 21129198Scognet * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 22129198Scognet * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE 23129198Scognet * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 24129198Scognet * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 25129198Scognet * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 26129198Scognet * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 27129198Scognet * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 28129198Scognet * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 29129198Scognet * SUCH DAMAGE. 30129198Scognet * 31129198Scognet * $FreeBSD: head/sys/arm/include/vmparam.h 170277 2007-06-04 08:02:22Z alc $ 32129198Scognet */ 33129198Scognet 34129198Scognet#ifndef _MACHINE_VMPARAM_H_ 35129198Scognet#define _MACHINE_VMPARAM_H_ 36129198Scognet 37129198Scognet 38129198Scognet/*#include <arm/arm32/vmparam.h> 39129198Scognet*/ 40129198Scognet/* 41129198Scognet * Address space constants 42129198Scognet */ 43129198Scognet 44129198Scognet/* 45129198Scognet * The line between user space and kernel space 46129198Scognet * Mappings >= KERNEL_BASE are constant across all processes 47129198Scognet */ 48129198Scognet#define KERNBASE 0xc0000000 49129198Scognet 50129198Scognet/* 51129198Scognet * max number of non-contig chunks of physical RAM you can have 52129198Scognet */ 53129198Scognet 54129198Scognet#define VM_PHYSSEG_MAX 32 55129198Scognet 56129198Scognet/* 57169291Salc * The physical address space is densely populated. 58169291Salc */ 59169291Salc#define VM_PHYSSEG_DENSE 60169291Salc 61169291Salc/* 62170277Salc * Create two free page pools: VM_FREEPOOL_DEFAULT is the default pool 63170277Salc * from which physical pages are allocated and VM_FREEPOOL_DIRECT is 64170277Salc * the pool from which physical pages for small UMA objects are 65170277Salc * allocated. 66170277Salc */ 67170277Salc#define VM_NFREEPOOL 2 68170277Salc#define VM_FREEPOOL_DEFAULT 0 69170277Salc#define VM_FREEPOOL_DIRECT 1 70170277Salc 71170277Salc/* 72129198Scognet * we support 2 free lists: 73129198Scognet * 74129198Scognet * - DEFAULT for all systems 75129198Scognet * - ISADMA for the ISA DMA range on Sharks only 76129198Scognet */ 77129198Scognet 78129198Scognet#define VM_NFREELIST 2 79129198Scognet#define VM_FREELIST_DEFAULT 0 80129198Scognet#define VM_FREELIST_ISADMA 1 81129198Scognet 82170277Salc/* 83170277Salc * The largest allocation size is 1MB. 84170277Salc */ 85170277Salc#define VM_NFREEORDER 9 86170277Salc 87129198Scognet#define UPT_MAX_ADDRESS VADDR(UPTPTDI + 3, 0) 88129198Scognet#define UPT_MIN_ADDRESS VADDR(UPTPTDI, 0) 89129198Scognet 90129198Scognet#define VM_MIN_ADDRESS (0x00001000) 91161105Scognet#ifdef ARM_USE_SMALL_ALLOC 92161105Scognet#ifndef ARM_KERN_DIRECTMAP 93161105Scognet#define ARM_KERN_DIRECTMAP 512 * 1024 * 1024 /* 512 MB */ 94161105Scognet#endif 95161105Scognet#define VM_MAXUSER_ADDRESS KERNBASE - ARM_KERN_DIRECTMAP 96161105Scognet#else /* ARM_USE_SMALL_ALLOC */ 97129198Scognet#define VM_MAXUSER_ADDRESS KERNBASE 98161105Scognet#endif /* ARM_USE_SMALL_ALLOC */ 99129198Scognet#define VM_MAX_ADDRESS VM_MAXUSER_ADDRESS 100129198Scognet 101129198Scognet#define USRSTACK VM_MAXUSER_ADDRESS 102129198Scognet 103129198Scognet/* initial pagein size of beginning of executable file */ 104129198Scognet#ifndef VM_INITIAL_PAGEIN 105129198Scognet#define VM_INITIAL_PAGEIN 16 106129198Scognet#endif 107129198Scognet 108129198Scognet#ifndef VM_MIN_KERNEL_ADDRESS 109129198Scognet#define VM_MIN_KERNEL_ADDRESS KERNBASE 110129198Scognet#endif 111129198Scognet 112129198Scognet#define VM_MAX_KERNEL_ADDRESS 0xffffffff 113129198Scognet/* 114133011Scognet * Virtual size (bytes) for various kernel submaps. 115133011Scognet */ 116133011Scognet 117129198Scognet#ifndef VM_KMEM_SIZE 118129198Scognet#define VM_KMEM_SIZE (12*1024*1024) 119129198Scognet#endif 120129198Scognet 121129198Scognet#define MAXTSIZ (16*1024*1024) 122129198Scognet#define DFLDSIZ (128*1024*1024) 123129198Scognet#define MAXDSIZ (512*1024*1024) 124129198Scognet#define DFLSSIZ (2*1024*1024) 125129198Scognet#define MAXSSIZ (8*1024*1024) 126129198Scognet#define SGROWSIZ (128*1024) 127129198Scognet#define MAXSLP 20 128129198Scognet 129135662Scognet#define VM_PROT_READ_IS_EXEC 130147114Scognet 131147114Scognet#ifdef ARM_USE_SMALL_ALLOC 132147114Scognet#define UMA_MD_SMALL_ALLOC 133147114Scognet#endif /* ARM_USE_SMALL_ALLOC */ 134129198Scognet#endif /* _MACHINE_VMPARAM_H_ */ 135