1 /* $NetBSD: vmparam.h,v 1.12.18.4 2009/04/28 07:34:06 skrll Exp $ */
3 /* $OpenBSD: vmparam.h,v 1.33 2006/06/04 17:21:24 miod Exp $ */
6 * Copyright (c) 1988-1994, The University of Utah and
7 * the Computer Systems Laboratory at the University of Utah (CSL).
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.''
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.
22 * CSL requests users of this software to return to csl-dist@cs.utah.edu any
23 * improvements that they make and grant CSL redistribution rights.
25 * Utah $Hdr: vmparam.h 1.16 94/12/16$
28 #ifndef _HPPA_VMPARAM_H_
29 #define _HPPA_VMPARAM_H_
32 * Machine dependent constants for HP PA
36 * We use 4K pages on the HP PA. Override the PAGE_* definitions
37 * to be compile-time constants.
40 #define PAGE_SIZE (1 << PAGE_SHIFT)
41 #define PAGE_MASK (PAGE_SIZE - 1)
44 * USRSTACK is the bottom (start) of the user stack.
46 #define USRSTACK 0x70000000 /* Start of user stack */
47 #define SYSCALLGATE 0xC0000000 /* syscall gateway page */
50 * Virtual memory related constants, all in bytes
53 #define MAXTSIZ (0x40000000) /* max text size */
56 #define DFLDSIZ (16*1024*1024) /* initial data size limit */
59 #define MAXDSIZ (USRSTACK-MAXTSIZ) /* max data size */
62 #define DFLSSIZ (2*1024*1024) /* initial stack size limit */
65 #define MAXSSIZ (256*1024*1024) /* max stack size */
69 #define USRIOSIZE ((2*HPPA_PGALIAS)/PAGE_SIZE) /* 2mb */
73 * The time for a process to be blocked before being very swappable.
74 * This is a number of seconds which the system takes as being a non-trivial
75 * amount of real time. You probably shouldn't change this;
76 * it is used in subtle ways (fractions and multiples of it are, that is, like
77 * half of a ``long time'', almost a long time, etc.)
78 * It is related to human patience and other factors which don't really
81 /* XXXNH - remove??? */
84 /* user/kernel map constants */
85 #define VM_MIN_ADDRESS ((vaddr_t)0)
86 #define VM_MAXUSER_ADDRESS ((vaddr_t)0xc0000000)
87 #define VM_MAX_ADDRESS VM_MAXUSER_ADDRESS
89 #define VM_MIN_KERNEL_ADDRESS ((vaddr_t)0xc0001000)
90 #define VM_MAX_KERNEL_ADDRESS ((vaddr_t)0xef000000)
92 /* virtual sizes (bytes) for various kernel submaps */
93 #define VM_PHYS_SIZE (USRIOSIZE*PAGE_SIZE)
95 #define VM_PHYSSEG_MAX 8 /* this many physmem segments */
96 #define VM_PHYSSEG_STRAT VM_PSTRAT_BIGFIRST
98 #define VM_PHYSSEG_NOADD /* XXX until uvm code is fixed */
100 #define VM_NFREELIST 1
101 #define VM_FREELIST_DEFAULT 0
103 #if defined(_KERNEL) && !defined(_LOCORE)
104 #define __HAVE_VM_PAGE_MD
109 kmutex_t pvh_lock
; /* locks every pv on this list */
110 struct pv_entry
*pvh_list
; /* head of list (locked by pvh_lock) */
111 u_int pvh_attrs
; /* to preserve ref/mod */
112 int pvh_aliases
; /* alias counting */
115 #define VM_MDPAGE_INIT(pg) \
117 mutex_init(&(pg)->mdpage.pvh_lock, MUTEX_NODEBUG, IPL_VM); \
118 (pg)->mdpage.pvh_list = NULL; \
119 (pg)->mdpage.pvh_attrs = 0; \
120 (pg)->mdpage.pvh_aliases = 0; \
124 #endif /* _HPPA_VMPARAM_H_ */