vmparam.h revision 161628
1170754Sdelphij/*- 2170754Sdelphij * Copyright (C) 1995, 1996 Wolfgang Solfrank. 3170754Sdelphij * Copyright (C) 1995, 1996 TooLs GmbH. 4170754Sdelphij * All rights reserved. 5170754Sdelphij * 6170754Sdelphij * Redistribution and use in source and binary forms, with or without 7170754Sdelphij * modification, are permitted provided that the following conditions 8170754Sdelphij * are met: 9170754Sdelphij * 1. Redistributions of source code must retain the above copyright 10170754Sdelphij * notice, this list of conditions and the following disclaimer. 11170754Sdelphij * 2. Redistributions in binary form must reproduce the above copyright 12170754Sdelphij * notice, this list of conditions and the following disclaimer in the 13170754Sdelphij * documentation and/or other materials provided with the distribution. 14170754Sdelphij * 3. All advertising materials mentioning features or use of this software 15170754Sdelphij * must display the following acknowledgement: 16170754Sdelphij * This product includes software developed by TooLs GmbH. 17170754Sdelphij * 4. The name of TooLs GmbH may not be used to endorse or promote products 18170754Sdelphij * derived from this software without specific prior written permission. 19170754Sdelphij * 20170754Sdelphij * THIS SOFTWARE IS PROVIDED BY TOOLS GMBH ``AS IS'' AND ANY EXPRESS OR 21170754Sdelphij * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES 22170754Sdelphij * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. 23170754Sdelphij * IN NO EVENT SHALL TOOLS GMBH BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 24170754Sdelphij * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, 25170754Sdelphij * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; 26170754Sdelphij * OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, 27170754Sdelphij * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR 28170754Sdelphij * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF 29170754Sdelphij * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 30170754Sdelphij * 31170754Sdelphij * $NetBSD: vmparam.h,v 1.11 2000/02/11 19:25:16 thorpej Exp $ 32170754Sdelphij * $FreeBSD: head/sys/powerpc/include/vmparam.h 161628 2006-08-25 23:51:11Z alc $ 33170754Sdelphij */ 34170754Sdelphij 35170754Sdelphij#ifndef _MACHINE_VMPARAM_H_ 36170754Sdelphij#define _MACHINE_VMPARAM_H_ 37170754Sdelphij 38170754Sdelphij#define USRTEXT NBPG 39170754Sdelphij#define USRSTACK VM_MAXUSER_ADDRESS 40170754Sdelphij 41170754Sdelphij#ifndef MAXTSIZ 42170754Sdelphij#define MAXTSIZ (16*1024*1024) /* max text size */ 43170754Sdelphij#endif 44170754Sdelphij 45170754Sdelphij#ifndef DFLDSIZ 46170754Sdelphij#define DFLDSIZ (32*1024*1024) /* default data size */ 47170754Sdelphij#endif 48170754Sdelphij 49170754Sdelphij#ifndef MAXDSIZ 50170754Sdelphij#define MAXDSIZ (512*1024*1024) /* max data size */ 51170754Sdelphij#endif 52170754Sdelphij 53170754Sdelphij#ifndef DFLSSIZ 54170754Sdelphij#define DFLSSIZ (1*1024*1024) /* default stack size */ 55170754Sdelphij#endif 56170754Sdelphij 57170754Sdelphij#ifndef MAXSSIZ 58170754Sdelphij#define MAXSSIZ (32*1024*1024) /* max stack size */ 59170754Sdelphij#endif 60170754Sdelphij 61170754Sdelphij/* 62170754Sdelphij * Size of shared memory map 63170754Sdelphij */ 64170754Sdelphij#ifndef SHMMAXPGS 65170754Sdelphij#define SHMMAXPGS 1024 66170754Sdelphij#endif 67170754Sdelphij 68170754Sdelphij/* 69170754Sdelphij * The time for a process to be blocked before being very swappable. 70170754Sdelphij * This is a number of seconds which the system takes as being a non-trivial 71170754Sdelphij * amount of real time. You probably shouldn't change this; 72170754Sdelphij * it is used in subtle ways (fractions and multiples of it are, that is, like 73170754Sdelphij * half of a ``long time'', almost a long time, etc.) 74170754Sdelphij * It is related to human patience and other factors which don't really 75170754Sdelphij * change over time. 76170754Sdelphij */ 77170754Sdelphij#define MAXSLP 20 78170754Sdelphij 79170754Sdelphij/* 80170754Sdelphij * Use the direct-mapped BAT registers for UMA small allocs. This 81170754Sdelphij * takes pressure off the small amount of available KVA. 82170754Sdelphij */ 83170754Sdelphij#define UMA_MD_SMALL_ALLOC 84170754Sdelphij 85170754Sdelphij/* 86170754Sdelphij * Would like to have MAX addresses = 0, but this doesn't (currently) work 87170754Sdelphij */ 88170754Sdelphij#define VM_MIN_ADDRESS ((vm_offset_t)0) 89170754Sdelphij#define VM_MAXUSER_ADDRESS ((vm_offset_t)0x7ffff000) 90170754Sdelphij#define VM_MAX_ADDRESS VM_MAXUSER_ADDRESS 91170754Sdelphij#define VM_MIN_KERNEL_ADDRESS ((vm_offset_t)(KERNEL_SR << ADDR_SR_SHFT)) 92170754Sdelphij#define VM_MAX_KERNEL_ADDRESS (VM_MIN_KERNEL_ADDRESS + 2*SEGMENT_LENGTH - 1) 93170754Sdelphij 94170754Sdelphij#define KERNBASE 0x100000 /* start of kernel virtual */ 95170754Sdelphij 96170754Sdelphij/* XXX max. amount of KVM to be used by buffers. */ 97170754Sdelphij#ifndef VM_MAX_KERNEL_BUF 98170754Sdelphij#define VM_MAX_KERNEL_BUF (SEGMENT_LENGTH * 7 / 10) 99170754Sdelphij#endif 100170754Sdelphij 101170754Sdelphijstruct pmap_physseg { 102170754Sdelphij struct pv_entry *pvent; 103170754Sdelphij char *attrs; 104170754Sdelphij}; 105170754Sdelphij 106170754Sdelphij#define VM_PHYSSEG_MAX 16 /* 1? */ 107170754Sdelphij#define VM_PHYSSEG_STRAT VM_PSTRAT_BSEARCH 108170754Sdelphij#define VM_PHYSSEG_NOADD /* can't add RAM after vm_mem_init */ 109170754Sdelphij 110170754Sdelphij#define VM_NFREELIST 1 111170754Sdelphij#define VM_FREELIST_DEFAULT 0 112170754Sdelphij 113170754Sdelphij#ifndef VM_INITIAL_PAGEIN 114170754Sdelphij#define VM_INITIAL_PAGEIN 16 115170754Sdelphij#endif 116170754Sdelphij 117170754Sdelphij#ifndef SGROWSIZ 118170754Sdelphij#define SGROWSIZ (128UL*1024) /* amount to grow stack */ 119170754Sdelphij#endif 120170754Sdelphij 121170754Sdelphij#ifndef VM_KMEM_SIZE 122170754Sdelphij#define VM_KMEM_SIZE (12 * 1024 * 1024) 123170754Sdelphij#endif 124170754Sdelphij 125170754Sdelphij#endif /* _MACHINE_VMPARAM_H_ */ 126170754Sdelphij