xref: /openbsd/sys/arch/macppc/include/vmparam.h (revision ed3b9130)
1*ed3b9130Sderaadt /*	$OpenBSD: vmparam.h,v 1.33 2024/01/30 16:43:22 deraadt Exp $	*/
252c13d20Sdrahn /*	$NetBSD: vmparam.h,v 1.1 1996/09/30 16:34:38 ws Exp $	*/
352c13d20Sdrahn 
452c13d20Sdrahn /*-
552c13d20Sdrahn  * Copyright (C) 1995, 1996 Wolfgang Solfrank.
652c13d20Sdrahn  * Copyright (C) 1995, 1996 TooLs GmbH.
752c13d20Sdrahn  * All rights reserved.
852c13d20Sdrahn  *
952c13d20Sdrahn  * Redistribution and use in source and binary forms, with or without
1052c13d20Sdrahn  * modification, are permitted provided that the following conditions
1152c13d20Sdrahn  * are met:
1252c13d20Sdrahn  * 1. Redistributions of source code must retain the above copyright
1352c13d20Sdrahn  *    notice, this list of conditions and the following disclaimer.
1452c13d20Sdrahn  * 2. Redistributions in binary form must reproduce the above copyright
1552c13d20Sdrahn  *    notice, this list of conditions and the following disclaimer in the
1652c13d20Sdrahn  *    documentation and/or other materials provided with the distribution.
1752c13d20Sdrahn  * 3. All advertising materials mentioning features or use of this software
1852c13d20Sdrahn  *    must display the following acknowledgement:
1952c13d20Sdrahn  *	This product includes software developed by TooLs GmbH.
2052c13d20Sdrahn  * 4. The name of TooLs GmbH may not be used to endorse or promote products
2152c13d20Sdrahn  *    derived from this software without specific prior written permission.
2252c13d20Sdrahn  *
2352c13d20Sdrahn  * THIS SOFTWARE IS PROVIDED BY TOOLS GMBH ``AS IS'' AND ANY EXPRESS OR
2452c13d20Sdrahn  * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
2552c13d20Sdrahn  * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
2652c13d20Sdrahn  * IN NO EVENT SHALL TOOLS GMBH BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
2752c13d20Sdrahn  * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
2852c13d20Sdrahn  * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
2952c13d20Sdrahn  * OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
3052c13d20Sdrahn  * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
3152c13d20Sdrahn  * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
3252c13d20Sdrahn  * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
3352c13d20Sdrahn  */
3452c13d20Sdrahn 
3552c13d20Sdrahn #ifndef MACHINE_VMPARAM_H
3652c13d20Sdrahn #define MACHINE_VMPARAM_H
3752c13d20Sdrahn 
3852c13d20Sdrahn #define	USRSTACK	VM_MAXUSER_ADDRESS
3952c13d20Sdrahn 
4052c13d20Sdrahn #ifndef	MAXTSIZ
41*ed3b9130Sderaadt #define	MAXTSIZ		(128*1024*1024)		/* max text size */
4252c13d20Sdrahn #endif
4352c13d20Sdrahn 
4452c13d20Sdrahn #ifndef	DFLDSIZ
4565a37b56Smarco #define	DFLDSIZ		(64*1024*1024)		/* default data size */
4652c13d20Sdrahn #endif
4752c13d20Sdrahn 
4852c13d20Sdrahn #ifndef	MAXDSIZ
494e38a0c4Sajacoutot #define	MAXDSIZ		(2UL*1024*1024*1024)	/* max data size */
5052c13d20Sdrahn #endif
5152c13d20Sdrahn 
5201d0831fStedu #ifndef BRKSIZ
5301d0831fStedu #define	BRKSIZ		MAXDSIZ			/* heap gap size */
5401d0831fStedu #endif
5501d0831fStedu 
5652c13d20Sdrahn #ifndef	DFLSSIZ
57cfd52802Sbrad #define	DFLSSIZ		(2*1024*1024)		/* default stack size */
5852c13d20Sdrahn #endif
5952c13d20Sdrahn 
6052c13d20Sdrahn #ifndef	MAXSSIZ
6152c13d20Sdrahn #define	MAXSSIZ		(32*1024*1024)		/* max stack size */
6252c13d20Sdrahn #endif
6352c13d20Sdrahn 
64a489ea08Sderaadt #define STACKGAP_RANDOM	256*1024
65a489ea08Sderaadt 
6652c13d20Sdrahn /*
6752c13d20Sdrahn  * Size of shared memory map
6852c13d20Sdrahn  */
6952c13d20Sdrahn #ifndef	SHMMAXPGS
7047adadefSmillert #define	SHMMAXPGS       8192			/* 32mb */
7152c13d20Sdrahn #endif
7252c13d20Sdrahn 
7352c13d20Sdrahn /*
7452c13d20Sdrahn  * Size of User Raw I/O map
7552c13d20Sdrahn  */
7652c13d20Sdrahn #define	USRIOSIZE	1024
7752c13d20Sdrahn 
7852c13d20Sdrahn /*
7952c13d20Sdrahn  * Would like to have MAX addresses = 0, but this doesn't (currently) work
8052c13d20Sdrahn  */
81a201ab69Stedu #define	VM_MIN_ADDRESS		((vaddr_t)PAGE_SIZE)
82e02071cfSmiod #define	VM_MAXUSER_ADDRESS	((vaddr_t)0xfffff000)
8352c13d20Sdrahn #define	VM_MAX_ADDRESS		VM_MAXUSER_ADDRESS
84e02071cfSmiod #define	VM_MIN_KERNEL_ADDRESS	((vaddr_t)(PPC_KERNEL_SR << ADDR_SR_SHIFT))
8552c13d20Sdrahn 
86c62276a4Skurt /* map PIE into approximately the first quarter of user va space */
87c62276a4Skurt #define VM_PIE_MIN_ADDR		PAGE_SIZE
88c62276a4Skurt #define VM_PIE_MAX_ADDR		0x40000000
89c62276a4Skurt 
903d1403a8Sdrahn #define VM_KERN_ADDRESS_SIZE  (PPC_SEGMENT_LENGTH - (32 * 1024 * 1024))
91e8788ae9Sdrahn #define	VM_MAX_KERNEL_ADDRESS	(VM_MIN_KERNEL_ADDRESS + VM_KERN_ADDRESS_SIZE)
9252c13d20Sdrahn 
9352c13d20Sdrahn #define	VM_PHYS_SIZE		(USRIOSIZE * PAGE_SIZE)
9452c13d20Sdrahn 
9552c13d20Sdrahn #define	VM_PHYSSEG_MAX	32	/* actually we could have this many segments */
9652c13d20Sdrahn #define	VM_PHYSSEG_STRAT	VM_PSTRAT_BSEARCH
9752c13d20Sdrahn #define	VM_PHYSSEG_NOADD	/* can't add RAM after vm_mem_init */
9852c13d20Sdrahn 
9969b9ef50Sdrahn #endif
100