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

Subversion Repositories or1k_old

[/] [or1k_old/] [trunk/] [rc203soc/] [sw/] [uClinux/] [include/] [asm-m68k/] [bootinfo.h] - Blame information for rev 1782

Details | Compare with Previous | View Log

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

powered by: WebSVN 2.1.0

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