vmparam.h revision 1.5
11.5She/* $NetBSD: vmparam.h,v 1.5 2012/02/19 07:51:52 he 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 * Override the default pager_map size, there's not enough KVA. 511.1Sgavan */ 521.3Syamt#define PAGER_MAP_DEFAULT_SIZE (4 * 1024 * 1024) 531.1Sgavan 541.1Sgavan/* 551.1Sgavan * Size of User Raw I/O map 561.1Sgavan */ 571.1Sgavan 581.1Sgavan#define USRIOSIZE 300 591.1Sgavan 601.1Sgavan/* virtual sizes (bytes) for various kernel submaps */ 611.1Sgavan 621.1Sgavan#define VM_PHYS_SIZE (USRIOSIZE*PAGE_SIZE) 631.1Sgavan 641.1Sgavan/* 651.1Sgavan * max number of non-contig chunks of physical RAM you can have 661.1Sgavan */ 671.1Sgavan 681.1Sgavan#define VM_PHYSSEG_MAX 32 691.1Sgavan 701.1Sgavan/* 711.1Sgavan * when converting a physical address to a vm_page structure, we 721.1Sgavan * want to use a binary search on the chunks of physical memory 731.1Sgavan * to find our RAM 741.1Sgavan */ 751.1Sgavan 761.1Sgavan#define VM_PHYSSEG_STRAT VM_PSTRAT_BSEARCH 771.1Sgavan 781.1Sgavan/* 791.1Sgavan * we support 2 free lists: 801.1Sgavan * 811.1Sgavan * - DEFAULT for all systems 821.1Sgavan * - ISADMA for the ISA DMA range on Sharks only 831.1Sgavan */ 841.1Sgavan 851.1Sgavan#define VM_NFREELIST 2 861.1Sgavan#define VM_FREELIST_DEFAULT 0 871.1Sgavan#define VM_FREELIST_ISADMA 1 881.1Sgavan 891.5She#endif /* _KERNEL || _KMEMUSER */ 901.1Sgavan 911.1Sgavan#endif /* _IYONIX_VMPARAM_H_ */ 92