vmparam.h revision 66458
166458Sdfr/* $FreeBSD: head/sys/ia64/include/vmparam.h 66458 2000-09-29 13:46:07Z dfr $ */ 266458Sdfr/* From: NetBSD: vmparam.h,v 1.6 1997/09/23 23:23:23 mjacob Exp */ 366458Sdfr#ifndef _ALPHA_VMPARAM_H 466458Sdfr#define _ALPHA_VMPARAM_H 566458Sdfr/* 666458Sdfr * Copyright (c) 1988 University of Utah. 766458Sdfr * Copyright (c) 1992, 1993 866458Sdfr * The Regents of the University of California. All rights reserved. 966458Sdfr * 1066458Sdfr * This code is derived from software contributed to Berkeley by 1166458Sdfr * the Systems Programming Group of the University of Utah Computer 1266458Sdfr * Science Department and Ralph Campbell. 1366458Sdfr * 1466458Sdfr * Redistribution and use in source and binary forms, with or without 1566458Sdfr * modification, are permitted provided that the following conditions 1666458Sdfr * are met: 1766458Sdfr * 1. Redistributions of source code must retain the above copyright 1866458Sdfr * notice, this list of conditions and the following disclaimer. 1966458Sdfr * 2. Redistributions in binary form must reproduce the above copyright 2066458Sdfr * notice, this list of conditions and the following disclaimer in the 2166458Sdfr * documentation and/or other materials provided with the distribution. 2266458Sdfr * 3. All advertising materials mentioning features or use of this software 2366458Sdfr * must display the following acknowledgement: 2466458Sdfr * This product includes software developed by the University of 2566458Sdfr * California, Berkeley and its contributors. 2666458Sdfr * 4. Neither the name of the University nor the names of its contributors 2766458Sdfr * may be used to endorse or promote products derived from this software 2866458Sdfr * without specific prior written permission. 2966458Sdfr * 3066458Sdfr * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND 3166458Sdfr * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 3266458Sdfr * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 3366458Sdfr * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE 3466458Sdfr * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 3566458Sdfr * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 3666458Sdfr * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 3766458Sdfr * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 3866458Sdfr * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 3966458Sdfr * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 4066458Sdfr * SUCH DAMAGE. 4166458Sdfr * 4266458Sdfr * from: Utah $Hdr: vmparam.h 1.16 91/01/18$ 4366458Sdfr * 4466458Sdfr * @(#)vmparam.h 8.2 (Berkeley) 4/22/94 4566458Sdfr */ 4666458Sdfr 4766458Sdfr/* 4866458Sdfr * Machine dependent constants for Alpha. 4966458Sdfr */ 5066458Sdfr/* 5166458Sdfr * USRTEXT is the start of the user text/data space, while USRSTACK 5266458Sdfr * is the top (end) of the user stack. Immediately above the user stack 5366458Sdfr * resides the user structure, which is UPAGES long and contains the 5466458Sdfr * kernel stack. 5566458Sdfr */ 5666458Sdfr#define USRTEXT CLBYTES 5766458Sdfr/* #define USRSTACK VM_MAXUSER_ADDRESS */ 5866458Sdfr 5966458Sdfr/* 6066458Sdfr * This stack location is suitable for OSF1 emulation. Some OSF 6166458Sdfr * programs are built as 32bit and assume that the stack is reachable 6266458Sdfr * with a 32bit value. OSF1 manages to have a variable location for 6366458Sdfr * the user stack which we should probably also support. 6466458Sdfr */ 6566458Sdfr#define USRSTACK (0x12000000LL - (UPAGES*PAGE_SIZE)) 6666458Sdfr 6766458Sdfr/* 6866458Sdfr * Virtual memory related constants, all in bytes 6966458Sdfr */ 7066458Sdfr#ifndef MAXTSIZ 7166458Sdfr#define MAXTSIZ (1<<30) /* max text size (1G) */ 7266458Sdfr#endif 7366458Sdfr#ifndef DFLDSIZ 7466458Sdfr#define DFLDSIZ (1<<27) /* initial data size (128M) */ 7566458Sdfr#endif 7666458Sdfr#ifndef MAXDSIZ 7766458Sdfr#define MAXDSIZ (1<<30) /* max data size (1G) */ 7866458Sdfr#endif 7966458Sdfr#ifndef DFLSSIZ 8066458Sdfr#define DFLSSIZ (1<<21) /* initial stack size (2M) */ 8166458Sdfr#endif 8266458Sdfr#ifndef MAXSSIZ 8366458Sdfr#define MAXSSIZ (1<<25) /* max stack size (32M) */ 8466458Sdfr#endif 8566458Sdfr#ifndef SGROWSIZ 8666458Sdfr#define SGROWSIZ (128UL*1024) /* amount to grow stack */ 8766458Sdfr#endif 8866458Sdfr 8966458Sdfr/* 9066458Sdfr * PTEs for mapping user space into the kernel for phyio operations. 9166458Sdfr * 64 pte's are enough to cover 8 disks * MAXBSIZE. 9266458Sdfr */ 9366458Sdfr#ifndef USRIOSIZE 9466458Sdfr#define USRIOSIZE 64 9566458Sdfr#endif 9666458Sdfr 9766458Sdfr/* 9866458Sdfr * Boundary at which to place first MAPMEM segment if not explicitly 9966458Sdfr * specified. Should be a power of two. This allows some slop for 10066458Sdfr * the data segment to grow underneath the first mapped segment. 10166458Sdfr */ 10266458Sdfr#define MMSEG 0x200000 10366458Sdfr 10466458Sdfr/* 10566458Sdfr * The size of the clock loop. 10666458Sdfr */ 10766458Sdfr#define LOOPPAGES (maxfree - firstfree) 10866458Sdfr 10966458Sdfr/* 11066458Sdfr * The time for a process to be blocked before being very swappable. 11166458Sdfr * This is a number of seconds which the system takes as being a non-trivial 11266458Sdfr * amount of real time. You probably shouldn't change this; 11366458Sdfr * it is used in subtle ways (fractions and multiples of it are, that is, like 11466458Sdfr * half of a ``long time'', almost a long time, etc.) 11566458Sdfr * It is related to human patience and other factors which don't really 11666458Sdfr * change over time. 11766458Sdfr */ 11866458Sdfr#define MAXSLP 20 11966458Sdfr 12066458Sdfr/* 12166458Sdfr * A swapped in process is given a small amount of core without being bothered 12266458Sdfr * by the page replacement algorithm. Basically this says that if you are 12366458Sdfr * swapped in you deserve some resources. We protect the last SAFERSS 12466458Sdfr * pages against paging and will just swap you out rather than paging you. 12566458Sdfr * Note that each process has at least UPAGES+CLSIZE pages which are not 12666458Sdfr * paged anyways, in addition to SAFERSS. 12766458Sdfr */ 12866458Sdfr#define SAFERSS 10 /* nominal ``small'' resident set size 12966458Sdfr protected against replacement */ 13066458Sdfr 13166458Sdfr/* 13266458Sdfr * Mach derived constants 13366458Sdfr */ 13466458Sdfr 13566458Sdfr/* user/kernel map constants */ 13666458Sdfr#define VM_MIN_ADDRESS 0 13766458Sdfr#define VM_MAXUSER_ADDRESS IA64_RR_BASE(5) 13866458Sdfr#define VM_MAX_ADDRESS VM_MAXUSER_ADDRESS 13966458Sdfr#define VM_MIN_KERNEL_ADDRESS IA64_RR_BASE(5) 14066458Sdfr#define VM_MAX_KERNEL_ADDRESS (IA64_RR_BASE(6) - 1) 14166458Sdfr 14266458Sdfr/* virtual sizes (bytes) for various kernel submaps */ 14366458Sdfr#ifndef VM_KMEM_SIZE 14466458Sdfr#define VM_KMEM_SIZE (12 * 1024 * 1024) 14566458Sdfr#endif 14666458Sdfr 14766458Sdfr/* 14866458Sdfr * How many physical pages per KVA page allocated. 14966458Sdfr * min(max(VM_KMEM_SIZE, Physical memory/VM_KMEM_SIZE_SCALE), VM_KMEM_SIZE_MAX) 15066458Sdfr * is the total KVA space allocated for kmem_map. 15166458Sdfr */ 15266458Sdfr#ifndef VM_KMEM_SIZE_SCALE 15366458Sdfr#define VM_KMEM_SIZE_SCALE (4) /* XXX 8192 byte pages */ 15466458Sdfr#endif 15566458Sdfr 15666458Sdfr/* initial pagein size of beginning of executable file */ 15766458Sdfr#ifndef VM_INITIAL_PAGEIN 15866458Sdfr#define VM_INITIAL_PAGEIN 16 15966458Sdfr#endif 16066458Sdfr 16166458Sdfr#endif /* !_ALPHA_VMPARAM_H */ 162