1 /* 2 * asm/bootinfo.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 11 #ifndef _UAPI_ASM_M68K_BOOTINFO_H 12 #define _UAPI_ASM_M68K_BOOTINFO_H 13 14 #include <linux/types.h> 15 16 17 #ifndef __ASSEMBLY__ 18 19 /* 20 * Bootinfo definitions 21 * 22 * This is an easily parsable and extendable structure containing all 23 * information to be passed from the bootstrap to the kernel. 24 * 25 * This way I hope to keep all future changes back/forewards compatible. 26 * Thus, keep your fingers crossed... 27 * 28 * This structure is copied right after the kernel by the bootstrap 29 * routine. 30 */ 31 32 struct bi_record { 33 unsigned short tag; /* tag ID */ 34 unsigned short size; /* size of record (in bytes) */ 35 unsigned long data[0]; /* data */ 36 }; 37 38 #endif /* __ASSEMBLY__ */ 39 40 41 /* 42 * Tag Definitions 43 * 44 * Machine independent tags start counting from 0x0000 45 * Machine dependent tags start counting from 0x8000 46 */ 47 48 #define BI_LAST 0x0000 /* last record (sentinel) */ 49 #define BI_MACHTYPE 0x0001 /* machine type (u_long) */ 50 #define BI_CPUTYPE 0x0002 /* cpu type (u_long) */ 51 #define BI_FPUTYPE 0x0003 /* fpu type (u_long) */ 52 #define BI_MMUTYPE 0x0004 /* mmu type (u_long) */ 53 #define BI_MEMCHUNK 0x0005 /* memory chunk address and size */ 54 /* (struct mem_info) */ 55 #define BI_RAMDISK 0x0006 /* ramdisk address and size */ 56 /* (struct mem_info) */ 57 #define BI_COMMAND_LINE 0x0007 /* kernel command line parameters */ 58 /* (string) */ 59 60 61 /* 62 * Stuff for bootinfo interface versioning 63 * 64 * At the start of kernel code, a 'struct bootversion' is located. 65 * bootstrap checks for a matching version of the interface before booting 66 * a kernel, to avoid user confusion if kernel and bootstrap don't work 67 * together :-) 68 * 69 * If incompatible changes are made to the bootinfo interface, the major 70 * number below should be stepped (and the minor reset to 0) for the 71 * appropriate machine. If a change is backward-compatible, the minor 72 * should be stepped. "Backwards-compatible" means that booting will work, 73 * but certain features may not. 74 */ 75 76 #define BOOTINFOV_MAGIC 0x4249561A /* 'BIV^Z' */ 77 #define MK_BI_VERSION(major, minor) (((major) << 16) + (minor)) 78 #define BI_VERSION_MAJOR(v) (((v) >> 16) & 0xffff) 79 #define BI_VERSION_MINOR(v) ((v) & 0xffff) 80 81 #ifndef __ASSEMBLY__ 82 83 struct bootversion { 84 unsigned short branch; 85 unsigned long magic; 86 struct { 87 unsigned long machtype; 88 unsigned long version; 89 } machversions[0]; 90 } __packed; 91 92 #endif /* __ASSEMBLY__ */ 93 94 95 #endif /* _UAPI_ASM_M68K_BOOTINFO_H */ 96