vmparam.h revision 1.21
11.21Sskrll/*	$NetBSD: vmparam.h,v 1.21 2017/11/02 09:42:45 skrll 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.19Schristos#ifndef	_SHARK_VMPARAM_H_
331.19Schristos#define	_SHARK_VMPARAM_H_
341.1Sthorpej
351.18Schristos#if defined(_KERNEL) || defined(_KMEMUSER)
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 * Size of User Raw I/O map
511.1Sthorpej */
521.1Sthorpej
531.1Sthorpej#define USRIOSIZE       300
541.1Sthorpej
551.1Sthorpej/* virtual sizes (bytes) for various kernel submaps */
561.1Sthorpej
571.7Sthorpej#define VM_PHYS_SIZE		(USRIOSIZE*PAGE_SIZE)
581.1Sthorpej
591.1Sthorpej/*
601.1Sthorpej * max number of non-contig chunks of physical RAM you can have
611.1Sthorpej */
621.1Sthorpej
631.1Sthorpej#define	VM_PHYSSEG_MAX		32
641.1Sthorpej
651.1Sthorpej/*
661.1Sthorpej * when converting a physical address to a vm_page structure, we
671.1Sthorpej * want to use a binary search on the chunks of physical memory
681.1Sthorpej * to find our RAM
691.1Sthorpej */
701.1Sthorpej
711.1Sthorpej#define	VM_PHYSSEG_STRAT	VM_PSTRAT_BSEARCH
721.1Sthorpej
731.1Sthorpej/*
741.1Sthorpej * we support 2 free lists:
751.1Sthorpej *
761.1Sthorpej *	- DEFAULT for all systems
771.21Sskrll *	- ISADMA for the ISA DMA range
781.1Sthorpej *	- RPCDMA for the DMA range on RiscPC's + Kinetic cards
791.1Sthorpej */
801.1Sthorpej
811.1Sthorpej#define	VM_NFREELIST		2
821.1Sthorpej#define	VM_FREELIST_DEFAULT	0
831.1Sthorpej#define	VM_FREELIST_ISADMA	1
841.1Sthorpej#define VM_FREELIST_RPCDMA	1
851.6Sthorpej
861.6Sthorpej#endif /* _KERNEL */
871.1Sthorpej
881.19Schristos#endif	/* _SHARK_VMPARAM_H_ */
89