1 /* $NetBSD: vmparam.h,v 1.8 2007/10/25 13:03:03 yamt Exp $ */
4 * Copyright (c) 1988 The Regents of the University of California.
7 * Redistribution and use in source and binary forms, with or without
8 * modification, are permitted provided that the following conditions
10 * 1. Redistributions of source code must retain the above copyright
11 * notice, this list of conditions and the following disclaimer.
12 * 2. Redistributions in binary form must reproduce the above copyright
13 * notice, this list of conditions and the following disclaimer in the
14 * documentation and/or other materials provided with the distribution.
15 * 3. Neither the name of the University nor the names of its contributors
16 * may be used to endorse or promote products derived from this software
17 * without specific prior written permission.
19 * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
20 * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
21 * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
22 * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
23 * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
24 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
25 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
26 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
27 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
28 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
32 #ifndef _ARM26_VMPARAM_H_
33 #define _ARM26_VMPARAM_H_
35 #define __USE_TOPDOWN_VM
38 * Page size on the 26-bit ARM CPUs is not variable in the traditional
39 * sense. We override the PAGE_* definitions to compile-time constants.
42 #define PAGE_SIZE (1 << PAGE_SHIFT)
43 #define PAGE_MASK (PAGE_SIZE - 1)
45 #define USRSTACK VM_MAXUSER_ADDRESS
47 #define MAXTSIZ (0x007f8000) /* max text size */
49 #define DFLDSIZ (0x01800000) /* initial data size limit */
52 #define MAXDSIZ (0x01800000) /* max data size */
55 #define DFLSSIZ (512*1024) /* initial stack size limit */
58 #define MAXSSIZ (0x00200000) /* max stack size */
62 * Override the default pager_map size, there's not enough KVA.
64 #define PAGER_MAP_DEFAULT_SIZE (1 * 1024 * 1024)
67 * Mach derived constants
70 /* Need to link some of these with some in param.h */
73 * These specify the range of virtual pages available to user
74 * processes and to the kernel. This is a bit of a delicate balancing
75 * act, as we've only got 32Mb between them. There should probably be
76 * an option to have separate kernel and user spaces to ease this.
79 #define KVM_SIZE 0x00800000 /* 8Mb */
82 #define VM_MIN_ADDRESS ((vm_offset_t)0x00008000)
83 #define VM_MAX_ADDRESS ((vm_offset_t)0x02000000 - KVM_SIZE)
84 #define VM_MAXUSER_ADDRESS VM_MAX_ADDRESS
87 #define VM_MIN_KERNEL_ADDRESS VM_MAX_ADDRESS
88 #define VM_MAX_KERNEL_ADDRESS ((vm_offset_t)0x02000000)
89 #define VM_MAXKERN_ADDRESS VM_MAX_KERNEL_ADDRESS
91 /* XXX max. amount of KVM to be used by buffers. */
92 #ifndef VM_MAX_KERNEL_BUF
93 #define VM_MAX_KERNEL_BUF \
94 ((VM_MAX_KERNEL_ADDRESS - VM_MIN_KERNEL_ADDRESS) / 4)
97 /* Physical memory parameters */
99 #define VM_PHYSSEG_MAX 3
101 #define VM_PHYSSEG_STRAT VM_PSTRAT_BIGFIRST
103 #define VM_PHYSSEG_NOADD /* We won't turn up extra memory during autoconfig */
105 #define VM_NFREELIST 2
106 #define VM_FREELIST_LOW 1 /* DMA-able memory (bottom 512k phys) */
107 #define VM_FREELIST_DEFAULT 0 /* The rest */
109 #endif /* _ARM26_VMPARAM_H_ */
111 /* End of vmparam.h */