vmparam3.h revision 1.20
11.20Sgwr/* $NetBSD: vmparam3.h,v 1.20 1998/02/05 04:57:02 gwr Exp $ */ 21.9Scgd 31.7Sglass/* 41.10Sgwr * Copyright (c) 1994 Gordon W. Ross 51.7Sglass * Copyright (c) 1993 Adam Glass 61.7Sglass * Copyright (c) 1988 University of Utah. 71.7Sglass * Copyright (c) 1982, 1986, 1990 The Regents of the University of California. 81.7Sglass * All rights reserved. 91.7Sglass * 101.7Sglass * This code is derived from software contributed to Berkeley by 111.7Sglass * the Systems Programming Group of the University of Utah Computer 121.7Sglass * Science Department. 131.7Sglass * 141.7Sglass * Redistribution and use in source and binary forms, with or without 151.7Sglass * modification, are permitted provided that the following conditions 161.7Sglass * are met: 171.7Sglass * 1. Redistributions of source code must retain the above copyright 181.7Sglass * notice, this list of conditions and the following disclaimer. 191.7Sglass * 2. Redistributions in binary form must reproduce the above copyright 201.7Sglass * notice, this list of conditions and the following disclaimer in the 211.7Sglass * documentation and/or other materials provided with the distribution. 221.7Sglass * 3. All advertising materials mentioning features or use of this software 231.7Sglass * must display the following acknowledgement: 241.7Sglass * This product includes software developed by the University of 251.7Sglass * California, Berkeley and its contributors. 261.7Sglass * 4. Neither the name of the University nor the names of its contributors 271.7Sglass * may be used to endorse or promote products derived from this software 281.7Sglass * without specific prior written permission. 291.7Sglass * 301.7Sglass * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND 311.7Sglass * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 321.7Sglass * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 331.7Sglass * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE 341.7Sglass * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 351.7Sglass * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 361.7Sglass * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 371.7Sglass * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 381.7Sglass * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 391.7Sglass * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 401.7Sglass * SUCH DAMAGE. 411.7Sglass * 421.10Sgwr * from: Utah $Hdr: vmparam.h 1.16 91/01/18$ 431.10Sgwr * from: @(#)vmparam.h 7.3 (Berkeley) 5/7/91 441.10Sgwr * vmparam.h,v 1.2 1993/05/22 07:58:38 cgd Exp 451.7Sglass */ 461.1Sglass 471.10Sgwr/* 481.14Sgwr * Machine dependent constants for Sun3 491.14Sgwr * 501.14Sgwr * The Sun3 has limited total kernel virtual space (32MB) and 511.14Sgwr * can not use main memory for page tables. (All active PTEs 521.14Sgwr * must be installed in special translation RAM in the MMU). 531.14Sgwr * Therefore, parameters that would normally configure the 541.14Sgwr * size of various page tables are irrelevant. Only things 551.14Sgwr * that consume portions of kernel virtual (KV) space matter, 561.14Sgwr * and those things should be chosen to conserve KV space. 571.10Sgwr */ 581.10Sgwr 591.10Sgwr/* 601.14Sgwr * USRTEXT is the start of the user text/data space, while 611.14Sgwr * USRSTACK is the top (end) of the user stack. 621.10Sgwr */ 631.10Sgwr#define USRTEXT NBPG /* Start of user text */ 641.10Sgwr#define USRSTACK KERNBASE /* High end of user stack */ 651.1Sglass 661.1Sglass/* 671.20Sgwr * Virtual memory related constants, all in bytes. 681.20Sgwr * The Sun3 has only 224 MB of user-virtual space, 691.20Sgwr * so we need to be conservative with these limits. 701.1Sglass */ 711.1Sglass#ifndef MAXTSIZ 721.6Sglass#define MAXTSIZ (8*1024*1024) /* max text size */ 731.1Sglass#endif 741.1Sglass#ifndef DFLDSIZ 751.17Sgwr#define DFLDSIZ (16*1024*1024) /* initial data size limit */ 761.1Sglass#endif 771.1Sglass#ifndef MAXDSIZ 781.6Sglass#define MAXDSIZ (32*1024*1024) /* max data size */ 791.1Sglass#endif 801.1Sglass#ifndef DFLSSIZ 811.1Sglass#define DFLSSIZ (512*1024) /* initial stack size limit */ 821.1Sglass#endif 831.1Sglass#ifndef MAXSSIZ 841.10Sgwr#define MAXSSIZ MAXDSIZ /* max stack size */ 851.1Sglass#endif 861.1Sglass 871.1Sglass/* 881.4Sglass * PTEs for mapping user space into the kernel for phyio operations. 891.14Sgwr * The actual limitation for physio requests will be the DVMA space, 901.14Sgwr * and that is fixed by hardware design at 1MB. We could make the 911.14Sgwr * physio map larger than that, but it would not buy us much. 921.4Sglass */ 931.4Sglass#ifndef USRIOSIZE 941.14Sgwr#define USRIOSIZE 128 /* 1 MB */ 951.13Sgwr#endif 961.13Sgwr 971.13Sgwr/* 981.13Sgwr * PTEs for system V style shared memory. 991.13Sgwr * This is basically slop for kmempt which we actually allocate (malloc) from. 1001.13Sgwr */ 1011.13Sgwr#ifndef SHMMAXPGS 1021.14Sgwr#define SHMMAXPGS 512 /* 4 MB */ 1031.4Sglass#endif 1041.4Sglass 1051.4Sglass/* 1061.20Sgwr * Mach-derived constants: 1071.1Sglass */ 1081.1Sglass 1091.1Sglass/* user/kernel map constants */ 1101.1Sglass#define VM_MIN_ADDRESS ((vm_offset_t)0) 1111.10Sgwr#define VM_MAX_ADDRESS ((vm_offset_t)KERNBASE) 1121.10Sgwr#define VM_MAXUSER_ADDRESS ((vm_offset_t)KERNBASE) 1131.10Sgwr#define VM_MIN_KERNEL_ADDRESS ((vm_offset_t)KERNBASE) 1141.16Sgwr#define VM_MAX_KERNEL_ADDRESS ((vm_offset_t)KERN_END) 1151.1Sglass 1161.1Sglass/* virtual sizes (bytes) for various kernel submaps */ 1171.1Sglass#define VM_MBUF_SIZE (NMBCLUSTERS*MCLBYTES) 1181.1Sglass#define VM_KMEM_SIZE (NKMEMCLUSTERS*CLBYTES) 1191.1Sglass#define VM_PHYS_SIZE (USRIOSIZE*CLBYTES) 1201.15Sgwr 1211.15Sgwr#define MACHINE_NONCONTIG /* VM <=> pmap interface modifier */ 122