root/include/asm-m68k/bootinfo.h

/* [previous][next][first][last][top][bottom][index][help] */

INCLUDED FROM


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

/* [previous][next][first][last][top][bottom][index][help] */