11556Srgrimes/* $OpenBSD: vmparam.h,v 1.57 2021/03/16 18:04:16 kurt Exp $ */ 21556Srgrimes/* $NetBSD: vmparam.h,v 1.15 1994/10/27 04:16:34 cgd Exp $ */ 31556Srgrimes 41556Srgrimes/*- 51556Srgrimes * Copyright (c) 1990 The Regents of the University of California. 61556Srgrimes * All rights reserved. 71556Srgrimes * 81556Srgrimes * This code is derived from software contributed to Berkeley by 91556Srgrimes * William Jolitz. 101556Srgrimes * 111556Srgrimes * Redistribution and use in source and binary forms, with or without 121556Srgrimes * modification, are permitted provided that the following conditions 131556Srgrimes * are met: 141556Srgrimes * 1. Redistributions of source code must retain the above copyright 151556Srgrimes * notice, this list of conditions and the following disclaimer. 161556Srgrimes * 2. Redistributions in binary form must reproduce the above copyright 171556Srgrimes * notice, this list of conditions and the following disclaimer in the 181556Srgrimes * documentation and/or other materials provided with the distribution. 191556Srgrimes * 3. Neither the name of the University nor the names of its contributors 201556Srgrimes * may be used to endorse or promote products derived from this software 211556Srgrimes * without specific prior written permission. 221556Srgrimes * 231556Srgrimes * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND 241556Srgrimes * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 251556Srgrimes * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 261556Srgrimes * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE 271556Srgrimes * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 281556Srgrimes * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 291556Srgrimes * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 301556Srgrimes * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 311556Srgrimes * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 3217987Speter * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 3350471Speter * SUCH DAMAGE. 341556Srgrimes * 351556Srgrimes * @(#)vmparam.h 5.9 (Berkeley) 5/12/91 361556Srgrimes */ 371556Srgrimes 381556Srgrimes#ifndef _MACHINE_VMPARAM_H_ 391556Srgrimes#define _MACHINE_VMPARAM_H_ 4046684Skris/* 411556Srgrimes * Machine dependent constants for 386. 421556Srgrimes */ 431556Srgrimes 441556Srgrimes#define USRSTACK VM_MAXUSER_ADDRESS 451556Srgrimes 461556Srgrimes/* 4738521Scracauer * Virtual memory related constants, all in bytes 481556Srgrimes */ 491556Srgrimes#define MAXTSIZ (256*1024*1024) /* max text size */ 501556Srgrimes#ifndef DFLDSIZ 511556Srgrimes#define DFLDSIZ (64*1024*1024) /* initial data size limit */ 521556Srgrimes#endif 531556Srgrimes#ifndef MAXDSIZ 5438530Scracauer#define MAXDSIZ (3UL*1024*1024*1024) /* max data size */ 551556Srgrimes#endif 561556Srgrimes#ifndef BRKSIZ 571556Srgrimes#define BRKSIZ (128*1024*1024) /* heap gap size */ 581556Srgrimes#endif 59218306Sjilles#ifndef DFLSSIZ 60220978Sjilles#define DFLSSIZ (4*1024*1024) /* initial stack size limit */ 611556Srgrimes#endif 621556Srgrimes#ifndef MAXSSIZ 631556Srgrimes#define MAXSSIZ (32*1024*1024) /* max stack size */ 641556Srgrimes#endif 651556Srgrimes 661556Srgrimes#define STACKGAP_RANDOM 256*1024 671556Srgrimes 681556Srgrimes/* I386 has a line where all code is executable: 0 - I386_MAX_EXE_ADDR */ 691556Srgrimes#define I386_MAX_EXE_ADDR 0x20000000 /* exec line */ 7038521Scracauer 7138521Scracauer/* map PIE into 320MB - 448MB address range */ 721556Srgrimes#define VM_PIE_MIN_ADDR 0x14000000 731556Srgrimes#define VM_PIE_MAX_ADDR 0x1C000000 7417987Speter 75199660Sjilles/* 76199660Sjilles * Size of shared memory map 771556Srgrimes */ 781556Srgrimes#ifndef SHMMAXPGS 791556Srgrimes#define SHMMAXPGS 8192 801556Srgrimes#endif 81200967Sjilles 8290111Simp/* 83216622Sjilles * Size of User Raw I/O map 84200967Sjilles */ 85200967Sjilles#define USRIOSIZE 300 861556Srgrimes 871556Srgrimes/* 881556Srgrimes * Specific addresses being unmapped and used as fillers for free memory. 891556Srgrimes */ 901556Srgrimes#define DEADBEEF0 0xefffeecc /* malloc's filler */ 911556Srgrimes#define DEADBEEF1 0xefffaabb /* pool's filler */ 921556Srgrimes 931556Srgrimes/* user/kernel map constants */ 941556Srgrimes#define VM_MIN_ADDRESS ((vaddr_t)PAGE_SIZE) 95#define VM_MAXUSER_ADDRESS ((vaddr_t)((PDSLOT_PTE<<PDSHIFT) - (2 * PAGE_SIZE))) 96#define VM_MAX_ADDRESS ((vaddr_t)((PDSLOT_PTE<<PDSHIFT) + \ 97 (PDSLOT_PTE<<PAGE_SHIFT))) 98#define VM_MIN_KERNEL_ADDRESS ((vaddr_t)KERNBASE) 99#define VM_MAX_KERNEL_ADDRESS ((vaddr_t)(PDSLOT_APTE<<PDSHIFT)) 100 101/* virtual sizes (bytes) for various kernel submaps */ 102#define VM_PHYS_SIZE (USRIOSIZE*PAGE_SIZE) 103 104#define VM_PHYSSEG_MAX 16 /* actually we could have this many segments */ 105#define VM_PHYSSEG_STRAT VM_PSTRAT_BSEARCH 106#define VM_PHYSSEG_NOADD /* can't add RAM after vm_mem_init */ 107 108#endif /* _MACHINE_VMPARAM_H_ */ 109