vmparam.h revision 1.12 1 1.12 uch /* $NetBSD: vmparam.h,v 1.12 2002/04/28 17:10:37 uch Exp $ */
2 1.1 itojun
3 1.1 itojun /*-
4 1.1 itojun * Copyright (c) 1990 The Regents of the University of California.
5 1.1 itojun * All rights reserved.
6 1.1 itojun *
7 1.1 itojun * This code is derived from software contributed to Berkeley by
8 1.1 itojun * William Jolitz.
9 1.1 itojun *
10 1.1 itojun * Redistribution and use in source and binary forms, with or without
11 1.1 itojun * modification, are permitted provided that the following conditions
12 1.1 itojun * are met:
13 1.1 itojun * 1. Redistributions of source code must retain the above copyright
14 1.1 itojun * notice, this list of conditions and the following disclaimer.
15 1.1 itojun * 2. Redistributions in binary form must reproduce the above copyright
16 1.1 itojun * notice, this list of conditions and the following disclaimer in the
17 1.1 itojun * documentation and/or other materials provided with the distribution.
18 1.1 itojun * 3. All advertising materials mentioning features or use of this software
19 1.1 itojun * must display the following acknowledgement:
20 1.1 itojun * This product includes software developed by the University of
21 1.1 itojun * California, Berkeley and its contributors.
22 1.1 itojun * 4. Neither the name of the University nor the names of its contributors
23 1.1 itojun * may be used to endorse or promote products derived from this software
24 1.1 itojun * without specific prior written permission.
25 1.1 itojun *
26 1.1 itojun * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
27 1.1 itojun * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
28 1.1 itojun * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
29 1.1 itojun * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
30 1.1 itojun * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
31 1.1 itojun * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
32 1.1 itojun * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
33 1.1 itojun * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
34 1.1 itojun * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
35 1.1 itojun * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
36 1.1 itojun * SUCH DAMAGE.
37 1.1 itojun *
38 1.1 itojun * @(#)vmparam.h 5.9 (Berkeley) 5/12/91
39 1.1 itojun */
40 1.1 itojun
41 1.11 uch #ifndef _SH3_VMPARAM_H_
42 1.12 uch #define _SH3_VMPARAM_H_
43 1.1 itojun
44 1.1 itojun /*
45 1.11 uch * Machine dependent constants for NetBSD/sh3.
46 1.1 itojun */
47 1.1 itojun
48 1.1 itojun /*
49 1.11 uch * Virtual address space arrangement.
50 1.1 itojun * USRTEXT is the start of the user text/data space, while USRSTACK
51 1.11 uch * is the top (end) of the user stack.
52 1.1 itojun */
53 1.3 ragge #define USRTEXT NBPG
54 1.1 itojun #define USRSTACK VM_MAXUSER_ADDRESS
55 1.1 itojun
56 1.1 itojun /*
57 1.1 itojun * Virtual memory related constants, all in bytes
58 1.1 itojun */
59 1.1 itojun #define MAXTSIZ (64*1024*1024) /* max text size */
60 1.1 itojun #ifndef DFLDSIZ
61 1.1 itojun #define DFLDSIZ (128*1024*1024) /* initial data size limit */
62 1.1 itojun #endif
63 1.1 itojun #ifndef MAXDSIZ
64 1.1 itojun #define MAXDSIZ (1*1024*1024*1024) /* max data size */
65 1.1 itojun #endif
66 1.1 itojun #ifndef DFLSSIZ
67 1.1 itojun #define DFLSSIZ (2*1024*1024) /* initial stack size limit */
68 1.1 itojun #endif
69 1.1 itojun #ifndef MAXSSIZ
70 1.1 itojun #define MAXSSIZ (32*1024*1024) /* max stack size */
71 1.1 itojun #endif
72 1.1 itojun
73 1.1 itojun /*
74 1.1 itojun * Size of shared memory map
75 1.1 itojun */
76 1.1 itojun #ifndef SHMMAXPGS
77 1.12 uch #define SHMMAXPGS 1024
78 1.1 itojun #endif
79 1.1 itojun
80 1.1 itojun /*
81 1.1 itojun * Size of User Raw I/O map
82 1.1 itojun */
83 1.1 itojun #define USRIOSIZE 300
84 1.1 itojun
85 1.1 itojun /*
86 1.1 itojun * Mach derived constants
87 1.1 itojun */
88 1.1 itojun
89 1.1 itojun /* user/kernel map constants */
90 1.12 uch #define VM_MIN_ADDRESS ((vaddr_t)0)
91 1.1 itojun /* PTDPTDI<<PDSHIFT - UPAGES*NBPG */
92 1.12 uch #define VM_MAXUSER_ADDRESS ((vaddr_t)0x7fffe000)
93 1.1 itojun /* PTDPTDI<<PDSHIFT + PTDPTDI<<PGSHIFT */
94 1.12 uch #define VM_MAX_ADDRESS ((vaddr_t)0xcffbf000)
95 1.1 itojun /* KPTDI<<PDSHIFT */
96 1.12 uch #define VM_MIN_KERNEL_ADDRESS ((vaddr_t)0xd0000000)
97 1.1 itojun /* APTDPTDI<<PDSHIFT */
98 1.12 uch #define VM_MAX_KERNEL_ADDRESS ((vaddr_t)0xdfc00000)
99 1.1 itojun
100 1.1 itojun /* XXX max. amount of KVM to be used by buffers. */
101 1.1 itojun #ifndef VM_MAX_KERNEL_BUF
102 1.12 uch #define VM_MAX_KERNEL_BUF \
103 1.1 itojun ((VM_MAX_KERNEL_ADDRESS - VM_MIN_KERNEL_ADDRESS) * 7 / 10)
104 1.1 itojun #endif
105 1.1 itojun
106 1.1 itojun /* virtual sizes (bytes) for various kernel submaps */
107 1.12 uch #define VM_PHYS_SIZE (USRIOSIZE*NBPG)
108 1.1 itojun
109 1.12 uch #define VM_PHYSSEG_STRAT VM_PSTRAT_BSEARCH
110 1.12 uch #define VM_PHYSSEG_NOADD /* no more after vm_mem_init */
111 1.8 thorpej
112 1.9 thorpej #define __HAVE_PMAP_PHYSSEG
113 1.1 itojun
114 1.1 itojun /*
115 1.1 itojun * pmap specific data stored in the vm_physmem[] array
116 1.1 itojun */
117 1.1 itojun struct pmap_physseg {
118 1.1 itojun struct pv_head *pvhead; /* pv_head array */
119 1.1 itojun char *attrs; /* attrs array */
120 1.1 itojun };
121 1.1 itojun
122 1.11 uch #endif /* !_SH3_VMPARAM_H_ */
123