15b81b6b3SRodney W. Grimes /*- 25b81b6b3SRodney W. Grimes * Copyright (c) 1990 The Regents of the University of California. 35b81b6b3SRodney W. Grimes * All rights reserved. 47f8cb368SDavid Greenman * Copyright (c) 1994 John S. Dyson 57f8cb368SDavid Greenman * All rights reserved. 65b81b6b3SRodney W. Grimes * 75b81b6b3SRodney W. Grimes * This code is derived from software contributed to Berkeley by 85b81b6b3SRodney W. Grimes * William Jolitz. 95b81b6b3SRodney W. Grimes * 105b81b6b3SRodney W. Grimes * Redistribution and use in source and binary forms, with or without 115b81b6b3SRodney W. Grimes * modification, are permitted provided that the following conditions 125b81b6b3SRodney W. Grimes * are met: 135b81b6b3SRodney W. Grimes * 1. Redistributions of source code must retain the above copyright 145b81b6b3SRodney W. Grimes * notice, this list of conditions and the following disclaimer. 155b81b6b3SRodney W. Grimes * 2. Redistributions in binary form must reproduce the above copyright 165b81b6b3SRodney W. Grimes * notice, this list of conditions and the following disclaimer in the 175b81b6b3SRodney W. Grimes * documentation and/or other materials provided with the distribution. 185b81b6b3SRodney W. Grimes * 3. All advertising materials mentioning features or use of this software 195b81b6b3SRodney W. Grimes * must display the following acknowledgement: 205b81b6b3SRodney W. Grimes * This product includes software developed by the University of 215b81b6b3SRodney W. Grimes * California, Berkeley and its contributors. 225b81b6b3SRodney W. Grimes * 4. Neither the name of the University nor the names of its contributors 235b81b6b3SRodney W. Grimes * may be used to endorse or promote products derived from this software 245b81b6b3SRodney W. Grimes * without specific prior written permission. 255b81b6b3SRodney W. Grimes * 265b81b6b3SRodney W. Grimes * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND 275b81b6b3SRodney W. Grimes * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 285b81b6b3SRodney W. Grimes * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 295b81b6b3SRodney W. Grimes * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE 305b81b6b3SRodney W. Grimes * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 315b81b6b3SRodney W. Grimes * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 325b81b6b3SRodney W. Grimes * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 335b81b6b3SRodney W. Grimes * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 345b81b6b3SRodney W. Grimes * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 355b81b6b3SRodney W. Grimes * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 365b81b6b3SRodney W. Grimes * SUCH DAMAGE. 375b81b6b3SRodney W. Grimes * 38d42d25c4SRodney W. Grimes * from: @(#)vmparam.h 5.9 (Berkeley) 5/12/91 39a6cd0a24SDavid Greenman * $Id: vmparam.h,v 1.15 1994/09/12 11:38:20 davidg Exp $ 405b81b6b3SRodney W. Grimes */ 415b81b6b3SRodney W. Grimes 425b81b6b3SRodney W. Grimes 436e393973SGarrett Wollman #ifndef _MACHINE_VMPARAM_H_ 446e393973SGarrett Wollman #define _MACHINE_VMPARAM_H_ 1 456e393973SGarrett Wollman 465b81b6b3SRodney W. Grimes /* 475b81b6b3SRodney W. Grimes * Machine dependent constants for 386. 485b81b6b3SRodney W. Grimes */ 495b81b6b3SRodney W. Grimes 505b81b6b3SRodney W. Grimes /* 515b81b6b3SRodney W. Grimes * Virtual memory related constants, all in bytes 525b81b6b3SRodney W. Grimes */ 53e10a6186SDavid Greenman #define MAXTSIZ (16UL*1024*1024) /* max text size */ 545b81b6b3SRodney W. Grimes #ifndef DFLDSIZ 55e10a6186SDavid Greenman #define DFLDSIZ (64UL*1024*1024) /* initial data size limit */ 565b81b6b3SRodney W. Grimes #endif 575b81b6b3SRodney W. Grimes #ifndef MAXDSIZ 58e10a6186SDavid Greenman #define MAXDSIZ (128UL*1024*1024) /* max data size */ 595b81b6b3SRodney W. Grimes #endif 605b81b6b3SRodney W. Grimes #ifndef DFLSSIZ 6129360eb0SDavid Greenman #define DFLSSIZ (8UL*1024*1024) /* initial stack size limit */ 625b81b6b3SRodney W. Grimes #endif 635b81b6b3SRodney W. Grimes #ifndef MAXSSIZ 64e10a6186SDavid Greenman #define MAXSSIZ (64UL*1024*1024) /* max stack size */ 655b81b6b3SRodney W. Grimes #endif 6629360eb0SDavid Greenman #ifndef SGROWSIZ 6729360eb0SDavid Greenman #define SGROWSIZ (128UL*1024) /* amount to grow stack */ 6829360eb0SDavid Greenman #endif 695b81b6b3SRodney W. Grimes 70cde72574SDavid Greenman #define USRTEXT (1*NBPG) /* base of user text XXX bogus */ 71cde72574SDavid Greenman 725b81b6b3SRodney W. Grimes /* 735b81b6b3SRodney W. Grimes * Default sizes of swap allocation chunks (see dmap.h). 745b81b6b3SRodney W. Grimes * The actual values may be changed in vminit() based on MAXDSIZ. 755b81b6b3SRodney W. Grimes * With MAXDSIZ of 16Mb and NDMAP of 38, dmmax will be 1024. 765b81b6b3SRodney W. Grimes */ 775b81b6b3SRodney W. Grimes #define DMMIN 32 /* smallest swap allocation */ 785b81b6b3SRodney W. Grimes #define DMMAX 4096 /* largest potential swap allocation */ 795b81b6b3SRodney W. Grimes #define DMTEXT 1024 /* swap allocation for text */ 805b81b6b3SRodney W. Grimes 815b81b6b3SRodney W. Grimes /* 825b81b6b3SRodney W. Grimes * Sizes of the system and user portions of the system page table. 835b81b6b3SRodney W. Grimes */ 845b81b6b3SRodney W. Grimes #define SYSPTSIZE (2*NPTEPG) 855b81b6b3SRodney W. Grimes #define USRPTSIZE (2*NPTEPG) 865b81b6b3SRodney W. Grimes 875b81b6b3SRodney W. Grimes /* 88b6c78fe4SRodney W. Grimes * Size of the Shared Memory Pages page table. 89b6c78fe4SRodney W. Grimes */ 9089ccb410SDavid Greenman #ifndef SHMMAXPGS 91a6cd0a24SDavid Greenman #define SHMMAXPGS 1024 /* XXX until we have more kmap space */ 92b6c78fe4SRodney W. Grimes #endif 93b6c78fe4SRodney W. Grimes 94b6c78fe4SRodney W. Grimes /* 955b81b6b3SRodney W. Grimes * Size of User Raw I/O map 965b81b6b3SRodney W. Grimes */ 977f8cb368SDavid Greenman #define USRIOSIZE 1024 985b81b6b3SRodney W. Grimes 995b81b6b3SRodney W. Grimes /* 1005b81b6b3SRodney W. Grimes * The time for a process to be blocked before being very swappable. 1015b81b6b3SRodney W. Grimes * This is a number of seconds which the system takes as being a non-trivial 1025b81b6b3SRodney W. Grimes * amount of real time. You probably shouldn't change this; 1035b81b6b3SRodney W. Grimes * it is used in subtle ways (fractions and multiples of it are, that is, like 1045b81b6b3SRodney W. Grimes * half of a ``long time'', almost a long time, etc.) 1055b81b6b3SRodney W. Grimes * It is related to human patience and other factors which don't really 1065b81b6b3SRodney W. Grimes * change over time. 1075b81b6b3SRodney W. Grimes */ 1085b81b6b3SRodney W. Grimes #define MAXSLP 20 1095b81b6b3SRodney W. Grimes 1105b81b6b3SRodney W. Grimes /* 1115b81b6b3SRodney W. Grimes * Mach derived constants 1125b81b6b3SRodney W. Grimes */ 1135b81b6b3SRodney W. Grimes 1145b81b6b3SRodney W. Grimes /* user/kernel map constants */ 115cde72574SDavid Greenman #define KERNBASE ((0x400-1-NKPDE)*(NBPG*NPTEPG)) 1167f8cb368SDavid Greenman 1175b81b6b3SRodney W. Grimes #define VM_MIN_ADDRESS ((vm_offset_t)0) 1187f8cb368SDavid Greenman #define VM_MAXUSER_ADDRESS ((vm_offset_t)KERNBASE - (NBPG*(NPTEPG+UPAGES))) 1197f8cb368SDavid Greenman #define USRSTACK VM_MAXUSER_ADDRESS 1207f8cb368SDavid Greenman #define UPT_MIN_ADDRESS ((vm_offset_t)KERNBASE - (NBPG*NPTEPG)) 1217f8cb368SDavid Greenman #define UPT_MAX_ADDRESS ((vm_offset_t)KERNBASE - (NBPG*(NKPDE+2))) 1225b81b6b3SRodney W. Grimes #define VM_MAX_ADDRESS UPT_MAX_ADDRESS 1237f8cb368SDavid Greenman #define VM_MIN_KERNEL_ADDRESS ((vm_offset_t)KERNBASE - (NBPG*(NKPDE+2))) 1245b81b6b3SRodney W. Grimes #define UPDT VM_MIN_KERNEL_ADDRESS 125cde72574SDavid Greenman #define KPT_MIN_ADDRESS ((vm_offset_t)KERNBASE - NBPG*(NKPDE+1)) 126cde72574SDavid Greenman #define KPT_MAX_ADDRESS ((vm_offset_t)KERNBASE - NBPG) 127cde72574SDavid Greenman #define VM_MAX_KERNEL_ADDRESS ((vm_offset_t)KERNBASE + NKPT*NBPG*NPTEPG) 1285b81b6b3SRodney W. Grimes 1295b81b6b3SRodney W. Grimes /* virtual sizes (bytes) for various kernel submaps */ 1305b81b6b3SRodney W. Grimes #define VM_MBUF_SIZE (NMBCLUSTERS*MCLBYTES) 131d42d25c4SRodney W. Grimes #define VM_KMEM_SIZE (16 * 1024 * 1024) 1325b81b6b3SRodney W. Grimes #define VM_PHYS_SIZE (USRIOSIZE*CLBYTES) 1335b81b6b3SRodney W. Grimes 1346e393973SGarrett Wollman #endif /* _MACHINE_VMPARAM_H_ */ 135