OpenCores
URL https://opencores.org/ocsvn/or1k/or1k/trunk

Subversion Repositories or1k

[/] [or1k/] [trunk/] [rc203soc/] [sw/] [uClinux/] [include/] [asm-m68knommu/] [setup.h] - Blame information for rev 1765

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 1633 jcastillo
/*
2
** asm/setup.h -- Definition of the Linux/m68k boot information structure
3
**
4
** Copyright 1992 by Greg Harp
5
**
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
8
** for more details.
9
**
10
** Created 09/29/92 by Greg Harp
11
**
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
*/
19
 
20
#ifndef _M68K_SETUP_H
21
#define _M68K_SETUP_H
22
 
23
#include <linux/config.h>
24
 
25
#define CL_SIZE (256)
26
 
27
#if 0
28
 
29
#include <asm/zorro.h>
30
 
31
/*
32
 * Amiga specific part of bootinfo structure.
33
 */
34
 
35
#define NUM_AUTO    16
36
 
37
#ifndef __ASSEMBLY__
38
 
39
#define AMIGAHW_DECLARE(name)   unsigned name : 1
40
#define AMIGAHW_SET(name)       (boot_info.bi_amiga.hw_present.name = 1)
41
#define AMIGAHW_PRESENT(name)   (boot_info.bi_amiga.hw_present.name)
42
 
43
struct bi_Amiga {
44
        int model;                              /* Amiga Model (3000?) */
45
        int num_autocon;                        /* # of autoconfig devices found */
46
        struct ConfigDev autocon[NUM_AUTO];     /* up to 16 autoconfig devices */
47
#ifdef HACKER_KERNEL
48
        void (*exit_func)(void);                /* addr of function to exit kernel */
49
        unsigned long chip_addr;                /* start of chip memory (bytes) */
50
#endif
51
        unsigned long chip_size;                /* size of chip memory (bytes) */
52
        unsigned char vblank;                   /* VBLANK frequency */
53
        unsigned char psfreq;                   /* power supply frequency */
54
        unsigned long eclock;                   /* EClock frequency */
55
        unsigned long chipset;                  /* native chipset present */
56
        struct {
57
                /* video hardware */
58
                AMIGAHW_DECLARE(AMI_VIDEO);     /* Amiga Video */
59
                AMIGAHW_DECLARE(AMI_BLITTER);   /* Amiga Blitter */
60
                AMIGAHW_DECLARE(AMBER_FF);      /* Amber Flicker Fixer */
61
                /* sound hardware */
62
                AMIGAHW_DECLARE(AMI_AUDIO);     /* Amiga Audio */
63
                /* disk storage interfaces */
64
                AMIGAHW_DECLARE(AMI_FLOPPY);    /* Amiga Floppy */
65
                AMIGAHW_DECLARE(A3000_SCSI);    /* SCSI (wd33c93, A3000 alike) */
66
                AMIGAHW_DECLARE(A4000_SCSI);    /* SCSI (ncr53c710, A4000T alike) */
67
                AMIGAHW_DECLARE(A1200_IDE);     /* IDE (A1200 alike) */
68
                AMIGAHW_DECLARE(A4000_IDE);     /* IDE (A4000 alike) */
69
                AMIGAHW_DECLARE(CD_ROM);        /* CD ROM drive */
70
                /* other I/O hardware */
71
                AMIGAHW_DECLARE(AMI_KEYBOARD);  /* Amiga Keyboard */
72
                AMIGAHW_DECLARE(AMI_MOUSE);     /* Amiga Mouse */
73
                AMIGAHW_DECLARE(AMI_SERIAL);    /* Amiga Serial */
74
                AMIGAHW_DECLARE(AMI_PARALLEL);  /* Amiga Parallel */
75
                /* real time clocks */
76
                AMIGAHW_DECLARE(A2000_CLK);     /* Hardware Clock (A2000 alike) */
77
                AMIGAHW_DECLARE(A3000_CLK);     /* Hardware Clock (A3000 alike) */
78
                /* supporting hardware */
79
                AMIGAHW_DECLARE(CHIP_RAM);      /* Chip RAM */
80
                AMIGAHW_DECLARE(PAULA);         /* Paula (8364) */
81
                AMIGAHW_DECLARE(DENISE);        /* Denise (8362) */
82
                AMIGAHW_DECLARE(DENISE_HR);     /* Denise (8373) */
83
                AMIGAHW_DECLARE(LISA);          /* Lisa (8375) */
84
                AMIGAHW_DECLARE(AGNUS_PAL);     /* Normal/Fat PAL Agnus (8367/8371) */
85
                AMIGAHW_DECLARE(AGNUS_NTSC);    /* Normal/Fat NTSC Agnus (8361/8370) */
86
                AMIGAHW_DECLARE(AGNUS_HR_PAL);  /* Fat Hires PAL Agnus (8372) */
87
                AMIGAHW_DECLARE(AGNUS_HR_NTSC); /* Fat Hires NTSC Agnus (8372) */
88
                AMIGAHW_DECLARE(ALICE_PAL);     /* PAL Alice (8374) */
89
                AMIGAHW_DECLARE(ALICE_NTSC);    /* NTSC Alice (8374) */
90
                AMIGAHW_DECLARE(MAGIC_REKICK);  /* A3000 Magic Hard Rekick */
91
                AMIGAHW_DECLARE(ZORRO);         /* Zorro AutoConfig */
92
        } hw_present;
93
};
94
 
