1*569905a9Sclaudio /* $OpenBSD: param.h,v 1.22 2023/12/14 13:26:49 claudio Exp $ */ 2184e2458Sderaadt 33180e169Smiod /* 43180e169Smiod * Copyright (c) 1999 Steve Murphree, Jr. 53180e169Smiod * Copyright (c) 1988 University of Utah. 63180e169Smiod * Copyright (c) 1982, 1986, 1990 The Regents of the University of California. 73180e169Smiod * All rights reserved. 83180e169Smiod * 93180e169Smiod * This code is derived from software contributed to Berkeley by 103180e169Smiod * the Systems Programming Group of the University of Utah Computer 113180e169Smiod * Science Department. 123180e169Smiod * 133180e169Smiod * Redistribution and use in source and binary forms, with or without 143180e169Smiod * modification, are permitted provided that the following conditions 153180e169Smiod * are met: 163180e169Smiod * 1. Redistributions of source code must retain the above copyright 173180e169Smiod * notice, this list of conditions and the following disclaimer. 183180e169Smiod * 2. Redistributions in binary form must reproduce the above copyright 193180e169Smiod * notice, this list of conditions and the following disclaimer in the 203180e169Smiod * documentation and/or other materials provided with the distribution. 213180e169Smiod * 3. Neither the name of the University nor the names of its contributors 223180e169Smiod * may be used to endorse or promote products derived from this software 233180e169Smiod * without specific prior written permission. 243180e169Smiod * 253180e169Smiod * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND 263180e169Smiod * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 273180e169Smiod * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 283180e169Smiod * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE 293180e169Smiod * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 303180e169Smiod * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 313180e169Smiod * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 323180e169Smiod * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 333180e169Smiod * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 343180e169Smiod * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 353180e169Smiod * SUCH DAMAGE. 363180e169Smiod */ 37184e2458Sderaadt 383180e169Smiod #ifndef _M88K_PARAM_H_ 393180e169Smiod #define _M88K_PARAM_H_ 403180e169Smiod 413180e169Smiod #ifdef _KERNEL 423180e169Smiod #ifndef _LOCORE 433180e169Smiod #include <machine/cpu.h> 443180e169Smiod #endif /* _LOCORE */ 453180e169Smiod #endif 463180e169Smiod 473180e169Smiod #define _MACHINE_ARCH m88k 483180e169Smiod #define MACHINE_ARCH "m88k" 493180e169Smiod #define MID_MACHINE MID_M88K 503180e169Smiod 513180e169Smiod #define PAGE_SHIFT 12 523180e169Smiod #define PAGE_SIZE (1 << PAGE_SHIFT) 533180e169Smiod #define PAGE_MASK (PAGE_SIZE - 1) 543180e169Smiod 553180e169Smiod #define NPTEPG (PAGE_SIZE / (sizeof(pt_entry_t))) 563180e169Smiod 57184e2458Sderaadt #ifdef _KERNEL 58184e2458Sderaadt 59184e2458Sderaadt #define NBPG PAGE_SIZE 604612d168Smiod #define PGSHIFT PAGE_SHIFT 614612d168Smiod #define PGOFSET PAGE_MASK 623180e169Smiod 635981bd55Smiod #define UPAGES 2 /* pages of u-area */ 64184e2458Sderaadt #define USPACE (UPAGES * PAGE_SIZE) /* total size of u-area */ 65184e2458Sderaadt #define USPACE_ALIGN 0 /* u-area alignment 0-none */ 663180e169Smiod 67965127f8Sclaudio #define NMBCLUSTERS (8 * 1024) /* max cluster allocation */ 683180e169Smiod 69184e2458Sderaadt #ifndef MSGBUFSIZE 70184e2458Sderaadt #define MSGBUFSIZE PAGE_SIZE 71184e2458Sderaadt #endif 72184e2458Sderaadt 733180e169Smiod /* 743180e169Smiod * Get interrupt glue. 753180e169Smiod */ 763180e169Smiod #include <machine/intr.h> 773180e169Smiod 783180e169Smiod #define DELAY(x) delay(x) 793180e169Smiod 80dfff2de9Smiod #if !defined(_LOCORE) 81dfff2de9Smiod extern void delay(int); 823180e169Smiod extern int cputyp; 833180e169Smiod #endif 843180e169Smiod 853180e169Smiod /* 863180e169Smiod * Values for the cputyp variable. 873180e169Smiod */ 88063362aeSmiod #define CPU_88100 0x00 89063362aeSmiod #define CPU_88110 0x01 903180e169Smiod 91ebe667c9Smiod #ifdef M88100 92ebe667c9Smiod #ifdef M88110 93ebe667c9Smiod #define CPU_IS88100 (cputyp == CPU_88100) 94ebe667c9Smiod #define CPU_IS88110 (cputyp != CPU_88100) 95ebe667c9Smiod #else 96ebe667c9Smiod #define CPU_IS88100 1 97ebe667c9Smiod #define CPU_IS88110 0 98ebe667c9Smiod #endif 99ebe667c9Smiod #else 100ebe667c9Smiod #define CPU_IS88100 0 101ebe667c9Smiod #define CPU_IS88110 1 102ebe667c9Smiod #endif 103ebe667c9Smiod 104dfff2de9Smiod #endif /* _KERNEL */ 105184e2458Sderaadt 106184e2458Sderaadt #endif /* _M88K_PARAM_H_ */ 107