vmparam.h revision 1.1
11.1Sbriggs/*	$NetBSD: vmparam.h,v 1.1 2001/02/04 18:32:16 briggs Exp $	*/
21.1Sbriggs
31.1Sbriggs/*-
41.1Sbriggs * Copyright (C) 1995, 1996 Wolfgang Solfrank.
51.1Sbriggs * Copyright (C) 1995, 1996 TooLs GmbH.
61.1Sbriggs * All rights reserved.
71.1Sbriggs *
81.1Sbriggs * Redistribution and use in source and binary forms, with or without
91.1Sbriggs * modification, are permitted provided that the following conditions
101.1Sbriggs * are met:
111.1Sbriggs * 1. Redistributions of source code must retain the above copyright
121.1Sbriggs *    notice, this list of conditions and the following disclaimer.
131.1Sbriggs * 2. Redistributions in binary form must reproduce the above copyright
141.1Sbriggs *    notice, this list of conditions and the following disclaimer in the
151.1Sbriggs *    documentation and/or other materials provided with the distribution.
161.1Sbriggs * 3. All advertising materials mentioning features or use of this software
171.1Sbriggs *    must display the following acknowledgement:
181.1Sbriggs *	This product includes software developed by TooLs GmbH.
191.1Sbriggs * 4. The name of TooLs GmbH may not be used to endorse or promote products
201.1Sbriggs *    derived from this software without specific prior written permission.
211.1Sbriggs *
221.1Sbriggs * THIS SOFTWARE IS PROVIDED BY TOOLS GMBH ``AS IS'' AND ANY EXPRESS OR
231.1Sbriggs * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
241.1Sbriggs * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
251.1Sbriggs * IN NO EVENT SHALL TOOLS GMBH BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
261.1Sbriggs * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
271.1Sbriggs * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
281.1Sbriggs * OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
291.1Sbriggs * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
301.1Sbriggs * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
311.1Sbriggs * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
321.1Sbriggs */
331.1Sbriggs
341.1Sbriggs#ifndef	_MACHINE_VMPARAM_H_
351.1Sbriggs#define	_MACHINE_VMPARAM_H_
361.1Sbriggs
371.1Sbriggs#define	USRTEXT		NBPG
381.1Sbriggs#define	USRSTACK	VM_MAXUSER_ADDRESS
391.1Sbriggs
401.1Sbriggs#ifndef	MAXTSIZ
411.1Sbriggs#define	MAXTSIZ		(16*1024*1024)		/* max text size */
421.1Sbriggs#endif
431.1Sbriggs
441.1Sbriggs#ifndef	DFLDSIZ
451.1Sbriggs#define	DFLDSIZ		(16*1024*1024)		/* default data size */
461.1Sbriggs#endif
471.1Sbriggs
481.1Sbriggs#ifndef	MAXDSIZ
491.1Sbriggs#define	MAXDSIZ		(512*1024*1024)		/* max data size */
501.1Sbriggs#endif
511.1Sbriggs
521.1Sbriggs#ifndef	DFLSSIZ
531.1Sbriggs#define	DFLSSIZ		(1*1024*1024)		/* default stack size */
541.1Sbriggs#endif
551.1Sbriggs
561.1Sbriggs#ifndef	MAXSSIZ
571.1Sbriggs#define	MAXSSIZ		(32*1024*1024)		/* max stack size */
581.1Sbriggs#endif
591.1Sbriggs
601.1Sbriggs/*
611.1Sbriggs * Size of shared memory map
621.1Sbriggs */
631.1Sbriggs#ifndef	SHMMAXPGS
641.1Sbriggs#define	SHMMAXPGS	1024
651.1Sbriggs#endif
661.1Sbriggs
671.1Sbriggs/*
681.1Sbriggs * Size of User Raw I/O map
691.1Sbriggs */
701.1Sbriggs#define	USRIOSIZE	1024
711.1Sbriggs
721.1Sbriggs/*
731.1Sbriggs * The time for a process to be blocked before being very swappable.
741.1Sbriggs * This is a number of seconds which the system takes as being a non-trivial
751.1Sbriggs * amount of real time.  You probably shouldn't change this;
761.1Sbriggs * it is used in subtle ways (fractions and multiples of it are, that is, like
771.1Sbriggs * half of a ``long time'', almost a long time, etc.)
781.1Sbriggs * It is related to human patience and other factors which don't really
791.1Sbriggs * change over time.
801.1Sbriggs */
811.1Sbriggs#define	MAXSLP 		20
821.1Sbriggs
831.1Sbriggs/*
841.1Sbriggs * Would like to have MAX addresses = 0, but this doesn't (currently) work
851.1Sbriggs */
861.1Sbriggs#define	VM_MIN_ADDRESS		((vaddr_t)0)
871.1Sbriggs#define	VM_MAXUSER_ADDRESS	((vaddr_t)0xfffff000)
881.1Sbriggs#define	VM_MAX_ADDRESS		VM_MAXUSER_ADDRESS
891.1Sbriggs#define	VM_MIN_KERNEL_ADDRESS	((vaddr_t)(KERNEL_SR << ADDR_SR_SHFT))
901.1Sbriggs#define	VM_MAX_KERNEL_ADDRESS	(VM_MIN_KERNEL_ADDRESS + SEGMENT_LENGTH - 1)
911.1Sbriggs
921.1Sbriggs#define	VM_PHYS_SIZE		(USRIOSIZE * NBPG)
931.1Sbriggs
941.1Sbriggsstruct pmap_physseg {
951.1Sbriggs	struct pv_entry *pvent;
961.1Sbriggs	char *attrs;
971.1Sbriggs};
981.1Sbriggs
991.1Sbriggs#define VM_PHYSSEG_MAX		32
1001.1Sbriggs#define VM_PHYSSEG_STRAT	VM_PSTRAT_BSEARCH
1011.1Sbriggs#define VM_PHYSSEG_NOADD		/* can't add RAM after vm_mem_init */
1021.1Sbriggs
1031.1Sbriggs#define VM_NFREELIST		1
1041.1Sbriggs#define VM_FREELIST_DEFAULT	0
1051.1Sbriggs
1061.1Sbriggs#endif /* _MACHINE_VMPARAM_H_ */
107