1*207defd0Sandvar /* $NetBSD: vmparam.h,v 1.10 2021/09/11 20:28:04 andvar Exp $ */ 28b3b8c48Smatt /*- 3b8ea2c8cSmatt * Copyright (c) 2010, 2011 The NetBSD Foundation, Inc. 48b3b8c48Smatt * All rights reserved. 58b3b8c48Smatt * 68b3b8c48Smatt * This code is derived from software contributed to The NetBSD Foundation 7b8ea2c8cSmatt * by Raytheon BBN Technologies Corp and Defense Advanced Research Projects 8b8ea2c8cSmatt * Agency and which was developed by Matt Thomas of 3am Software Foundry. 9b8ea2c8cSmatt * 10b8ea2c8cSmatt * This material is based upon work supported by the Defense Advanced Research 11b8ea2c8cSmatt * Projects Agency and Space and Naval Warfare Systems Center, Pacific, under 12b8ea2c8cSmatt * Contract No. N66001-09-C-2073. 13b8ea2c8cSmatt * Approved for Public Release, Distribution Unlimited 148b3b8c48Smatt * 158b3b8c48Smatt * Redistribution and use in source and binary forms, with or without 168b3b8c48Smatt * modification, are permitted provided that the following conditions 178b3b8c48Smatt * are met: 188b3b8c48Smatt * 1. Redistributions of source code must retain the above copyright 198b3b8c48Smatt * notice, this list of conditions and the following disclaimer. 208b3b8c48Smatt * 2. Redistributions in binary form must reproduce the above copyright 218b3b8c48Smatt * notice, this list of conditions and the following disclaimer in the 228b3b8c48Smatt * documentation and/or other materials provided with the distribution. 238b3b8c48Smatt * 248b3b8c48Smatt * THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS 258b3b8c48Smatt * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED 268b3b8c48Smatt * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR 278b3b8c48Smatt * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS 288b3b8c48Smatt * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR 298b3b8c48Smatt * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF 308b3b8c48Smatt * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS 318b3b8c48Smatt * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN 328b3b8c48Smatt * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 338b3b8c48Smatt * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE 348b3b8c48Smatt * POSSIBILITY OF SUCH DAMAGE. 358b3b8c48Smatt */ 368b3b8c48Smatt 378b3b8c48Smatt #ifndef _POWERPC_BOOKE_VMPARAM_H_ 388b3b8c48Smatt #define _POWERPC_BOOKE_VMPARAM_H_ 398b3b8c48Smatt 408b3b8c48Smatt /* 41*207defd0Sandvar * Most of the definitions in this can be overridden by a machine-specific 428b3b8c48Smatt * vmparam.h if required. Otherwise a port can just include this file 438b3b8c48Smatt * get the right thing to happen. 448b3b8c48Smatt */ 458b3b8c48Smatt 468b3b8c48Smatt /* 478b3b8c48Smatt * BookE processors have 4K pages. Override the PAGE_* definitions to be 488b3b8c48Smatt * compile-time constants. 498b3b8c48Smatt */ 508b3b8c48Smatt #define PAGE_SHIFT 12 518b3b8c48Smatt #define PAGE_SIZE (1 << PAGE_SHIFT) 528b3b8c48Smatt #define PAGE_MASK (PAGE_SIZE - 1) 538b3b8c48Smatt 548b3b8c48Smatt #ifndef USRSTACK 558b3b8c48Smatt #define USRSTACK VM_MAXUSER_ADDRESS 568b3b8c48Smatt #endif 578b3b8c48Smatt 588b3b8c48Smatt #ifndef MAXTSIZ 5999c90d24Srin #define MAXTSIZ (128*1024*1024) /* maximum text size */ 608b3b8c48Smatt #endif 618b3b8c48Smatt 628b3b8c48Smatt #ifndef MAXDSIZ 6399c90d24Srin #define MAXDSIZ (1024*1024*1024) /* maximum data size */ 648b3b8c48Smatt #endif 658b3b8c48Smatt 668b3b8c48Smatt #ifndef MAXSSIZ 678a733105Srin #define MAXSSIZ (32*1024*1024) /* maximum stack size */ 688b3b8c48Smatt #endif 698b3b8c48Smatt 708b3b8c48Smatt #ifndef DFLDSIZ 718b3b8c48Smatt #define DFLDSIZ (256*1024*1024) /* default data size */ 728b3b8c48Smatt #endif 738b3b8c48Smatt 748b3b8c48Smatt #ifndef DFLSSIZ 758b3b8c48Smatt #define DFLSSIZ (2*1024*1024) /* default stack size */ 768b3b8c48Smatt #endif 778b3b8c48Smatt 788b3b8c48Smatt /* 798b3b8c48Smatt * Default number of pages in the user raw I/O map. 808b3b8c48Smatt */ 818b3b8c48Smatt #ifndef USRIOSIZE 828b3b8c48Smatt #define USRIOSIZE 1024 838b3b8c48Smatt #endif 848b3b8c48Smatt 858b3b8c48Smatt /* 868b3b8c48Smatt * The number of seconds for a process to be blocked before being 878b3b8c48Smatt * considered very swappable. 888b3b8c48Smatt */ 898b3b8c48Smatt #ifndef MAXSLP 908b3b8c48Smatt #define MAXSLP 20 918b3b8c48Smatt #endif 928b3b8c48Smatt 938b3b8c48Smatt /* 948b3b8c48Smatt * Some system constants 958b3b8c48Smatt */ 968b3b8c48Smatt 978b3b8c48Smatt #define VM_MIN_ADDRESS ((vaddr_t) 0) 98dd01d67eSmatt #define VM_MAXUSER_ADDRESS ((vaddr_t) /* -32768 */ 0xffff8000) 998b3b8c48Smatt #define VM_MAX_ADDRESS VM_MAXUSER_ADDRESS 1008b3b8c48Smatt #define VM_MIN_KERNEL_ADDRESS ((vaddr_t) 0xe4000000) 1018b3b8c48Smatt #define VM_MAX_KERNEL_ADDRESS ((vaddr_t) 0xfefff000) 1028b3b8c48Smatt 1038b3b8c48Smatt #define VM_PHYSSEG_STRAT VM_PSTRAT_BIGFIRST 1048b3b8c48Smatt 1058b3b8c48Smatt #ifndef VM_PHYS_SIZE 1068b3b8c48Smatt #define VM_PHYS_SIZE (USRIOSIZE * PAGE_SIZE) 1078b3b8c48Smatt #endif 1088b3b8c48Smatt 109e62c0b0fSchristos #include <uvm/pmap/vmpagemd.h> 1108b3b8c48Smatt 1118b3b8c48Smatt #endif /* _POWERPC_BOOKE_VMPARAM_H_ */ 112