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