1 1.41 tsutsui /* $NetBSD: vmparam.h,v 1.41 2025/02/08 23:44:54 tsutsui Exp $ */ 2 1.1 oki 3 1.1 oki /* 4 1.33 rmind * Copyright (c) 1988 University of Utah. 5 1.1 oki * Copyright (c) 1982, 1986, 1990, 1993 6 1.1 oki * The Regents of the University of California. All rights reserved. 7 1.26 agc * 8 1.26 agc * This code is derived from software contributed to Berkeley by 9 1.26 agc * the Systems Programming Group of the University of Utah Computer 10 1.26 agc * Science Department. 11 1.26 agc * 12 1.26 agc * Redistribution and use in source and binary forms, with or without 13 1.26 agc * modification, are permitted provided that the following conditions 14 1.26 agc * are met: 15 1.26 agc * 1. Redistributions of source code must retain the above copyright 16 1.26 agc * notice, this list of conditions and the following disclaimer. 17 1.26 agc * 2. Redistributions in binary form must reproduce the above copyright 18 1.26 agc * notice, this list of conditions and the following disclaimer in the 19 1.26 agc * documentation and/or other materials provided with the distribution. 20 1.26 agc * 3. Neither the name of the University nor the names of its contributors 21 1.26 agc * may be used to endorse or promote products derived from this software 22 1.26 agc * without specific prior written permission. 23 1.26 agc * 24 1.26 agc * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND 25 1.26 agc * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 26 1.26 agc * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 27 1.26 agc * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE 28 1.26 agc * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 29 1.26 agc * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 30 1.26 agc * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 31 1.26 agc * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 32 1.26 agc * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 33 1.26 agc * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 34 1.26 agc * SUCH DAMAGE. 35 1.26 agc * 36 1.26 agc * from: Utah $Hdr: vmparam.h 1.16 91/01/18$ 37 1.26 agc * 38 1.26 agc * @(#)vmparam.h 8.2 (Berkeley) 4/19/94 39 1.26 agc */ 40 1.1 oki 41 1.4 msaitoh #ifndef _X68K_VMPARAM_H_ 42 1.4 msaitoh #define _X68K_VMPARAM_H_ 43 1.4 msaitoh 44 1.1 oki /* 45 1.1 oki * Machine dependent constants for X68K 46 1.1 oki */ 47 1.15 thorpej 48 1.15 thorpej /* 49 1.40 tsutsui * Use common m68k definitions to define PAGE_SIZE and related constants. 50 1.40 tsutsui */ 51 1.40 tsutsui #include <m68k/vmparam.h> 52 1.15 thorpej 53 1.1 oki /* 54 1.24 thorpej * USRSTACK is the top (end) of the user stack. 55 1.1 oki */ 56 1.19 minoura #define USRSTACK VM_MAXUSER_ADDRESS /* Start of user stack */ 57 1.1 oki 58 1.1 oki /* 59 1.1 oki * Virtual memory related constants, all in bytes 60 1.1 oki */ 61 1.1 oki #ifndef MAXTSIZ 62 1.38 rin #define MAXTSIZ (32*1024*1024) /* max text size */ 63 1.1 oki #endif 64 1.1 oki #ifndef DFLDSIZ 65 1.1 oki #define DFLDSIZ (16*1024*1024) /* initial data size limit */ 66 1.1 oki #endif 67 1.1 oki #ifndef MAXDSIZ 68 1.1 oki #define MAXDSIZ (64*1024*1024) /* max data size */ 69 1.1 oki #endif 70 1.1 oki #ifndef DFLSSIZ 71 1.41 tsutsui #define DFLSSIZ (2*1024*1024) /* initial stack size limit */ 72 1.1 oki #endif 73 1.1 oki #ifndef MAXSSIZ 74 1.1 oki #define MAXSSIZ MAXDSIZ /* max stack size */ 75 1.1 oki #endif 76 1.1 oki 77 1.1 oki /* 78 1.1 oki * PTEs for mapping user space into the kernel for phyio operations. 79 1.1 oki * One page is enough to handle 4Mb of simultaneous raw IO operations. 80 1.1 oki */ 81 1.1 oki #ifndef USRIOSIZE 82 1.1 oki #define USRIOSIZE (1 * NPTEPG) /* 4mb */ 83 1.1 oki #endif 84 1.1 oki 85 1.1 oki /* 86 1.1 oki * Mach derived constants 87 1.1 oki */ 88 1.1 oki 89 1.1 oki /* user/kernel map constants */ 90 1.6 minoura #define VM_MIN_ADDRESS ((vaddr_t)0) 91 1.34 tsutsui #define VM_MAXUSER_ADDRESS ((vaddr_t)0xFFF00000) 92 1.34 tsutsui #define VM_MAX_ADDRESS ((vaddr_t)0xFFF00000) 93 1.6 minoura #define VM_MIN_KERNEL_ADDRESS ((vaddr_t)0) 94 1.27 yamt #define VM_MAX_KERNEL_ADDRESS ((vaddr_t)(0-PAGE_SIZE*NPTEPG)) 95 1.1 oki 96 1.1 oki /* virtual sizes (bytes) for various kernel submaps */ 97 1.25 thorpej #define VM_PHYS_SIZE (USRIOSIZE*PAGE_SIZE) 98 1.1 oki 99 1.1 oki /* # of kernel PT pages (initial only, can grow dynamically) */ 100 1.37 rin #define VM_KERNEL_PT_PAGES ((vsize_t)4) 101 1.4 msaitoh 102 1.4 msaitoh /* 103 1.4 msaitoh * Constants which control the way the VM system deals with memory segments. 104 1.4 msaitoh */ 105 1.4 msaitoh #define VM_PHYSSEG_MAX 3 106 1.12 minoura #define VM_PHYSSEG_STRAT VM_PSTRAT_BIGFIRST 107 1.12 minoura /* Actually VM_PSTRAT_UPPERFIRST is needed */ 108 1.5 thorpej 109 1.35 tsutsui #define VM_NFREELIST 2 110 1.5 thorpej #define VM_FREELIST_DEFAULT 0 111 1.35 tsutsui #define VM_FREELIST_HIGHMEM VM_FREELIST_DEFAULT 112 1.35 tsutsui #define VM_FREELIST_MAINMEM 1 113 1.20 thorpej 114 1.21 thorpej #define __HAVE_PMAP_PHYSSEG 115 1.4 msaitoh 116 1.4 msaitoh /* 117 1.4 msaitoh * pmap-specific data stored in the vm_physmem[] array. 118 1.4 msaitoh */ 119 1.4 msaitoh struct pmap_physseg { 120 1.30 thorpej struct pv_header *pvheader; /* pv table for this seg */ 121 1.4 msaitoh }; 122 1.4 msaitoh 123 1.4 msaitoh #endif /* _X68K_VMPARAM_H_ */ 124