1f9bac91bSBenno Rice /*- 2f9bac91bSBenno Rice * Copyright (C) 1995, 1996 Wolfgang Solfrank. 3f9bac91bSBenno Rice * Copyright (C) 1995, 1996 TooLs GmbH. 4f9bac91bSBenno Rice * All rights reserved. 5f9bac91bSBenno Rice * 6f9bac91bSBenno Rice * Redistribution and use in source and binary forms, with or without 7f9bac91bSBenno Rice * modification, are permitted provided that the following conditions 8f9bac91bSBenno Rice * are met: 9f9bac91bSBenno Rice * 1. Redistributions of source code must retain the above copyright 10f9bac91bSBenno Rice * notice, this list of conditions and the following disclaimer. 11f9bac91bSBenno Rice * 2. Redistributions in binary form must reproduce the above copyright 12f9bac91bSBenno Rice * notice, this list of conditions and the following disclaimer in the 13f9bac91bSBenno Rice * documentation and/or other materials provided with the distribution. 14f9bac91bSBenno Rice * 3. All advertising materials mentioning features or use of this software 15f9bac91bSBenno Rice * must display the following acknowledgement: 16f9bac91bSBenno Rice * This product includes software developed by TooLs GmbH. 17f9bac91bSBenno Rice * 4. The name of TooLs GmbH may not be used to endorse or promote products 18f9bac91bSBenno Rice * derived from this software without specific prior written permission. 19f9bac91bSBenno Rice * 20f9bac91bSBenno Rice * THIS SOFTWARE IS PROVIDED BY TOOLS GMBH ``AS IS'' AND ANY EXPRESS OR 21f9bac91bSBenno Rice * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES 22f9bac91bSBenno Rice * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. 23f9bac91bSBenno Rice * IN NO EVENT SHALL TOOLS GMBH BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 24f9bac91bSBenno Rice * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, 25f9bac91bSBenno Rice * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; 26f9bac91bSBenno Rice * OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, 27f9bac91bSBenno Rice * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR 28f9bac91bSBenno Rice * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF 29f9bac91bSBenno Rice * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 30f9bac91bSBenno Rice * 31f9bac91bSBenno Rice * $NetBSD: vmparam.h,v 1.11 2000/02/11 19:25:16 thorpej Exp $ 32f9bac91bSBenno Rice * $FreeBSD$ 33f9bac91bSBenno Rice */ 34f9bac91bSBenno Rice 35f9bac91bSBenno Rice #ifndef _MACHINE_VMPARAM_H_ 36f9bac91bSBenno Rice #define _MACHINE_VMPARAM_H_ 37f9bac91bSBenno Rice 38f9bac91bSBenno Rice #define USRSTACK VM_MAXUSER_ADDRESS 39f9bac91bSBenno Rice 40f9bac91bSBenno Rice #ifndef MAXTSIZ 41f9bac91bSBenno Rice #define MAXTSIZ (16*1024*1024) /* max text size */ 42f9bac91bSBenno Rice #endif 43f9bac91bSBenno Rice 44f9bac91bSBenno Rice #ifndef DFLDSIZ 45f9bac91bSBenno Rice #define DFLDSIZ (32*1024*1024) /* default data size */ 46f9bac91bSBenno Rice #endif 47f9bac91bSBenno Rice 48f9bac91bSBenno Rice #ifndef MAXDSIZ 49f9bac91bSBenno Rice #define MAXDSIZ (512*1024*1024) /* max data size */ 50f9bac91bSBenno Rice #endif 51f9bac91bSBenno Rice 52f9bac91bSBenno Rice #ifndef DFLSSIZ 53f9bac91bSBenno Rice #define DFLSSIZ (1*1024*1024) /* default stack size */ 54f9bac91bSBenno Rice #endif 55f9bac91bSBenno Rice 56f9bac91bSBenno Rice #ifndef MAXSSIZ 57f9bac91bSBenno Rice #define MAXSSIZ (32*1024*1024) /* max stack size */ 58f9bac91bSBenno Rice #endif 59f9bac91bSBenno Rice 60f9bac91bSBenno Rice /* 61f9bac91bSBenno Rice * Size of shared memory map 62f9bac91bSBenno Rice */ 63f9bac91bSBenno Rice #ifndef SHMMAXPGS 64f9bac91bSBenno Rice #define SHMMAXPGS 1024 65f9bac91bSBenno Rice #endif 66f9bac91bSBenno Rice 67f9bac91bSBenno Rice /* 68f9bac91bSBenno Rice * The time for a process to be blocked before being very swappable. 69f9bac91bSBenno Rice * This is a number of seconds which the system takes as being a non-trivial 70f9bac91bSBenno Rice * amount of real time. You probably shouldn't change this; 71f9bac91bSBenno Rice * it is used in subtle ways (fractions and multiples of it are, that is, like 72f9bac91bSBenno Rice * half of a ``long time'', almost a long time, etc.) 73f9bac91bSBenno Rice * It is related to human patience and other factors which don't really 74f9bac91bSBenno Rice * change over time. 75f9bac91bSBenno Rice */ 76f9bac91bSBenno Rice #define MAXSLP 20 77f9bac91bSBenno Rice 78f9bac91bSBenno Rice /* 79db55e39aSPeter Grehan * Use the direct-mapped BAT registers for UMA small allocs. This 80db55e39aSPeter Grehan * takes pressure off the small amount of available KVA. 81db55e39aSPeter Grehan */ 82db55e39aSPeter Grehan #define UMA_MD_SMALL_ALLOC 83db55e39aSPeter Grehan 84db55e39aSPeter Grehan /* 85f9bac91bSBenno Rice * Would like to have MAX addresses = 0, but this doesn't (currently) work 86f9bac91bSBenno Rice */ 87f9bac91bSBenno Rice #define VM_MIN_ADDRESS ((vm_offset_t)0) 88f9bac91bSBenno Rice #define VM_MAXUSER_ADDRESS ((vm_offset_t)0x7ffff000) 89f9bac91bSBenno Rice #define VM_MAX_ADDRESS VM_MAXUSER_ADDRESS 90f9bac91bSBenno Rice #define VM_MIN_KERNEL_ADDRESS ((vm_offset_t)(KERNEL_SR << ADDR_SR_SHFT)) 914daf20b2SPeter Grehan #define VM_MAX_KERNEL_ADDRESS (VM_MIN_KERNEL_ADDRESS + 2*SEGMENT_LENGTH - 1) 92f9bac91bSBenno Rice 937c277971SPeter Grehan #define KERNBASE 0x100000 /* start of kernel virtual */ 947c277971SPeter Grehan 95f9bac91bSBenno Rice /* XXX max. amount of KVM to be used by buffers. */ 96f9bac91bSBenno Rice #ifndef VM_MAX_KERNEL_BUF 97f9bac91bSBenno Rice #define VM_MAX_KERNEL_BUF (SEGMENT_LENGTH * 7 / 10) 98f9bac91bSBenno Rice #endif 99f9bac91bSBenno Rice 100f9bac91bSBenno Rice struct pmap_physseg { 101f9bac91bSBenno Rice struct pv_entry *pvent; 102f9bac91bSBenno Rice char *attrs; 103f9bac91bSBenno Rice }; 104f9bac91bSBenno Rice 105f9bac91bSBenno Rice #define VM_PHYSSEG_MAX 16 /* 1? */ 106f9bac91bSBenno Rice 10704a18977SAlan Cox /* 10804a18977SAlan Cox * The physical address space is densely populated. 10904a18977SAlan Cox */ 11004a18977SAlan Cox #define VM_PHYSSEG_DENSE 11104a18977SAlan Cox 1122446e4f0SAlan Cox /* 1137bfda801SAlan Cox * Create three free page pools: VM_FREEPOOL_DEFAULT is the default pool 1142446e4f0SAlan Cox * from which physical pages are allocated and VM_FREEPOOL_DIRECT is 1152446e4f0SAlan Cox * the pool from which physical pages for small UMA objects are 1162446e4f0SAlan Cox * allocated. 1172446e4f0SAlan Cox */ 1187bfda801SAlan Cox #define VM_NFREEPOOL 3 1197bfda801SAlan Cox #define VM_FREEPOOL_CACHE 2 1202446e4f0SAlan Cox #define VM_FREEPOOL_DEFAULT 0 1212446e4f0SAlan Cox #define VM_FREEPOOL_DIRECT 1 1222446e4f0SAlan Cox 1232446e4f0SAlan Cox /* 1242446e4f0SAlan Cox * Create one free page list. 1252446e4f0SAlan Cox */ 126f9bac91bSBenno Rice #define VM_NFREELIST 1 127f9bac91bSBenno Rice #define VM_FREELIST_DEFAULT 0 128f9bac91bSBenno Rice 1292446e4f0SAlan Cox /* 1302446e4f0SAlan Cox * The largest allocation size is 4MB. 1312446e4f0SAlan Cox */ 1322446e4f0SAlan Cox #define VM_NFREEORDER 11 1332446e4f0SAlan Cox 134b8e7fc24SAlan Cox /* 135b8e7fc24SAlan Cox * Disable superpage reservations. 136b8e7fc24SAlan Cox */ 137b8e7fc24SAlan Cox #ifndef VM_NRESERVLEVEL 138b8e7fc24SAlan Cox #define VM_NRESERVLEVEL 0 139b8e7fc24SAlan Cox #endif 140b8e7fc24SAlan Cox 141f9bac91bSBenno Rice #ifndef VM_INITIAL_PAGEIN 142f9bac91bSBenno Rice #define VM_INITIAL_PAGEIN 16 143f9bac91bSBenno Rice #endif 144f9bac91bSBenno Rice 145f9bac91bSBenno Rice #ifndef SGROWSIZ 146f9bac91bSBenno Rice #define SGROWSIZ (128UL*1024) /* amount to grow stack */ 147f9bac91bSBenno Rice #endif 148f9bac91bSBenno Rice 149f9bac91bSBenno Rice #ifndef VM_KMEM_SIZE 150f9bac91bSBenno Rice #define VM_KMEM_SIZE (12 * 1024 * 1024) 151f9bac91bSBenno Rice #endif 152f9bac91bSBenno Rice 153f9bac91bSBenno Rice #endif /* _MACHINE_VMPARAM_H_ */ 154