16fc729afSOlivier Houchard /* $NetBSD: vmparam.h,v 1.26 2003/08/07 16:27:47 agc Exp $ */ 26fc729afSOlivier Houchard 36fc729afSOlivier Houchard /* 46fc729afSOlivier Houchard * Copyright (c) 1988 The Regents of the University of California. 56fc729afSOlivier Houchard * All rights reserved. 66fc729afSOlivier Houchard * 76fc729afSOlivier Houchard * Redistribution and use in source and binary forms, with or without 86fc729afSOlivier Houchard * modification, are permitted provided that the following conditions 96fc729afSOlivier Houchard * are met: 106fc729afSOlivier Houchard * 1. Redistributions of source code must retain the above copyright 116fc729afSOlivier Houchard * notice, this list of conditions and the following disclaimer. 126fc729afSOlivier Houchard * 2. Redistributions in binary form must reproduce the above copyright 136fc729afSOlivier Houchard * notice, this list of conditions and the following disclaimer in the 146fc729afSOlivier Houchard * documentation and/or other materials provided with the distribution. 156fc729afSOlivier Houchard * 3. Neither the name of the University nor the names of its contributors 166fc729afSOlivier Houchard * may be used to endorse or promote products derived from this software 176fc729afSOlivier Houchard * without specific prior written permission. 186fc729afSOlivier Houchard * 196fc729afSOlivier Houchard * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND 206fc729afSOlivier Houchard * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 216fc729afSOlivier Houchard * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 226fc729afSOlivier Houchard * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE 236fc729afSOlivier Houchard * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 246fc729afSOlivier Houchard * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 256fc729afSOlivier Houchard * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 266fc729afSOlivier Houchard * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 276fc729afSOlivier Houchard * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 286fc729afSOlivier Houchard * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 296fc729afSOlivier Houchard * SUCH DAMAGE. 306fc729afSOlivier Houchard * 316fc729afSOlivier Houchard * $FreeBSD$ 326fc729afSOlivier Houchard */ 336fc729afSOlivier Houchard 346fc729afSOlivier Houchard #ifndef _MACHINE_VMPARAM_H_ 356fc729afSOlivier Houchard #define _MACHINE_VMPARAM_H_ 366fc729afSOlivier Houchard 376fc729afSOlivier Houchard 386fc729afSOlivier Houchard /*#include <arm/arm32/vmparam.h> 396fc729afSOlivier Houchard */ 406fc729afSOlivier Houchard /* 416fc729afSOlivier Houchard * Address space constants 426fc729afSOlivier Houchard */ 436fc729afSOlivier Houchard 446fc729afSOlivier Houchard /* 456fc729afSOlivier Houchard * The line between user space and kernel space 466fc729afSOlivier Houchard * Mappings >= KERNEL_BASE are constant across all processes 476fc729afSOlivier Houchard */ 486fc729afSOlivier Houchard #define KERNBASE 0xc0000000 496fc729afSOlivier Houchard 506fc729afSOlivier Houchard /* 516fc729afSOlivier Houchard * Override the default pager_map size, there's not enough KVA. 526fc729afSOlivier Houchard */ 536fc729afSOlivier Houchard /* 546fc729afSOlivier Houchard * Size of User Raw I/O map 556fc729afSOlivier Houchard */ 566fc729afSOlivier Houchard 576fc729afSOlivier Houchard #define USRIOSIZE 300 586fc729afSOlivier Houchard 596fc729afSOlivier Houchard /* virtual sizes (bytes) for various kernel submaps */ 606fc729afSOlivier Houchard 616fc729afSOlivier Houchard #define VM_PHYS_SIZE (USRIOSIZE*PAGE_SIZE) 626fc729afSOlivier Houchard 636fc729afSOlivier Houchard /* 646fc729afSOlivier Houchard * max number of non-contig chunks of physical RAM you can have 656fc729afSOlivier Houchard */ 666fc729afSOlivier Houchard 676fc729afSOlivier Houchard #define VM_PHYSSEG_MAX 32 686fc729afSOlivier Houchard 696fc729afSOlivier Houchard /* 706fc729afSOlivier Houchard * when converting a physical address to a vm_page structure, we 716fc729afSOlivier Houchard * want to use a binary search on the chunks of physical memory 726fc729afSOlivier Houchard * to find our RAM 736fc729afSOlivier Houchard */ 746fc729afSOlivier Houchard 756fc729afSOlivier Houchard #define VM_PHYSSEG_STRAT VM_PSTRAT_BSEARCH 766fc729afSOlivier Houchard 776fc729afSOlivier Houchard /* 786fc729afSOlivier Houchard * this indicates that we can't add RAM to the VM system after the 796fc729afSOlivier Houchard * vm system is init'd. 806fc729afSOlivier Houchard */ 816fc729afSOlivier Houchard 826fc729afSOlivier Houchard #define VM_PHYSSEG_NOADD 836fc729afSOlivier Houchard 846fc729afSOlivier Houchard /* 856fc729afSOlivier Houchard * we support 2 free lists: 866fc729afSOlivier Houchard * 876fc729afSOlivier Houchard * - DEFAULT for all systems 886fc729afSOlivier Houchard * - ISADMA for the ISA DMA range on Sharks only 896fc729afSOlivier Houchard */ 906fc729afSOlivier Houchard 916fc729afSOlivier Houchard #define VM_NFREELIST 2 926fc729afSOlivier Houchard #define VM_FREELIST_DEFAULT 0 936fc729afSOlivier Houchard #define VM_FREELIST_ISADMA 1 946fc729afSOlivier Houchard 956fc729afSOlivier Houchard #define UPT_MAX_ADDRESS VADDR(UPTPTDI + 3, 0) 966fc729afSOlivier Houchard #define UPT_MIN_ADDRESS VADDR(UPTPTDI, 0) 976fc729afSOlivier Houchard 986fc729afSOlivier Houchard #define VM_MIN_ADDRESS (0x00001000) 996fc729afSOlivier Houchard #define VM_MAXUSER_ADDRESS KERNBASE 1006fc729afSOlivier Houchard #define VM_MAX_ADDRESS VM_MAXUSER_ADDRESS 1016fc729afSOlivier Houchard 1026fc729afSOlivier Houchard #define USRSTACK VM_MAXUSER_ADDRESS 1036fc729afSOlivier Houchard 1046fc729afSOlivier Houchard /* initial pagein size of beginning of executable file */ 1056fc729afSOlivier Houchard #ifndef VM_INITIAL_PAGEIN 1066fc729afSOlivier Houchard #define VM_INITIAL_PAGEIN 16 1076fc729afSOlivier Houchard #endif 1086fc729afSOlivier Houchard 1096fc729afSOlivier Houchard #ifndef VM_MIN_KERNEL_ADDRESS 1106fc729afSOlivier Houchard #define VM_MIN_KERNEL_ADDRESS KERNBASE 1116fc729afSOlivier Houchard #endif 1126fc729afSOlivier Houchard 1136fc729afSOlivier Houchard #define VM_MAX_KERNEL_ADDRESS 0xffffffff 1146fc729afSOlivier Houchard /* 1156fc729afSOlivier Houchard * * Virtual size (bytes) for various kernel submaps. 1166fc729afSOlivier Houchard * */ 1176fc729afSOlivier Houchard #ifndef VM_KMEM_SIZE 1186fc729afSOlivier Houchard #define VM_KMEM_SIZE (12*1024*1024) 1196fc729afSOlivier Houchard #endif 1206fc729afSOlivier Houchard 1216fc729afSOlivier Houchard #define MAXTSIZ (16*1024*1024) 1226fc729afSOlivier Houchard #define DFLDSIZ (128*1024*1024) 1236fc729afSOlivier Houchard #define MAXDSIZ (512*1024*1024) 1246fc729afSOlivier Houchard #define DFLSSIZ (2*1024*1024) 1256fc729afSOlivier Houchard #define MAXSSIZ (8*1024*1024) 1266fc729afSOlivier Houchard #define SGROWSIZ (128*1024) 1276fc729afSOlivier Houchard #define MAXSLP 20 1286fc729afSOlivier Houchard 1296fc729afSOlivier Houchard #endif /* _MACHINE_VMPARAM_H_ */ 130