1/*	$OpenBSD: vmparam.h,v 1.47 2015/11/01 20:09:59 miod Exp $	*/
2
3/*
4 * Copyright (c) 1988-1994, The University of Utah and
5 * the Computer Systems Laboratory at the University of Utah (CSL).
6 * All rights reserved.
7 *
8 * Permission to use, copy, modify and distribute this software is hereby
9 * granted provided that (1) source code retains these copyright, permission,
10 * and disclaimer notices, and (2) redistributions including binaries
11 * reproduce the notices in supporting documentation, and (3) all advertising
12 * materials mentioning features or use of this software display the following
13 * acknowledgement: ``This product includes software developed by the
14 * Computer Systems Laboratory at the University of Utah.''
15 *
16 * THE UNIVERSITY OF UTAH AND CSL ALLOW FREE USE OF THIS SOFTWARE IN ITS "AS
17 * IS" CONDITION.  THE UNIVERSITY OF UTAH AND CSL DISCLAIM ANY LIABILITY OF
18 * ANY KIND FOR ANY DAMAGES WHATSOEVER RESULTING FROM THE USE OF THIS SOFTWARE.
19 *
20 * CSL requests users of this software to return to csl-dist@cs.utah.edu any
21 * improvements that they make and grant CSL redistribution rights.
22 *
23 * 	Utah $Hdr: vmparam.h 1.16 94/12/16$
24 */
25
26#ifndef _MACHINE_VMPARAM_H_
27#define _MACHINE_VMPARAM_H_
28
29/*
30 * Machine dependent constants for HP PA
31 */
32#define	USRSTACK	0x78000000UL	/* start (bottom) of user stack */
33#define	SYSCALLGATE	0xC0000000	/* syscall gateway page */
34
35/*
36 * Virtual memory related constants, all in bytes
37 */
38#ifndef MAXTSIZ
39#define	MAXTSIZ		(512*1024*1024UL)	/* max text size */
40#endif
41#ifndef DFLDSIZ
42#define	DFLDSIZ		(16*1024*1024)		/* initial data size limit */
43#endif
44#ifndef MAXDSIZ
45#define	MAXDSIZ		(1*1024*1024*1024UL)	/* max data size */
46#endif
47#ifndef BRKSIZ
48#define	BRKSIZ		MAXDSIZ			/* heap gap size */
49#endif
50#ifndef	DFLSSIZ
51#define	DFLSSIZ		(2*1024*1024)		/* initial stack size limit */
52#endif
53#ifndef	MAXSSIZ
54#define	MAXSSIZ		(32*1024*1024UL)	/* max stack size */
55#endif
56
57#define	STACKGAP_RANDOM	256*1024
58
59#ifndef USRIOSIZE
60#define	USRIOSIZE	((2*HPPA_PGALIAS)/PAGE_SIZE)	/* 8mb */
61#endif
62
63/*
64 * PTEs for system V style shared memory.
65 * This is basically slop for kmempt which we actually allocate (malloc) from.
66 */
67#ifndef SHMMAXPGS
68#define SHMMAXPGS	8192	/* 32mb */
69#endif
70
71/* user/kernel map constants */
72#define	VM_MIN_ADDRESS		((vaddr_t)PAGE_SIZE)
73#define	VM_MAXUSER_ADDRESS	((vaddr_t)0xc0000000)
74#define	VM_MAX_ADDRESS		VM_MAXUSER_ADDRESS
75#define	VM_MIN_KERNEL_ADDRESS	((vaddr_t)0xc0001000)
76#define	VM_MAX_KERNEL_ADDRESS	((vaddr_t)0xef000000)
77
78/* use a small range for PIE to minimize mmap pressure */
79#define	VM_PIE_MIN_ADDR		PAGE_SIZE
80#define	VM_PIE_MAX_ADDR		0x40000UL
81
82/* virtual sizes (bytes) for various kernel submaps */
83#define VM_PHYS_SIZE		(USRIOSIZE*PAGE_SIZE)
84
85#define	VM_PHYSSEG_MAX		1	/* this many physmem segments */
86#define	VM_PHYSSEG_STRAT	VM_PSTRAT_RANDOM
87
88#define	VM_PHYSSEG_NOADD	/* XXX until uvm code is fixed */
89
90#endif	/* _MACHINE_VMPARAM_H_ */
91