1 /* $NetBSD: param.h,v 1.19 2013/10/26 18:07:52 matt Exp $ */
4 * Copyright (c) 1994,1995 Mark Brinicombe.
7 * Redistribution and use in source and binary forms, with or without
8 * modification, are permitted provided that the following conditions
10 * 1. Redistributions of source code must retain the above copyright
11 * notice, this list of conditions and the following disclaimer.
12 * 2. Redistributions in binary form must reproduce the above copyright
13 * notice, this list of conditions and the following disclaimer in the
14 * documentation and/or other materials provided with the distribution.
15 * 3. All advertising materials mentioning features or use of this software
16 * must display the following acknowledgement:
17 * This product includes software developed by the RiscBSD team.
18 * 4. The name "RiscBSD" nor the name of the author may be used to
19 * endorse or promote products derived from this software without specific
20 * prior written permission.
22 * THIS SOFTWARE IS PROVIDED BY RISCBSD ``AS IS'' AND ANY EXPRESS OR IMPLIED
23 * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
24 * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
25 * IN NO EVENT SHALL RISCBSD OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT,
26 * INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
27 * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
28 * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
29 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
30 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
31 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
39 * Machine dependent constants for all ARM processors
44 * MACHINE must be defined by the individual port. This is so that
45 * uname returns the correct thing, etc.
47 * MACHINE_ARCH may be defined by individual ports as a temporary
48 * measure while we're finishing the conversion to ELF.
50 * For non-KERNEL code:
51 * If ELF, MACHINE and MACHINE_ARCH are forced to "arm/armeb".
55 # ifndef MACHINE_ARCH /* XXX For now */
58 # define _MACHINE_ARCH earm
59 # define MACHINE_ARCH "earm"
61 # define _MACHINE_ARCH arm
62 # define MACHINE_ARCH "arm"
66 # define _MACHINE_ARCH earmeb
67 # define MACHINE_ARCH "earmeb"
69 # define _MACHINE_ARCH armeb
70 # define MACHINE_ARCH "armeb"
72 # endif /* __ARMEB__ */
73 # endif /* MACHINE_ARCH */
80 # define MACHINE "arm"
85 # define _MACHINE_ARCH earmv7hf
86 # define MACHINE_ARCH "earmv7hf"
87 # elif defined(_ARM_ARCH_6)
88 # define _MACHINE_ARCH earmv6hf
89 # define MACHINE_ARCH "earmv6hf"
91 # define _MACHINE_ARCH earmhf
92 # define MACHINE_ARCH "earmhf"
96 # define _MACHINE_ARCH earmv7
97 # define MACHINE_ARCH "earmv7"
98 # elif defined(_ARM_ARCH_6)
99 # define _MACHINE_ARCH earmv6
100 # define MACHINE_ARCH "earmv6"
101 # elif !defined(_ARM_ARCH_5T)
102 # define _MACHINE_ARCH earmv4
103 # define MACHINE_ARCH "earmv4"
105 # define _MACHINE_ARCH earm
106 # define MACHINE_ARCH "earm"
110 # define _MACHINE_ARCH arm
111 # define MACHINE_ARCH "arm"
115 # ifdef __ARM_PCS_VFP
117 # define _MACHINE_ARCH earmv7hfeb
118 # define MACHINE_ARCH "earmv7hfeb"
119 # elif defined(_ARM_ARCH_6)
120 # define _MACHINE_ARCH earmv6hfeb
121 # define MACHINE_ARCH "earmv6hfeb"
123 # define _MACHINE_ARCH earmhfeb
124 # define MACHINE_ARCH "earmhfeb"
128 # define _MACHINE_ARCH earmv7eb
129 # define MACHINE_ARCH "earmv7eb"
130 # elif defined(_ARM_ARCH_6)
131 # define _MACHINE_ARCH earmv6eb
132 # define MACHINE_ARCH "earmv6eb"
133 # elif !defined(_ARM_ARCH_5T)
134 # define _MACHINE_ARCH earmv4eb
135 # define MACHINE_ARCH "earmv4eb"
137 # define _MACHINE_ARCH earmeb
138 # define MACHINE_ARCH "earmeb"
142 # define _MACHINE_ARCH armeb
143 # define MACHINE_ARCH "armeb"
145 # endif /* __ARMEB__ */
146 #endif /* !_KERNEL */
148 #define MID_MACHINE MID_ARM6
150 /* ARM-specific macro to align a stack pointer (downwards). */
151 #define STACK_ALIGNBYTES (8 - 1)
153 #define ALIGNBYTES32 3
155 #define ALIGNBYTES32 7
158 #define DEV_BSHIFT 9 /* log2(DEV_BSIZE) */
159 #define DEV_BSIZE (1 << DEV_BSHIFT)
160 #define BLKDEV_IOSIZE 2048
163 #define MAXPHYS 65536 /* max I/O transfer size */
167 * Constants related to network buffer management.
168 * MCLBYTES must be no larger than NBPG (the software page size), and,
169 * on machines that exchange pages of input or output buffers with mbuf
170 * clusters (MAPPED_MBUFS), MCLBYTES must also be an integral multiple
171 * of the hardware page size.
173 #define MSIZE 256 /* size of an mbuf */
176 #define MCLSHIFT 11 /* convert bytes to m_buf clusters */
177 /* 2K cluster can hold Ether frame */
178 #endif /* MCLSHIFT */
180 #define MCLBYTES (1 << MCLSHIFT) /* size of a m_buf cluster */
182 #ifndef NMBCLUSTERS_MAX
183 #define NMBCLUSTERS_MAX (0x2000000 / MCLBYTES) /* Limit to 64MB for clusters */
187 * Compatibility /dev/zero mapping.
191 #define COMPAT_ZERODEV(x) (x == makedev(0, _DEV_ZERO_oARM))
196 /* LSC: FIXME This is a hack. Good enough for now, as we only have ARMv7 targets. */
197 #include <arm/arm32/param.h>
198 #endif /* defined(__minix) */
199 #endif /* _ARM_PARAM_H_ */