vmparam.h revision 133011
1250661Sdavidcs/* $NetBSD: vmparam.h,v 1.26 2003/08/07 16:27:47 agc Exp $ */ 2284982Sdavidcs 3250661Sdavidcs/* 4250661Sdavidcs * Copyright (c) 1988 The Regents of the University of California. 5250661Sdavidcs * All rights reserved. 6250661Sdavidcs * 7250661Sdavidcs * Redistribution and use in source and binary forms, with or without 8250661Sdavidcs * modification, are permitted provided that the following conditions 9250661Sdavidcs * are met: 10250661Sdavidcs * 1. Redistributions of source code must retain the above copyright 11250661Sdavidcs * notice, this list of conditions and the following disclaimer. 12250661Sdavidcs * 2. Redistributions in binary form must reproduce the above copyright 13250661Sdavidcs * notice, this list of conditions and the following disclaimer in the 14250661Sdavidcs * documentation and/or other materials provided with the distribution. 15250661Sdavidcs * 3. Neither the name of the University nor the names of its contributors 16250661Sdavidcs * may be used to endorse or promote products derived from this software 17250661Sdavidcs * without specific prior written permission. 18250661Sdavidcs * 19250661Sdavidcs * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND 20250661Sdavidcs * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 21250661Sdavidcs * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 22250661Sdavidcs * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE 23250661Sdavidcs * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 24250661Sdavidcs * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 25250661Sdavidcs * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 26250661Sdavidcs * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 27250661Sdavidcs * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 28250661Sdavidcs * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 29250661Sdavidcs * SUCH DAMAGE. 30250661Sdavidcs * 31250661Sdavidcs * $FreeBSD: head/sys/arm/include/vmparam.h 133011 2004-08-02 12:23:53Z cognet $ 32250661Sdavidcs */ 33250661Sdavidcs 34250661Sdavidcs#ifndef _MACHINE_VMPARAM_H_ 35250661Sdavidcs#define _MACHINE_VMPARAM_H_ 36250661Sdavidcs 37250661Sdavidcs 38250661Sdavidcs/*#include <arm/arm32/vmparam.h> 39250661Sdavidcs*/ 40250661Sdavidcs/* 41250661Sdavidcs * Address space constants 42250661Sdavidcs */ 43250661Sdavidcs 44250661Sdavidcs/* 45250661Sdavidcs * The line between user space and kernel space 46250661Sdavidcs * Mappings >= KERNEL_BASE are constant across all processes 47250661Sdavidcs */ 48250661Sdavidcs#define KERNBASE 0xc0000000 49250661Sdavidcs 50250661Sdavidcs/* 51250661Sdavidcs * Override the default pager_map size, there's not enough KVA. 52250661Sdavidcs */ 53250661Sdavidcs/* 54250661Sdavidcs * Size of User Raw I/O map 55250661Sdavidcs */ 56250661Sdavidcs 57250661Sdavidcs#define USRIOSIZE 300 58250661Sdavidcs 59250661Sdavidcs/* virtual sizes (bytes) for various kernel submaps */ 60250661Sdavidcs 61250661Sdavidcs#define VM_PHYS_SIZE (USRIOSIZE*PAGE_SIZE) 62250661Sdavidcs 63250661Sdavidcs/* 64250661Sdavidcs * max number of non-contig chunks of physical RAM you can have 65250661Sdavidcs */ 66250661Sdavidcs 67250661Sdavidcs#define VM_PHYSSEG_MAX 32 68250661Sdavidcs 69250661Sdavidcs/* 70250661Sdavidcs * when converting a physical address to a vm_page structure, we 71250661Sdavidcs * want to use a binary search on the chunks of physical memory 72250661Sdavidcs * to find our RAM 73250661Sdavidcs */ 74250661Sdavidcs 75250661Sdavidcs#define VM_PHYSSEG_STRAT VM_PSTRAT_BSEARCH 76250661Sdavidcs 77250661Sdavidcs/* 78250661Sdavidcs * this indicates that we can't add RAM to the VM system after the 79250661Sdavidcs * vm system is init'd. 80250661Sdavidcs */ 81250661Sdavidcs 82250661Sdavidcs#define VM_PHYSSEG_NOADD 83250661Sdavidcs 84250661Sdavidcs/* 85250661Sdavidcs * we support 2 free lists: 86250661Sdavidcs * 87250661Sdavidcs * - DEFAULT for all systems 88250661Sdavidcs * - ISADMA for the ISA DMA range on Sharks only 89250661Sdavidcs */ 90250661Sdavidcs 91250661Sdavidcs#define VM_NFREELIST 2 92250661Sdavidcs#define VM_FREELIST_DEFAULT 0 93250661Sdavidcs#define VM_FREELIST_ISADMA 1 94250661Sdavidcs 95250661Sdavidcs#define UPT_MAX_ADDRESS VADDR(UPTPTDI + 3, 0) 96250661Sdavidcs#define UPT_MIN_ADDRESS VADDR(UPTPTDI, 0) 97250661Sdavidcs 98250661Sdavidcs#define VM_MIN_ADDRESS (0x00001000) 99250661Sdavidcs#define VM_MAXUSER_ADDRESS KERNBASE 100250661Sdavidcs#define VM_MAX_ADDRESS VM_MAXUSER_ADDRESS 101250661Sdavidcs 102250661Sdavidcs#define USRSTACK VM_MAXUSER_ADDRESS 103250661Sdavidcs 104250661Sdavidcs/* initial pagein size of beginning of executable file */ 105250661Sdavidcs#ifndef VM_INITIAL_PAGEIN 106250661Sdavidcs#define VM_INITIAL_PAGEIN 16 107250661Sdavidcs#endif 108250661Sdavidcs 109250661Sdavidcs#ifndef VM_MIN_KERNEL_ADDRESS 110250661Sdavidcs#define VM_MIN_KERNEL_ADDRESS KERNBASE 111250661Sdavidcs#endif 112250661Sdavidcs 113250661Sdavidcs#define VM_MAX_KERNEL_ADDRESS 0xffffffff 114250661Sdavidcs/* 115250661Sdavidcs * Virtual size (bytes) for various kernel submaps. 116250661Sdavidcs */ 117250661Sdavidcs 118250661Sdavidcs#ifndef VM_KMEM_SIZE 119250661Sdavidcs#define VM_KMEM_SIZE (12*1024*1024) 120250661Sdavidcs#endif 121250661Sdavidcs 122250661Sdavidcs#define MAXTSIZ (16*1024*1024) 123250661Sdavidcs#define DFLDSIZ (128*1024*1024) 124250661Sdavidcs#define MAXDSIZ (512*1024*1024) 125250661Sdavidcs#define DFLSSIZ (2*1024*1024) 126250661Sdavidcs#define MAXSSIZ (8*1024*1024) 127250661Sdavidcs#define SGROWSIZ (128*1024) 128250661Sdavidcs#define MAXSLP 20 129250661Sdavidcs 130250661Sdavidcs#endif /* _MACHINE_VMPARAM_H_ */ 131250661Sdavidcs