xref: /openbsd/sys/arch/hppa/include/param.h (revision cecf84d4)
1 /*	$OpenBSD: param.h,v 1.45 2013/03/26 05:04:10 deraadt 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 
24 #ifndef	_MACHINE_PARAM_H_
25 #define	_MACHINE_PARAM_H_
26 
27 #ifdef _KERNEL
28 #include <machine/cpu.h>
29 #include <machine/intr.h>
30 #endif
31 
32 #define	_MACHINE	hppa
33 #define	MACHINE		"hppa"
34 #define	_MACHINE_ARCH	hppa
35 #define	MACHINE_ARCH	"hppa"
36 #define	MID_MACHINE	MID_HPUX800
37 
38 #define	PAGE_SHIFT	12
39 #define	PAGE_SIZE	(1 << PAGE_SHIFT)
40 #define	PAGE_MASK	(PAGE_SIZE - 1)
41 
42 #define	KERNBASE	0x00000000		/* start of kernel virtual */
43 
44 #ifdef _KERNEL
45 
46 #define	NBPG		PAGE_SIZE		/* bytes/page */
47 #define	PGSHIFT		PAGE_SHIFT		/* LOG2(PAGE_SIZE) */
48 #define	PGOFSET		PAGE_MASK		/* byte offset into page */
49 
50 #define	UPAGES		4			/* pages of u-area */
51 #define	USPACE		(UPAGES * PAGE_SIZE)	/* total size of u-area */
52 #define	USPACE_ALIGN	0			/* u-area alignment 0-none */
53 
54 #define	NMBCLUSTERS	4096			/* map size, max cluster allocation */
55 
56 #ifndef	MSGBUFSIZE
57 #define	MSGBUFSIZE	(2 * PAGE_SIZE)		/* default message buffer size */
58 #endif
59 
60 /*
61  * Maximum size of the kernel malloc arena in PAGE_SIZE-sized
62  * logical pages.
63  */
64 #define	NKMEMPAGES_MAX_DEFAULT	((128 * 1024 * 1024) >> PAGE_SHIFT)
65 
66 #endif /* _KERNEL */
67 
68 #define	MACHINE_STACK_GROWS_UP	1		/* stack grows to higher addresses */
69 #define	__SWAP_BROKEN
70 
71 #endif /* _MACHINE_PARAM_H_ */
72