vmparam.h revision 1.26
11.26Schristos/*	$NetBSD: vmparam.h,v 1.26 2012/02/18 16:25:25 christos Exp $	*/
21.1Smatt
31.1Smatt/*
41.1Smatt * Copyright (c) 1988 The Regents of the University of California.
51.1Smatt * All rights reserved.
61.1Smatt *
71.1Smatt * Redistribution and use in source and binary forms, with or without
81.1Smatt * modification, are permitted provided that the following conditions
91.1Smatt * are met:
101.1Smatt * 1. Redistributions of source code must retain the above copyright
111.1Smatt *    notice, this list of conditions and the following disclaimer.
121.1Smatt * 2. Redistributions in binary form must reproduce the above copyright
131.1Smatt *    notice, this list of conditions and the following disclaimer in the
141.1Smatt *    documentation and/or other materials provided with the distribution.
151.22Sagc * 3. Neither the name of the University nor the names of its contributors
161.1Smatt *    may be used to endorse or promote products derived from this software
171.1Smatt *    without specific prior written permission.
181.1Smatt *
191.1Smatt * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
201.1Smatt * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
211.1Smatt * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
221.1Smatt * ARE DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
231.1Smatt * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
241.1Smatt * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
251.1Smatt * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
261.1Smatt * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
271.1Smatt * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
281.1Smatt * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
291.1Smatt * SUCH DAMAGE.
301.1Smatt */
311.1Smatt
321.26Schristos#ifndef	_NETWINDER_VMPARAM_H_
331.26Schristos#define	_NETWINDER_VMPARAM_H_
341.1Smatt
351.26Schristos#if defined(_KERNEL) || defined(_KMEMUSER)
361.5Sthorpej
371.5Sthorpej#include <arm/arm32/vmparam.h>
381.1Smatt
391.1Smatt/*
401.1Smatt * Address space constants
411.1Smatt */
421.1Smatt
431.1Smatt/*
441.1Smatt * The line between user space and kernel space
451.12Sthorpej * Mappings >= KERNEL_BASE are constant across all processes
461.1Smatt */
471.12Sthorpej#define	KERNEL_BASE		0xf0000000
481.1Smatt
491.1Smatt/*
501.1Smatt * Override the default pager_map size, there's not enough KVA.
511.1Smatt */
521.24Syamt#define PAGER_MAP_DEFAULT_SIZE		(4 * 1024 * 1024)
531.1Smatt
541.1Smatt/*
551.1Smatt * Size of User Raw I/O map
561.1Smatt */
571.1Smatt
581.1Smatt#define USRIOSIZE       300
591.1Smatt
601.1Smatt/* virtual sizes (bytes) for various kernel submaps */
611.1Smatt
621.15Sthorpej#define VM_PHYS_SIZE		(USRIOSIZE*PAGE_SIZE)
631.1Smatt
641.1Smatt/*
651.1Smatt * max number of non-contig chunks of physical RAM you can have
661.1Smatt */
671.1Smatt
681.1Smatt#define	VM_PHYSSEG_MAX		32
691.1Smatt
701.1Smatt/*
711.1Smatt * when converting a physical address to a vm_page structure, we
721.1Smatt * want to use a binary search on the chunks of physical memory
731.1Smatt * to find our RAM
741.1Smatt */
751.1Smatt
761.1Smatt#define	VM_PHYSSEG_STRAT	VM_PSTRAT_BSEARCH
771.1Smatt
781.1Smatt/*
791.1Smatt * we support 2 free lists:
801.1Smatt *
811.1Smatt *	- DEFAULT for all systems
821.1Smatt *	- ISADMA for the ISA DMA range on Sharks only
831.1Smatt */
841.1Smatt
851.1Smatt#define	VM_NFREELIST		2
861.1Smatt#define	VM_FREELIST_DEFAULT	0
871.1Smatt#define	VM_FREELIST_ISADMA	1
881.14Sthorpej
891.26Schristos#endif /* _KERNEL || _KMEMUSER */
901.1Smatt
911.26Schristos#endif	/* _NETWINDER_VMPARAM_H_ */
92