95
#else   /* __ASSEMBLY__ */
96
 
97
BI_amiga_model          = BI_un
98
BI_amiga_num_autcon     = BI_amiga_model+4
99
BI_amiga_autocon        = BI_amiga_num_autcon+4
100
#ifdef HACKER_KERNEL
101
BI_amiga_exit_func      = BI_amiga_autocon+(CD_sizeof*NUM_AUTO)
102
BI_amiga_chip_addr      = BI_amiga_exit_func+4
103
BI_amiga_chip_size      = BI_amiga_chip_addr+4
104
#else
105
BI_amiga_chip_size      = BI_amiga_autocon+(CD_sizeof*NUM_AUTO)
106
#endif
107
BI_amiga_vblank         = BI_amiga_chip_size+4
108
BI_amiga_psfreq         = BI_amiga_vblank+1
109
BI_amiga_eclock         = BI_amiga_psfreq+1
110
BI_amiga_chipset        = BI_amiga_eclock+4
111
BI_amiga_hw_present     = BI_amiga_chipset+4
112
 
113
#endif  /* __ASSEMBLY__ */
114
 
115
/* Atari specific part of bootinfo */
116
 
117
/*
118
 * Define several Hardware-Chips for indication so that for the ATARI we do
119
 * no longer decide whether it is a Falcon or other machine . It's just
120
 * important what hardware the machine uses
121
 */
122
 
123
/* ++roman 08/08/95: rewritten from ORing constants to a C bitfield */
124
 
125
#ifndef __ASSEMBLY__
126
 
127
#define ATARIHW_DECLARE(name)   unsigned name : 1
128
#define ATARIHW_SET(name)       (boot_info.bi_atari.hw_present.name = 1)
129
#define ATARIHW_PRESENT(name)   (boot_info.bi_atari.hw_present.name)
130
 
