+++ /dev/null
-/* $NetBSD: vmparam.h,v 1.2 2006/07/03 17:01:45 cherry Exp $ */\r
-\r
-/*-\r
- * Copyright (c) 1990 The Regents of the University of California.\r
- * All rights reserved.\r
- *\r
- * This code is derived from software contributed to Berkeley by\r
- * William Jolitz.\r
- *\r
- * Redistribution and use in source and binary forms, with or without\r
- * modification, are permitted provided that the following conditions\r
- * are met:\r
- * 1. Redistributions of source code must retain the above copyright\r
- * notice, this list of conditions and the following disclaimer.\r
- * 2. Redistributions in binary form must reproduce the above copyright\r
- * notice, this list of conditions and the following disclaimer in the\r
- * documentation and/or other materials provided with the distribution.\r
- * 3. Neither the name of the University nor the names of its contributors\r
- * may be used to endorse or promote products derived from this software\r
- * without specific prior written permission.\r
- *\r
- * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND\r
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE\r
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE\r
- * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE\r
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL\r
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS\r
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)\r
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT\r
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY\r
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF\r
- * SUCH DAMAGE.\r
- *\r
- * @(#)vmparam.h 5.9 (Berkeley) 5/12/91\r
- */\r
-\r
-#ifndef _VMPARAM_H_\r
-#define _VMPARAM_H_\r
-\r
-#include <sys/tree.h>\r
-\r
-#define USRSTACK VM_MAX_ADDRESS /* XXX: Revisit vm address space. */\r
-\r
-/*\r
- * Virtual memory related constants, all in bytes\r
- */\r
-#ifndef MAXTSIZ\r
-#define MAXTSIZ (1<<30) /* max text size (1G) */\r
-#endif\r
-#ifndef DFLDSIZ\r
-#define DFLDSIZ (1<<27) /* initial data size (128M) */\r
-#endif\r
-#ifndef MAXDSIZ\r
-#define MAXDSIZ (1<<30) /* max data size (1G) */\r
-#endif\r
-#ifndef DFLSSIZ\r
-#define DFLSSIZ (1<<21) /* initial stack size (2M) */\r
-#endif\r
-#ifndef MAXSSIZ\r
-#define MAXSSIZ (1<<28) /* max stack size (256M) */\r
-#endif\r
-#ifndef SGROWSIZ\r
-#define SGROWSIZ (128UL*1024) /* amount to grow stack */\r
-#endif\r
-\r
-\r
-\r
-/*\r
- * PTEs for mapping user space into the kernel for phyio operations.\r
- * 64 pte's are enough to cover 8 disks * MAXBSIZE.\r
- */\r
-#ifndef USRIOSIZE\r
-#define USRIOSIZE 64\r
-#endif\r
-\r
-/*\r
- * Manipulating region bits of an address.\r
- */\r
-#define IA64_RR_BASE(n) (((u_int64_t) (n)) << 61)\r
-#define IA64_RR_MASK(x) ((x) & ((1L << 61) - 1))\r
-\r
-#define IA64_PHYS_TO_RR6(x) ((x) | IA64_RR_BASE(6))\r
-#define IA64_PHYS_TO_RR7(x) ((x) | IA64_RR_BASE(7))\r
-\r
-#define IA64_ID_PAGE_SHIFT 28 /* 256M */\r
-#define IA64_ID_PAGE_SIZE (1 << IA64_ID_PAGE_SHIFT)\r
-#define IA64_ID_PAGE_MASK (IA64_ID_PAGE_SIZE-1)\r
-\r
-#define IA64_BACKINGSTORE IA64_RR_BASE(4)\r
-\r
-#define PAGE_SHIFT 14 /* 16K pages by default. */\r
-#define PAGE_SIZE (1 << PAGE_SHIFT)\r
-#define PAGE_MASK (PAGE_SIZE - 1)\r
-\r
-/* user/kernel map constants */\r
-#define VM_MIN_ADDRESS ((vaddr_t)0)\r
-#define VM_MAX_ADDRESS ((vaddr_t) IA64_RR_BASE(5))\r
-#define VM_GATEWAY_SIZE PAGE_SIZE\r
-#define VM_MAXUSER_ADDRESS (VM_MAX_ADDRESS + VM_GATEWAY_SIZE)\r
-#define VM_MIN_KERNEL_ADDRESS VM_MAXUSER_ADDRESS\r
-#define VM_MAX_KERNEL_ADDRESS ((vaddr_t) (IA64_RR_BASE(6) - 1))\r
-\r
-#define VM_PHYSSEG_MAX 16 /* XXX: */\r
-#define VM_PHYSSEG_STRAT VM_PSTRAT_BSEARCH\r
-#define VM_PHYSSEG_NOADD /* no more after vm_mem_init */\r
-\r
-#define VM_NFREELIST 1 /* XXX: */\r
-#define VM_FREELIST_DEFAULT 0 /* XXX: */\r
-\r
-/* virtual sizes (bytes) for various kernel submaps */\r
-#define VM_PHYS_SIZE (USRIOSIZE*PAGE_SIZE)\r
-\r
-#ifndef _LOCORE\r
-/*\r
- * pmap-specific data store in the vm_page structure.\r
- */\r
-#define __HAVE_VM_PAGE_MD\r
-struct vm_page_md {\r
- TAILQ_HEAD(,pv_entry) pv_list; /* pv_entry list */\r
- int pv_list_count;\r
- struct simplelock pv_slock; /* lock on this head */\r
- int pvh_attrs; /* page attributes */\r
-};\r
-\r
-#define VM_MDPAGE_INIT(pg) \\r
-do { \\r
- TAILQ_INIT(&(pg)->mdpage.pv_list); \\r
- simple_lock_init(&(pg)->mdpage.pv_slock); \\r
-} while (/*CONSTCOND*/0)\r
-#endif /*_LOCORE*/\r
-\r
-#endif /* _VMPARAM_H_ */\r