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
47 extern unsigned long m68k_machtype;
48 #endif /* !__ASSEMBLY__ */
50 #if !defined(CONFIG_AMIGA)
51 # define MACH_IS_AMIGA (0)
52 #elif defined(CONFIG_ATARI) || defined(CONFIG_MAC) || defined(CONFIG_APOLLO) \
53 || defined(CONFIG_MVME16x) || defined(CONFIG_BVME6000) \
54 || defined(CONFIG_HP300) || defined(CONFIG_Q40) \
55 || defined(CONFIG_SUN3X) || defined(CONFIG_MVME147)
56 # define MACH_IS_AMIGA (m68k_machtype == MACH_AMIGA)
58 # define MACH_AMIGA_ONLY
59 # define MACH_IS_AMIGA (1)
60 # define MACH_TYPE (MACH_AMIGA)
63 #if !defined(CONFIG_ATARI)
64 # define MACH_IS_ATARI (0)
65 #elif defined(CONFIG_AMIGA) || defined(CONFIG_MAC) || 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 # define MACH_IS_ATARI (m68k_machtype == MACH_ATARI)
71 # define MACH_ATARI_ONLY
72 # define MACH_IS_ATARI (1)
73 # define MACH_TYPE (MACH_ATARI)
76 #if !defined(CONFIG_MAC)
77 # define MACH_IS_MAC (0)
78 #elif defined(CONFIG_AMIGA) || defined(CONFIG_ATARI) || defined(CONFIG_APOLLO) \
79 || defined(CONFIG_MVME16x) || defined(CONFIG_BVME6000) \
80 || defined(CONFIG_HP300) || defined(CONFIG_Q40) \
81 || defined(CONFIG_SUN3X) || defined(CONFIG_MVME147)
82 # define MACH_IS_MAC (m68k_machtype == MACH_MAC)
84 # define MACH_MAC_ONLY
85 # define MACH_IS_MAC (1)
86 # define MACH_TYPE (MACH_MAC)
89 #if defined(CONFIG_SUN3)
90 #define MACH_IS_SUN3 (1)
91 #define MACH_SUN3_ONLY (1)
92 #define MACH_TYPE (MACH_SUN3)
94 #define MACH_IS_SUN3 (0)
97 #if !defined (CONFIG_APOLLO)
98 # define MACH_IS_APOLLO (0)
99 #elif defined(CONFIG_AMIGA) || defined(CONFIG_MAC) || defined(CONFIG_ATARI) \
100 || defined(CONFIG_MVME16x) || defined(CONFIG_BVME6000) \
101 || defined(CONFIG_HP300) || defined(CONFIG_Q40) \
102 || defined(CONFIG_SUN3X) || defined(CONFIG_MVME147)
103 # define MACH_IS_APOLLO (m68k_machtype == MACH_APOLLO)
105 # define MACH_APOLLO_ONLY
106 # define MACH_IS_APOLLO (1)
107 # define MACH_TYPE (MACH_APOLLO)
110 #if !defined (CONFIG_MVME147)
111 # define MACH_IS_MVME147 (0)
112 #elif defined(CONFIG_AMIGA) || defined(CONFIG_MAC) || defined(CONFIG_ATARI) \
113 || defined(CONFIG_APOLLO) || defined(CONFIG_BVME6000) \
114 || defined(CONFIG_HP300) || defined(CONFIG_Q40) \
115 || defined(CONFIG_SUN3X) || defined(CONFIG_MVME16x)
116 # define MACH_IS_MVME147 (m68k_machtype == MACH_MVME147)
118 # define MACH_MVME147_ONLY
119 # define MACH_IS_MVME147 (1)
120 # define MACH_TYPE (MACH_MVME147)
123 #if !defined (CONFIG_MVME16x)
124 # define MACH_IS_MVME16x (0)
125 #elif defined(CONFIG_AMIGA) || defined(CONFIG_MAC) || defined(CONFIG_ATARI) \
126 || defined(CONFIG_APOLLO) || defined(CONFIG_BVME6000) \
127 || defined(CONFIG_HP300) || defined(CONFIG_Q40) \
128 || defined(CONFIG_SUN3X) || defined(CONFIG_MVME147)
129 # define MACH_IS_MVME16x (m68k_machtype == MACH_MVME16x)
131 # define MACH_MVME16x_ONLY
132 # define MACH_IS_MVME16x (1)
133 # define MACH_TYPE (MACH_MVME16x)
136 #if !defined (CONFIG_BVME6000)
137 # define MACH_IS_BVME6000 (0)
138 #elif defined(CONFIG_AMIGA) || defined(CONFIG_MAC) || defined(CONFIG_ATARI) \
139 || defined(CONFIG_APOLLO) || defined(CONFIG_MVME16x) \
140 || defined(CONFIG_HP300) || defined(CONFIG_Q40) \
141 || defined(CONFIG_SUN3X) || defined(CONFIG_MVME147)
142 # define MACH_IS_BVME6000 (m68k_machtype == MACH_BVME6000)
144 # define MACH_BVME6000_ONLY
145 # define MACH_IS_BVME6000 (1)
146 # define MACH_TYPE (MACH_BVME6000)
149 #if !defined (CONFIG_HP300)
150 # define MACH_IS_HP300 (0)
151 #elif defined(CONFIG_AMIGA) || defined(CONFIG_MAC) || defined(CONFIG_ATARI) \
152 || defined(CONFIG_APOLLO) || defined(CONFIG_MVME16x) \
153 || defined(CONFIG_BVME6000) || defined(CONFIG_Q40) \
154 || defined(CONFIG_SUN3X) || defined(CONFIG_MVME147)
155 # define MACH_IS_HP300 (m68k_machtype == MACH_HP300)
157 # define MACH_HP300_ONLY
158 # define MACH_IS_HP300 (1)
159 # define MACH_TYPE (MACH_HP300)
162 #if !defined (CONFIG_Q40)
163 # define MACH_IS_Q40 (0)
164 #elif defined(CONFIG_AMIGA) || defined(CONFIG_MAC) || defined(CONFIG_ATARI) \
165 || defined(CONFIG_APOLLO) || defined(CONFIG_MVME16x) \
166 || defined(CONFIG_BVME6000) || defined(CONFIG_HP300) \
167 || defined(CONFIG_SUN3X) || defined(CONFIG_MVME147)
168 # define MACH_IS_Q40 (m68k_machtype == MACH_Q40)
170 # define MACH_Q40_ONLY
171 # define MACH_IS_Q40 (1)
172 # define MACH_TYPE (MACH_Q40)
175 #if !defined (CONFIG_SUN3X)
176 # define MACH_IS_SUN3X (0)
177 #elif defined(CONFIG_AMIGA) || defined(CONFIG_MAC) || defined(CONFIG_ATARI) \
178 || defined(CONFIG_APOLLO) || defined(CONFIG_MVME16x) \
179 || defined(CONFIG_BVME6000) || defined(CONFIG_HP300) \
180 || defined(CONFIG_Q40) || defined(CONFIG_MVME147)
181 # define MACH_IS_SUN3X (m68k_machtype == MACH_SUN3X)
183 # define CONFIG_SUN3X_ONLY
184 # define MACH_IS_SUN3X (1)
185 # define MACH_TYPE (MACH_SUN3X)
189 # define MACH_TYPE (m68k_machtype)
192 #endif /* __KERNEL__ */
196 * CPU, FPU and MMU types
198 * Note: we may rely on the following equalities:
200 * CPU_68020 == MMU_68851
201 * CPU_68030 == MMU_68030
202 * CPU_68040 == FPU_68040 == MMU_68040
203 * CPU_68060 == FPU_68060 == MMU_68060
211 #define CPU_68020 (1<<CPUB_68020)
212 #define CPU_68030 (1<<CPUB_68030)
213 #define CPU_68040 (1<<CPUB_68040)
214 #define CPU_68060 (1<<CPUB_68060)
218 #define FPUB_68040 2 /* Internal FPU */
219 #define FPUB_68060 3 /* Internal FPU */
220 #define FPUB_SUNFPA 4 /* Sun-3 FPA */
222 #define FPU_68881 (1<<FPUB_68881)
223 #define FPU_68882 (1<<FPUB_68882)
224 #define FPU_68040 (1<<FPUB_68040)
225 #define FPU_68060 (1<<FPUB_68060)
226 #define FPU_SUNFPA (1<<FPUB_SUNFPA)
229 #define MMUB_68030 1 /* Internal MMU */
230 #define MMUB_68040 2 /* Internal MMU */
231 #define MMUB_68060 3 /* Internal MMU */
232 #define MMUB_APOLLO 4 /* Custom Apollo */
233 #define MMUB_SUN3 5 /* Custom Sun-3 */
235 #define MMU_68851 (1<<MMUB_68851)
236 #define MMU_68030 (1<<MMUB_68030)
237 #define MMU_68040 (1<<MMUB_68040)
238 #define MMU_68060 (1<<MMUB_68060)
239 #define MMU_SUN3 (1<<MMUB_SUN3)
240 #define MMU_APOLLO (1<<MMUB_APOLLO)
245 extern unsigned long m68k_cputype;
246 extern unsigned long m68k_fputype;
247 extern unsigned long m68k_mmutype; /* Not really used yet */
249 extern unsigned long vme_brdtype;
253 * m68k_is040or060 is != 0 for a '040 or higher;
254 * used numbers are 4 for 68040 and 6 for 68060.
257 extern int m68k_is040or060;
258 #endif /* !__ASSEMBLY__ */
260 #if !defined(CONFIG_M68020)
261 # define CPU_IS_020 (0)
262 # define MMU_IS_851 (0)
263 # define MMU_IS_SUN3 (0)
264 #elif defined(CONFIG_M68030) || defined(CONFIG_M68040) || defined(CONFIG_M68060)
265 # define CPU_IS_020 (m68k_cputype & CPU_68020)
266 # define MMU_IS_851 (m68k_mmutype & MMU_68851)
267 # define MMU_IS_SUN3 (0) /* Sun3 not supported with other CPU enabled */
269 # define CPU_M68020_ONLY
270 # define CPU_IS_020 (1)
271 #ifdef MACH_SUN3_ONLY
272 # define MMU_IS_SUN3 (1)
273 # define MMU_IS_851 (0)
275 # define MMU_IS_SUN3 (0)
276 # define MMU_IS_851 (1)
280 #if !defined(CONFIG_M68030)
281 # define CPU_IS_030 (0)
282 # define MMU_IS_030 (0)
283 #elif defined(CONFIG_M68020) || defined(CONFIG_M68040) || defined(CONFIG_M68060)
284 # define CPU_IS_030 (m68k_cputype & CPU_68030)
285 # define MMU_IS_030 (m68k_mmutype & MMU_68030)
287 # define CPU_M68030_ONLY
288 # define CPU_IS_030 (1)
289 # define MMU_IS_030 (1)
292 #if !defined(CONFIG_M68040)
293 # define CPU_IS_040 (0)
294 # define MMU_IS_040 (0)
295 #elif defined(CONFIG_M68020) || defined(CONFIG_M68030) || defined(CONFIG_M68060)
296 # define CPU_IS_040 (m68k_cputype & CPU_68040)
297 # define MMU_IS_040 (m68k_mmutype & MMU_68040)
299 # define CPU_M68040_ONLY
300 # define CPU_IS_040 (1)
301 # define MMU_IS_040 (1)
304 #if !defined(CONFIG_M68060)
305 # define CPU_IS_060 (0)
306 # define MMU_IS_060 (0)
307 #elif defined(CONFIG_M68020) || defined(CONFIG_M68030) || defined(CONFIG_M68040)
308 # define CPU_IS_060 (m68k_cputype & CPU_68060)
309 # define MMU_IS_060 (m68k_mmutype & MMU_68060)
311 # define CPU_M68060_ONLY
312 # define CPU_IS_060 (1)
313 # define MMU_IS_060 (1)
316 #if !defined(CONFIG_M68020) && !defined(CONFIG_M68030)
317 # define CPU_IS_020_OR_030 (0)
319 # define CPU_M68020_OR_M68030
320 # if defined(CONFIG_M68040) || defined(CONFIG_M68060)
321 # define CPU_IS_020_OR_030 (!m68k_is040or060)
323 # define CPU_M68020_OR_M68030_ONLY
324 # define CPU_IS_020_OR_030 (1)
328 #if !defined(CONFIG_M68040) && !defined(CONFIG_M68060)
329 # define CPU_IS_040_OR_060 (0)
331 # define CPU_M68040_OR_M68060
332 # if defined(CONFIG_M68020) || defined(CONFIG_M68030)
333 # define CPU_IS_040_OR_060 (m68k_is040or060)
335 # define CPU_M68040_OR_M68060_ONLY
336 # define CPU_IS_040_OR_060 (1)
340 #define CPU_TYPE (m68k_cputype)
342 #ifdef CONFIG_M68KFPU_EMU
343 # ifdef CONFIG_M68KFPU_EMU_ONLY
344 # define FPU_IS_EMU (1)
346 # define FPU_IS_EMU (!m68k_fputype)
349 # define FPU_IS_EMU (0)
357 #define NUM_MEMINFO 4
359 #define COMMAND_LINE_SIZE CL_SIZE
363 unsigned long addr; /* physical address of memory chunk */
364 unsigned long size; /* length of memory chunk (in bytes) */
367 extern int m68k_num_memory; /* # of memory blocks found (and used) */
368 extern int m68k_realnum_memory; /* real # of memory blocks found */
369 extern struct mem_info m68k_memory[NUM_MEMINFO];/* memory description */
372 #endif /* __KERNEL__ */
374 #endif /* _M68K_SETUP_H */