131
struct bi_Atari {
132
        struct {
133
                /* video hardware */
134
                ATARIHW_DECLARE(STND_SHIFTER);  /* ST-Shifter - no base low ! */
135
                ATARIHW_DECLARE(EXTD_SHIFTER);  /* STe-Shifter - 24 bit address */
136
                ATARIHW_DECLARE(TT_SHIFTER);    /* TT-Shifter */
137
                ATARIHW_DECLARE(VIDEL_SHIFTER); /* Falcon-Shifter */
138
                /* sound hardware */
139
                ATARIHW_DECLARE(YM_2149);       /* Yamaha YM 2149 */
140
                ATARIHW_DECLARE(PCM_8BIT);      /* PCM-Sound in STe-ATARI */
141
                ATARIHW_DECLARE(CODEC);         /* CODEC Sound (Falcon) */
142
                /* disk storage interfaces */
143
                ATARIHW_DECLARE(TT_SCSI);       /* Directly mapped NCR5380 */
144
                ATARIHW_DECLARE(ST_SCSI);       /* NCR5380 via ST-DMA (Falcon) */
145
                ATARIHW_DECLARE(ACSI);          /* Standard ACSI like in STs */
146
                ATARIHW_DECLARE(IDE);           /* IDE Interface */
147
                ATARIHW_DECLARE(FDCSPEED);      /* 8/16 MHz switch for FDC */
148
                /* other I/O hardware */
149
                ATARIHW_DECLARE(ST_MFP);        /* The ST-MFP (there should
150
                                                   be no Atari without
151
                                                   it... but who knows?) */
152
                ATARIHW_DECLARE(TT_MFP);        /* 2nd MFP */
153
                ATARIHW_DECLARE(SCC);           /* Serial Communications Contr. */
154
                ATARIHW_DECLARE(ST_ESCC);       /* SCC Z83230 in an ST */
155
                ATARIHW_DECLARE(ANALOG_JOY);    /* Paddle Interface for STe
156
                                                   and Falcon */
157
                ATARIHW_DECLARE(MICROWIRE);     /* Microwire Interface */
158
                /* DMA */
159
                ATARIHW_DECLARE(STND_DMA);      /* 24 Bit limited ST-DMA */
160
                ATARIHW_DECLARE(EXTD_DMA);      /* 32 Bit ST-DMA */
161
                ATARIHW_DECLARE(SCSI_DMA);      /* DMA for the NCR5380 */
162
                ATARIHW_DECLARE(SCC_DMA);       /* DMA for the SCC */
163
                /* real time clocks */
164
                ATARIHW_DECLARE(TT_CLK);        /* TT compatible clock chip */
165
                ATARIHW_DECLARE(MSTE_CLK);      /* Mega ST(E) clock chip */
166
                /* supporting hardware */
167
                ATARIHW_DECLARE(SCU);           /* System Control Unit */
168
                ATARIHW_DECLARE(BLITTER);       /* Blitter */
169
                ATARIHW_DECLARE(VME);           /* VME Bus */
170
        } hw_present;
171
        unsigned long mch_cookie;               /* _MCH cookie from TOS */
172
};
173
 
174
/* mch_cookie values (upper word) */
175
#define ATARI_MCH_ST            0
176
#define ATARI_MCH_STE           1
177
#define ATARI_MCH_TT            2
178
#define ATARI_MCH_FALCON        3
179
 
180
struct mem_info {
181
        unsigned long addr;                     /* physical address of memory chunk */
182
        unsigned long size;                     /* length of memory chunk (in bytes) */
183
};
184
 
185
#else   /* __ASSEMBLY__ */
186
 
187
MI_addr         = 0
188
MI_size         = MI_addr+4
189
MI_sizeof       = MI_size+4
190
 
191
#endif /* __ASSEMBLY__ */
192
 
193
#define NUM_MEMINFO  4
194
 
195
#define MACH_AMIGA   1
196
#define MACH_ATARI   2
197
#define MACH_MAC     3
198
 
199
/*
200
 * CPU and FPU types
201
 */
202
 
203
#define CPUB_68020 0
204
#define CPUB_68030 1
205
#define CPUB_68040 2
206
#define CPUB_68060 3
207
#define FPUB_68881 5
208
#define FPUB_68882 6
209
#define FPUB_68040 7                            /* Internal FPU */
210
#define FPUB_68060 8                            /* Internal FPU */
211
 
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)
216
#define CPU_MASK     (31)
217
#define FPU_68881    (1<<FPUB_68881)
218
#define FPU_68882    (1<<FPUB_68882)
219
#define FPU_68040    (1<<FPUB_68040)            /* Internal FPU */
220
#define FPU_68060    (1<<FPUB_68060)            /* Internal FPU */
221
#define FPU_MASK     (0xfe0)
222
 
