11.28Sskrll/*	$NetBSD: vmparam.h,v 1.28 2017/11/02 09:42:45 skrll 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 * Size of User Raw I/O map
511.1Smatt */
521.1Smatt
531.1Smatt#define USRIOSIZE       300
541.1Smatt
551.1Smatt/* virtual sizes (bytes) for various kernel submaps */
561.1Smatt
571.15Sthorpej#define VM_PHYS_SIZE		(USRIOSIZE*PAGE_SIZE)
581.1Smatt
591.1Smatt/*
601.1Smatt * max number of non-contig chunks of physical RAM you can have
611.1Smatt */
621.1Smatt
631.1Smatt#define	VM_PHYSSEG_MAX		32
641.1Smatt
651.1Smatt/*
661.1Smatt * when converting a physical address to a vm_page structure, we
671.1Smatt * want to use a binary search on the chunks of physical memory
681.1Smatt * to find our RAM
691.1Smatt */
701.1Smatt
711.1Smatt#define	VM_PHYSSEG_STRAT	VM_PSTRAT_BSEARCH
721.1Smatt
731.1Smatt/*
741.1Smatt * we support 2 free lists:
751.1Smatt *
761.1Smatt *	- DEFAULT for all systems
771.28Sskrll *	- ISADMA for the ISA DMA range
781.1Smatt */
791.1Smatt
801.1Smatt#define	VM_NFREELIST		2
811.1Smatt#define	VM_FREELIST_DEFAULT	0
821.1Smatt#define	VM_FREELIST_ISADMA	1
831.14Sthorpej
841.26Schristos#endif /* _KERNEL || _KMEMUSER */
851.1Smatt
861.26Schristos#endif	/* _NETWINDER_VMPARAM_H_ */
87