Home | History | Annotate | Line # | Download | only in include
      1 /*	$NetBSD: vmparam.h,v 1.22 2021/02/26 01:48:20 simonb Exp $	*/
      2 
      3 /*	$OpenBSD: vmparam.h,v 1.33 2006/06/04 17:21:24 miod Exp $	*/
      4 
      5 /*
      6  * Copyright (c) 1988-1994, The University of Utah and
      7  * the Computer Systems Laboratory at the University of Utah (CSL).
      8  * All rights reserved.
      9  *
     10  * Permission to use, copy, modify and distribute this software is hereby
     11  * granted provided that (1) source code retains these copyright, permission,
     12  * and disclaimer notices, and (2) redistributions including binaries
     13  * reproduce the notices in supporting documentation, and (3) all advertising
     14  * materials mentioning features or use of this software display the following
     15  * acknowledgement: ``This product includes software developed by the
     16  * Computer Systems Laboratory at the University of Utah.''
     17  *
     18  * THE UNIVERSITY OF UTAH AND CSL ALLOW FREE USE OF THIS SOFTWARE IN ITS "AS
     19  * IS" CONDITION.  THE UNIVERSITY OF UTAH AND CSL DISCLAIM ANY LIABILITY OF
     20  * ANY KIND FOR ANY DAMAGES WHATSOEVER RESULTING FROM THE USE OF THIS SOFTWARE.
     21  *
     22  * CSL requests users of this software to return to csl-dist (at) cs.utah.edu any
     23  * improvements that they make and grant CSL redistribution rights.
     24  *
     25  * 	Utah $Hdr: vmparam.h 1.16 94/12/16$
     26  */
     27 
     28 #ifndef _HPPA_VMPARAM_H_
     29 #define _HPPA_VMPARAM_H_
     30 
     31 #define __USE_TOPDOWN_VM
     32 
     33 /*
     34  * Machine dependent constants for HP PA
     35  */
     36 
     37 /*
     38  * We use 4K pages on the HP PA.  Override the PAGE_* definitions
     39  * to be compile-time constants.
     40  */
     41 #define	PAGE_SHIFT	12
     42 #define	PAGE_SIZE	(1 << PAGE_SHIFT)
     43 #define	PAGE_MASK	(PAGE_SIZE - 1)
     44 
     45 /*
     46  * USRSTACK is the bottom (start) of the user stack.
     47  */
     48 #define	USRSTACK	(VM_MAXUSER_ADDRESS - MAXSSIZ) /* Start of user stack */
     49 #define	SYSCALLGATE	0xc0000000		/* syscall gateway page */
     50 
     51 /*
     52  * Virtual memory related constants, all in bytes
     53  */
     54 #ifndef MAXTSIZ
     55 #define	MAXTSIZ		(1024*1024*1024)		/* max text size */
     56 #endif
     57 #ifndef DFLDSIZ
     58 #define	DFLDSIZ		(16*1024*1024)		/* initial data size limit */
     59 #endif
     60 #ifndef MAXDSIZ
     61 #define	MAXDSIZ		(USRSTACK-MAXTSIZ)	/* max data size */
     62 #endif
     63 #ifndef	DFLSSIZ
     64 #define	DFLSSIZ		(2*1024*1024)		/* initial stack size limit */
     65 #endif
     66 #ifndef	MAXSSIZ
     67 #define	MAXSSIZ		(256*1024*1024)		/* max stack size */
     68 #endif
     69 
     70 #ifndef USRIOSIZE
     71 #define	USRIOSIZE	((2*HPPA_PGALIAS)/PAGE_SIZE)	/* 2mb */
     72 #endif
     73 
     74 /*
     75  * The time for a process to be blocked before being very swappable.
     76  * This is a number of seconds which the system takes as being a non-trivial
     77  * amount of real time.  You probably shouldn't change this;
     78  * it is used in subtle ways (fractions and multiples of it are, that is, like
     79  * half of a ``long time'', almost a long time, etc.)
     80  * It is related to human patience and other factors which don't really
     81  * change over time.
     82  */
     83 /* XXXNH - remove??? */
     84 #define	MAXSLP 		20
     85 
     86 /* user/kernel map constants */
     87 #define	VM_MIN_ADDRESS		((vaddr_t)0)
     88 #define	VM_MAXUSER_ADDRESS	((vaddr_t)0xc0000000)
     89 #define	VM_MAX_ADDRESS		VM_MAXUSER_ADDRESS
     90 
     91 #define	VM_MIN_KERNEL_ADDRESS	((vaddr_t)0xc0001000)
     92 #define	VM_MAX_KERNEL_ADDRESS	((vaddr_t)0xef000000)
     93 
     94 /* virtual sizes (bytes) for various kernel submaps */
     95 #define VM_PHYS_SIZE		(USRIOSIZE*PAGE_SIZE)
     96 
     97 #define	VM_PHYSSEG_MAX	8	/* this many physmem segments */
     98 #define	VM_PHYSSEG_STRAT	VM_PSTRAT_BIGFIRST
     99 
    100 #define	VM_NFREELIST		2
    101 #define	VM_FREELIST_DEFAULT	0
    102 #define	VM_FREELIST_ISADMA	1
    103 
    104 #endif	/* _HPPA_VMPARAM_H_ */
    105