2 ** asm/setup.h -- Definition of the Linux/m68k setup information
4 ** Copyright 1992 by Greg Harp
6 ** This file is subject to the terms and conditions of the GNU General Public
7 ** License. See the file COPYING in the main directory of this archive
10 ** Created 09/29/92 by Greg Harp
12 ** 5/2/94 Roman Hodek:
13 ** Added bi_atari part of the machine dependent union bi_un; for now it
14 ** contains just a model field to distinguish between TT and Falcon.
15 ** 26/7/96 Roman Zippel:
16 ** Renamed to setup.h; added some useful macros to allow gcc some
17 ** optimizations if possible.
18 ** 5/10/96 Geert Uytterhoeven:
19 ** Redesign of the boot information structure; moved boot information
20 ** structure to bootinfo.h
25 #include <uapi/asm/bootinfo.h>
26 #include <uapi/asm/setup.h>
29 #define CL_SIZE COMMAND_LINE_SIZE
32 extern unsigned long m68k_machtype;
33 #endif /* !__ASSEMBLY__ */
35 #if !defined(CONFIG_AMIGA)
36 # define MACH_IS_AMIGA (0)
37 #elif defined(CONFIG_ATARI) || defined(CONFIG_MAC) || defined(CONFIG_APOLLO) \
38 || defined(CONFIG_MVME16x) || defined(CONFIG_BVME6000) \
39 || defined(CONFIG_HP300) || defined(CONFIG_Q40) \
40 || defined(CONFIG_SUN3X) || defined(CONFIG_MVME147) \
41 || defined(CONFIG_VIRT)
42 # define MACH_IS_AMIGA (m68k_machtype == MACH_AMIGA)
44 # define MACH_AMIGA_ONLY
45 # define MACH_IS_AMIGA (1)
46 # define MACH_TYPE (MACH_AMIGA)
49 #if !defined(CONFIG_ATARI)
50 # define MACH_IS_ATARI (0)
51 #elif defined(CONFIG_AMIGA) || defined(CONFIG_MAC) || defined(CONFIG_APOLLO) \
52 || defined(CONFIG_MVME16x) || defined(CONFIG_BVME6000) \
53 || defined(CONFIG_HP300) || defined(CONFIG_Q40) \
54 || defined(CONFIG_SUN3X) || defined(CONFIG_MVME147) \
55 || defined(CONFIG_VIRT)
56 # define MACH_IS_ATARI (m68k_machtype == MACH_ATARI)
58 # define MACH_ATARI_ONLY
59 # define MACH_IS_ATARI (1)
60 # define MACH_TYPE (MACH_ATARI)
63 #if !defined(CONFIG_MAC)
64 # define MACH_IS_MAC (0)
65 #elif defined(CONFIG_AMIGA) || defined(CONFIG_ATARI) || defined(CONFIG_APOLLO) \
66 || defined(CONFIG_MVME16x) || defined(CONFIG_BVME6000) \
67 || defined(CONFIG_HP300) || defined(CONFIG_Q40) \
68 || defined(CONFIG_SUN3X) || defined(CONFIG_MVME147) \
69 || defined(CONFIG_VIRT)
70 # define MACH_IS_MAC (m68k_machtype == MACH_MAC)
72 # define MACH_MAC_ONLY
73 # define MACH_IS_MAC (1)
74 # define MACH_TYPE (MACH_MAC)
77 #if defined(CONFIG_SUN3)
78 #define MACH_IS_SUN3 (1)
79 #define MACH_SUN3_ONLY (1)
80 #define MACH_TYPE (MACH_SUN3)
82 #define MACH_IS_SUN3 (0)
85 #if !defined (CONFIG_APOLLO)
86 # define MACH_IS_APOLLO (0)
87 #elif defined(CONFIG_AMIGA) || defined(CONFIG_MAC) || defined(CONFIG_ATARI) \
88 || defined(CONFIG_MVME16x) || defined(CONFIG_BVME6000) \
89 || defined(CONFIG_HP300) || defined(CONFIG_Q40) \
90 || defined(CONFIG_SUN3X) || defined(CONFIG_MVME147) \
91 || defined(CONFIG_VIRT)
92 # define MACH_IS_APOLLO (m68k_machtype == MACH_APOLLO)
94 # define MACH_APOLLO_ONLY
95 # define MACH_IS_APOLLO (1)
96 # define MACH_TYPE (MACH_APOLLO)
99 #if !defined (CONFIG_MVME147)
100 # define MACH_IS_MVME147 (0)
101 #elif defined(CONFIG_AMIGA) || defined(CONFIG_MAC) || defined(CONFIG_ATARI) \
102 || defined(CONFIG_APOLLO) || defined(CONFIG_BVME6000) \
103 || defined(CONFIG_HP300) || defined(CONFIG_Q40) \
104 || defined(CONFIG_SUN3X) || defined(CONFIG_MVME16x) \
105 || defined(CONFIG_VIRT)
106 # define MACH_IS_MVME147 (m68k_machtype == MACH_MVME147)
108 # define MACH_MVME147_ONLY
109 # define MACH_IS_MVME147 (1)
110 # define MACH_TYPE (MACH_MVME147)
113 #if !defined (CONFIG_MVME16x)
114 # define MACH_IS_MVME16x (0)
115 #elif defined(CONFIG_AMIGA) || defined(CONFIG_MAC) || defined(CONFIG_ATARI) \
116 || defined(CONFIG_APOLLO) || defined(CONFIG_BVME6000) \
117 || defined(CONFIG_HP300) || defined(CONFIG_Q40) \
118 || defined(CONFIG_SUN3X) || defined(CONFIG_MVME147) \
119 || defined(CONFIG_VIRT)
120 # define MACH_IS_MVME16x (m68k_machtype == MACH_MVME16x)
122 # define MACH_MVME16x_ONLY
123 # define MACH_IS_MVME16x (1)
124 # define MACH_TYPE (MACH_MVME16x)
127 #if !defined (CONFIG_BVME6000)
128 # define MACH_IS_BVME6000 (0)
129 #elif defined(CONFIG_AMIGA) || defined(CONFIG_MAC) || defined(CONFIG_ATARI) \
130 || defined(CONFIG_APOLLO) || defined(CONFIG_MVME16x) \
131 || defined(CONFIG_HP300) || defined(CONFIG_Q40) \
132 || defined(CONFIG_SUN3X) || defined(CONFIG_MVME147) \
133 || defined(CONFIG_VIRT)
134 # define MACH_IS_BVME6000 (m68k_machtype == MACH_BVME6000)
136 # define MACH_BVME6000_ONLY
137 # define MACH_IS_BVME6000 (1)
138 # define MACH_TYPE (MACH_BVME6000)
141 #if !defined (CONFIG_HP300)
142 # define MACH_IS_HP300 (0)
143 #elif defined(CONFIG_AMIGA) || defined(CONFIG_MAC) || defined(CONFIG_ATARI) \
144 || defined(CONFIG_APOLLO) || defined(CONFIG_MVME16x) \
145 || defined(CONFIG_BVME6000) || defined(CONFIG_Q40) \
146 || defined(CONFIG_SUN3X) || defined(CONFIG_MVME147) \
147 || defined(CONFIG_VIRT)
148 # define MACH_IS_HP300 (m68k_machtype == MACH_HP300)
150 # define MACH_HP300_ONLY
151 # define MACH_IS_HP300 (1)
152 # define MACH_TYPE (MACH_HP300)
155 #if !defined (CONFIG_Q40)
156 # define MACH_IS_Q40 (0)
157 #elif defined(CONFIG_AMIGA) || defined(CONFIG_MAC) || defined(CONFIG_ATARI) \
158 || defined(CONFIG_APOLLO) || defined(CONFIG_MVME16x) \
159 || defined(CONFIG_BVME6000) || defined(CONFIG_HP300) \
160 || defined(CONFIG_SUN3X) || defined(CONFIG_MVME147) \
161 || defined(CONFIG_VIRT)
162 # define MACH_IS_Q40 (m68k_machtype == MACH_Q40)
164 # define MACH_Q40_ONLY
165 # define MACH_IS_Q40 (1)
166 # define MACH_TYPE (MACH_Q40)
169 #if !defined (CONFIG_SUN3X)
170 # define MACH_IS_SUN3X (0)
171 #elif defined(CONFIG_AMIGA) || defined(CONFIG_MAC) || defined(CONFIG_ATARI) \
172 || defined(CONFIG_APOLLO) || defined(CONFIG_MVME16x) \
173 || defined(CONFIG_BVME6000) || defined(CONFIG_HP300) \
174 || defined(CONFIG_Q40) || defined(CONFIG_MVME147) \
175 || defined(CONFIG_VIRT)
176 # define MACH_IS_SUN3X (m68k_machtype == MACH_SUN3X)
178 # define CONFIG_SUN3X_ONLY
179 # define MACH_IS_SUN3X (1)
180 # define MACH_TYPE (MACH_SUN3X)
183 #if !defined(CONFIG_VIRT)
184 # define MACH_IS_VIRT (0)
185 #elif defined(CONFIG_AMIGA) || defined(CONFIG_MAC) || defined(CONFIG_ATARI) \
186 || defined(CONFIG_APOLLO) || defined(CONFIG_MVME16x) \
187 || defined(CONFIG_BVME6000) || defined(CONFIG_HP300) \
188 || defined(CONFIG_Q40) || defined(CONFIG_SUN3X) \
189 || defined(CONFIG_MVME147)
190 # define MACH_IS_VIRT (m68k_machtype == MACH_VIRT)
192 # define MACH_VIRT_ONLY
193 # define MACH_IS_VIRT (1)
194 # define MACH_TYPE (MACH_VIRT)
198 # define MACH_TYPE (m68k_machtype)
203 extern unsigned long m68k_cputype;
204 extern unsigned long m68k_fputype;
205 extern unsigned long m68k_mmutype;
207 extern unsigned long vme_brdtype;
211 * m68k_is040or060 is != 0 for a '040 or higher;
212 * used numbers are 4 for 68040 and 6 for 68060.
215 extern int m68k_is040or060;
216 #endif /* !__ASSEMBLY__ */
218 #if !defined(CONFIG_M68020)
219 # define CPU_IS_020 (0)
220 # define MMU_IS_851 (0)
221 # define MMU_IS_SUN3 (0)
222 #elif defined(CONFIG_M68030) || defined(CONFIG_M68040) || defined(CONFIG_M68060)
223 # define CPU_IS_020 (m68k_cputype & CPU_68020)
224 # define MMU_IS_851 (m68k_mmutype & MMU_68851)
225 # define MMU_IS_SUN3 (0) /* Sun3 not supported with other CPU enabled */
227 # define CPU_M68020_ONLY
228 # define CPU_IS_020 (1)
229 #ifdef MACH_SUN3_ONLY
230 # define MMU_IS_SUN3 (1)
231 # define MMU_IS_851 (0)
233 # define MMU_IS_SUN3 (0)
234 # define MMU_IS_851 (1)
238 #if !defined(CONFIG_M68030)
239 # define CPU_IS_030 (0)
240 # define MMU_IS_030 (0)
241 #elif defined(CONFIG_M68020) || defined(CONFIG_M68040) || defined(CONFIG_M68060)
242 # define CPU_IS_030 (m68k_cputype & CPU_68030)
243 # define MMU_IS_030 (m68k_mmutype & MMU_68030)
245 # define CPU_M68030_ONLY
246 # define CPU_IS_030 (1)
247 # define MMU_IS_030 (1)
250 #if !defined(CONFIG_M68040)
251 # define CPU_IS_040 (0)
252 # define MMU_IS_040 (0)
253 #elif defined(CONFIG_M68020) || defined(CONFIG_M68030) || defined(CONFIG_M68060)
254 # define CPU_IS_040 (m68k_cputype & CPU_68040)
255 # define MMU_IS_040 (m68k_mmutype & MMU_68040)
257 # define CPU_M68040_ONLY
258 # define CPU_IS_040 (1)
259 # define MMU_IS_040 (1)
262 #if !defined(CONFIG_M68060)
263 # define CPU_IS_060 (0)
264 # define MMU_IS_060 (0)
265 #elif defined(CONFIG_M68020) || defined(CONFIG_M68030) || defined(CONFIG_M68040)
266 # define CPU_IS_060 (m68k_cputype & CPU_68060)
267 # define MMU_IS_060 (m68k_mmutype & MMU_68060)
269 # define CPU_M68060_ONLY
270 # define CPU_IS_060 (1)
271 # define MMU_IS_060 (1)
274 #if !defined(CONFIG_M68020) && !defined(CONFIG_M68030)
275 # define CPU_IS_020_OR_030 (0)
277 # define CPU_M68020_OR_M68030
278 # if defined(CONFIG_M68040) || defined(CONFIG_M68060)
279 # define CPU_IS_020_OR_030 (!m68k_is040or060)
281 # define CPU_M68020_OR_M68030_ONLY
282 # define CPU_IS_020_OR_030 (1)
286 #if !defined(CONFIG_M68040) && !defined(CONFIG_M68060)
287 # define CPU_IS_040_OR_060 (0)
289 # define CPU_M68040_OR_M68060
290 # if defined(CONFIG_M68020) || defined(CONFIG_M68030)
291 # define CPU_IS_040_OR_060 (m68k_is040or060)
293 # define CPU_M68040_OR_M68060_ONLY
294 # define CPU_IS_040_OR_060 (1)
298 #if !defined(CONFIG_COLDFIRE)
299 # define CPU_IS_COLDFIRE (0)
301 # define CPU_IS_COLDFIRE (1)
302 # define MMU_IS_COLDFIRE (1)
305 #define CPU_TYPE (m68k_cputype)
307 #ifdef CONFIG_M68KFPU_EMU
308 # ifdef CONFIG_M68KFPU_EMU_ONLY
309 # define FPU_IS_EMU (1)
311 # define FPU_IS_EMU (!m68k_fputype)
314 # define FPU_IS_EMU (0)
322 #define NUM_MEMINFO 4
325 struct m68k_mem_info {
326 unsigned long addr; /* physical address of memory chunk */
327 unsigned long size; /* length of memory chunk (in bytes) */
330 extern int m68k_num_memory; /* # of memory blocks found (and used) */
331 extern int m68k_realnum_memory; /* real # of memory blocks found */
332 extern struct m68k_mem_info m68k_memory[NUM_MEMINFO];/* memory description */
335 #endif /* _M68K_SETUP_H */