1*d7e7dacbSderaadt /* $OpenBSD: vmparam.h,v 1.31 2023/11/16 13:47:22 deraadt Exp $ */ 2f58c7388Spefo /* $NetBSD: vmparam.h,v 1.5 1994/10/26 21:10:10 cgd Exp $ */ 3f58c7388Spefo 4f58c7388Spefo /* 5f58c7388Spefo * Copyright (c) 1988 University of Utah. 6f58c7388Spefo * Copyright (c) 1992, 1993 7f58c7388Spefo * The Regents of the University of California. All rights reserved. 8f58c7388Spefo * 9f58c7388Spefo * This code is derived from software contributed to Berkeley by 10f58c7388Spefo * the Systems Programming Group of the University of Utah Computer 11f58c7388Spefo * Science Department and Ralph Campbell. 12f58c7388Spefo * 13f58c7388Spefo * Redistribution and use in source and binary forms, with or without 14f58c7388Spefo * modification, are permitted provided that the following conditions 15f58c7388Spefo * are met: 16f58c7388Spefo * 1. Redistributions of source code must retain the above copyright 17f58c7388Spefo * notice, this list of conditions and the following disclaimer. 18f58c7388Spefo * 2. Redistributions in binary form must reproduce the above copyright 19f58c7388Spefo * notice, this list of conditions and the following disclaimer in the 20f58c7388Spefo * documentation and/or other materials provided with the distribution. 2153aa784aSmiod * 3. Neither the name of the University nor the names of its contributors 22f58c7388Spefo * may be used to endorse or promote products derived from this software 23f58c7388Spefo * without specific prior written permission. 24f58c7388Spefo * 25f58c7388Spefo * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND 26f58c7388Spefo * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 27f58c7388Spefo * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 28f58c7388Spefo * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE 29f58c7388Spefo * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 30f58c7388Spefo * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 31f58c7388Spefo * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 32f58c7388Spefo * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 33f58c7388Spefo * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 34f58c7388Spefo * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 35f58c7388Spefo * SUCH DAMAGE. 36f58c7388Spefo * 37f58c7388Spefo * from: Utah Hdr: vmparam.h 1.16 91/01/18 38f58c7388Spefo * @(#)vmparam.h 8.2 (Berkeley) 4/22/94 39f58c7388Spefo */ 40f58c7388Spefo 412fa72412Spirofti #ifndef _MIPS64_VMPARAM_H_ 422fa72412Spirofti #define _MIPS64_VMPARAM_H_ 43f58c7388Spefo 44f58c7388Spefo /* 45f58c7388Spefo * Machine dependent constants mips processors. 46f58c7388Spefo */ 4797a95142Smiod 4884d051cfSmiod #define USRSTACK VM_MAXUSER_ADDRESS /* Start of user stack */ 49f58c7388Spefo 50f58c7388Spefo /* 51f58c7388Spefo * Virtual memory related constants, all in bytes 52f58c7388Spefo */ 53f58c7388Spefo #ifndef MAXTSIZ 54*d7e7dacbSderaadt #define MAXTSIZ (128*1024*1024) /* max text size */ 55f58c7388Spefo #endif 56f58c7388Spefo #ifndef DFLDSIZ 57ae6cfd8cSpefo #define DFLDSIZ (128*1024*1024) /* initial data size limit */ 58f58c7388Spefo #endif 59f58c7388Spefo #ifndef MAXDSIZ 60f39ec411Svisa #define MAXDSIZ (16UL*1024*1024*1024) /* max data size */ 61f58c7388Spefo #endif 6201d0831fStedu #ifndef BRKSIZ 6301d0831fStedu #define BRKSIZ MAXDSIZ /* heap gap size */ 6401d0831fStedu #endif 65f58c7388Spefo #ifndef DFLSSIZ 66f58c7388Spefo #define DFLSSIZ (2*1024*1024) /* initial stack size limit */ 67f58c7388Spefo #endif 68f58c7388Spefo #ifndef MAXSSIZ 69f58c7388Spefo #define MAXSSIZ (32*1024*1024) /* max stack size */ 70f58c7388Spefo #endif 71f58c7388Spefo 72a489ea08Sderaadt #define STACKGAP_RANDOM 256*1024 73a489ea08Sderaadt 74f58c7388Spefo /* 75f37e88deSmiod * PTEs for mapping user space into the kernel for physio operations. 76f58c7388Spefo * 16 pte's are enough to cover 8 disks * MAXBSIZE. 77f58c7388Spefo */ 78f58c7388Spefo #ifndef USRIOSIZE 79f58c7388Spefo #define USRIOSIZE 32 80f58c7388Spefo #endif 81f58c7388Spefo 82f58c7388Spefo /* 83f58c7388Spefo * PTEs for system V style shared memory. 84f58c7388Spefo * This is basically slop for kmempt which we actually allocate (malloc) from. 85f58c7388Spefo */ 86f58c7388Spefo #ifndef SHMMAXPGS 87f58c7388Spefo #define SHMMAXPGS 8192 /* 8mb */ 88f58c7388Spefo #endif 89f58c7388Spefo 904683fd8aSmiod #ifndef VM_PHYSSEG_MAX 91f58c7388Spefo #define VM_PHYSSEG_MAX 8 /* Max number of physical memory segments */ 924683fd8aSmiod #endif 9397a95142Smiod #ifndef VM_PHYSSEG_STRAT 94f58c7388Spefo #define VM_PHYSSEG_STRAT VM_PSTRAT_BSEARCH 9597a95142Smiod #endif 96f58c7388Spefo #define VM_PHYSSEG_NOADD 97f58c7388Spefo 98f58c7388Spefo /* user/kernel map constants */ 992239ae50Smiod #define VM_MIN_ADDRESS ((vaddr_t)0x0000000000004000L) 100f39ec411Svisa #define VM_MAXUSER_ADDRESS ((vaddr_t)0x0000010000000000L) 10184d051cfSmiod #define VM_MAX_ADDRESS VM_MAXUSER_ADDRESS 102e8dad7d8Skettenis #ifdef _KERNEL 103e8dad7d8Skettenis #define VM_MIN_STACK_ADDRESS ((vaddr_t)0x000000c000000000L) 104e8dad7d8Skettenis #endif 10584d051cfSmiod #define VM_MIN_KERNEL_ADDRESS ((vaddr_t)0xc000000000000000L) 10684d051cfSmiod #define VM_MAX_KERNEL_ADDRESS ((vaddr_t)0xc000000040000000L) 107f58c7388Spefo 108574484f9Svisa /* map PIE into approximately the first quarter of user va space */ 10931af9a24Skurt #define VM_PIE_MIN_ADDR PAGE_SIZE 110f39ec411Svisa #define VM_PIE_MAX_ADDR (0x4000000000UL) 11131af9a24Skurt 112f58c7388Spefo /* virtual sizes (bytes) for various kernel submaps */ 113f58c7388Spefo #define VM_PHYS_SIZE (USRIOSIZE*PAGE_SIZE) 114f58c7388Spefo 1152fa72412Spirofti #endif /* !_MIPS64_VMPARAM_H_ */ 116