223
#define CL_SIZE      (256)
224
 
225
/*
226
 * machine type definitions
227
 */
228
 
229
#if !defined(CONFIG_AMIGA)
230
#  define MACH_IS_AMIGA (0)
231
#elif defined(CONFIG_ATARI) || defined(CONFIG_MAC)
232
#  define MACH_IS_AMIGA (boot_info.machtype == MACH_AMIGA)
233
#else
234
#  define CONFIG_AMIGA_ONLY
235
#  define MACH_IS_AMIGA (1)
236
#  define MACH_TYPE (MACH_AMIGA)
237
#endif
238
 
239
#if !defined(CONFIG_ATARI)
240
#  define MACH_IS_ATARI (0)
241
#elif defined(CONFIG_AMIGA) || defined(CONFIG_MAC)
242
#  define MACH_IS_ATARI (boot_info.machtype == MACH_ATARI)
243
#else
244
#  define CONFIG_ATARI_ONLY
245
#  define MACH_IS_ATARI (1)
246
#  define MACH_TYPE (MACH_ATARI)
247
#endif
248
 
249
#if defined(CONFIG_MAC)
250
#  error Currently no Mac support!
251
#endif
252
 
253
#ifndef MACH_TYPE
254
#  define MACH_TYPE (boot_info.machtype)
255
#endif
256
 
257
/*
258
 * cpu type definitions
259
 */
260
 
261
#if !defined(CONFIG_M68020)
262
#  define CPU_IS_020 (0)
263
#elif defined(CONFIG_M68030) || defined(CONFIG_M68040) || defined(CONFIG_M68060)
264
#  define CPU_IS_020 (boot_info.cputype & CPU_68020)
265
#else
266
#  define CONFIG_M68020_ONLY
267
#  define CPU_IS_020 (1)
268
#endif
269
 
270
#if !defined(CONFIG_M68030)
271
#  define CPU_IS_030 (0)
272
#elif defined(CONFIG_M68020) || defined(CONFIG_M68040) || defined(CONFIG_M68060)
273
#  define CPU_IS_030 (boot_info.cputype & CPU_68030)
274
#else
275
#  define CONFIG_M68030_ONLY
276
#  define CPU_IS_030 (1)
277
#endif
278
 
279
#if !defined(CONFIG_M68040)
280
#  define CPU_IS_040 (0)
281
#elif defined(CONFIG_M68020) || defined(CONFIG_M68030) || defined(CONFIG_M68060)
282
#  define CPU_IS_040 (boot_info.cputype & CPU_68040)
283
#else
284
#  define CONFIG_M68040_ONLY
285
#  define CPU_IS_040 (1)
286
#endif
287
 
288
#if !defined(CONFIG_M68060)
289
#  define CPU_IS_060 (0)
290
#elif defined(CONFIG_M68020) || defined(CONFIG_M68030) || defined(CONFIG_M68040)
291
#  define CPU_IS_060 (boot_info.cputype & CPU_68060)
292
#else
293
#  define CONFIG_M68060_ONLY
294
#  define CPU_IS_060 (1)
295
#endif
296
 
297
#if !defined(CONFIG_M68020) && !defined(CONFIG_M68030)
298
#  define CPU_IS_020_OR_030 (0)
299
#else
300
#  define CONFIG_M68020_OR_M68030
301
#  if defined(CONFIG_M68040) || defined(CONFIG_M68060)
302
#    define CPU_IS_020_OR_030 (!m68k_is040or060)
303
#  else
304
#    define CONFIG_M68020_OR_M68030_ONLY
305
#    define CPU_IS_020_OR_030 (1)
306
#  endif
307
#endif
308
 
