1*fc9073f9Stsutsui /* $NetBSD: vmparam.h,v 1.38 2020/02/01 19:41:49 tsutsui Exp $ */ 20b036e11Schuck 30b036e11Schuck /* 49b6bd2d9Srmind * Copyright (c) 1988 University of Utah. 50b036e11Schuck * Copyright (c) 1982, 1986, 1990, 1993 60b036e11Schuck * The Regents of the University of California. All rights reserved. 70b036e11Schuck * 80b036e11Schuck * This code is derived from software contributed to Berkeley by 90b036e11Schuck * the Systems Programming Group of the University of Utah Computer 100b036e11Schuck * Science Department. 110b036e11Schuck * 120b036e11Schuck * Redistribution and use in source and binary forms, with or without 130b036e11Schuck * modification, are permitted provided that the following conditions 140b036e11Schuck * are met: 150b036e11Schuck * 1. Redistributions of source code must retain the above copyright 160b036e11Schuck * notice, this list of conditions and the following disclaimer. 170b036e11Schuck * 2. Redistributions in binary form must reproduce the above copyright 180b036e11Schuck * notice, this list of conditions and the following disclaimer in the 190b036e11Schuck * documentation and/or other materials provided with the distribution. 20aad01611Sagc * 3. Neither the name of the University nor the names of its contributors 21aad01611Sagc * may be used to endorse or promote products derived from this software 22aad01611Sagc * without specific prior written permission. 23aad01611Sagc * 24aad01611Sagc * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND 25aad01611Sagc * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 26aad01611Sagc * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 27aad01611Sagc * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE 28aad01611Sagc * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 29aad01611Sagc * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 30aad01611Sagc * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 31aad01611Sagc * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 32aad01611Sagc * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 33aad01611Sagc * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 34aad01611Sagc * SUCH DAMAGE. 35aad01611Sagc * 36aad01611Sagc * from: Utah $Hdr: vmparam.h 1.16 91/01/18$ 37aad01611Sagc * 38aad01611Sagc * @(#)vmparam.h 8.2 (Berkeley) 4/19/94 39aad01611Sagc */ 400b036e11Schuck 410e88177cSscw #ifndef _MVME68K_VMPARAM_H_ 420e88177cSscw #define _MVME68K_VMPARAM_H_ 430e88177cSscw 440b036e11Schuck /* 450b036e11Schuck * Machine dependent constants for MVME68K 460b036e11Schuck */ 470e88177cSscw 480b036e11Schuck /* 49*fc9073f9Stsutsui * Use common m68k definitions to define PAGE_SIZE and related constants. 50ecf04700Sthorpej */ 51*fc9073f9Stsutsui #include <m68k/vmparam.h> 52ecf04700Sthorpej 53ecf04700Sthorpej /* 5478ea2dd3Sthorpej * USRSTACK is the top (end) of the user stack. 550b036e11Schuck * 560b036e11Schuck * NOTE: the ONLY reason that HIGHPAGES is 0x100 instead of UPAGES (3) 570b036e11Schuck * is for HPUX compatibility. Why?? Because HPUX's debuggers 580b036e11Schuck * have the user's stack hard-wired at FFF00000 for post-mortems, 590b036e11Schuck * and we must be compatible... 600b036e11Schuck */ 61cc2c493bSthorpej #define USRSTACK (-HIGHPAGES*PAGE_SIZE) /* Start of user stack */ 620b036e11Schuck #define BTOPUSRSTACK (0x100000-HIGHPAGES) /* btop(USRSTACK) */ 630b036e11Schuck #define P1PAGES 0x100000 64cc2c493bSthorpej #define HIGHPAGES (0x100000/PAGE_SIZE) 650b036e11Schuck 660b036e11Schuck /* 670b036e11Schuck * Virtual memory related constants, all in bytes 680b036e11Schuck */ 690b036e11Schuck #ifndef MAXTSIZ 709e3d987aSrin #define MAXTSIZ (32*1024*1024) /* max text size */ 710b036e11Schuck #endif 720b036e11Schuck #ifndef DFLDSIZ 730d5db1f6Sscw #define DFLDSIZ (32*1024*1024) /* initial data size limit */ 740b036e11Schuck #endif 750b036e11Schuck #ifndef MAXDSIZ 760b036e11Schuck #define MAXDSIZ (64*1024*1024) /* max data size */ 770b036e11Schuck #endif 780b036e11Schuck #ifndef DFLSSIZ 790b036e11Schuck #define DFLSSIZ (512*1024) /* initial stack size limit */ 800b036e11Schuck #endif 810b036e11Schuck #ifndef MAXSSIZ 820b036e11Schuck #define MAXSSIZ MAXDSIZ /* max stack size */ 830b036e11Schuck #endif 840b036e11Schuck 850b036e11Schuck /* 860b036e11Schuck * PTEs for mapping user space into the kernel for phyio operations. 870b036e11Schuck * One page is enough to handle 4Mb of simultaneous raw IO operations. 880b036e11Schuck */ 890b036e11Schuck #ifndef USRIOSIZE 900b036e11Schuck #define USRIOSIZE (1 * NPTEPG) /* 4mb */ 910b036e11Schuck #endif 920b036e11Schuck 930b036e11Schuck /* 940b036e11Schuck * Mach derived constants 950b036e11Schuck */ 960b036e11Schuck 970b036e11Schuck /* user/kernel map constants */ 98a84a6744Sscw #define VM_MIN_ADDRESS ((vaddr_t)0) 99a84a6744Sscw #define VM_MAXUSER_ADDRESS ((vaddr_t)0xFFF00000) 100a84a6744Sscw #define VM_MAX_ADDRESS ((vaddr_t)0xFFF00000) 101a84a6744Sscw #define VM_MIN_KERNEL_ADDRESS ((vaddr_t)0) 10246705dc7Stsutsui #define VM_MAX_KERNEL_ADDRESS ((vaddr_t)(0-PAGE_SIZE*NPTEPG)) 1030b036e11Schuck 1040b036e11Schuck /* virtual sizes (bytes) for various kernel submaps */ 105cc2c493bSthorpej #define VM_PHYS_SIZE (USRIOSIZE*PAGE_SIZE) 1060b036e11Schuck 1070b036e11Schuck /* # of kernel PT pages (initial only, can grow dynamically) */ 1086eadace4Srin #define VM_KERNEL_PT_PAGES ((vsize_t)2) 1090b036e11Schuck 1100e88177cSscw /* 1110e88177cSscw * Constants which control the way the VM system deals with memory segments. 1120e88177cSscw * The mvme68k port has two physical memory segments: 1 for onboard RAM 1130e88177cSscw * and another for contiguous VMEbus RAM. 1140e88177cSscw */ 1150e88177cSscw #define VM_PHYSSEG_MAX 2 1160e88177cSscw #define VM_PHYSSEG_STRAT VM_PSTRAT_RANDOM 1170e88177cSscw 1186fa49323Sthorpej #define VM_NFREELIST 2 1196fa49323Sthorpej #define VM_FREELIST_DEFAULT 0 1206fa49323Sthorpej #define VM_FREELIST_VMEMEM 1 1216fa49323Sthorpej 122cf67ac71Sthorpej #define __HAVE_PMAP_PHYSSEG 1232b27ac7aSthorpej 1240e88177cSscw /* 1250e88177cSscw * pmap-specific data stored in the vm_physmem[] array. 1260e88177cSscw */ 1270e88177cSscw struct pmap_physseg { 128b5fd5d57Sthorpej struct pv_header *pvheader; /* pv table for this seg */ 1290e88177cSscw }; 1300e88177cSscw 1310e88177cSscw #endif /* _MVME68K_VMPARAM_H_ */ 132