vmparam.h revision 1.23
11.23Stsutsui/*	$NetBSD: vmparam.h,v 1.23 2020/02/01 19:41:49 tsutsui Exp $	*/
21.1Stsutsui
31.1Stsutsui/*
41.18Srmind * Copyright (c) 1988 University of Utah.
51.1Stsutsui * Copyright (c) 1982, 1986, 1990, 1993
61.1Stsutsui *	The Regents of the University of California.  All rights reserved.
71.11Sagc *
81.11Sagc * This code is derived from software contributed to Berkeley by
91.11Sagc * the Systems Programming Group of the University of Utah Computer
101.11Sagc * Science Department.
111.11Sagc *
121.11Sagc * Redistribution and use in source and binary forms, with or without
131.11Sagc * modification, are permitted provided that the following conditions
141.11Sagc * are met:
151.11Sagc * 1. Redistributions of source code must retain the above copyright
161.11Sagc *    notice, this list of conditions and the following disclaimer.
171.11Sagc * 2. Redistributions in binary form must reproduce the above copyright
181.11Sagc *    notice, this list of conditions and the following disclaimer in the
191.11Sagc *    documentation and/or other materials provided with the distribution.
201.11Sagc * 3. Neither the name of the University nor the names of its contributors
211.11Sagc *    may be used to endorse or promote products derived from this software
221.11Sagc *    without specific prior written permission.
231.11Sagc *
241.11Sagc * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
251.11Sagc * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
261.11Sagc * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
271.11Sagc * ARE DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
281.11Sagc * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
291.11Sagc * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
301.11Sagc * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
311.11Sagc * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
321.11Sagc * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
331.11Sagc * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
341.11Sagc * SUCH DAMAGE.
351.11Sagc *
361.11Sagc * from: Utah $Hdr: vmparam.h 1.16 91/01/18$
371.11Sagc *
381.11Sagc *	@(#)vmparam.h	8.2 (Berkeley) 4/19/94
391.11Sagc */
401.1Stsutsui
411.1Stsutsui#ifndef _NEWS68K_VMPARAM_H_
421.1Stsutsui#define	_NEWS68K_VMPARAM_H_
431.1Stsutsui
441.1Stsutsui/*
451.1Stsutsui * Machine dependent constants for news68k
461.1Stsutsui */
471.4Sthorpej
481.4Sthorpej/*
491.23Stsutsui * Use common m68k definitions to define PAGE_SIZE and related constants.
501.23Stsutsui */
511.23Stsutsui#include <m68k/vmparam.h>
521.1Stsutsui
531.1Stsutsui/*
541.9Sthorpej * USRSTACK is the top (end) of the user stack.
551.1Stsutsui *
561.1Stsutsui * NOTE: the ONLY reason that HIGHPAGES is 0x100 instead of UPAGES (3)
571.1Stsutsui * is for HPUX compatibility.  Why??  Because HPUX's debuggers
581.1Stsutsui * have the user's stack hard-wired at FFF00000 for post-mortems,
591.1Stsutsui * and we must be compatible...
601.1Stsutsui */
611.10Sthorpej#define	USRSTACK	(-HIGHPAGES*PAGE_SIZE)	/* Start of user stack */
621.1Stsutsui#define	BTOPUSRSTACK	(0x100000-HIGHPAGES)	/* btop(USRSTACK) */
631.1Stsutsui#define P1PAGES		0x100000
641.10Sthorpej#define HIGHPAGES	(0x100000/PAGE_SIZE)
651.1Stsutsui
661.1Stsutsui/*
671.1Stsutsui * Virtual memory related constants, all in bytes
681.1Stsutsui */
691.1Stsutsui#ifndef MAXTSIZ
701.21Srin#define	MAXTSIZ		(32*1024*1024)		/* max text size */
711.1Stsutsui#endif
721.1Stsutsui#ifndef DFLDSIZ
731.1Stsutsui#define	DFLDSIZ		(16*1024*1024)		/* initial data size limit */
741.1Stsutsui#endif
751.1Stsutsui#ifndef MAXDSIZ
761.1Stsutsui#define	MAXDSIZ		(64*1024*1024)		/* max data size */
771.1Stsutsui#endif
781.1Stsutsui#ifndef	DFLSSIZ
791.1Stsutsui#define	DFLSSIZ		(512*1024)		/* initial stack size limit */
801.1Stsutsui#endif
811.1Stsutsui#ifndef	MAXSSIZ
821.1Stsutsui#define	MAXSSIZ		MAXDSIZ			/* max stack size */
831.1Stsutsui#endif
841.1Stsutsui
851.1Stsutsui/*
861.1Stsutsui * PTEs for mapping user space into the kernel for phyio operations.
871.1Stsutsui * One page is enough to handle 4Mb of simultaneous raw IO operations.
881.1Stsutsui */
891.1Stsutsui#ifndef USRIOSIZE
901.1Stsutsui#define USRIOSIZE	(1 * NPTEPG)	/* 4mb */
911.1Stsutsui#endif
921.1Stsutsui
931.1Stsutsui/*
941.1Stsutsui * Mach derived constants
951.1Stsutsui */
961.1Stsutsui
971.1Stsutsui/* user/kernel map constants */
981.1Stsutsui#define VM_MIN_ADDRESS		((vaddr_t)0)
991.1Stsutsui#define VM_MAXUSER_ADDRESS	((vaddr_t)0xFFF00000)
1001.1Stsutsui#define VM_MAX_ADDRESS		((vaddr_t)0xFFF00000)
1011.1Stsutsui#define VM_MIN_KERNEL_ADDRESS	((vaddr_t)0)
1021.19Stsutsui#define VM_MAX_KERNEL_ADDRESS	((vaddr_t)(0xC0000000-PAGE_SIZE*NPTEPG))
1031.1Stsutsui
1041.1Stsutsui/* virtual sizes (bytes) for various kernel submaps */
1051.10Sthorpej#define VM_PHYS_SIZE		(USRIOSIZE*PAGE_SIZE)
1061.1Stsutsui
1071.1Stsutsui/* # of kernel PT pages (initial only, can grow dynamically) */
1081.20Srin#define VM_KERNEL_PT_PAGES	((vsize_t)2)
1091.1Stsutsui
1101.1Stsutsui/*
1111.1Stsutsui * Constants which control the way the VM system deals with memory segments.
1121.1Stsutsui * The news68k only has one physical memory segment?
1131.1Stsutsui */
1141.1Stsutsui#define	VM_PHYSSEG_MAX		1
1151.1Stsutsui#define	VM_PHYSSEG_STRAT	VM_PSTRAT_BSEARCH
1161.1Stsutsui
1171.1Stsutsui#define	VM_NFREELIST		1
1181.1Stsutsui#define	VM_FREELIST_DEFAULT	0
1191.6Sthorpej
1201.7Sthorpej#define	__HAVE_PMAP_PHYSSEG
1211.1Stsutsui
1221.1Stsutsui/*
1231.1Stsutsui * pmap-specific data stored in the vm_physmem[] array.
1241.1Stsutsui */
1251.1Stsutsuistruct pmap_physseg {
1261.15Sthorpej	struct pv_header *pvheader;	/* pv table for this seg */
1271.1Stsutsui};
1281.1Stsutsui
1291.1Stsutsui#endif /* _NEWS68K_VMPARAM_H_ */
130