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
26 #include <linux/config.h>
30 * Linux/m68k Architectures
38 #define MACH_MVME147 6
39 #define MACH_MVME16x 7
40 #define MACH_BVME6000 8
48 extern unsigned long m68k_machtype
;
49 #endif /* !__ASSEMBLY__ */
51 #if !defined(CONFIG_AMIGA)
52 # define MACH_IS_AMIGA (0)
53 #elif defined(CONFIG_ATARI) || defined(CONFIG_MAC) || defined(CONFIG_APOLLO) \
54 || defined(CONFIG_MVME16x) || defined(CONFIG_BVME6000) \
55 || defined(CONFIG_HP300) || defined(CONFIG_Q40) \
56 || defined(CONFIG_SUN3X) || defined(CONFIG_MVME147)
57 # define MACH_IS_AMIGA (m68k_machtype == MACH_AMIGA)
59 # define MACH_AMIGA_ONLY
60 # define MACH_IS_AMIGA (1)
61 # define MACH_TYPE (MACH_AMIGA)
64 #if !defined(CONFIG_ATARI)
65 # define MACH_IS_ATARI (0)
66 #elif defined(CONFIG_AMIGA) || defined(CONFIG_MAC) || defined(CONFIG_APOLLO) \
67 || defined(CONFIG_MVME16x) || defined(CONFIG_BVME6000) \
68 || defined(CONFIG_HP300) || defined(CONFIG_Q40) \
69 || defined(CONFIG_SUN3X) || defined(CONFIG_MVME147)
70 # define MACH_IS_ATARI (m68k_machtype == MACH_ATARI)
72 # define MACH_ATARI_ONLY
73 # define MACH_IS_ATARI (1)
74 # define MACH_TYPE (MACH_ATARI)
77 #if !defined(CONFIG_MAC)
78 # define MACH_IS_MAC (0)
79 #elif defined(CONFIG_AMIGA) || defined(CONFIG_ATARI) || defined(CONFIG_APOLLO) \
80 || defined(CONFIG_MVME16x) || defined(CONFIG_BVME6000) \
81 || defined(CONFIG_HP300) || defined(CONFIG_Q40) \
82 || defined(CONFIG_SUN3X) || defined(CONFIG_MVME147)
83 # define MACH_IS_MAC (m68k_machtype == MACH_MAC)
85 # define MACH_MAC_ONLY
86 # define MACH_IS_MAC (1)
87 # define MACH_TYPE (MACH_MAC)
90 #if defined(CONFIG_SUN3)
91 #define MACH_IS_SUN3 (1)
92 #define MACH_SUN3_ONLY (1)
93 #define MACH_TYPE (MACH_SUN3)
95 #define MACH_IS_SUN3 (0)
98 #if !defined (CONFIG_APOLLO)
99 # define MACH_IS_APOLLO (0)
100 #elif defined(CONFIG_AMIGA) || defined(CONFIG_MAC) || defined(CONFIG_ATARI) \
101 || defined(CONFIG_MVME16x) || defined(CONFIG_BVME6000) \
102 || defined(CONFIG_HP300) || defined(CONFIG_Q40) \
103 || defined(CONFIG_SUN3X) || defined(CONFIG_MVME147)
104 # define MACH_IS_APOLLO (m68k_machtype == MACH_APOLLO)
106 # define MACH_APOLLO_ONLY
107 # define MACH_IS_APOLLO (1)
108 # define MACH_TYPE (MACH_APOLLO)
111 #if !defined (CONFIG_MVME147)
112 # define MACH_IS_MVME147 (0)
113 #elif defined(CONFIG_AMIGA) || defined(CONFIG_MAC) || defined(CONFIG_ATARI) \
114 || defined(CONFIG_APOLLO) || defined(CONFIG_BVME6000) \
115 || defined(CONFIG_HP300) || defined(CONFIG_Q40) \
116 || defined(CONFIG_SUN3X) || defined(CONFIG_MVME16x)
117 # define MACH_IS_MVME147 (m68k_machtype == MACH_MVME147)
119 # define MACH_MVME147_ONLY
120 # define MACH_IS_MVME147 (1)
121 # define MACH_TYPE (MACH_MVME147)
124 #if !defined (CONFIG_MVME16x)
125 # define MACH_IS_MVME16x (0)
126 #elif defined(CONFIG_AMIGA) || defined(CONFIG_MAC) || defined(CONFIG_ATARI) \
127 || defined(CONFIG_APOLLO) || defined(CONFIG_BVME6000) \
128 || defined(CONFIG_HP300) || defined(CONFIG_Q40) \
129 || defined(CONFIG_SUN3X) || defined(CONFIG_MVME147)
130 # define MACH_IS_MVME16x (m68k_machtype == MACH_MVME16x)
132 # define MACH_MVME16x_ONLY
133 # define MACH_IS_MVME16x (1)
134 # define MACH_TYPE (MACH_MVME16x)
137 #if !defined (CONFIG_BVME6000)
138 # define MACH_IS_BVME6000 (0)
139 #elif defined(CONFIG_AMIGA) || defined(CONFIG_MAC) || defined(CONFIG_ATARI) \
140 || defined(CONFIG_APOLLO) || defined(CONFIG_MVME16x) \
141 || defined(CONFIG_HP300) || defined(CONFIG_Q40) \
142 || defined(CONFIG_SUN3X) || defined(CONFIG_MVME147)
143 # define MACH_IS_BVME6000 (m68k_machtype == MACH_BVME6000)
145 # define MACH_BVME6000_ONLY
146 # define MACH_IS_BVME6000 (1)
147 # define MACH_TYPE (MACH_BVME6000)
150 #if !defined (CONFIG_HP300)
151 # define MACH_IS_HP300 (0)
152 #elif defined(CONFIG_AMIGA) || defined(CONFIG_MAC) || defined(CONFIG_ATARI) \
153 || defined(CONFIG_APOLLO) || defined(CONFIG_MVME16x) \
154 || defined(CONFIG_BVME6000) || defined(CONFIG_Q40) \
155 || defined(CONFIG_SUN3X) || defined(CONFIG_MVME147)
156 # define MACH_IS_HP300 (m68k_machtype == MACH_HP300)
158 # define MACH_HP300_ONLY
159 # define MACH_IS_HP300 (1)
160 # define MACH_TYPE (MACH_HP300)
163 #if !defined (CONFIG_Q40)
164 # define MACH_IS_Q40 (0)
165 #elif defined(CONFIG_AMIGA) || defined(CONFIG_MAC) || defined(CONFIG_ATARI) \
166 || defined(CONFIG_APOLLO) || defined(CONFIG_MVME16x) \
167 || defined(CONFIG_BVME6000) || defined(CONFIG_HP300) \
168 || defined(CONFIG_SUN3X) || defined(CONFIG_MVME147)
169 # define MACH_IS_Q40 (m68k_machtype == MACH_Q40)
171 # define MACH_Q40_ONLY
172 # define MACH_IS_Q40 (1)
173 # define MACH_TYPE (MACH_Q40)
176 #if !defined (CONFIG_SUN3X)
177 # define MACH_IS_SUN3X (0)
178 #elif defined(CONFIG_AMIGA) || defined(CONFIG_MAC) || defined(CONFIG_ATARI) \
179 || defined(CONFIG_APOLLO) || defined(CONFIG_MVME16x) \
180 || defined(CONFIG_BVME6000) || defined(CONFIG_HP300) \
181 || defined(CONFIG_Q40) || defined(CONFIG_MVME147)
182 # define MACH_IS_SUN3X (m68k_machtype == MACH_SUN3X)
184 # define CONFIG_SUN3X_ONLY
185 # define MACH_IS_SUN3X (1)
186 # define MACH_TYPE (MACH_SUN3X)
190 # define MACH_TYPE (m68k_machtype)
193 #endif /* __KERNEL__ */
197 * CPU, FPU and MMU types
199 * Note: we may rely on the following equalities:
201 * CPU_68020 == MMU_68851
202 * CPU_68030 == MMU_68030
203 * CPU_68040 == FPU_68040 == MMU_68040
204 * CPU_68060 == FPU_68060 == MMU_68060
212 #define CPU_68020 (1<<CPUB_68020)
213 #define CPU_68030 (1<<CPUB_68030)
214 #define CPU_68040 (1<<CPUB_68040)
215 #define CPU_68060 (1<<CPUB_68060)
219 #define FPUB_68040 2 /* Internal FPU */
220 #define FPUB_68060 3 /* Internal FPU */
221 #define FPUB_SUNFPA 4 /* Sun-3 FPA */
223 #define FPU_68881 (1<<FPUB_68881)
224 #define FPU_68882 (1<<FPUB_68882)
225 #define FPU_68040 (1<<FPUB_68040)
226 #define FPU_68060 (1<<FPUB_68060)
227 #define FPU_SUNFPA (1<<FPUB_SUNFPA)
230 #define MMUB_68030 1 /* Internal MMU */
231 #define MMUB_68040 2 /* Internal MMU */
232 #define MMUB_68060 3 /* Internal MMU */
233 #define MMUB_APOLLO 4 /* Custom Apollo */
234 #define MMUB_SUN3 5 /* Custom Sun-3 */
236 #define MMU_68851 (1<<MMUB_68851)
237 #define MMU_68030 (1<<MMUB_68030)
238 #define MMU_68040 (1<<MMUB_68040)
239 #define MMU_68060 (1<<MMUB_68060)
240 #define MMU_SUN3 (1<<MMUB_SUN3)
241 #define MMU_APOLLO (1<<MMUB_APOLLO)
246 extern unsigned long m68k_cputype
;
247 extern unsigned long m68k_fputype
;
248 extern unsigned long m68k_mmutype
; /* Not really used yet */
250 extern unsigned long vme_brdtype
;
254 * m68k_is040or060 is != 0 for a '040 or higher;
255 * used numbers are 4 for 68040 and 6 for 68060.
258 extern int m68k_is040or060
;
259 #endif /* !__ASSEMBLY__ */
261 #if !defined(CONFIG_M68020)
262 # define CPU_IS_020 (0)
263 # define MMU_IS_851 (0)
264 # define MMU_IS_SUN3 (0)
265 #elif defined(CONFIG_M68030) || defined(CONFIG_M68040) || defined(CONFIG_M68060)
266 # define CPU_IS_020 (m68k_cputype & CPU_68020)
267 # define MMU_IS_851 (m68k_mmutype & MMU_68851)
268 # define MMU_IS_SUN3 (0) /* Sun3 not supported with other CPU enabled */
270 # define CPU_M68020_ONLY
271 # define CPU_IS_020 (1)
272 #ifdef MACH_SUN3_ONLY
273 # define MMU_IS_SUN3 (1)
274 # define MMU_IS_851 (0)
276 # define MMU_IS_SUN3 (0)
277 # define MMU_IS_851 (1)
281 #if !defined(CONFIG_M68030)
282 # define CPU_IS_030 (0)
283 # define MMU_IS_030 (0)
284 #elif defined(CONFIG_M68020) || defined(CONFIG_M68040) || defined(CONFIG_M68060)
285 # define CPU_IS_030 (m68k_cputype & CPU_68030)
286 # define MMU_IS_030 (m68k_mmutype & MMU_68030)
288 # define CPU_M68030_ONLY
289 # define CPU_IS_030 (1)
290 # define MMU_IS_030 (1)
293 #if !defined(CONFIG_M68040)
294 # define CPU_IS_040 (0)
295 # define MMU_IS_040 (0)
296 #elif defined(CONFIG_M68020) || defined(CONFIG_M68030) || defined(CONFIG_M68060)
297 # define CPU_IS_040 (m68k_cputype & CPU_68040)
298 # define MMU_IS_040 (m68k_mmutype & MMU_68040)
300 # define CPU_M68040_ONLY
301 # define CPU_IS_040 (1)
302 # define MMU_IS_040 (1)
305 #if !defined(CONFIG_M68060)
306 # define CPU_IS_060 (0)
307 # define MMU_IS_060 (0)
308 #elif defined(CONFIG_M68020) || defined(CONFIG_M68030) || defined(CONFIG_M68040)
309 # define CPU_IS_060 (m68k_cputype & CPU_68060)
310 # define MMU_IS_060 (m68k_mmutype & MMU_68060)
312 # define CPU_M68060_ONLY
313 # define CPU_IS_060 (1)
314 # define MMU_IS_060 (1)
317 #if !defined(CONFIG_M68020) && !defined(CONFIG_M68030)
318 # define CPU_IS_020_OR_030 (0)
320 # define CPU_M68020_OR_M68030
321 # if defined(CONFIG_M68040) || defined(CONFIG_M68060)
322 # define CPU_IS_020_OR_030 (!m68k_is040or060)
324 # define CPU_M68020_OR_M68030_ONLY
325 # define CPU_IS_020_OR_030 (1)
329 #if !defined(CONFIG_M68040) && !defined(CONFIG_M68060)
330 # define CPU_IS_040_OR_060 (0)
332 # define CPU_M68040_OR_M68060
333 # if defined(CONFIG_M68020) || defined(CONFIG_M68030)
334 # define CPU_IS_040_OR_060 (m68k_is040or060)
336 # define CPU_M68040_OR_M68060_ONLY
337 # define CPU_IS_040_OR_060 (1)
341 #define CPU_TYPE (m68k_cputype)
343 #ifdef CONFIG_M68KFPU_EMU
344 # ifdef CONFIG_M68KFPU_EMU_ONLY
345 # define FPU_IS_EMU (1)
347 # define FPU_IS_EMU (!m68k_fputype)
350 # define FPU_IS_EMU (0)
358 #define NUM_MEMINFO 4
360 #define COMMAND_LINE_SIZE CL_SIZE
364 unsigned long addr
; /* physical address of memory chunk */
365 unsigned long size
; /* length of memory chunk (in bytes) */
368 extern int m68k_num_memory
; /* # of memory blocks found (and used) */
369 extern int m68k_realnum_memory
; /* real # of memory blocks found */
370 extern struct mem_info m68k_memory
[NUM_MEMINFO
];/* memory description */
373 #endif /* __KERNEL__ */
375 #endif /* _M68K_SETUP_H */