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