11.10Sandvar/*	$NetBSD: vmparam.h,v 1.10 2021/09/11 20:28:04 andvar Exp $	*/
21.1Smatt/*-
31.3Smatt * Copyright (c) 2010, 2011 The NetBSD Foundation, Inc.
41.1Smatt * All rights reserved.
51.1Smatt *
61.1Smatt * This code is derived from software contributed to The NetBSD Foundation
71.3Smatt * by Raytheon BBN Technologies Corp and Defense Advanced Research Projects
81.3Smatt * Agency and which was developed by Matt Thomas of 3am Software Foundry.
91.3Smatt *
101.3Smatt * This material is based upon work supported by the Defense Advanced Research
111.3Smatt * Projects Agency and Space and Naval Warfare Systems Center, Pacific, under
121.3Smatt * Contract No. N66001-09-C-2073.
131.3Smatt * Approved for Public Release, Distribution Unlimited
141.1Smatt *
151.1Smatt * Redistribution and use in source and binary forms, with or without
161.1Smatt * modification, are permitted provided that the following conditions
171.1Smatt * are met:
181.1Smatt * 1. Redistributions of source code must retain the above copyright
191.1Smatt *    notice, this list of conditions and the following disclaimer.
201.1Smatt * 2. Redistributions in binary form must reproduce the above copyright
211.1Smatt *    notice, this list of conditions and the following disclaimer in the
221.1Smatt *    documentation and/or other materials provided with the distribution.
231.1Smatt *
241.1Smatt * THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS
251.1Smatt * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
261.1Smatt * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
271.1Smatt * PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS
281.1Smatt * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
291.1Smatt * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
301.1Smatt * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
311.1Smatt * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
321.1Smatt * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
331.1Smatt * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
341.1Smatt * POSSIBILITY OF SUCH DAMAGE.
351.1Smatt */
361.1Smatt
371.1Smatt#ifndef _POWERPC_BOOKE_VMPARAM_H_
381.1Smatt#define _POWERPC_BOOKE_VMPARAM_H_
391.1Smatt
401.1Smatt/*
411.10Sandvar * Most of the definitions in this can be overridden by a machine-specific
421.1Smatt * vmparam.h if required.  Otherwise a port can just include this file
431.1Smatt * get the right thing to happen.
441.1Smatt */
451.1Smatt
461.1Smatt/*
471.1Smatt * BookE processors have 4K pages.  Override the PAGE_* definitions to be
481.1Smatt * compile-time constants.
491.1Smatt */
501.1Smatt#define	PAGE_SHIFT	12
511.1Smatt#define	PAGE_SIZE	(1 << PAGE_SHIFT)
521.1Smatt#define	PAGE_MASK	(PAGE_SIZE - 1)
531.1Smatt
541.1Smatt#ifndef	USRSTACK
551.1Smatt#define	USRSTACK	VM_MAXUSER_ADDRESS
561.1Smatt#endif
571.1Smatt
581.1Smatt#ifndef	MAXTSIZ
591.9Srin#define	MAXTSIZ		(128*1024*1024)		/* maximum text size */
601.1Smatt#endif
611.1Smatt
621.1Smatt#ifndef	MAXDSIZ
631.9Srin#define	MAXDSIZ		(1024*1024*1024)	/* maximum data size */
641.1Smatt#endif
651.1Smatt
661.1Smatt#ifndef	MAXSSIZ
671.8Srin#define	MAXSSIZ		(32*1024*1024)		/* maximum stack size */
681.1Smatt#endif
691.1Smatt
701.1Smatt#ifndef	DFLDSIZ
711.1Smatt#define	DFLDSIZ		(256*1024*1024)		/* default data size */
721.1Smatt#endif
731.1Smatt
741.1Smatt#ifndef	DFLSSIZ
751.1Smatt#define	DFLSSIZ		(2*1024*1024)		/* default stack size */
761.1Smatt#endif
771.1Smatt
781.1Smatt/*
791.1Smatt * Default number of pages in the user raw I/O map.
801.1Smatt */
811.1Smatt#ifndef USRIOSIZE
821.1Smatt#define	USRIOSIZE	1024
831.1Smatt#endif
841.1Smatt
851.1Smatt/*
861.1Smatt * The number of seconds for a process to be blocked before being
871.1Smatt * considered very swappable.
881.1Smatt */
891.1Smatt#ifndef MAXSLP
901.1Smatt#define	MAXSLP		20
911.1Smatt#endif
921.1Smatt
931.1Smatt/*
941.1Smatt * Some system constants
951.1Smatt */
961.1Smatt
971.1Smatt#define	VM_MIN_ADDRESS		((vaddr_t) 0)
981.6Smatt#define	VM_MAXUSER_ADDRESS	((vaddr_t) /* -32768 */ 0xffff8000)
991.1Smatt#define	VM_MAX_ADDRESS		VM_MAXUSER_ADDRESS
1001.1Smatt#define	VM_MIN_KERNEL_ADDRESS	((vaddr_t) 0xe4000000)
1011.1Smatt#define	VM_MAX_KERNEL_ADDRESS	((vaddr_t) 0xfefff000)
1021.1Smatt
1031.1Smatt#define	VM_PHYSSEG_STRAT	VM_PSTRAT_BIGFIRST
1041.1Smatt
1051.1Smatt#ifndef VM_PHYS_SIZE
1061.1Smatt#define	VM_PHYS_SIZE		(USRIOSIZE * PAGE_SIZE)
1071.1Smatt#endif
1081.1Smatt
1091.7Schristos#include <uvm/pmap/vmpagemd.h>
1101.1Smatt
1111.1Smatt#endif /* _POWERPC_BOOKE_VMPARAM_H_ */
112