Home | History | Annotate | Line # | Download | only in include
param.h revision 1.21.46.1
      1  1.21.46.1  pgoyette /*	$NetBSD: param.h,v 1.21.46.1 2019/01/18 08:50:18 pgoyette Exp $	*/
      2        1.1     veego 
      3        1.1     veego /*
      4       1.18     rmind  * Copyright (c) 1988 University of Utah.
      5        1.1     veego  * Copyright (c) 1982, 1986, 1990 The Regents of the University of California.
      6        1.1     veego  * All rights reserved.
      7       1.12       agc  *
      8       1.12       agc  * This code is derived from software contributed to Berkeley by
      9       1.12       agc  * the Systems Programming Group of the University of Utah Computer
     10       1.12       agc  * Science Department.
     11       1.12       agc  *
     12       1.12       agc  * Redistribution and use in source and binary forms, with or without
     13       1.12       agc  * modification, are permitted provided that the following conditions
     14       1.12       agc  * are met:
     15       1.12       agc  * 1. Redistributions of source code must retain the above copyright
     16       1.12       agc  *    notice, this list of conditions and the following disclaimer.
     17       1.12       agc  * 2. Redistributions in binary form must reproduce the above copyright
     18       1.12       agc  *    notice, this list of conditions and the following disclaimer in the
     19       1.12       agc  *    documentation and/or other materials provided with the distribution.
     20       1.12       agc  * 3. Neither the name of the University nor the names of its contributors
     21       1.12       agc  *    may be used to endorse or promote products derived from this software
     22       1.12       agc  *    without specific prior written permission.
     23       1.12       agc  *
     24       1.12       agc  * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
     25       1.12       agc  * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
     26       1.12       agc  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
     27       1.12       agc  * ARE DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
     28       1.12       agc  * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
     29       1.12       agc  * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
     30       1.12       agc  * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
     31       1.12       agc  * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
     32       1.12       agc  * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
     33       1.12       agc  * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
     34       1.12       agc  * SUCH DAMAGE.
     35       1.12       agc  *
     36       1.12       agc  * from: Utah $Hdr: machparam.h 1.16 92/12/20$
     37       1.12       agc  *
     38       1.12       agc  *	@(#)param.h	8.1 (Berkeley) 6/10/93
     39       1.12       agc  */
     40       1.18     rmind 
     41        1.1     veego #ifndef _M68K_PARAM_H_
     42        1.1     veego #define _M68K_PARAM_H_
     43        1.1     veego 
     44        1.1     veego /*
     45        1.1     veego  * Machine independent constants for m68k
     46        1.1     veego  */
     47        1.9  fredette #ifndef	MACHINE_ARCH
     48        1.1     veego #define	_MACHINE_ARCH	m68k
     49        1.1     veego #define	MACHINE_ARCH	"m68k"
     50        1.9  fredette #endif
     51        1.9  fredette #ifndef	MID_MACHINE
     52        1.1     veego #define	MID_MACHINE	MID_M68K
     53        1.9  fredette #endif
     54       1.19      matt #ifndef _KERNEL
     55       1.19      matt #undef MACHINE
     56       1.19      matt #define MACHINE "m68k"
     57       1.19      matt #endif
     58        1.1     veego 
     59        1.1     veego #define	NBPG		(1 << PGSHIFT)	/* bytes/page */
     60        1.1     veego #define	PGOFSET		(NBPG-1)	/* byte offset into page */
     61        1.1     veego 
     62        1.1     veego #define	BTOPKERNBASE	((u_long)KERNBASE >> PGSHIFT)
     63        1.1     veego 
     64        1.1     veego #define	SSIZE		1		/* initial stack size/NBPG */
     65        1.1     veego #define	SINCR		1		/* increment of stack/NBPG */
     66        1.1     veego 
     67        1.1     veego #define	USPACE		(UPAGES * NBPG)
     68        1.4       leo 
     69        1.4       leo #ifndef MSGBUFSIZE
     70        1.4       leo #define MSGBUFSIZE	NBPG		/* default message buffer size */
     71        1.4       leo #endif
     72        1.1     veego 
     73        1.1     veego /*
     74        1.1     veego  * Constants related to network buffer management.
     75       1.11    simonb  * MCLBYTES must be no larger than NBPG (the software page size), and,
     76        1.1     veego  * on machines that exchange pages of input or output buffers with mbuf
     77        1.1     veego  * clusters (MAPPED_MBUFS), MCLBYTES must also be an integral multiple
     78        1.1     veego  * of the hardware page size.
     79        1.1     veego  */
     80        1.8    itojun #define	MSIZE		256		/* size of an mbuf */
     81        1.1     veego 
     82       1.11    simonb #ifndef MCLSHIFT
     83       1.11    simonb #define	MCLSHIFT	11		/* convert bytes to m_buf clusters */
     84       1.11    simonb 					/* 2K cluster can hold Ether frame */
     85        1.1     veego #endif	/* MCLSHIFT */
     86        1.1     veego 
     87       1.11    simonb #define	MCLBYTES	(1 << MCLSHIFT)	/* size of a m_buf cluster */
     88       1.11    simonb 
     89        1.2     veego /*
     90        1.7    scottr  * Mach-derived conversion macros
     91        1.2     veego  */
     92       1.16   tsutsui #define	m68k_round_page(x)	((((vaddr_t)(x)) + PGOFSET) & ~PGOFSET)
     93       1.16   tsutsui #define	m68k_trunc_page(x)	((vaddr_t)(x) & ~PGOFSET)
     94       1.16   tsutsui #define	m68k_page_offset(x)	((vaddr_t)(x) & PGOFSET)
     95       1.16   tsutsui #define	m68k_btop(x)		((vaddr_t)(x) >> PGSHIFT)
     96       1.16   tsutsui #define	m68k_ptob(x)		((vaddr_t)(x) << PGSHIFT)
     97        1.1     veego 
     98        1.1     veego #endif	/* !_M68K_PARAM_H_ */
     99