1 /* $OpenBSD: param.h,v 1.41 2011/09/08 03:40:32 guenther Exp $ */ 2 3 /* 4 * Copyright (c) 1988-1994, The University of Utah and 5 * the Computer Systems Laboratory at the University of Utah (CSL). 6 * All rights reserved. 7 * 8 * Permission to use, copy, modify and distribute this software is hereby 9 * granted provided that (1) source code retains these copyright, permission, 10 * and disclaimer notices, and (2) redistributions including binaries 11 * reproduce the notices in supporting documentation, and (3) all advertising 12 * materials mentioning features or use of this software display the following 13 * acknowledgement: ``This product includes software developed by the 14 * Computer Systems Laboratory at the University of Utah.'' 15 * 16 * THE UNIVERSITY OF UTAH AND CSL ALLOW FREE USE OF THIS SOFTWARE IN ITS "AS 17 * IS" CONDITION. THE UNIVERSITY OF UTAH AND CSL DISCLAIM ANY LIABILITY OF 18 * ANY KIND FOR ANY DAMAGES WHATSOEVER RESULTING FROM THE USE OF THIS SOFTWARE. 19 * 20 * CSL requests users of this software to return to csl-dist@cs.utah.edu any 21 * improvements that they make and grant CSL redistribution rights. 22 * 23 * Utah $Hdr: param.h 1.18 94/12/16$ 24 */ 25 26 #include <machine/cpu.h> 27 #include <machine/intr.h> 28 29 /* 30 * Machine dependent constants for PA-RISC. 31 */ 32 33 #define _MACHINE hppa 34 #define MACHINE "hppa" 35 #define _MACHINE_ARCH hppa 36 #define MACHINE_ARCH "hppa" 37 #define MID_MACHINE MID_HPUX800 38 39 #define ALIGNBYTES _ALIGNBYTES 40 #define ALIGN(p) _ALIGN(p) 41 #define ALIGNED_POINTER(p,t) _ALIGNED_POINTER(p,t) 42 43 #define PAGE_SIZE 4096 44 #define PAGE_MASK (PAGE_SIZE-1) 45 #define PAGE_SHIFT 12 46 47 #define NBPG 4096 /* bytes/page */ 48 #define PGOFSET (NBPG-1) /* byte offset into page */ 49 #define PGSHIFT 12 /* LOG2(NBPG) */ 50 51 #define KERNBASE 0x00000000 /* start of kernel virtual */ 52 53 #define DEV_BSHIFT 9 /* log2(DEV_BSIZE) */ 54 #define DEV_BSIZE (1 << DEV_BSHIFT) 55 #define BLKDEV_IOSIZE 2048 56 #define MAXPHYS (64 * 1024) /* max raw I/O transfer size */ 57 58 #define MACHINE_STACK_GROWS_UP 1 /* stack grows to higher addresses */ 59 60 #define USPACE (4 * NBPG) /* pages for user struct and kstack */ 61 #define USPACE_ALIGN (0) /* u-area alignment 0-none */ 62 63 #ifndef MSGBUFSIZE 64 #define MSGBUFSIZE 2*NBPG /* default message buffer size */ 65 #endif 66 67 /* 68 * Constants related to network buffer management. 69 */ 70 #define NMBCLUSTERS 4096 /* map size, max cluster allocation */ 71 72 /* 73 * Minimum and maximum sizes of the kernel malloc arena in PAGE_SIZE-sized 74 * logical pages. 75 */ 76 #define NKMEMPAGES_MIN_DEFAULT ((4 * 1024 * 1024) >> PAGE_SHIFT) 77 #define NKMEMPAGES_MAX_DEFAULT ((128 * 1024 * 1024) >> PAGE_SHIFT) 78 79 /* pages ("clicks") (4096 bytes) to disk blocks */ 80 #define ctod(x) ((x) << (PGSHIFT - DEV_BSHIFT)) 81 #define dtoc(x) ((x) >> (PGSHIFT - DEV_BSHIFT)) 82 83 #define btodb(x) ((x) >> DEV_BSHIFT) 84 #define dbtob(x) ((x) << DEV_BSHIFT) 85 86 #define __SWAP_BROKEN 87