1*cc474bc6Schristos /* $NetBSD: vmparam.h,v 1.12 2019/03/27 19:30:31 christos Exp $ */ 2b4450c6dSmatt 3b4450c6dSmatt /*- 4b4450c6dSmatt * Copyright (C) 1995, 1996 Wolfgang Solfrank. 5b4450c6dSmatt * Copyright (C) 1995, 1996 TooLs GmbH. 6b4450c6dSmatt * All rights reserved. 7b4450c6dSmatt * 8b4450c6dSmatt * Redistribution and use in source and binary forms, with or without 9b4450c6dSmatt * modification, are permitted provided that the following conditions 10b4450c6dSmatt * are met: 11b4450c6dSmatt * 1. Redistributions of source code must retain the above copyright 12b4450c6dSmatt * notice, this list of conditions and the following disclaimer. 13b4450c6dSmatt * 2. Redistributions in binary form must reproduce the above copyright 14b4450c6dSmatt * notice, this list of conditions and the following disclaimer in the 15b4450c6dSmatt * documentation and/or other materials provided with the distribution. 16b4450c6dSmatt * 3. All advertising materials mentioning features or use of this software 17b4450c6dSmatt * must display the following acknowledgement: 18b4450c6dSmatt * This product includes software developed by TooLs GmbH. 19b4450c6dSmatt * 4. The name of TooLs GmbH may not be used to endorse or promote products 20b4450c6dSmatt * derived from this software without specific prior written permission. 21b4450c6dSmatt * 22b4450c6dSmatt * THIS SOFTWARE IS PROVIDED BY TOOLS GMBH ``AS IS'' AND ANY EXPRESS OR 23b4450c6dSmatt * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES 24b4450c6dSmatt * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. 25b4450c6dSmatt * IN NO EVENT SHALL TOOLS GMBH BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 26b4450c6dSmatt * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, 27b4450c6dSmatt * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; 28b4450c6dSmatt * OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, 29b4450c6dSmatt * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR 30b4450c6dSmatt * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF 31b4450c6dSmatt * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 32b4450c6dSmatt */ 33b4450c6dSmatt 34*cc474bc6Schristos #ifndef _POWERPC_IBM4XX_VMPARAM_H_ 35*cc474bc6Schristos #define _POWERPC_IBM4XX_VMPARAM_H_ 36b4450c6dSmatt 377c0edb9dSthorpej /* 387c0edb9dSthorpej * We use 16K pages on IBM4xx CPUs. Override the PAGE_* definitions 397c0edb9dSthorpej * to be compile-time constants. 407c0edb9dSthorpej */ 417c0edb9dSthorpej #define PAGE_SHIFT 14 427c0edb9dSthorpej #define PAGE_SIZE (1 << PAGE_SHIFT) 437c0edb9dSthorpej #define PAGE_MASK (PAGE_SIZE - 1) 447c0edb9dSthorpej 45b4450c6dSmatt #define USRSTACK VM_MAXUSER_ADDRESS 46b4450c6dSmatt 47b4450c6dSmatt #ifndef MAXTSIZ 48b4450c6dSmatt #define MAXTSIZ (64*1024*1024) /* max text size */ 49b4450c6dSmatt #endif 50b4450c6dSmatt 51b4450c6dSmatt #ifndef DFLDSIZ 52b4450c6dSmatt #define DFLDSIZ (128*1024*1024) /* default data size */ 53b4450c6dSmatt #endif 54b4450c6dSmatt 55b4450c6dSmatt #ifndef MAXDSIZ 56b4450c6dSmatt #define MAXDSIZ (1*1024*1024*1024) /* max data size */ 57b4450c6dSmatt #endif 58b4450c6dSmatt 59b4450c6dSmatt #ifndef DFLSSIZ 60b4450c6dSmatt #define DFLSSIZ (2*1024*1024) /* default stack size */ 61b4450c6dSmatt #endif 62b4450c6dSmatt 63b4450c6dSmatt #ifndef MAXSSIZ 64b4450c6dSmatt #define MAXSSIZ (32*1024*1024) /* max stack size */ 65b4450c6dSmatt #endif 66b4450c6dSmatt 67b4450c6dSmatt /* 68b4450c6dSmatt * Size of User Raw I/O map 69b4450c6dSmatt */ 70b4450c6dSmatt #define USRIOSIZE 1024 71b4450c6dSmatt 72b4450c6dSmatt #if 1 73b4450c6dSmatt /* 74b4450c6dSmatt * These definitions give you a 2GB kernel VA space. The other set matches 75b4450c6dSmatt * the way other PPC ports lay out their 256MB kernel address space. 76b4450c6dSmatt */ 77b4450c6dSmatt #define VM_MIN_ADDRESS ((vaddr_t)0) 78cc2c493bSthorpej #define VM_MAXUSER_ADDRESS ((vaddr_t)0xffff0000-PAGE_SIZE) 79b4450c6dSmatt #define VM_MAX_ADDRESS VM_MAXUSER_ADDRESS 80b4450c6dSmatt #define VM_MIN_KERNEL_ADDRESS ((vaddr_t)0x80000000) 816980fa77Suebayasi #define VM_MAX_KERNEL_ADDRESS ((vaddr_t)0xef000000) /* before I/O periphs */ 82b4450c6dSmatt #else 83b4450c6dSmatt /* 84b4450c6dSmatt * Would like to have MAX addresses = 0, but this doesn't (currently) work 85b4450c6dSmatt */ 86b4450c6dSmatt #define VM_MIN_ADDRESS ((vaddr_t)0) 87cc2c493bSthorpej #define VM_MAXUSER_ADDRESS ((vaddr_t)0x80000000-PAGE_SIZE) 88b4450c6dSmatt #define VM_MAX_ADDRESS VM_MAXUSER_ADDRESS 89b4450c6dSmatt #define VM_MIN_KERNEL_ADDRESS ((vaddr_t)(KERNEL_SR << ADDR_SR_SHFT)) 90b4450c6dSmatt #define VM_MAX_KERNEL_ADDRESS (VM_MIN_KERNEL_ADDRESS + SEGMENT_LENGTH - 1) 91b4450c6dSmatt #endif 92b4450c6dSmatt 93cc2c493bSthorpej #define VM_PHYS_SIZE (USRIOSIZE * PAGE_SIZE) 94b4450c6dSmatt 95b4450c6dSmatt #define __HAVE_PMAP_PHYSSEG 96b4450c6dSmatt 97b4450c6dSmatt struct pmap_physseg { 98b4450c6dSmatt struct pv_entry *pvent; 99b4450c6dSmatt char *attrs; 100b4450c6dSmatt }; 101b4450c6dSmatt 102b4450c6dSmatt #define VM_PHYSSEG_STRAT VM_PSTRAT_BSEARCH 103b4450c6dSmatt 104*cc474bc6Schristos #endif /* _POWERPC_IBM4XX_VMPARAM_H_ */ 105