1 1.1 tsutsui /* $NetBSD: vmparam.h,v 1.1 2020/02/01 19:41:48 tsutsui Exp $ */ 2 1.1 tsutsui 3 1.1 tsutsui /* 4 1.1 tsutsui * Copyright (c) 1988 University of Utah. 5 1.1 tsutsui * Copyright (c) 1982, 1986, 1990, 1993 6 1.1 tsutsui * The Regents of the University of California. All rights reserved. 7 1.1 tsutsui * 8 1.1 tsutsui * This code is derived from software contributed to Berkeley by 9 1.1 tsutsui * the Systems Programming Group of the University of Utah Computer 10 1.1 tsutsui * Science Department. 11 1.1 tsutsui * 12 1.1 tsutsui * Redistribution and use in source and binary forms, with or without 13 1.1 tsutsui * modification, are permitted provided that the following conditions 14 1.1 tsutsui * are met: 15 1.1 tsutsui * 1. Redistributions of source code must retain the above copyright 16 1.1 tsutsui * notice, this list of conditions and the following disclaimer. 17 1.1 tsutsui * 2. Redistributions in binary form must reproduce the above copyright 18 1.1 tsutsui * notice, this list of conditions and the following disclaimer in the 19 1.1 tsutsui * documentation and/or other materials provided with the distribution. 20 1.1 tsutsui * 3. Neither the name of the University nor the names of its contributors 21 1.1 tsutsui * may be used to endorse or promote products derived from this software 22 1.1 tsutsui * without specific prior written permission. 23 1.1 tsutsui * 24 1.1 tsutsui * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND 25 1.1 tsutsui * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 26 1.1 tsutsui * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 27 1.1 tsutsui * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE 28 1.1 tsutsui * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 29 1.1 tsutsui * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 30 1.1 tsutsui * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 31 1.1 tsutsui * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 32 1.1 tsutsui * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 33 1.1 tsutsui * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 34 1.1 tsutsui * SUCH DAMAGE. 35 1.1 tsutsui * 36 1.1 tsutsui * from: Utah $Hdr: vmparam.h 1.16 91/01/18$ 37 1.1 tsutsui * 38 1.1 tsutsui * @(#)vmparam.h 8.2 (Berkeley) 4/19/94 39 1.1 tsutsui */ 40 1.1 tsutsui 41 1.1 tsutsui #ifndef _M68K_VMPARAM_H_ 42 1.1 tsutsui #define _M68K_VMPARAM_H_ 43 1.1 tsutsui 44 1.1 tsutsui /* 45 1.1 tsutsui * Common constants for m68k ports 46 1.1 tsutsui */ 47 1.1 tsutsui 48 1.1 tsutsui /* 49 1.1 tsutsui * hp300 pmap derived m68k ports can use 4K or 8K pages. 50 1.1 tsutsui * (except HPMMU machines, that support only 4K page) 51 1.1 tsutsui * sun3 and sun3x use 8K pages. 52 1.1 tsutsui * The page size is specified by PGSHIFT in <machine/param.h>. 53 1.1 tsutsui * Override the PAGE_* definitions to be compile-time constants. 54 1.1 tsutsui */ 55 1.1 tsutsui #define PAGE_SHIFT PGSHIFT 56 1.1 tsutsui #define PAGE_SIZE (1 << PAGE_SHIFT) 57 1.1 tsutsui #define PAGE_MASK (PAGE_SIZE - 1) 58 1.1 tsutsui 59 1.1 tsutsui /* Some implemantations like jemalloc(3) require physical page size details. */ 60 1.1 tsutsui /* 61 1.1 tsutsui * XXX: 62 1.1 tsutsui * <uvm/uvm_param.h> assumes PAGE_SIZE is not a constant macro 63 1.1 tsutsui * but a variable (*uvmexp_pagesize) on MODULE builds in case of 64 1.1 tsutsui * (MIN_PAGE_SIZE != MAX_PAGE_SIZE). For now we define these macros 65 1.1 tsutsui * for m68k ports only on !_KERNEL (currently just for jemalloc) builds. 66 1.1 tsutsui */ 67 1.1 tsutsui #if !defined(_KERNEL) 68 1.1 tsutsui #define MIN_PAGE_SHIFT 12 69 1.1 tsutsui #define MAX_PAGE_SHIFT 13 70 1.1 tsutsui #define MIN_PAGE_SIZE (1 << MIN_PAGE_SHIFT) 71 1.1 tsutsui #define MAX_PAGE_SIZE (1 << MAX_PAGE_SHIFT) 72 1.1 tsutsui #endif /* !_KERNEL */ 73 1.1 tsutsui 74 1.1 tsutsui #endif /* _M68K_VMPARAM_H_ */ 75