vmparam.h revision 170033
1313544Spstef/*- 2313544Spstef * Copyright (C) 1995, 1996 Wolfgang Solfrank. 3313544Spstef * Copyright (C) 1995, 1996 TooLs GmbH. 4313544Spstef * All rights reserved. 5313544Spstef * 6313544Spstef * Redistribution and use in source and binary forms, with or without 7313544Spstef * modification, are permitted provided that the following conditions 8313544Spstef * are met: 9313544Spstef * 1. Redistributions of source code must retain the above copyright 10313544Spstef * notice, this list of conditions and the following disclaimer. 11313544Spstef * 2. Redistributions in binary form must reproduce the above copyright 12313544Spstef * notice, this list of conditions and the following disclaimer in the 13313544Spstef * documentation and/or other materials provided with the distribution. 14 * 3. All advertising materials mentioning features or use of this software 15 * must display the following acknowledgement: 16 * This product includes software developed by TooLs GmbH. 17 * 4. The name of TooLs GmbH may not be used to endorse or promote products 18 * derived from this software without specific prior written permission. 19 * 20 * THIS SOFTWARE IS PROVIDED BY TOOLS GMBH ``AS IS'' AND ANY EXPRESS OR 21 * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES 22 * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. 23 * IN NO EVENT SHALL TOOLS GMBH BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 24 * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, 25 * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; 26 * OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, 27 * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR 28 * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF 29 * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 30 * 31 * $NetBSD: vmparam.h,v 1.11 2000/02/11 19:25:16 thorpej Exp $ 32 * $FreeBSD: head/sys/powerpc/include/vmparam.h 170033 2007-05-27 20:34:26Z alc $ 33 */ 34 35#ifndef _MACHINE_VMPARAM_H_ 36#define _MACHINE_VMPARAM_H_ 37 38#define USRSTACK VM_MAXUSER_ADDRESS 39 40#ifndef MAXTSIZ 41#define MAXTSIZ (16*1024*1024) /* max text size */ 42#endif 43 44#ifndef DFLDSIZ 45#define DFLDSIZ (32*1024*1024) /* default data size */ 46#endif 47 48#ifndef MAXDSIZ 49#define MAXDSIZ (512*1024*1024) /* max data size */ 50#endif 51 52#ifndef DFLSSIZ 53#define DFLSSIZ (1*1024*1024) /* default stack size */ 54#endif 55 56#ifndef MAXSSIZ 57#define MAXSSIZ (32*1024*1024) /* max stack size */ 58#endif 59 60/* 61 * Size of shared memory map 62 */ 63#ifndef SHMMAXPGS 64#define SHMMAXPGS 1024 65#endif 66 67/* 68 * The time for a process to be blocked before being very swappable. 69 * This is a number of seconds which the system takes as being a non-trivial 70 * amount of real time. You probably shouldn't change this; 71 * it is used in subtle ways (fractions and multiples of it are, that is, like 72 * half of a ``long time'', almost a long time, etc.) 73 * It is related to human patience and other factors which don't really 74 * change over time. 75 */ 76#define MAXSLP 20 77 78/* 79 * Use the direct-mapped BAT registers for UMA small allocs. This 80 * takes pressure off the small amount of available KVA. 81 */ 82#define UMA_MD_SMALL_ALLOC 83 84/* 85 * Would like to have MAX addresses = 0, but this doesn't (currently) work 86 */ 87#define VM_MIN_ADDRESS ((vm_offset_t)0) 88#define VM_MAXUSER_ADDRESS ((vm_offset_t)0x7ffff000) 89#define VM_MAX_ADDRESS VM_MAXUSER_ADDRESS 90#define VM_MIN_KERNEL_ADDRESS ((vm_offset_t)(KERNEL_SR << ADDR_SR_SHFT)) 91#define VM_MAX_KERNEL_ADDRESS (VM_MIN_KERNEL_ADDRESS + 2*SEGMENT_LENGTH - 1) 92 93#define KERNBASE 0x100000 /* start of kernel virtual */ 94 95/* XXX max. amount of KVM to be used by buffers. */ 96#ifndef VM_MAX_KERNEL_BUF 97#define VM_MAX_KERNEL_BUF (SEGMENT_LENGTH * 7 / 10) 98#endif 99 100struct pmap_physseg { 101 struct pv_entry *pvent; 102 char *attrs; 103}; 104 105#define VM_PHYSSEG_MAX 16 /* 1? */ 106#define VM_PHYSSEG_STRAT VM_PSTRAT_BSEARCH 107#define VM_PHYSSEG_NOADD /* can't add RAM after vm_mem_init */ 108 109/* 110 * The physical address space is densely populated. 111 */ 112#define VM_PHYSSEG_DENSE 113 114#define VM_NFREELIST 1 115#define VM_FREELIST_DEFAULT 0 116 117#ifndef VM_INITIAL_PAGEIN 118#define VM_INITIAL_PAGEIN 16 119#endif 120 121#ifndef SGROWSIZ 122#define SGROWSIZ (128UL*1024) /* amount to grow stack */ 123#endif 124 125#ifndef VM_KMEM_SIZE 126#define VM_KMEM_SIZE (12 * 1024 * 1024) 127#endif 128 129#endif /* _MACHINE_VMPARAM_H_ */ 130