vmparam.h revision 1.2
11.2Schris/* $NetBSD: vmparam.h,v 1.2 2002/03/03 11:23:01 chris 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.1Sthorpej * 3. All advertising materials mentioning features or use of this software 161.1Sthorpej * must display the following acknowledgement: 171.1Sthorpej * This product includes software developed by the University of 181.1Sthorpej * California, Berkeley and its contributors. 191.1Sthorpej * 4. Neither the name of the University nor the names of its contributors 201.1Sthorpej * may be used to endorse or promote products derived from this software 211.1Sthorpej * without specific prior written permission. 221.1Sthorpej * 231.1Sthorpej * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND 241.1Sthorpej * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 251.1Sthorpej * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 261.1Sthorpej * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE 271.1Sthorpej * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 281.1Sthorpej * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 291.1Sthorpej * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 301.1Sthorpej * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 311.1Sthorpej * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 321.1Sthorpej * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 331.1Sthorpej * SUCH DAMAGE. 341.1Sthorpej */ 351.1Sthorpej 361.1Sthorpej#ifndef _ARM32_VMPARAM_H_ 371.1Sthorpej#define _ARM32_VMPARAM_H_ 381.1Sthorpej 391.1Sthorpej#ifdef _KERNEL 401.1Sthorpej 411.1Sthorpej#include <arm/arm32/vmparam.h> 421.1Sthorpej 431.1Sthorpej/* 441.1Sthorpej * Address space constants 451.1Sthorpej */ 461.1Sthorpej 471.1Sthorpej/* 481.1Sthorpej * The line between user space and kernel space 491.1Sthorpej * Mappings >= KERNEL_SPACE_START are constant across all processes 501.1Sthorpej */ 511.1Sthorpej#define KERNEL_SPACE_START 0xf0000000 521.1Sthorpej 531.1Sthorpej/* Various constants used by the MD code */ 541.1Sthorpej#define KERNEL_BASE 0xf0000000 551.1Sthorpej#define KERNEL_TEXT_BASE (KERNEL_BASE + 0x00000000) 561.1Sthorpej#define ALT_PAGE_TBLS_BASE (KERNEL_BASE + 0x00c00000) 571.1Sthorpej#define KERNEL_VM_BASE (KERNEL_BASE + 0x01000000) 581.1Sthorpej 591.1Sthorpej/* 601.1Sthorpej * The range 0xf1000000 - 0xf6ffffff is available for kernel VM space 611.1Sthorpej * OFW sits at 0xf7000000 621.1Sthorpej */ 631.1Sthorpej#define KERNEL_VM_SIZE 0x06000000 641.1Sthorpej 651.1Sthorpej#define PROCESS_PAGE_TBLS_BASE PAGE_TABLE_SPACE_START 661.1Sthorpej 671.1Sthorpej/* 681.1Sthorpej * Override the default pager_map size, there's not enough KVA. 691.1Sthorpej */ 701.1Sthorpej#define PAGER_MAP_SIZE (4 * 1024 * 1024) 711.1Sthorpej 721.1Sthorpej/* 731.1Sthorpej * Size of User Raw I/O map 741.1Sthorpej */ 751.1Sthorpej 761.1Sthorpej#define USRIOSIZE 300 771.1Sthorpej 781.1Sthorpej/* XXX max. amount of KVM to be used by buffers. */ 791.1Sthorpej#ifndef VM_MAX_KERNEL_BUF 801.1Sthorpej#define VM_MAX_KERNEL_BUF \ 811.2Schris ((KERNEL_VM_SIZE) * 4 / 10) 821.1Sthorpej#endif 831.1Sthorpej 841.1Sthorpej/* virtual sizes (bytes) for various kernel submaps */ 851.1Sthorpej 861.1Sthorpej#define VM_PHYS_SIZE (USRIOSIZE*NBPG) 871.1Sthorpej 881.1Sthorpej/* 891.1Sthorpej * max number of non-contig chunks of physical RAM you can have 901.1Sthorpej */ 911.1Sthorpej 921.1Sthorpej#define VM_PHYSSEG_MAX 32 931.1Sthorpej 941.1Sthorpej/* 951.1Sthorpej * when converting a physical address to a vm_page structure, we 961.1Sthorpej * want to use a binary search on the chunks of physical memory 971.1Sthorpej * to find our RAM 981.1Sthorpej */ 991.1Sthorpej 1001.1Sthorpej#define VM_PHYSSEG_STRAT VM_PSTRAT_BSEARCH 1011.1Sthorpej 1021.1Sthorpej/* 1031.1Sthorpej * this indicates that we can't add RAM to the VM system after the 1041.1Sthorpej * vm system is init'd. 1051.1Sthorpej */ 1061.1Sthorpej 1071.1Sthorpej#define VM_PHYSSEG_NOADD 1081.1Sthorpej 1091.1Sthorpej/* 1101.1Sthorpej * we support 2 free lists: 1111.1Sthorpej * 1121.1Sthorpej * - DEFAULT for all systems 1131.1Sthorpej * - ISADMA for the ISA DMA range on Sharks only 1141.1Sthorpej * - RPCDMA for the DMA range on RiscPC's + Kinetic cards 1151.1Sthorpej */ 1161.1Sthorpej 1171.1Sthorpej#define VM_NFREELIST 2 1181.1Sthorpej#define VM_FREELIST_DEFAULT 0 1191.1Sthorpej#define VM_FREELIST_ISADMA 1 1201.1Sthorpej#define VM_FREELIST_RPCDMA 1 1211.1Sthorpej 1221.1Sthorpej#endif /* _KERNEL */ 1231.1Sthorpej 1241.1Sthorpej#endif /* _ARM32_VMPARAM_H_ */ 125