vmparam.h revision 1.10
11.10Sthorpej/* $NetBSD: vmparam.h,v 1.10 2003/04/02 07:36:01 thorpej Exp $ */ 21.1Stsutsui 31.1Stsutsui/* 41.1Stsutsui * Copyright (c) 1988 University of Utah. 51.1Stsutsui * Copyright (c) 1982, 1986, 1990, 1993 61.1Stsutsui * The Regents of the University of California. All rights reserved. 71.1Stsutsui * 81.1Stsutsui * This code is derived from software contributed to Berkeley by 91.1Stsutsui * the Systems Programming Group of the University of Utah Computer 101.1Stsutsui * Science Department. 111.1Stsutsui * 121.1Stsutsui * Redistribution and use in source and binary forms, with or without 131.1Stsutsui * modification, are permitted provided that the following conditions 141.1Stsutsui * are met: 151.1Stsutsui * 1. Redistributions of source code must retain the above copyright 161.1Stsutsui * notice, this list of conditions and the following disclaimer. 171.1Stsutsui * 2. Redistributions in binary form must reproduce the above copyright 181.1Stsutsui * notice, this list of conditions and the following disclaimer in the 191.1Stsutsui * documentation and/or other materials provided with the distribution. 201.1Stsutsui * 3. All advertising materials mentioning features or use of this software 211.1Stsutsui * must display the following acknowledgement: 221.1Stsutsui * This product includes software developed by the University of 231.1Stsutsui * California, Berkeley and its contributors. 241.1Stsutsui * 4. Neither the name of the University nor the names of its contributors 251.1Stsutsui * may be used to endorse or promote products derived from this software 261.1Stsutsui * without specific prior written permission. 271.1Stsutsui * 281.1Stsutsui * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND 291.1Stsutsui * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 301.1Stsutsui * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 311.1Stsutsui * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE 321.1Stsutsui * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 331.1Stsutsui * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 341.1Stsutsui * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 351.1Stsutsui * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 361.1Stsutsui * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 371.1Stsutsui * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 381.1Stsutsui * SUCH DAMAGE. 391.1Stsutsui * 401.1Stsutsui * from: Utah $Hdr: vmparam.h 1.16 91/01/18$ 411.1Stsutsui * 421.1Stsutsui * @(#)vmparam.h 8.2 (Berkeley) 4/19/94 431.1Stsutsui */ 441.1Stsutsui 451.1Stsutsui#ifndef _NEWS68K_VMPARAM_H_ 461.1Stsutsui#define _NEWS68K_VMPARAM_H_ 471.1Stsutsui 481.1Stsutsui/* 491.1Stsutsui * Machine dependent constants for news68k 501.1Stsutsui */ 511.4Sthorpej 521.4Sthorpej/* 531.4Sthorpej * We use 4K pages on the news68k. Override the PAGE_* definitions 541.4Sthorpej * to be compile time constants. 551.4Sthorpej */ 561.4Sthorpej#define PAGE_SHIFT 12 571.4Sthorpej#define PAGE_SIZE (1 << PAGE_SHIFT) 581.4Sthorpej#define PAGE_MASK (PAGE_SIZE - 1) 591.1Stsutsui 601.1Stsutsui/* 611.9Sthorpej * USRSTACK is the top (end) of the user stack. 621.1Stsutsui * 631.1Stsutsui * NOTE: the ONLY reason that HIGHPAGES is 0x100 instead of UPAGES (3) 641.1Stsutsui * is for HPUX compatibility. Why?? Because HPUX's debuggers 651.1Stsutsui * have the user's stack hard-wired at FFF00000 for post-mortems, 661.1Stsutsui * and we must be compatible... 671.1Stsutsui */ 681.10Sthorpej#define USRSTACK (-HIGHPAGES*PAGE_SIZE) /* Start of user stack */ 691.1Stsutsui#define BTOPUSRSTACK (0x100000-HIGHPAGES) /* btop(USRSTACK) */ 701.1Stsutsui#define P1PAGES 0x100000 711.10Sthorpej#define HIGHPAGES (0x100000/PAGE_SIZE) 721.1Stsutsui 731.1Stsutsui/* 741.1Stsutsui * Virtual memory related constants, all in bytes 751.1Stsutsui */ 761.1Stsutsui#ifndef MAXTSIZ 771.1Stsutsui#define MAXTSIZ (8*1024*1024) /* max text size */ 781.1Stsutsui#endif 791.1Stsutsui#ifndef DFLDSIZ 801.1Stsutsui#define DFLDSIZ (16*1024*1024) /* initial data size limit */ 811.1Stsutsui#endif 821.1Stsutsui#ifndef MAXDSIZ 831.1Stsutsui#define MAXDSIZ (64*1024*1024) /* max data size */ 841.1Stsutsui#endif 851.1Stsutsui#ifndef DFLSSIZ 861.1Stsutsui#define DFLSSIZ (512*1024) /* initial stack size limit */ 871.1Stsutsui#endif 881.1Stsutsui#ifndef MAXSSIZ 891.1Stsutsui#define MAXSSIZ MAXDSIZ /* max stack size */ 901.1Stsutsui#endif 911.1Stsutsui 921.1Stsutsui/* 931.1Stsutsui * Sizes of the system and user portions of the system page table. 941.1Stsutsui */ 951.1Stsutsui/* SYSPTSIZE IS SILLY; IT SHOULD BE COMPUTED AT BOOT TIME */ 961.1Stsutsui#define SYSPTSIZE (2 * NPTEPG) /* 8mb */ 971.1Stsutsui#define USRPTSIZE (1 * NPTEPG) /* 4mb */ 981.1Stsutsui 991.1Stsutsui/* 1001.1Stsutsui * PTEs for mapping user space into the kernel for phyio operations. 1011.1Stsutsui * One page is enough to handle 4Mb of simultaneous raw IO operations. 1021.1Stsutsui */ 1031.1Stsutsui#ifndef USRIOSIZE 1041.1Stsutsui#define USRIOSIZE (1 * NPTEPG) /* 4mb */ 1051.1Stsutsui#endif 1061.1Stsutsui 1071.1Stsutsui/* 1081.1Stsutsui * PTEs for system V style shared memory. 1091.1Stsutsui * This is basically slop for kmempt which we actually allocate (malloc) from. 1101.1Stsutsui */ 1111.1Stsutsui#ifndef SHMMAXPGS 1121.1Stsutsui#define SHMMAXPGS 1024 /* 4mb */ 1131.1Stsutsui#endif 1141.1Stsutsui 1151.1Stsutsui/* 1161.1Stsutsui * Mach derived constants 1171.1Stsutsui */ 1181.1Stsutsui 1191.1Stsutsui/* user/kernel map constants */ 1201.1Stsutsui#define VM_MIN_ADDRESS ((vaddr_t)0) 1211.1Stsutsui#define VM_MAXUSER_ADDRESS ((vaddr_t)0xFFF00000) 1221.1Stsutsui#define VM_MAX_ADDRESS ((vaddr_t)0xFFF00000) 1231.1Stsutsui#define VM_MIN_KERNEL_ADDRESS ((vaddr_t)0) 1241.1Stsutsui#define VM_MAX_KERNEL_ADDRESS ((vaddr_t)0xFFFFF000) 1251.1Stsutsui 1261.1Stsutsui/* virtual sizes (bytes) for various kernel submaps */ 1271.10Sthorpej#define VM_PHYS_SIZE (USRIOSIZE*PAGE_SIZE) 1281.1Stsutsui 1291.1Stsutsui/* # of kernel PT pages (initial only, can grow dynamically) */ 1301.1Stsutsui#define VM_KERNEL_PT_PAGES ((vsize_t)2) /* XXX: SYSPTSIZE */ 1311.1Stsutsui 1321.1Stsutsui/* 1331.1Stsutsui * Constants which control the way the VM system deals with memory segments. 1341.1Stsutsui * The news68k only has one physical memory segment? 1351.1Stsutsui */ 1361.1Stsutsui#define VM_PHYSSEG_MAX 1 1371.1Stsutsui#define VM_PHYSSEG_STRAT VM_PSTRAT_BSEARCH 1381.1Stsutsui#define VM_PHYSSEG_NOADD 1391.1Stsutsui 1401.1Stsutsui#define VM_NFREELIST 1 1411.1Stsutsui#define VM_FREELIST_DEFAULT 0 1421.6Sthorpej 1431.7Sthorpej#define __HAVE_PMAP_PHYSSEG 1441.1Stsutsui 1451.1Stsutsui/* 1461.1Stsutsui * pmap-specific data stored in the vm_physmem[] array. 1471.1Stsutsui */ 1481.1Stsutsuistruct pmap_physseg { 1491.1Stsutsui struct pv_entry *pvent; /* pv table for this seg */ 1501.1Stsutsui char *attrs; /* page attributes for this seg */ 1511.1Stsutsui}; 1521.1Stsutsui 1531.1Stsutsui#endif /* _NEWS68K_VMPARAM_H_ */ 154