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/setup.h>
28 #define CL_SIZE COMMAND_LINE_SIZE
31 extern unsigned long m68k_machtype
;
32 #endif /* !__ASSEMBLY__ */
34 #if !defined(CONFIG_AMIGA)
35 # define MACH_IS_AMIGA (0)
36 #elif defined(CONFIG_ATARI) || defined(CONFIG_MAC) || defined(CONFIG_APOLLO) \
37 || defined(CONFIG_MVME16x) || defined(CONFIG_BVME6000) \
38 || defined(CONFIG_HP300) || defined(CONFIG_Q40) \
39 || defined(CONFIG_SUN3X) || defined(CONFIG_MVME147)
40 # define MACH_IS_AMIGA (m68k_machtype == MACH_AMIGA)
42 # define MACH_AMIGA_ONLY
43 # define MACH_IS_AMIGA (1)
44 # define MACH_TYPE (MACH_AMIGA)
47 #if !defined(CONFIG_ATARI)
48 # define MACH_IS_ATARI (0)
49 #elif defined(CONFIG_AMIGA) || defined(CONFIG_MAC) || defined(CONFIG_APOLLO) \
50 || defined(CONFIG_MVME16x) || defined(CONFIG_BVME6000) \
51 || defined(CONFIG_HP300) || defined(CONFIG_Q40) \
52 || defined(CONFIG_SUN3X) || defined(CONFIG_MVME147)
53 # define MACH_IS_ATARI (m68k_machtype == MACH_ATARI)
55 # define MACH_ATARI_ONLY
56 # define MACH_IS_ATARI (1)
57 # define MACH_TYPE (MACH_ATARI)
60 #if !defined(CONFIG_MAC)
61 # define MACH_IS_MAC (0)
62 #elif defined(CONFIG_AMIGA) || defined(CONFIG_ATARI) || defined(CONFIG_APOLLO) \
63 || defined(CONFIG_MVME16x) || defined(CONFIG_BVME6000) \
64 || defined(CONFIG_HP300) || defined(CONFIG_Q40) \
65 || defined(CONFIG_SUN3X) || defined(CONFIG_MVME147)
66 # define MACH_IS_MAC (m68k_machtype == MACH_MAC)
68 # define MACH_MAC_ONLY
69 # define MACH_IS_MAC (1)
70 # define MACH_TYPE (MACH_MAC)
73 #if defined(CONFIG_SUN3)
74 #define MACH_IS_SUN3 (1)
75 #define MACH_SUN3_ONLY (1)
76 #define MACH_TYPE (MACH_SUN3)
78 #define MACH_IS_SUN3 (0)
81 #if !defined (CONFIG_APOLLO)
82 # define MACH_IS_APOLLO (0)
83 #elif defined(CONFIG_AMIGA) || defined(CONFIG_MAC) || defined(CONFIG_ATARI) \
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_APOLLO (m68k_machtype == MACH_APOLLO)
89 # define MACH_APOLLO_ONLY
90 # define MACH_IS_APOLLO (1)
91 # define MACH_TYPE (MACH_APOLLO)
94 #if !defined (CONFIG_MVME147)
95 # define MACH_IS_MVME147 (0)
96 #elif defined(CONFIG_AMIGA) || defined(CONFIG_MAC) || defined(CONFIG_ATARI) \
97 || defined(CONFIG_APOLLO) || defined(CONFIG_BVME6000) \
98 || defined(CONFIG_HP300) || defined(CONFIG_Q40) \
99 || defined(CONFIG_SUN3X) || defined(CONFIG_MVME16x)
100 # define MACH_IS_MVME147 (m68k_machtype == MACH_MVME147)
102 # define MACH_MVME147_ONLY
103 # define MACH_IS_MVME147 (1)
104 # define MACH_TYPE (MACH_MVME147)
107 #if !defined (CONFIG_MVME16x)
108 # define MACH_IS_MVME16x (0)
109 #elif defined(CONFIG_AMIGA) || defined(CONFIG_MAC) || defined(CONFIG_ATARI) \
110 || defined(CONFIG_APOLLO) || defined(CONFIG_BVME6000) \
111 || defined(CONFIG_HP300) || defined(CONFIG_Q40) \
112 || defined(CONFIG_SUN3X) || defined(CONFIG_MVME147)
113 # define MACH_IS_MVME16x (m68k_machtype == MACH_MVME16x)
115 # define MACH_MVME16x_ONLY
116 # define MACH_IS_MVME16x (1)
117 # define MACH_TYPE (MACH_MVME16x)
120 #if !defined (CONFIG_BVME6000)
121 # define MACH_IS_BVME6000 (0)
122 #elif defined(CONFIG_AMIGA) || defined(CONFIG_MAC) || defined(CONFIG_ATARI) \
123 || defined(CONFIG_APOLLO) || defined(CONFIG_MVME16x) \
124 || defined(CONFIG_HP300) || defined(CONFIG_Q40) \
125 || defined(CONFIG_SUN3X) || defined(CONFIG_MVME147)
126 # define MACH_IS_BVME6000 (m68k_machtype == MACH_BVME6000)
128 # define MACH_BVME6000_ONLY
129 # define MACH_IS_BVME6000 (1)
130 # define MACH_TYPE (MACH_BVME6000)
133 #if !defined (CONFIG_HP300)
134 # define MACH_IS_HP300 (0)
135 #elif defined(CONFIG_AMIGA) || defined(CONFIG_MAC) || defined(CONFIG_ATARI) \
136 || defined(CONFIG_APOLLO) || defined(CONFIG_MVME16x) \
137 || defined(CONFIG_BVME6000) || defined(CONFIG_Q40) \
138 || defined(CONFIG_SUN3X) || defined(CONFIG_MVME147)
139 # define MACH_IS_HP300 (m68k_machtype == MACH_HP300)
141 # define MACH_HP300_ONLY
142 # define MACH_IS_HP300 (1)
143 # define MACH_TYPE (MACH_HP300)
146 #if !defined (CONFIG_Q40)
147 # define MACH_IS_Q40 (0)
148 #elif defined(CONFIG_AMIGA) || defined(CONFIG_MAC) || defined(CONFIG_ATARI) \
149 || defined(CONFIG_APOLLO) || defined(CONFIG_MVME16x) \
150 || defined(CONFIG_BVME6000) || defined(CONFIG_HP300) \
151 || defined(CONFIG_SUN3X) || defined(CONFIG_MVME147)
152 # define MACH_IS_Q40 (m68k_machtype == MACH_Q40)
154 # define MACH_Q40_ONLY
155 # define MACH_IS_Q40 (1)
156 # define MACH_TYPE (MACH_Q40)
159 #if !defined (CONFIG_SUN3X)
160 # define MACH_IS_SUN3X (0)
161 #elif defined(CONFIG_AMIGA) || defined(CONFIG_MAC) || defined(CONFIG_ATARI) \
162 || defined(CONFIG_APOLLO) || defined(CONFIG_MVME16x) \
163 || defined(CONFIG_BVME6000) || defined(CONFIG_HP300) \
164 || defined(CONFIG_Q40) || defined(CONFIG_MVME147)
165 # define MACH_IS_SUN3X (m68k_machtype == MACH_SUN3X)
167 # define CONFIG_SUN3X_ONLY
168 # define MACH_IS_SUN3X (1)
169 # define MACH_TYPE (MACH_SUN3X)
173 # define MACH_TYPE (m68k_machtype)
178 extern unsigned long m68k_cputype
;
179 extern unsigned long m68k_fputype
;
180 extern unsigned long m68k_mmutype
;
182 extern unsigned long vme_brdtype
;
186 * m68k_is040or060 is != 0 for a '040 or higher;
187 * used numbers are 4 for 68040 and 6 for 68060.
190 extern int m68k_is040or060
;
191 #endif /* !__ASSEMBLY__ */
193 #if !defined(CONFIG_M68020)
194 # define CPU_IS_020 (0)
195 # define MMU_IS_851 (0)
196 # define MMU_IS_SUN3 (0)
197 #elif defined(CONFIG_M68030) || defined(CONFIG_M68040) || defined(CONFIG_M68060)
198 # define CPU_IS_020 (m68k_cputype & CPU_68020)
199 # define MMU_IS_851 (m68k_mmutype & MMU_68851)
200 # define MMU_IS_SUN3 (0) /* Sun3 not supported with other CPU enabled */
202 # define CPU_M68020_ONLY
203 # define CPU_IS_020 (1)
204 #ifdef MACH_SUN3_ONLY
205 # define MMU_IS_SUN3 (1)
206 # define MMU_IS_851 (0)
208 # define MMU_IS_SUN3 (0)
209 # define MMU_IS_851 (1)
213 #if !defined(CONFIG_M68030)
214 # define CPU_IS_030 (0)
215 # define MMU_IS_030 (0)
216 #elif defined(CONFIG_M68020) || defined(CONFIG_M68040) || defined(CONFIG_M68060)
217 # define CPU_IS_030 (m68k_cputype & CPU_68030)
218 # define MMU_IS_030 (m68k_mmutype & MMU_68030)
220 # define CPU_M68030_ONLY
221 # define CPU_IS_030 (1)
222 # define MMU_IS_030 (1)
225 #if !defined(CONFIG_M68040)
226 # define CPU_IS_040 (0)
227 # define MMU_IS_040 (0)
228 #elif defined(CONFIG_M68020) || defined(CONFIG_M68030) || defined(CONFIG_M68060)
229 # define CPU_IS_040 (m68k_cputype & CPU_68040)
230 # define MMU_IS_040 (m68k_mmutype & MMU_68040)
232 # define CPU_M68040_ONLY
233 # define CPU_IS_040 (1)
234 # define MMU_IS_040 (1)
237 #if !defined(CONFIG_M68060)
238 # define CPU_IS_060 (0)
239 # define MMU_IS_060 (0)
240 #elif defined(CONFIG_M68020) || defined(CONFIG_M68030) || defined(CONFIG_M68040)
241 # define CPU_IS_060 (m68k_cputype & CPU_68060)
242 # define MMU_IS_060 (m68k_mmutype & MMU_68060)
244 # define CPU_M68060_ONLY
245 # define CPU_IS_060 (1)
246 # define MMU_IS_060 (1)
249 #if !defined(CONFIG_M68020) && !defined(CONFIG_M68030)
250 # define CPU_IS_020_OR_030 (0)
252 # define CPU_M68020_OR_M68030
253 # if defined(CONFIG_M68040) || defined(CONFIG_M68060)
254 # define CPU_IS_020_OR_030 (!m68k_is040or060)
256 # define CPU_M68020_OR_M68030_ONLY
257 # define CPU_IS_020_OR_030 (1)
261 #if !defined(CONFIG_M68040) && !defined(CONFIG_M68060)
262 # define CPU_IS_040_OR_060 (0)
264 # define CPU_M68040_OR_M68060
265 # if defined(CONFIG_M68020) || defined(CONFIG_M68030)
266 # define CPU_IS_040_OR_060 (m68k_is040or060)
268 # define CPU_M68040_OR_M68060_ONLY
269 # define CPU_IS_040_OR_060 (1)
273 #if !defined(CONFIG_COLDFIRE)
274 # define CPU_IS_COLDFIRE (0)
276 # define CPU_IS_COLDFIRE (1)
277 # define MMU_IS_COLDFIRE (1)
280 #define CPU_TYPE (m68k_cputype)
282 #ifdef CONFIG_M68KFPU_EMU
283 # ifdef CONFIG_M68KFPU_EMU_ONLY
284 # define FPU_IS_EMU (1)
286 # define FPU_IS_EMU (!m68k_fputype)
289 # define FPU_IS_EMU (0)
297 #define NUM_MEMINFO 4
301 unsigned long addr
; /* physical address of memory chunk */
302 unsigned long size
; /* length of memory chunk (in bytes) */
305 extern int m68k_num_memory
; /* # of memory blocks found (and used) */
306 extern int m68k_realnum_memory
; /* real # of memory blocks found */
307 extern struct mem_info m68k_memory
[NUM_MEMINFO
];/* memory description */
310 #endif /* _M68K_SETUP_H */