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
29 * Linux/m68k Architectures
37 #define MACH_MVME147 6
38 #define MACH_MVME16x 7
39 #define MACH_BVME6000 8
45 #define COMMAND_LINE_SIZE 256
49 #define CL_SIZE COMMAND_LINE_SIZE
52 extern unsigned long m68k_machtype
;
53 #endif /* !__ASSEMBLY__ */
55 #if !defined(CONFIG_AMIGA)
56 # define MACH_IS_AMIGA (0)
57 #elif defined(CONFIG_ATARI) || defined(CONFIG_MAC) || defined(CONFIG_APOLLO) \
58 || defined(CONFIG_MVME16x) || defined(CONFIG_BVME6000) \
59 || defined(CONFIG_HP300) || defined(CONFIG_Q40) \
60 || defined(CONFIG_SUN3X) || defined(CONFIG_MVME147)
61 # define MACH_IS_AMIGA (m68k_machtype == MACH_AMIGA)
63 # define MACH_AMIGA_ONLY
64 # define MACH_IS_AMIGA (1)
65 # define MACH_TYPE (MACH_AMIGA)
68 #if !defined(CONFIG_ATARI)
69 # define MACH_IS_ATARI (0)
70 #elif defined(CONFIG_AMIGA) || defined(CONFIG_MAC) || defined(CONFIG_APOLLO) \
71 || defined(CONFIG_MVME16x) || defined(CONFIG_BVME6000) \
72 || defined(CONFIG_HP300) || defined(CONFIG_Q40) \
73 || defined(CONFIG_SUN3X) || defined(CONFIG_MVME147)
74 # define MACH_IS_ATARI (m68k_machtype == MACH_ATARI)
76 # define MACH_ATARI_ONLY
77 # define MACH_IS_ATARI (1)
78 # define MACH_TYPE (MACH_ATARI)
81 #if !defined(CONFIG_MAC)
82 # define MACH_IS_MAC (0)
83 #elif defined(CONFIG_AMIGA) || defined(CONFIG_ATARI) || defined(CONFIG_APOLLO) \
84 || defined(CONFIG_MVME16x) || defined(CONFIG_BVME6000) \
85 || defined(CONFIG_HP300) || defined(CONFIG_Q40) \
86 || defined(CONFIG_SUN3X) || defined(CONFIG_MVME147)
87 # define MACH_IS_MAC (m68k_machtype == MACH_MAC)
89 # define MACH_MAC_ONLY
90 # define MACH_IS_MAC (1)
91 # define MACH_TYPE (MACH_MAC)
94 #if defined(CONFIG_SUN3)
95 #define MACH_IS_SUN3 (1)
96 #define MACH_SUN3_ONLY (1)
97 #define MACH_TYPE (MACH_SUN3)
99 #define MACH_IS_SUN3 (0)
102 #if !defined (CONFIG_APOLLO)
103 # define MACH_IS_APOLLO (0)
104 #elif defined(CONFIG_AMIGA) || defined(CONFIG_MAC) || defined(CONFIG_ATARI) \
105 || defined(CONFIG_MVME16x) || defined(CONFIG_BVME6000) \
106 || defined(CONFIG_HP300) || defined(CONFIG_Q40) \
107 || defined(CONFIG_SUN3X) || defined(CONFIG_MVME147)
108 # define MACH_IS_APOLLO (m68k_machtype == MACH_APOLLO)
110 # define MACH_APOLLO_ONLY
111 # define MACH_IS_APOLLO (1)
112 # define MACH_TYPE (MACH_APOLLO)
115 #if !defined (CONFIG_MVME147)
116 # define MACH_IS_MVME147 (0)
117 #elif defined(CONFIG_AMIGA) || defined(CONFIG_MAC) || defined(CONFIG_ATARI) \
118 || defined(CONFIG_APOLLO) || defined(CONFIG_BVME6000) \
119 || defined(CONFIG_HP300) || defined(CONFIG_Q40) \
120 || defined(CONFIG_SUN3X) || defined(CONFIG_MVME16x)
121 # define MACH_IS_MVME147 (m68k_machtype == MACH_MVME147)
123 # define MACH_MVME147_ONLY
124 # define MACH_IS_MVME147 (1)
125 # define MACH_TYPE (MACH_MVME147)
128 #if !defined (CONFIG_MVME16x)
129 # define MACH_IS_MVME16x (0)
130 #elif defined(CONFIG_AMIGA) || defined(CONFIG_MAC) || defined(CONFIG_ATARI) \
131 || defined(CONFIG_APOLLO) || defined(CONFIG_BVME6000) \
132 || defined(CONFIG_HP300) || defined(CONFIG_Q40) \
133 || defined(CONFIG_SUN3X) || defined(CONFIG_MVME147)
134 # define MACH_IS_MVME16x (m68k_machtype == MACH_MVME16x)
136 # define MACH_MVME16x_ONLY
137 # define MACH_IS_MVME16x (1)
138 # define MACH_TYPE (MACH_MVME16x)
141 #if !defined (CONFIG_BVME6000)
142 # define MACH_IS_BVME6000 (0)
143 #elif defined(CONFIG_AMIGA) || defined(CONFIG_MAC) || defined(CONFIG_ATARI) \
144 || defined(CONFIG_APOLLO) || defined(CONFIG_MVME16x) \
145 || defined(CONFIG_HP300) || defined(CONFIG_Q40) \
146 || defined(CONFIG_SUN3X) || defined(CONFIG_MVME147)
147 # define MACH_IS_BVME6000 (m68k_machtype == MACH_BVME6000)
149 # define MACH_BVME6000_ONLY
150 # define MACH_IS_BVME6000 (1)
151 # define MACH_TYPE (MACH_BVME6000)
154 #if !defined (CONFIG_HP300)
155 # define MACH_IS_HP300 (0)
156 #elif defined(CONFIG_AMIGA) || defined(CONFIG_MAC) || defined(CONFIG_ATARI) \
157 || defined(CONFIG_APOLLO) || defined(CONFIG_MVME16x) \
158 || defined(CONFIG_BVME6000) || defined(CONFIG_Q40) \
159 || defined(CONFIG_SUN3X) || defined(CONFIG_MVME147)
160 # define MACH_IS_HP300 (m68k_machtype == MACH_HP300)
162 # define MACH_HP300_ONLY
163 # define MACH_IS_HP300 (1)
164 # define MACH_TYPE (MACH_HP300)
167 #if !defined (CONFIG_Q40)
168 # define MACH_IS_Q40 (0)
169 #elif defined(CONFIG_AMIGA) || defined(CONFIG_MAC) || defined(CONFIG_ATARI) \
170 || defined(CONFIG_APOLLO) || defined(CONFIG_MVME16x) \
171 || defined(CONFIG_BVME6000) || defined(CONFIG_HP300) \
172 || defined(CONFIG_SUN3X) || defined(CONFIG_MVME147)
173 # define MACH_IS_Q40 (m68k_machtype == MACH_Q40)
175 # define MACH_Q40_ONLY
176 # define MACH_IS_Q40 (1)
177 # define MACH_TYPE (MACH_Q40)
180 #if !defined (CONFIG_SUN3X)
181 # define MACH_IS_SUN3X (0)
182 #elif defined(CONFIG_AMIGA) || defined(CONFIG_MAC) || defined(CONFIG_ATARI) \
183 || defined(CONFIG_APOLLO) || defined(CONFIG_MVME16x) \
184 || defined(CONFIG_BVME6000) || defined(CONFIG_HP300) \
185 || defined(CONFIG_Q40) || defined(CONFIG_MVME147)
186 # define MACH_IS_SUN3X (m68k_machtype == MACH_SUN3X)
188 # define CONFIG_SUN3X_ONLY
189 # define MACH_IS_SUN3X (1)
190 # define MACH_TYPE (MACH_SUN3X)
194 # define MACH_TYPE (m68k_machtype)
197 #endif /* __KERNEL__ */
201 * CPU, FPU and MMU types
203 * Note: we may rely on the following equalities:
205 * CPU_68020 == MMU_68851
206 * CPU_68030 == MMU_68030
207 * CPU_68040 == FPU_68040 == MMU_68040
208 * CPU_68060 == FPU_68060 == MMU_68060
215 #define CPUB_COLDFIRE 4
217 #define CPU_68020 (1<<CPUB_68020)
218 #define CPU_68030 (1<<CPUB_68030)
219 #define CPU_68040 (1<<CPUB_68040)
220 #define CPU_68060 (1<<CPUB_68060)
221 #define CPU_COLDFIRE (1<<CPUB_COLDFIRE)
225 #define FPUB_68040 2 /* Internal FPU */
226 #define FPUB_68060 3 /* Internal FPU */
227 #define FPUB_SUNFPA 4 /* Sun-3 FPA */
228 #define FPUB_COLDFIRE 5 /* ColdFire FPU */
230 #define FPU_68881 (1<<FPUB_68881)
231 #define FPU_68882 (1<<FPUB_68882)
232 #define FPU_68040 (1<<FPUB_68040)
233 #define FPU_68060 (1<<FPUB_68060)
234 #define FPU_SUNFPA (1<<FPUB_SUNFPA)
235 #define FPU_COLDFIRE (1<<FPUB_COLDFIRE)
238 #define MMUB_68030 1 /* Internal MMU */
239 #define MMUB_68040 2 /* Internal MMU */
240 #define MMUB_68060 3 /* Internal MMU */
241 #define MMUB_APOLLO 4 /* Custom Apollo */
242 #define MMUB_SUN3 5 /* Custom Sun-3 */
243 #define MMUB_COLDFIRE 6 /* Internal MMU */
245 #define MMU_68851 (1<<MMUB_68851)
246 #define MMU_68030 (1<<MMUB_68030)
247 #define MMU_68040 (1<<MMUB_68040)
248 #define MMU_68060 (1<<MMUB_68060)
249 #define MMU_SUN3 (1<<MMUB_SUN3)
250 #define MMU_APOLLO (1<<MMUB_APOLLO)
251 #define MMU_COLDFIRE (1<<MMUB_COLDFIRE)
256 extern unsigned long m68k_cputype
;
257 extern unsigned long m68k_fputype
;
258 extern unsigned long m68k_mmutype
;
260 extern unsigned long vme_brdtype
;
264 * m68k_is040or060 is != 0 for a '040 or higher;
265 * used numbers are 4 for 68040 and 6 for 68060.
268 extern int m68k_is040or060
;
269 #endif /* !__ASSEMBLY__ */
271 #if !defined(CONFIG_M68020)
272 # define CPU_IS_020 (0)
273 # define MMU_IS_851 (0)
274 # define MMU_IS_SUN3 (0)
275 #elif defined(CONFIG_M68030) || defined(CONFIG_M68040) || defined(CONFIG_M68060)
276 # define CPU_IS_020 (m68k_cputype & CPU_68020)
277 # define MMU_IS_851 (m68k_mmutype & MMU_68851)
278 # define MMU_IS_SUN3 (0) /* Sun3 not supported with other CPU enabled */
280 # define CPU_M68020_ONLY
281 # define CPU_IS_020 (1)
282 #ifdef MACH_SUN3_ONLY
283 # define MMU_IS_SUN3 (1)
284 # define MMU_IS_851 (0)
286 # define MMU_IS_SUN3 (0)
287 # define MMU_IS_851 (1)
291 #if !defined(CONFIG_M68030)
292 # define CPU_IS_030 (0)
293 # define MMU_IS_030 (0)
294 #elif defined(CONFIG_M68020) || defined(CONFIG_M68040) || defined(CONFIG_M68060)
295 # define CPU_IS_030 (m68k_cputype & CPU_68030)
296 # define MMU_IS_030 (m68k_mmutype & MMU_68030)
298 # define CPU_M68030_ONLY
299 # define CPU_IS_030 (1)
300 # define MMU_IS_030 (1)
303 #if !defined(CONFIG_M68040)
304 # define CPU_IS_040 (0)
305 # define MMU_IS_040 (0)
306 #elif defined(CONFIG_M68020) || defined(CONFIG_M68030) || defined(CONFIG_M68060)
307 # define CPU_IS_040 (m68k_cputype & CPU_68040)
308 # define MMU_IS_040 (m68k_mmutype & MMU_68040)
310 # define CPU_M68040_ONLY
311 # define CPU_IS_040 (1)
312 # define MMU_IS_040 (1)
315 #if !defined(CONFIG_M68060)
316 # define CPU_IS_060 (0)
317 # define MMU_IS_060 (0)
318 #elif defined(CONFIG_M68020) || defined(CONFIG_M68030) || defined(CONFIG_M68040)
319 # define CPU_IS_060 (m68k_cputype & CPU_68060)
320 # define MMU_IS_060 (m68k_mmutype & MMU_68060)
322 # define CPU_M68060_ONLY
323 # define CPU_IS_060 (1)
324 # define MMU_IS_060 (1)
327 #if !defined(CONFIG_M68020) && !defined(CONFIG_M68030)
328 # define CPU_IS_020_OR_030 (0)
330 # define CPU_M68020_OR_M68030
331 # if defined(CONFIG_M68040) || defined(CONFIG_M68060)
332 # define CPU_IS_020_OR_030 (!m68k_is040or060)
334 # define CPU_M68020_OR_M68030_ONLY
335 # define CPU_IS_020_OR_030 (1)
339 #if !defined(CONFIG_M68040) && !defined(CONFIG_M68060)
340 # define CPU_IS_040_OR_060 (0)
342 # define CPU_M68040_OR_M68060
343 # if defined(CONFIG_M68020) || defined(CONFIG_M68030)
344 # define CPU_IS_040_OR_060 (m68k_is040or060)
346 # define CPU_M68040_OR_M68060_ONLY
347 # define CPU_IS_040_OR_060 (1)
351 #if !defined(CONFIG_COLDFIRE)
352 # define CPU_IS_COLDFIRE (0)
354 # define CPU_IS_COLDFIRE (1)
355 # define MMU_IS_COLDFIRE (1)
358 #define CPU_TYPE (m68k_cputype)
360 #ifdef CONFIG_M68KFPU_EMU
361 # ifdef CONFIG_M68KFPU_EMU_ONLY
362 # define FPU_IS_EMU (1)
364 # define FPU_IS_EMU (!m68k_fputype)
367 # define FPU_IS_EMU (0)
375 #define NUM_MEMINFO 4
379 unsigned long addr
; /* physical address of memory chunk */
380 unsigned long size
; /* length of memory chunk (in bytes) */
383 extern int m68k_num_memory
; /* # of memory blocks found (and used) */
384 extern int m68k_realnum_memory
; /* real # of memory blocks found */
385 extern struct mem_info m68k_memory
[NUM_MEMINFO
];/* memory description */
388 #endif /* __KERNEL__ */
390 #endif /* _M68K_SETUP_H */