1 /* $OpenBSD: vmparam.h,v 1.30 2015/02/10 10:02:55 tedu Exp $ */ 2 /* $NetBSD: vmparam.h,v 1.1 1996/09/30 16:34:38 ws Exp $ */ 3 4 /*- 5 * Copyright (C) 1995, 1996 Wolfgang Solfrank. 6 * Copyright (C) 1995, 1996 TooLs GmbH. 7 * All rights reserved. 8 * 9 * Redistribution and use in source and binary forms, with or without 10 * modification, are permitted provided that the following conditions 11 * are met: 12 * 1. Redistributions of source code must retain the above copyright 13 * notice, this list of conditions and the following disclaimer. 14 * 2. Redistributions in binary form must reproduce the above copyright 15 * notice, this list of conditions and the following disclaimer in the 16 * documentation and/or other materials provided with the distribution. 17 * 3. All advertising materials mentioning features or use of this software 18 * must display the following acknowledgement: 19 * This product includes software developed by TooLs GmbH. 20 * 4. The name of TooLs GmbH may not be used to endorse or promote products 21 * derived from this software without specific prior written permission. 22 * 23 * THIS SOFTWARE IS PROVIDED BY TOOLS GMBH ``AS IS'' AND ANY EXPRESS OR 24 * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES 25 * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. 26 * IN NO EVENT SHALL TOOLS GMBH BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 27 * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, 28 * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; 29 * OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, 30 * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR 31 * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF 32 * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 33 */ 34 35 #ifndef MACHINE_VMPARAM_H 36 #define MACHINE_VMPARAM_H 37 38 #define USRTEXT PAGE_SIZE 39 #define USRSTACK VM_MAXUSER_ADDRESS 40 41 #ifndef MAXTSIZ 42 #define MAXTSIZ (64*1024*1024) /* max text size */ 43 #endif 44 45 #ifndef DFLDSIZ 46 #define DFLDSIZ (64*1024*1024) /* default data size */ 47 #endif 48 49 #ifndef MAXDSIZ 50 #define MAXDSIZ (2UL*1024*1024*1024) /* max data size */ 51 #endif 52 53 #ifndef BRKSIZ 54 #define BRKSIZ MAXDSIZ /* heap gap size */ 55 #endif 56 57 #ifndef DFLSSIZ 58 #define DFLSSIZ (2*1024*1024) /* default stack size */ 59 #endif 60 61 #ifndef MAXSSIZ 62 #define MAXSSIZ (32*1024*1024) /* max stack size */ 63 #endif 64 65 #define STACKGAP_RANDOM 256*1024 66 67 /* 68 * Size of shared memory map 69 */ 70 #ifndef SHMMAXPGS 71 #define SHMMAXPGS 8192 /* 32mb */ 72 #endif 73 74 /* 75 * Size of User Raw I/O map 76 */ 77 #define USRIOSIZE 1024 78 79 /* 80 * Would like to have MAX addresses = 0, but this doesn't (currently) work 81 */ 82 #define VM_MIN_ADDRESS ((vaddr_t)PAGE_SIZE) 83 #define VM_MAXUSER_ADDRESS ((vaddr_t)0xfffff000) 84 #define VM_MAX_ADDRESS VM_MAXUSER_ADDRESS 85 #define VM_MIN_KERNEL_ADDRESS ((vaddr_t)(PPC_KERNEL_SR << ADDR_SR_SHIFT)) 86 87 /* map PIE into approximately the first quarter of user va space */ 88 #define VM_PIE_MIN_ADDR PAGE_SIZE 89 #define VM_PIE_MAX_ADDR 0x40000000 90 91 /* ppc_kvm_stolen is so that vm space can be stolen before vm is fully 92 * initialized. 93 */ 94 extern vaddr_t ppc_kvm_stolen; 95 #define VM_KERN_ADDRESS_SIZE (PPC_SEGMENT_LENGTH - (32 * 1024 * 1024)) 96 #define VM_MAX_KERNEL_ADDRESS (VM_MIN_KERNEL_ADDRESS + VM_KERN_ADDRESS_SIZE) 97 98 #define VM_PHYS_SIZE (USRIOSIZE * PAGE_SIZE) 99 100 #define VM_PHYSSEG_MAX 32 /* actually we could have this many segments */ 101 #define VM_PHYSSEG_STRAT VM_PSTRAT_BSEARCH 102 #define VM_PHYSSEG_NOADD /* can't add RAM after vm_mem_init */ 103 104 #endif 105