309
#if !defined(CONFIG_M68040) && !defined(CONFIG_M68060)
310
#  define CPU_IS_040_OR_060 (0)
311
#else
312
#  define CONFIG_M68040_OR_M68060
313
#  if defined(CONFIG_M68020) || defined(CONFIG_M68030)
314
#    define CPU_IS_040_OR_060 (m68k_is040or060)
315
#  else
316
#    define CONFIG_M68040_OR_M68060_ONLY
317
#    define CPU_IS_040_OR_060 (1)
318
#  endif
319
#endif
320
 
321
#define CPU_TYPE (boot_info.cputype)
322
 
323
#ifndef __ASSEMBLY__
324
#ifdef __KERNEL__
325
        /*
326
         * m68k_is040or060 is != 0 for a '040 or higher;
327
         * used numbers are 4 for 68040 and 6 for 68060.
328
         */
329
 
330
extern int m68k_is040or060;
331
#endif
332
 
333
struct bootinfo {
334
        unsigned long machtype;                 /* machine type */
335
        unsigned long cputype;                  /* system CPU & FPU */
336
        struct mem_info memory[NUM_MEMINFO];    /* memory description */
337
        int num_memory;                         /* # of memory blocks found */
338
        unsigned long ramdisk_size;             /* ramdisk size in 1024 byte blocks */
339
        unsigned long ramdisk_addr;             /* address of the ram disk in mem */
340
        char command_line[CL_SIZE];             /* kernel command line parameters */
341
        union {
342
                struct bi_Amiga bi_ami;         /* Amiga specific information */
343
                struct bi_Atari bi_ata;         /* Atari specific information */
344
        } bi_un;
345
};
346
#define bi_amiga bi_un.bi_ami
347
#define bi_atari bi_un.bi_ata
348
#define bi_mac   bi_un.bi_mac
349
 
350
extern struct bootinfo
351
    boot_info;
352
 
353
#else   /* __ASSEMBLY__ */
354
 
355
BI_machtype     = 0
356
BI_cputype      = BI_machtype+4
357
BI_memory       = BI_cputype+4
358
BI_num_memory   = BI_memory+(MI_sizeof*NUM_MEMINFO)
359
BI_ramdisk_size = BI_num_memory+4
360
BI_ramdisk_addr = BI_ramdisk_size+4
361
BI_command_line = BI_ramdisk_addr+4
362
BI_un           = BI_command_line+CL_SIZE
363
 
364
#endif /* __ASSEMBLY__ */
365
 
366
 
367
/*
368
 * Stuff for bootinfo interface versioning
369
 *
370
 * At the start of kernel code, a 'struct bootversion' is located. bootstrap
371
 * checks for a matching version of the interface before booting a kernel, to
372
 * avoid user confusion if kernel and bootstrap don't work together :-)
373
 *
374
 * If incompatible changes are made to the bootinfo interface, the major
375
 * number below should be stepped (and the minor reset to 0) for the
376
 * appropriate machine. If a change is backward-compatible, the minor should
377
 * be stepped. "Backwards-compatible" means that booting will work, but
378
 * certain features may not.
379
 */
380
 
381
#define BOOTINFOV_MAGIC                 0x4249561A      /* 'BIV^Z' */
382
#define MK_BI_VERSION(major,minor)      (((major)<<16)+(minor))
383
#define BI_VERSION_MAJOR(v)             (((v) >> 16) & 0xffff)
384
#define BI_VERSION_MINOR(v)             ((v) & 0xffff)
385
 
386
#ifndef __ASSEMBLY__
387
 
388
struct bootversion {
389
        unsigned short branch;
390
        unsigned long magic;
391
        struct {
392
                unsigned long machtype;
393
                unsigned long version;
394
        } machversions[0];
395
};
396
 
397
#endif /* __ASSEMBLY__ */
398
 
399
#define AMIGA_BOOTI_VERSION    MK_BI_VERSION( 1, 0 )
400
#define ATARI_BOOTI_VERSION    MK_BI_VERSION( 1, 0 )
401
 
402
#endif
403
 
404
 
405
#endif /* _M68K_SETUP_H */

powered by: WebSVN 2.1.0

© copyright 1999-2024 OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.