Home | History | Annotate | Line # | Download | only in include
vmparam.h revision 1.8
      1  1.8  thorpej /*	$NetBSD: vmparam.h,v 1.8 2001/04/29 22:44:37 thorpej Exp $	*/
      2  1.1   itojun 
      3  1.1   itojun /*-
      4  1.1   itojun  * Copyright (c) 1990 The Regents of the University of California.
      5  1.1   itojun  * All rights reserved.
      6  1.1   itojun  *
      7  1.1   itojun  * This code is derived from software contributed to Berkeley by
      8  1.1   itojun  * William Jolitz.
      9  1.1   itojun  *
     10  1.1   itojun  * Redistribution and use in source and binary forms, with or without
     11  1.1   itojun  * modification, are permitted provided that the following conditions
     12  1.1   itojun  * are met:
     13  1.1   itojun  * 1. Redistributions of source code must retain the above copyright
     14  1.1   itojun  *    notice, this list of conditions and the following disclaimer.
     15  1.1   itojun  * 2. Redistributions in binary form must reproduce the above copyright
     16  1.1   itojun  *    notice, this list of conditions and the following disclaimer in the
     17  1.1   itojun  *    documentation and/or other materials provided with the distribution.
     18  1.1   itojun  * 3. All advertising materials mentioning features or use of this software
     19  1.1   itojun  *    must display the following acknowledgement:
     20  1.1   itojun  *	This product includes software developed by the University of
     21  1.1   itojun  *	California, Berkeley and its contributors.
     22  1.1   itojun  * 4. Neither the name of the University nor the names of its contributors
     23  1.1   itojun  *    may be used to endorse or promote products derived from this software
     24  1.1   itojun  *    without specific prior written permission.
     25  1.1   itojun  *
     26  1.1   itojun  * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
     27  1.1   itojun  * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
     28  1.1   itojun  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
     29  1.1   itojun  * ARE DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
     30  1.1   itojun  * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
     31  1.1   itojun  * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
     32  1.1   itojun  * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
     33  1.1   itojun  * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
     34  1.1   itojun  * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
     35  1.1   itojun  * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
     36  1.1   itojun  * SUCH DAMAGE.
     37  1.1   itojun  *
     38  1.1   itojun  *	@(#)vmparam.h	5.9 (Berkeley) 5/12/91
     39  1.1   itojun  */
     40  1.1   itojun 
     41  1.1   itojun #ifndef _MACHINE_VMPARAM_H_
     42  1.1   itojun #define _MACHINE_VMPARAM_H_
     43  1.1   itojun 
     44  1.1   itojun /*
     45  1.1   itojun  * Machine dependent constants for sh3.
     46  1.1   itojun  */
     47  1.1   itojun 
     48  1.1   itojun /*
     49  1.1   itojun  * Virtual address space arrangement. On 386, both user and kernel
     50  1.1   itojun  * share the address space, not unlike the vax.
     51  1.1   itojun  * USRTEXT is the start of the user text/data space, while USRSTACK
     52  1.1   itojun  * is the top (end) of the user stack. Immediately above the user stack
     53  1.1   itojun  * resides the user structure, which is UPAGES long and contains the
     54  1.1   itojun  * kernel stack.
     55  1.1   itojun  *
     56  1.1   itojun  * Immediately after the user structure is the page table map, and then
     57  1.1   itojun  * kernal address space.
     58  1.1   itojun  */
     59  1.3    ragge #define	USRTEXT		NBPG
     60  1.1   itojun #define	USRSTACK	VM_MAXUSER_ADDRESS
     61  1.1   itojun 
     62  1.1   itojun /*
     63  1.1   itojun  * Virtual memory related constants, all in bytes
     64  1.1   itojun  */
     65  1.1   itojun #define	MAXTSIZ		(64*1024*1024)		/* max text size */
     66  1.1   itojun #ifndef DFLDSIZ
     67  1.1   itojun #define	DFLDSIZ		(128*1024*1024)		/* initial data size limit */
     68  1.1   itojun #endif
     69  1.1   itojun #ifndef MAXDSIZ
     70  1.1   itojun #define	MAXDSIZ		(1*1024*1024*1024)	/* max data size */
     71  1.1   itojun #endif
     72  1.1   itojun #ifndef	DFLSSIZ
     73  1.1   itojun #define	DFLSSIZ		(2*1024*1024)		/* initial stack size limit */
     74  1.1   itojun #endif
     75  1.1   itojun #ifndef	MAXSSIZ
     76  1.1   itojun #define	MAXSSIZ		(32*1024*1024)		/* max stack size */
     77  1.1   itojun #endif
     78  1.1   itojun 
     79  1.1   itojun /*
     80  1.1   itojun  * Size of shared memory map
     81  1.1   itojun  */
     82  1.1   itojun #ifndef SHMMAXPGS
     83  1.1   itojun #define SHMMAXPGS	1024
     84  1.1   itojun #endif
     85  1.1   itojun 
     86  1.1   itojun /*
     87  1.1   itojun  * Size of User Raw I/O map
     88  1.1   itojun  */
     89  1.1   itojun #define	USRIOSIZE 	300
     90  1.1   itojun 
     91  1.1   itojun /*
     92  1.1   itojun  * The time for a process to be blocked before being very swappable.
     93  1.1   itojun  * This is a number of seconds which the system takes as being a non-trivial
     94  1.1   itojun  * amount of real time.  You probably shouldn't change this;
     95  1.1   itojun  * it is used in subtle ways (fractions and multiples of it are, that is, like
     96  1.1   itojun  * half of a ``long time'', almost a long time, etc.)
     97  1.1   itojun  * It is related to human patience and other factors which don't really
     98  1.1   itojun  * change over time.
     99  1.1   itojun  */
    100  1.1   itojun #define	MAXSLP 		20
    101  1.1   itojun 
    102  1.1   itojun /*
    103  1.1   itojun  * Mach derived constants
    104  1.1   itojun  */
    105  1.1   itojun 
    106  1.1   itojun /* user/kernel map constants */
    107  1.1   itojun #define VM_MIN_ADDRESS		((vaddr_t)0)
    108  1.1   itojun /* PTDPTDI<<PDSHIFT - UPAGES*NBPG */
    109  1.1   itojun #define VM_MAXUSER_ADDRESS	((vaddr_t)0x7fffe000)
    110  1.1   itojun /* PTDPTDI<<PDSHIFT + PTDPTDI<<PGSHIFT */
    111  1.1   itojun #define VM_MAX_ADDRESS		((vaddr_t)0xcffbf000)
    112  1.1   itojun /* KPTDI<<PDSHIFT */
    113  1.1   itojun #define VM_MIN_KERNEL_ADDRESS	((vaddr_t)0xd0000000)
    114  1.1   itojun /* APTDPTDI<<PDSHIFT */
    115  1.1   itojun #define VM_MAX_KERNEL_ADDRESS	((vaddr_t)0xdfc00000)
    116  1.1   itojun 
    117  1.1   itojun /* XXX max. amount of KVM to be used by buffers. */
    118  1.1   itojun #ifndef VM_MAX_KERNEL_BUF
    119  1.1   itojun #define VM_MAX_KERNEL_BUF \
    120  1.1   itojun 	((VM_MAX_KERNEL_ADDRESS - VM_MIN_KERNEL_ADDRESS) * 7 / 10)
    121  1.1   itojun #endif
    122  1.1   itojun 
    123  1.1   itojun /* virtual sizes (bytes) for various kernel submaps */
    124  1.3    ragge #define VM_PHYS_SIZE		(USRIOSIZE*NBPG)
    125  1.1   itojun 
    126  1.1   itojun #define VM_PHYSSEG_STRAT	VM_PSTRAT_BSEARCH
    127  1.1   itojun #define VM_PHYSSEG_NOADD		/* no more after vm_mem_init */
    128  1.8  thorpej 
    129  1.8  thorpej #define	VM_MDPAGE_MEMBERS	/* XXX nothing yet */
    130  1.8  thorpej #define	VM_MDPAGE_INIT(pg)	/* XXX nothing yet */
    131  1.8  thorpej #define	PMAP_PHYSSEG		/* XXX for now */
    132  1.1   itojun 
    133  1.1   itojun /*
    134  1.1   itojun  * pmap specific data stored in the vm_physmem[] array
    135  1.1   itojun  */
    136  1.1   itojun struct pmap_physseg {
    137  1.1   itojun 	struct pv_head *pvhead;		/* pv_head array */
    138  1.1   itojun 	char *attrs;			/* attrs array */
    139  1.1   itojun };
    140  1.1   itojun 
    141  1.1   itojun #endif /* _MACHINE_VMPARAM_H_ */
    142