1/*	$NetBSD: vmparam.h,v 1.10 2021/09/11 20:28:04 andvar Exp $	*/
2/*-
3 * Copyright (c) 2010, 2011 The NetBSD Foundation, Inc.
4 * All rights reserved.
5 *
6 * This code is derived from software contributed to The NetBSD Foundation
7 * by Raytheon BBN Technologies Corp and Defense Advanced Research Projects
8 * Agency and which was developed by Matt Thomas of 3am Software Foundry.
9 *
10 * This material is based upon work supported by the Defense Advanced Research
11 * Projects Agency and Space and Naval Warfare Systems Center, Pacific, under
12 * Contract No. N66001-09-C-2073.
13 * Approved for Public Release, Distribution Unlimited
14 *
15 * Redistribution and use in source and binary forms, with or without
16 * modification, are permitted provided that the following conditions
17 * are met:
18 * 1. Redistributions of source code must retain the above copyright
19 *    notice, this list of conditions and the following disclaimer.
20 * 2. Redistributions in binary form must reproduce the above copyright
21 *    notice, this list of conditions and the following disclaimer in the
22 *    documentation and/or other materials provided with the distribution.
23 *
24 * THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS
25 * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
26 * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
27 * PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS
28 * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
29 * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
30 * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
31 * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
32 * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
33 * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
34 * POSSIBILITY OF SUCH DAMAGE.
35 */
36
37#ifndef _POWERPC_BOOKE_VMPARAM_H_
38#define _POWERPC_BOOKE_VMPARAM_H_
39
40/*
41 * Most of the definitions in this can be overridden by a machine-specific
42 * vmparam.h if required.  Otherwise a port can just include this file
43 * get the right thing to happen.
44 */
45
46/*
47 * BookE processors have 4K pages.  Override the PAGE_* definitions to be
48 * compile-time constants.
49 */
50#define	PAGE_SHIFT	12
51#define	PAGE_SIZE	(1 << PAGE_SHIFT)
52#define	PAGE_MASK	(PAGE_SIZE - 1)
53
54#ifndef	USRSTACK
55#define	USRSTACK	VM_MAXUSER_ADDRESS
56#endif
57
58#ifndef	MAXTSIZ
59#define	MAXTSIZ		(128*1024*1024)		/* maximum text size */
60#endif
61
62#ifndef	MAXDSIZ
63#define	MAXDSIZ		(1024*1024*1024)	/* maximum data size */
64#endif
65
66#ifndef	MAXSSIZ
67#define	MAXSSIZ		(32*1024*1024)		/* maximum stack size */
68#endif
69
70#ifndef	DFLDSIZ
71#define	DFLDSIZ		(256*1024*1024)		/* default data size */
72#endif
73
74#ifndef	DFLSSIZ
75#define	DFLSSIZ		(2*1024*1024)		/* default stack size */
76#endif
77
78/*
79 * Default number of pages in the user raw I/O map.
80 */
81#ifndef USRIOSIZE
82#define	USRIOSIZE	1024
83#endif
84
85/*
86 * The number of seconds for a process to be blocked before being
87 * considered very swappable.
88 */
89#ifndef MAXSLP
90#define	MAXSLP		20
91#endif
92
93/*
94 * Some system constants
95 */
96
97#define	VM_MIN_ADDRESS		((vaddr_t) 0)
98#define	VM_MAXUSER_ADDRESS	((vaddr_t) /* -32768 */ 0xffff8000)
99#define	VM_MAX_ADDRESS		VM_MAXUSER_ADDRESS
100#define	VM_MIN_KERNEL_ADDRESS	((vaddr_t) 0xe4000000)
101#define	VM_MAX_KERNEL_ADDRESS	((vaddr_t) 0xfefff000)
102
103#define	VM_PHYSSEG_STRAT	VM_PSTRAT_BIGFIRST
104
105#ifndef VM_PHYS_SIZE
106#define	VM_PHYS_SIZE		(USRIOSIZE * PAGE_SIZE)
107#endif
108
109#include <uvm/pmap/vmpagemd.h>
110
111#endif /* _POWERPC_BOOKE_VMPARAM_H_ */
112