xref: /freebsd/sys/arm/include/vmparam.h (revision b8e7fc24fe7ebc11bf82aa8c7421c3f53a4522dd)
16fc729afSOlivier Houchard /*	$NetBSD: vmparam.h,v 1.26 2003/08/07 16:27:47 agc Exp $	*/
26fc729afSOlivier Houchard 
3d8315c79SWarner Losh /*-
46fc729afSOlivier Houchard  * Copyright (c) 1988 The Regents of the University of California.
56fc729afSOlivier Houchard  * All rights reserved.
66fc729afSOlivier Houchard  *
76fc729afSOlivier Houchard  * Redistribution and use in source and binary forms, with or without
86fc729afSOlivier Houchard  * modification, are permitted provided that the following conditions
96fc729afSOlivier Houchard  * are met:
106fc729afSOlivier Houchard  * 1. Redistributions of source code must retain the above copyright
116fc729afSOlivier Houchard  *    notice, this list of conditions and the following disclaimer.
126fc729afSOlivier Houchard  * 2. Redistributions in binary form must reproduce the above copyright
136fc729afSOlivier Houchard  *    notice, this list of conditions and the following disclaimer in the
146fc729afSOlivier Houchard  *    documentation and/or other materials provided with the distribution.
156fc729afSOlivier Houchard  * 3. Neither the name of the University nor the names of its contributors
166fc729afSOlivier Houchard  *    may be used to endorse or promote products derived from this software
176fc729afSOlivier Houchard  *    without specific prior written permission.
186fc729afSOlivier Houchard  *
196fc729afSOlivier Houchard  * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
206fc729afSOlivier Houchard  * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
216fc729afSOlivier Houchard  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
226fc729afSOlivier Houchard  * ARE DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
236fc729afSOlivier Houchard  * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
246fc729afSOlivier Houchard  * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
256fc729afSOlivier Houchard  * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
266fc729afSOlivier Houchard  * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
276fc729afSOlivier Houchard  * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
286fc729afSOlivier Houchard  * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
296fc729afSOlivier Houchard  * SUCH DAMAGE.
306fc729afSOlivier Houchard  *
316fc729afSOlivier Houchard  * $FreeBSD$
326fc729afSOlivier Houchard  */
336fc729afSOlivier Houchard 
346fc729afSOlivier Houchard #ifndef	_MACHINE_VMPARAM_H_
356fc729afSOlivier Houchard #define	_MACHINE_VMPARAM_H_
366fc729afSOlivier Houchard 
376fc729afSOlivier Houchard 
386fc729afSOlivier Houchard /*#include <arm/arm32/vmparam.h>
396fc729afSOlivier Houchard */
406fc729afSOlivier Houchard /*
416fc729afSOlivier Houchard  * Address space constants
426fc729afSOlivier Houchard  */
436fc729afSOlivier Houchard 
446fc729afSOlivier Houchard /*
456fc729afSOlivier Houchard  * The line between user space and kernel space
466fc729afSOlivier Houchard  * Mappings >= KERNEL_BASE are constant across all processes
476fc729afSOlivier Houchard  */
486fc729afSOlivier Houchard #define	KERNBASE		0xc0000000
496fc729afSOlivier Houchard 
506fc729afSOlivier Houchard /*
516fc729afSOlivier Houchard  * max number of non-contig chunks of physical RAM you can have
526fc729afSOlivier Houchard  */
536fc729afSOlivier Houchard 
546fc729afSOlivier Houchard #define	VM_PHYSSEG_MAX		32
556fc729afSOlivier Houchard 
566fc729afSOlivier Houchard /*
5704a18977SAlan Cox  * The physical address space is densely populated.
5804a18977SAlan Cox  */
5904a18977SAlan Cox #define	VM_PHYSSEG_DENSE
6004a18977SAlan Cox 
6104a18977SAlan Cox /*
627bfda801SAlan Cox  * Create three free page pools: VM_FREEPOOL_DEFAULT is the default pool
639211decaSAlan Cox  * from which physical pages are allocated and VM_FREEPOOL_DIRECT is
649211decaSAlan Cox  * the pool from which physical pages for small UMA objects are
659211decaSAlan Cox  * allocated.
669211decaSAlan Cox  */
677bfda801SAlan Cox #define	VM_NFREEPOOL		3
687bfda801SAlan Cox #define	VM_FREEPOOL_CACHE	2
699211decaSAlan Cox #define	VM_FREEPOOL_DEFAULT	0
709211decaSAlan Cox #define	VM_FREEPOOL_DIRECT	1
719211decaSAlan Cox 
729211decaSAlan Cox /*
736fc729afSOlivier Houchard  * we support 2 free lists:
746fc729afSOlivier Houchard  *
756fc729afSOlivier Houchard  *	- DEFAULT for all systems
766fc729afSOlivier Houchard  *	- ISADMA for the ISA DMA range on Sharks only
776fc729afSOlivier Houchard  */
786fc729afSOlivier Houchard 
796fc729afSOlivier Houchard #define	VM_NFREELIST		2
806fc729afSOlivier Houchard #define	VM_FREELIST_DEFAULT	0
816fc729afSOlivier Houchard #define	VM_FREELIST_ISADMA	1
826fc729afSOlivier Houchard 
839211decaSAlan Cox /*
849211decaSAlan Cox  * The largest allocation size is 1MB.
859211decaSAlan Cox  */
869211decaSAlan Cox #define	VM_NFREEORDER		9
879211decaSAlan Cox 
88b8e7fc24SAlan Cox /*
89b8e7fc24SAlan Cox  * Disable superpage reservations.
90b8e7fc24SAlan Cox  */
91b8e7fc24SAlan Cox #ifndef	VM_NRESERVLEVEL
92b8e7fc24SAlan Cox #define	VM_NRESERVLEVEL		0
93b8e7fc24SAlan Cox #endif
94b8e7fc24SAlan Cox 
956fc729afSOlivier Houchard #define UPT_MAX_ADDRESS		VADDR(UPTPTDI + 3, 0)
966fc729afSOlivier Houchard #define UPT_MIN_ADDRESS		VADDR(UPTPTDI, 0)
976fc729afSOlivier Houchard 
986fc729afSOlivier Houchard #define VM_MIN_ADDRESS          (0x00001000)
9949953e11SOlivier Houchard #ifdef ARM_USE_SMALL_ALLOC
10049953e11SOlivier Houchard #ifndef ARM_KERN_DIRECTMAP
10149953e11SOlivier Houchard #define ARM_KERN_DIRECTMAP 512 * 1024 * 1024 /* 512 MB */
10249953e11SOlivier Houchard #endif
10349953e11SOlivier Houchard #define VM_MAXUSER_ADDRESS	KERNBASE - ARM_KERN_DIRECTMAP
10449953e11SOlivier Houchard #else /* ARM_USE_SMALL_ALLOC */
1056fc729afSOlivier Houchard #define VM_MAXUSER_ADDRESS      KERNBASE
10649953e11SOlivier Houchard #endif /* ARM_USE_SMALL_ALLOC */
1076fc729afSOlivier Houchard #define VM_MAX_ADDRESS          VM_MAXUSER_ADDRESS
1086fc729afSOlivier Houchard 
1096fc729afSOlivier Houchard #define USRSTACK        VM_MAXUSER_ADDRESS
1106fc729afSOlivier Houchard 
1116fc729afSOlivier Houchard /* initial pagein size of beginning of executable file */
1126fc729afSOlivier Houchard #ifndef VM_INITIAL_PAGEIN
1136fc729afSOlivier Houchard #define VM_INITIAL_PAGEIN       16
1146fc729afSOlivier Houchard #endif
1156fc729afSOlivier Houchard 
1166fc729afSOlivier Houchard #ifndef VM_MIN_KERNEL_ADDRESS
1176fc729afSOlivier Houchard #define VM_MIN_KERNEL_ADDRESS KERNBASE
1186fc729afSOlivier Houchard #endif
1196fc729afSOlivier Houchard 
1206fc729afSOlivier Houchard #define VM_MAX_KERNEL_ADDRESS	0xffffffff
1216fc729afSOlivier Houchard /*
1225b17d1f9SOlivier Houchard  * Virtual size (bytes) for various kernel submaps.
1235b17d1f9SOlivier Houchard  */
1245b17d1f9SOlivier Houchard 
1256fc729afSOlivier Houchard #ifndef VM_KMEM_SIZE
1266fc729afSOlivier Houchard #define VM_KMEM_SIZE            (12*1024*1024)
1276fc729afSOlivier Houchard #endif
1286fc729afSOlivier Houchard 
1296fc729afSOlivier Houchard #define MAXTSIZ 	(16*1024*1024)
1306fc729afSOlivier Houchard #define DFLDSIZ         (128*1024*1024)
1316fc729afSOlivier Houchard #define MAXDSIZ         (512*1024*1024)
1326fc729afSOlivier Houchard #define DFLSSIZ         (2*1024*1024)
1336fc729afSOlivier Houchard #define MAXSSIZ         (8*1024*1024)
1346fc729afSOlivier Houchard #define SGROWSIZ        (128*1024)
1356fc729afSOlivier Houchard #define MAXSLP		20
1366fc729afSOlivier Houchard 
1379f0f6bf4SOlivier Houchard #define VM_PROT_READ_IS_EXEC
13856e472e2SOlivier Houchard 
13956e472e2SOlivier Houchard #ifdef ARM_USE_SMALL_ALLOC
14056e472e2SOlivier Houchard #define UMA_MD_SMALL_ALLOC
14156e472e2SOlivier Houchard #endif /* ARM_USE_SMALL_ALLOC */
1426fc729afSOlivier Houchard #endif	/* _MACHINE_VMPARAM_H_ */
143