1 /* $OpenBSD: vmparam.h,v 1.10 2014/01/30 18:16:41 miod Exp $ */ 2 /* $NetBSD: vmparam.h,v 1.17 2006/03/04 01:55:03 uwe Exp $ */ 3 4 /*- 5 * Copyright (c) 2002 The NetBSD Foundation, Inc. 6 * All rights reserved. 7 * 8 * This code is derived from software contributed to The NetBSD Foundation 9 * by UCHIYAMA Yasushi. 10 * 11 * Redistribution and use in source and binary forms, with or without 12 * modification, are permitted provided that the following conditions 13 * are met: 14 * 1. Redistributions of source code must retain the above copyright 15 * notice, this list of conditions and the following disclaimer. 16 * 2. Redistributions in binary form must reproduce the above copyright 17 * notice, this list of conditions and the following disclaimer in the 18 * documentation and/or other materials provided with the distribution. 19 * 20 * THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS 21 * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED 22 * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR 23 * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS 24 * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR 25 * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF 26 * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS 27 * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN 28 * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 29 * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE 30 * POSSIBILITY OF SUCH DAMAGE. 31 */ 32 33 #ifndef _SH_VMPARAM_H_ 34 #define _SH_VMPARAM_H_ 35 #include <sys/queue.h> 36 37 /* Virtual address map. */ 38 #define VM_MIN_ADDRESS ((vaddr_t)PAGE_SIZE) 39 #define VM_MAXUSER_ADDRESS ((vaddr_t)0x7ffff000) 40 #define VM_MAX_ADDRESS ((vaddr_t)0x7ffff000) 41 #define VM_MIN_KERNEL_ADDRESS ((vaddr_t)0xc0000000) 42 #define VM_MAX_KERNEL_ADDRESS ((vaddr_t)0xe0000000) 43 44 /* map PIE below 4MB (non-pie link address) to avoid mmap pressure */ 45 #define VM_PIE_MIN_ADDR PAGE_SIZE 46 #define VM_PIE_MAX_ADDR 0x400000UL 47 48 /* top of stack */ 49 #define USRSTACK VM_MAXUSER_ADDRESS 50 51 /* Virtual memory resource limit. */ 52 #define MAXTSIZ (64 * 1024 * 1024) /* max text size */ 53 #ifndef MAXDSIZ 54 #define MAXDSIZ (512 * 1024 * 1024) /* max data size */ 55 #endif 56 #ifndef BRKSIZ 57 #define BRKSIZ MAXDSIZ /* heap gap size */ 58 #endif 59 #ifndef MAXSSIZ 60 #define MAXSSIZ (32 * 1024 * 1024) /* max stack size */ 61 #endif 62 63 /* initial data size limit */ 64 #ifndef DFLDSIZ 65 #define DFLDSIZ (128 * 1024 * 1024) 66 #endif 67 /* initial stack size limit */ 68 #ifndef DFLSSIZ 69 #define DFLSSIZ (2 * 1024 * 1024) 70 #endif 71 72 #define STACKGAP_RANDOM (256 * 1024) 73 74 /* 75 * Size of shared memory map 76 */ 77 #ifndef SHMMAXPGS 78 #define SHMMAXPGS 1024 79 #endif 80 81 /* Size of user raw I/O map */ 82 #ifndef USRIOSIZE 83 #define USRIOSIZE (MAXBSIZE / PAGE_SIZE * 8) 84 #endif 85 86 #define VM_PHYS_SIZE (USRIOSIZE * PAGE_SIZE) 87 88 #endif /* !_SH_VMPARAM_H_ */ 89