Path: blob/master/arch/m68k/include/asm/bootinfo.h
10820 views
/*1** asm/bootinfo.h -- Definition of the Linux/m68k boot information structure2**3** Copyright 1992 by Greg Harp4**5** This file is subject to the terms and conditions of the GNU General Public6** License. See the file COPYING in the main directory of this archive7** for more details.8**9** Created 09/29/92 by Greg Harp10**11** 5/2/94 Roman Hodek:12** Added bi_atari part of the machine dependent union bi_un; for now it13** contains just a model field to distinguish between TT and Falcon.14** 26/7/96 Roman Zippel:15** Renamed to setup.h; added some useful macros to allow gcc some16** optimizations if possible.17** 5/10/96 Geert Uytterhoeven:18** Redesign of the boot information structure; renamed to bootinfo.h again19** 27/11/96 Geert Uytterhoeven:20** Backwards compatibility with bootinfo interface version 1.021*/2223#ifndef _M68K_BOOTINFO_H24#define _M68K_BOOTINFO_H252627/*28* Bootinfo definitions29*30* This is an easily parsable and extendable structure containing all31* information to be passed from the bootstrap to the kernel.32*33* This way I hope to keep all future changes back/forewards compatible.34* Thus, keep your fingers crossed...35*36* This structure is copied right after the kernel bss by the bootstrap37* routine.38*/3940#ifndef __ASSEMBLY__4142struct bi_record {43unsigned short tag; /* tag ID */44unsigned short size; /* size of record (in bytes) */45unsigned long data[0]; /* data */46};4748#endif /* __ASSEMBLY__ */495051/*52* Tag Definitions53*54* Machine independent tags start counting from 0x000055* Machine dependent tags start counting from 0x800056*/5758#define BI_LAST 0x0000 /* last record (sentinel) */59#define BI_MACHTYPE 0x0001 /* machine type (u_long) */60#define BI_CPUTYPE 0x0002 /* cpu type (u_long) */61#define BI_FPUTYPE 0x0003 /* fpu type (u_long) */62#define BI_MMUTYPE 0x0004 /* mmu type (u_long) */63#define BI_MEMCHUNK 0x0005 /* memory chunk address and size */64/* (struct mem_info) */65#define BI_RAMDISK 0x0006 /* ramdisk address and size */66/* (struct mem_info) */67#define BI_COMMAND_LINE 0x0007 /* kernel command line parameters */68/* (string) */6970/*71* Amiga-specific tags72*/7374#define BI_AMIGA_MODEL 0x8000 /* model (u_long) */75#define BI_AMIGA_AUTOCON 0x8001 /* AutoConfig device */76/* (struct ConfigDev) */77#define BI_AMIGA_CHIP_SIZE 0x8002 /* size of Chip RAM (u_long) */78#define BI_AMIGA_VBLANK 0x8003 /* VBLANK frequency (u_char) */79#define BI_AMIGA_PSFREQ 0x8004 /* power supply frequency (u_char) */80#define BI_AMIGA_ECLOCK 0x8005 /* EClock frequency (u_long) */81#define BI_AMIGA_CHIPSET 0x8006 /* native chipset present (u_long) */82#define BI_AMIGA_SERPER 0x8007 /* serial port period (u_short) */8384/*85* Atari-specific tags86*/8788#define BI_ATARI_MCH_COOKIE 0x8000 /* _MCH cookie from TOS (u_long) */89#define BI_ATARI_MCH_TYPE 0x8001 /* special machine type (u_long) */90/* (values are ATARI_MACH_* defines */9192/* mch_cookie values (upper word) */93#define ATARI_MCH_ST 094#define ATARI_MCH_STE 195#define ATARI_MCH_TT 296#define ATARI_MCH_FALCON 39798/* mch_type values */99#define ATARI_MACH_NORMAL 0 /* no special machine type */100#define ATARI_MACH_MEDUSA 1 /* Medusa 040 */101#define ATARI_MACH_HADES 2 /* Hades 040 or 060 */102#define ATARI_MACH_AB40 3 /* Afterburner040 on Falcon */103104/*105* VME-specific tags106*/107108#define BI_VME_TYPE 0x8000 /* VME sub-architecture (u_long) */109#define BI_VME_BRDINFO 0x8001 /* VME board information (struct) */110111/* BI_VME_TYPE codes */112#define VME_TYPE_TP34V 0x0034 /* Tadpole TP34V */113#define VME_TYPE_MVME147 0x0147 /* Motorola MVME147 */114#define VME_TYPE_MVME162 0x0162 /* Motorola MVME162 */115#define VME_TYPE_MVME166 0x0166 /* Motorola MVME166 */116#define VME_TYPE_MVME167 0x0167 /* Motorola MVME167 */117#define VME_TYPE_MVME172 0x0172 /* Motorola MVME172 */118#define VME_TYPE_MVME177 0x0177 /* Motorola MVME177 */119#define VME_TYPE_BVME4000 0x4000 /* BVM Ltd. BVME4000 */120#define VME_TYPE_BVME6000 0x6000 /* BVM Ltd. BVME6000 */121122/* BI_VME_BRDINFO is a 32 byte struct as returned by the Bug code on123* Motorola VME boards. Contains board number, Bug version, board124* configuration options, etc. See include/asm/mvme16xhw.h for details.125*/126127128/*129* Macintosh-specific tags (all u_long)130*/131132#define BI_MAC_MODEL 0x8000 /* Mac Gestalt ID (model type) */133#define BI_MAC_VADDR 0x8001 /* Mac video base address */134#define BI_MAC_VDEPTH 0x8002 /* Mac video depth */135#define BI_MAC_VROW 0x8003 /* Mac video rowbytes */136#define BI_MAC_VDIM 0x8004 /* Mac video dimensions */137#define BI_MAC_VLOGICAL 0x8005 /* Mac video logical base */138#define BI_MAC_SCCBASE 0x8006 /* Mac SCC base address */139#define BI_MAC_BTIME 0x8007 /* Mac boot time */140#define BI_MAC_GMTBIAS 0x8008 /* Mac GMT timezone offset */141#define BI_MAC_MEMSIZE 0x8009 /* Mac RAM size (sanity check) */142#define BI_MAC_CPUID 0x800a /* Mac CPU type (sanity check) */143#define BI_MAC_ROMBASE 0x800b /* Mac system ROM base address */144145/*146* Macintosh hardware profile data - unused, see macintosh.h for147* reasonable type values148*/149150#define BI_MAC_VIA1BASE 0x8010 /* Mac VIA1 base address (always present) */151#define BI_MAC_VIA2BASE 0x8011 /* Mac VIA2 base address (type varies) */152#define BI_MAC_VIA2TYPE 0x8012 /* Mac VIA2 type (VIA, RBV, OSS) */153#define BI_MAC_ADBTYPE 0x8013 /* Mac ADB interface type */154#define BI_MAC_ASCBASE 0x8014 /* Mac Apple Sound Chip base address */155#define BI_MAC_SCSI5380 0x8015 /* Mac NCR 5380 SCSI (base address, multi) */156#define BI_MAC_SCSIDMA 0x8016 /* Mac SCSI DMA (base address) */157#define BI_MAC_SCSI5396 0x8017 /* Mac NCR 53C96 SCSI (base address, multi) */158#define BI_MAC_IDETYPE 0x8018 /* Mac IDE interface type */159#define BI_MAC_IDEBASE 0x8019 /* Mac IDE interface base address */160#define BI_MAC_NUBUS 0x801a /* Mac Nubus type (none, regular, pseudo) */161#define BI_MAC_SLOTMASK 0x801b /* Mac Nubus slots present */162#define BI_MAC_SCCTYPE 0x801c /* Mac SCC serial type (normal, IOP) */163#define BI_MAC_ETHTYPE 0x801d /* Mac builtin ethernet type (Sonic, MACE */164#define BI_MAC_ETHBASE 0x801e /* Mac builtin ethernet base address */165#define BI_MAC_PMU 0x801f /* Mac power management / poweroff hardware */166#define BI_MAC_IOP_SWIM 0x8020 /* Mac SWIM floppy IOP */167#define BI_MAC_IOP_ADB 0x8021 /* Mac ADB IOP */168169/*170* Mac: compatibility with old booter data format (temporarily)171* Fields unused with the new bootinfo can be deleted now; instead of172* adding new fields the struct might be splitted into a hardware address173* part and a hardware type part174*/175176#ifndef __ASSEMBLY__177178struct mac_booter_data179{180unsigned long videoaddr;181unsigned long videorow;182unsigned long videodepth;183unsigned long dimensions;184unsigned long args;185unsigned long boottime;186unsigned long gmtbias;187unsigned long bootver;188unsigned long videological;189unsigned long sccbase;190unsigned long id;191unsigned long memsize;192unsigned long serialmf;193unsigned long serialhsk;194unsigned long serialgpi;195unsigned long printmf;196unsigned long printhsk;197unsigned long printgpi;198unsigned long cpuid;199unsigned long rombase;200unsigned long adbdelay;201unsigned long timedbra;202};203204extern struct mac_booter_data205mac_bi_data;206207#endif208209/*210* Apollo-specific tags211*/212213#define BI_APOLLO_MODEL 0x8000 /* model (u_long) */214215/*216* HP300-specific tags217*/218219#define BI_HP300_MODEL 0x8000 /* model (u_long) */220#define BI_HP300_UART_SCODE 0x8001 /* UART select code (u_long) */221#define BI_HP300_UART_ADDR 0x8002 /* phys. addr of UART (u_long) */222223/*224* Stuff for bootinfo interface versioning225*226* At the start of kernel code, a 'struct bootversion' is located.227* bootstrap checks for a matching version of the interface before booting228* a kernel, to avoid user confusion if kernel and bootstrap don't work229* together :-)230*231* If incompatible changes are made to the bootinfo interface, the major232* number below should be stepped (and the minor reset to 0) for the233* appropriate machine. If a change is backward-compatible, the minor234* should be stepped. "Backwards-compatible" means that booting will work,235* but certain features may not.236*/237238#define BOOTINFOV_MAGIC 0x4249561A /* 'BIV^Z' */239#define MK_BI_VERSION(major,minor) (((major)<<16)+(minor))240#define BI_VERSION_MAJOR(v) (((v) >> 16) & 0xffff)241#define BI_VERSION_MINOR(v) ((v) & 0xffff)242243#ifndef __ASSEMBLY__244245struct bootversion {246unsigned short branch;247unsigned long magic;248struct {249unsigned long machtype;250unsigned long version;251} machversions[0];252};253254#endif /* __ASSEMBLY__ */255256#define AMIGA_BOOTI_VERSION MK_BI_VERSION( 2, 0 )257#define ATARI_BOOTI_VERSION MK_BI_VERSION( 2, 1 )258#define MAC_BOOTI_VERSION MK_BI_VERSION( 2, 0 )259#define MVME147_BOOTI_VERSION MK_BI_VERSION( 2, 0 )260#define MVME16x_BOOTI_VERSION MK_BI_VERSION( 2, 0 )261#define BVME6000_BOOTI_VERSION MK_BI_VERSION( 2, 0 )262#define Q40_BOOTI_VERSION MK_BI_VERSION( 2, 0 )263#define HP300_BOOTI_VERSION MK_BI_VERSION( 2, 0 )264265#ifdef BOOTINFO_COMPAT_1_0266267/*268* Backwards compatibility with bootinfo interface version 1.0269*/270271#define COMPAT_AMIGA_BOOTI_VERSION MK_BI_VERSION( 1, 0 )272#define COMPAT_ATARI_BOOTI_VERSION MK_BI_VERSION( 1, 0 )273#define COMPAT_MAC_BOOTI_VERSION MK_BI_VERSION( 1, 0 )274275#include <linux/zorro.h>276277#define COMPAT_NUM_AUTO 16278279struct compat_bi_Amiga {280int model;281int num_autocon;282struct ConfigDev autocon[COMPAT_NUM_AUTO];283unsigned long chip_size;284unsigned char vblank;285unsigned char psfreq;286unsigned long eclock;287unsigned long chipset;288unsigned long hw_present;289};290291struct compat_bi_Atari {292unsigned long hw_present;293unsigned long mch_cookie;294};295296#ifndef __ASSEMBLY__297298struct compat_bi_Macintosh299{300unsigned long videoaddr;301unsigned long videorow;302unsigned long videodepth;303unsigned long dimensions;304unsigned long args;305unsigned long boottime;306unsigned long gmtbias;307unsigned long bootver;308unsigned long videological;309unsigned long sccbase;310unsigned long id;311unsigned long memsize;312unsigned long serialmf;313unsigned long serialhsk;314unsigned long serialgpi;315unsigned long printmf;316unsigned long printhsk;317unsigned long printgpi;318unsigned long cpuid;319unsigned long rombase;320unsigned long adbdelay;321unsigned long timedbra;322};323324#endif325326struct compat_mem_info {327unsigned long addr;328unsigned long size;329};330331#define COMPAT_NUM_MEMINFO 4332333#define COMPAT_CPUB_68020 0334#define COMPAT_CPUB_68030 1335#define COMPAT_CPUB_68040 2336#define COMPAT_CPUB_68060 3337#define COMPAT_FPUB_68881 5338#define COMPAT_FPUB_68882 6339#define COMPAT_FPUB_68040 7340#define COMPAT_FPUB_68060 8341342#define COMPAT_CPU_68020 (1<<COMPAT_CPUB_68020)343#define COMPAT_CPU_68030 (1<<COMPAT_CPUB_68030)344#define COMPAT_CPU_68040 (1<<COMPAT_CPUB_68040)345#define COMPAT_CPU_68060 (1<<COMPAT_CPUB_68060)346#define COMPAT_CPU_MASK (31)347#define COMPAT_FPU_68881 (1<<COMPAT_FPUB_68881)348#define COMPAT_FPU_68882 (1<<COMPAT_FPUB_68882)349#define COMPAT_FPU_68040 (1<<COMPAT_FPUB_68040)350#define COMPAT_FPU_68060 (1<<COMPAT_FPUB_68060)351#define COMPAT_FPU_MASK (0xfe0)352353#define COMPAT_CL_SIZE (256)354355struct compat_bootinfo {356unsigned long machtype;357unsigned long cputype;358struct compat_mem_info memory[COMPAT_NUM_MEMINFO];359int num_memory;360unsigned long ramdisk_size;361unsigned long ramdisk_addr;362char command_line[COMPAT_CL_SIZE];363union {364struct compat_bi_Amiga bi_ami;365struct compat_bi_Atari bi_ata;366struct compat_bi_Macintosh bi_mac;367} bi_un;368};369370#define bi_amiga bi_un.bi_ami371#define bi_atari bi_un.bi_ata372#define bi_mac bi_un.bi_mac373374#endif /* BOOTINFO_COMPAT_1_0 */375376377#endif /* _M68K_BOOTINFO_H */378379380