16fc729afSOlivier Houchard /* $NetBSD: vmparam.h,v 1.26 2003/08/07 16:27:47 agc Exp $ */ 26fc729afSOlivier Houchard 3d8315c79SWarner Losh /*- 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 * max number of non-contig chunks of physical RAM you can have 526fc729afSOlivier Houchard */ 536fc729afSOlivier Houchard 546fc729afSOlivier Houchard #define VM_PHYSSEG_MAX 32 556fc729afSOlivier Houchard 566fc729afSOlivier Houchard /* 5704a18977SAlan Cox * The physical address space is densely populated. 5804a18977SAlan Cox */ 5904a18977SAlan Cox #define VM_PHYSSEG_DENSE 6004a18977SAlan Cox 6104a18977SAlan Cox /* 627bfda801SAlan Cox * Create three free page pools: VM_FREEPOOL_DEFAULT is the default pool 639211decaSAlan Cox * from which physical pages are allocated and VM_FREEPOOL_DIRECT is 649211decaSAlan Cox * the pool from which physical pages for small UMA objects are 659211decaSAlan Cox * allocated. 669211decaSAlan Cox */ 677bfda801SAlan Cox #define VM_NFREEPOOL 3 687bfda801SAlan Cox #define VM_FREEPOOL_CACHE 2 699211decaSAlan Cox #define VM_FREEPOOL_DEFAULT 0 709211decaSAlan Cox #define VM_FREEPOOL_DIRECT 1 719211decaSAlan Cox 729211decaSAlan Cox /* 736fc729afSOlivier Houchard * we support 2 free lists: 746fc729afSOlivier Houchard * 756fc729afSOlivier Houchard * - DEFAULT for all systems 766fc729afSOlivier Houchard * - ISADMA for the ISA DMA range on Sharks only 776fc729afSOlivier Houchard */ 786fc729afSOlivier Houchard 796fc729afSOlivier Houchard #define VM_NFREELIST 2 806fc729afSOlivier Houchard #define VM_FREELIST_DEFAULT 0 816fc729afSOlivier Houchard #define VM_FREELIST_ISADMA 1 826fc729afSOlivier Houchard 839211decaSAlan Cox /* 849211decaSAlan Cox * The largest allocation size is 1MB. 859211decaSAlan Cox */ 869211decaSAlan Cox #define VM_NFREEORDER 9 879211decaSAlan Cox 88b8e7fc24SAlan Cox /* 89a3870a18SJohn Baldwin * Only one memory domain. 90a3870a18SJohn Baldwin */ 91a3870a18SJohn Baldwin #ifndef VM_NDOMAIN 92a3870a18SJohn Baldwin #define VM_NDOMAIN 1 93a3870a18SJohn Baldwin #endif 94a3870a18SJohn Baldwin 95a3870a18SJohn Baldwin /* 96b8e7fc24SAlan Cox * Disable superpage reservations. 97b8e7fc24SAlan Cox */ 98b8e7fc24SAlan Cox #ifndef VM_NRESERVLEVEL 99b8e7fc24SAlan Cox #define VM_NRESERVLEVEL 0 100b8e7fc24SAlan Cox #endif 101b8e7fc24SAlan Cox 1026fc729afSOlivier Houchard #define UPT_MAX_ADDRESS VADDR(UPTPTDI + 3, 0) 1036fc729afSOlivier Houchard #define UPT_MIN_ADDRESS VADDR(UPTPTDI, 0) 1046fc729afSOlivier Houchard 1056fc729afSOlivier Houchard #define VM_MIN_ADDRESS (0x00001000) 10649953e11SOlivier Houchard #ifdef ARM_USE_SMALL_ALLOC 1077202abb6SOlivier Houchard /* 1087202abb6SOlivier Houchard * ARM_KERN_DIRECTMAP is used to make sure there's enough space between 1097202abb6SOlivier Houchard * VM_MAXUSER_ADDRESS and KERNBASE to map the whole memory. 1107202abb6SOlivier Houchard * It has to be a compile-time constant, even if arm_init_smallalloc(), 1117202abb6SOlivier Houchard * which will do the mapping, gets the real amount of memory at runtime, 1127202abb6SOlivier Houchard * because VM_MAXUSER_ADDRESS is a constant. 1137202abb6SOlivier Houchard */ 11449953e11SOlivier Houchard #ifndef ARM_KERN_DIRECTMAP 11549953e11SOlivier Houchard #define ARM_KERN_DIRECTMAP 512 * 1024 * 1024 /* 512 MB */ 11649953e11SOlivier Houchard #endif 11749953e11SOlivier Houchard #define VM_MAXUSER_ADDRESS KERNBASE - ARM_KERN_DIRECTMAP 11849953e11SOlivier Houchard #else /* ARM_USE_SMALL_ALLOC */ 1196fc729afSOlivier Houchard #define VM_MAXUSER_ADDRESS KERNBASE 12049953e11SOlivier Houchard #endif /* ARM_USE_SMALL_ALLOC */ 1216fc729afSOlivier Houchard #define VM_MAX_ADDRESS VM_MAXUSER_ADDRESS 1226fc729afSOlivier Houchard 1236fc729afSOlivier Houchard #define USRSTACK VM_MAXUSER_ADDRESS 1246fc729afSOlivier Houchard 1256fc729afSOlivier Houchard /* initial pagein size of beginning of executable file */ 1266fc729afSOlivier Houchard #ifndef VM_INITIAL_PAGEIN 1276fc729afSOlivier Houchard #define VM_INITIAL_PAGEIN 16 1286fc729afSOlivier Houchard #endif 1296fc729afSOlivier Houchard 1306fc729afSOlivier Houchard #ifndef VM_MIN_KERNEL_ADDRESS 1316fc729afSOlivier Houchard #define VM_MIN_KERNEL_ADDRESS KERNBASE 1326fc729afSOlivier Houchard #endif 1336fc729afSOlivier Houchard 1346fc729afSOlivier Houchard #define VM_MAX_KERNEL_ADDRESS 0xffffffff 1356fc729afSOlivier Houchard /* 1365b17d1f9SOlivier Houchard * Virtual size (bytes) for various kernel submaps. 1375b17d1f9SOlivier Houchard */ 1385b17d1f9SOlivier Houchard 1396fc729afSOlivier Houchard #ifndef VM_KMEM_SIZE 1406fc729afSOlivier Houchard #define VM_KMEM_SIZE (12*1024*1024) 1416fc729afSOlivier Houchard #endif 1426fc729afSOlivier Houchard 1436fc729afSOlivier Houchard #define MAXTSIZ (16*1024*1024) 1446fc729afSOlivier Houchard #define DFLDSIZ (128*1024*1024) 1456fc729afSOlivier Houchard #define MAXDSIZ (512*1024*1024) 1466fc729afSOlivier Houchard #define DFLSSIZ (2*1024*1024) 1476fc729afSOlivier Houchard #define MAXSSIZ (8*1024*1024) 1486fc729afSOlivier Houchard #define SGROWSIZ (128*1024) 1496fc729afSOlivier Houchard 15056e472e2SOlivier Houchard #ifdef ARM_USE_SMALL_ALLOC 15156e472e2SOlivier Houchard #define UMA_MD_SMALL_ALLOC 15256e472e2SOlivier Houchard #endif /* ARM_USE_SMALL_ALLOC */ 153*cfb00e5aSMatthew D Fleming 154*cfb00e5aSMatthew D Fleming #define ZERO_REGION_SIZE (64 * 1024) /* 64KB */ 155*cfb00e5aSMatthew D Fleming 1566fc729afSOlivier Houchard #endif /* _MACHINE_VMPARAM_H_ */ 157