1*2688b459Schristos /* $NetBSD: vmparam.h,v 1.33 2019/03/27 17:15:29 christos Exp $ */ 21bf6aa62Smatt 31bf6aa62Smatt /* 41bf6aa62Smatt * Copyright (c) 1988 The Regents of the University of California. 51bf6aa62Smatt * All rights reserved. 61bf6aa62Smatt * 71bf6aa62Smatt * Redistribution and use in source and binary forms, with or without 81bf6aa62Smatt * modification, are permitted provided that the following conditions 91bf6aa62Smatt * are met: 101bf6aa62Smatt * 1. Redistributions of source code must retain the above copyright 111bf6aa62Smatt * notice, this list of conditions and the following disclaimer. 121bf6aa62Smatt * 2. Redistributions in binary form must reproduce the above copyright 131bf6aa62Smatt * notice, this list of conditions and the following disclaimer in the 141bf6aa62Smatt * documentation and/or other materials provided with the distribution. 15aad01611Sagc * 3. Neither the name of the University nor the names of its contributors 161bf6aa62Smatt * may be used to endorse or promote products derived from this software 171bf6aa62Smatt * without specific prior written permission. 181bf6aa62Smatt * 191bf6aa62Smatt * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND 201bf6aa62Smatt * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 211bf6aa62Smatt * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 221bf6aa62Smatt * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE 231bf6aa62Smatt * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 241bf6aa62Smatt * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 251bf6aa62Smatt * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 261bf6aa62Smatt * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 271bf6aa62Smatt * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 281bf6aa62Smatt * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 291bf6aa62Smatt * SUCH DAMAGE. 301bf6aa62Smatt */ 311bf6aa62Smatt 32caff4f57Schristos #ifndef _EVBARM_VMPARAM_H_ 33caff4f57Schristos #define _EVBARM_VMPARAM_H_ 341bf6aa62Smatt 35fe33aa27Sryo #ifdef __aarch64__ 36fe33aa27Sryo 37fe33aa27Sryo #include <aarch64/vmparam.h> 38fe33aa27Sryo 39fe33aa27Sryo #else 40fe33aa27Sryo 414ffa9834Sthorpej #include <arm/arm32/vmparam.h> 424ffa9834Sthorpej 431bf6aa62Smatt /* 441bf6aa62Smatt * Address space constants 451bf6aa62Smatt */ 461bf6aa62Smatt 471bf6aa62Smatt /* 481bf6aa62Smatt * The line between user space and kernel space 49110e2a57Sthorpej * Mappings >= KERNEL_BASE are constant across all processes 501bf6aa62Smatt */ 51825088edSmatt #ifdef KERNEL_BASE_EXT 52825088edSmatt #define KERNEL_BASE KERNEL_BASE_EXT 53825088edSmatt #else 54825088edSmatt #define KERNEL_BASE 0x80000000 55825088edSmatt #endif 561bf6aa62Smatt 571bf6aa62Smatt /* 581bf6aa62Smatt * Size of User Raw I/O map 591bf6aa62Smatt */ 601bf6aa62Smatt 611bf6aa62Smatt #define USRIOSIZE 300 621bf6aa62Smatt 631bf6aa62Smatt /* virtual sizes (bytes) for various kernel submaps */ 641bf6aa62Smatt 65cc2c493bSthorpej #define VM_PHYS_SIZE (USRIOSIZE*PAGE_SIZE) 661bf6aa62Smatt 671bf6aa62Smatt /* 681bf6aa62Smatt * max number of non-contig chunks of physical RAM you can have 691bf6aa62Smatt */ 701bf6aa62Smatt 711bf6aa62Smatt #define VM_PHYSSEG_MAX 32 721bf6aa62Smatt 731bf6aa62Smatt /* 741bf6aa62Smatt * when converting a physical address to a vm_page structure, we 751bf6aa62Smatt * want to use a binary search on the chunks of physical memory 761bf6aa62Smatt * to find our RAM 771bf6aa62Smatt */ 781bf6aa62Smatt 791bf6aa62Smatt #define VM_PHYSSEG_STRAT VM_PSTRAT_BSEARCH 801bf6aa62Smatt 811bf6aa62Smatt /* 82ee91b1e5Sskrll * we support 3 free lists: 831bf6aa62Smatt * 841bf6aa62Smatt * - DEFAULT for all systems 85ee91b1e5Sskrll * - ISADMA for the ISA DMA range (could be unused) 86ee91b1e5Sskrll * - DIRECTMAP for systems with direct KVA mapped pages 871bf6aa62Smatt */ 881bf6aa62Smatt 89ee91b1e5Sskrll #define VM_NFREELIST 3 901bf6aa62Smatt #define VM_FREELIST_DEFAULT 0 911bf6aa62Smatt #define VM_FREELIST_ISADMA 1 92ee91b1e5Sskrll #define VM_FREELIST_DIRECTMAP 2 931bf6aa62Smatt 94fe33aa27Sryo #endif 95fe33aa27Sryo 96caff4f57Schristos #endif /* _EVBARM_VMPARAM_H_ */ 97