1 /* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */ 2 /* 3 * asm/bootinfo.h -- Definition of the Linux/m68k boot information structure 4 * 5 * Copyright 1992 by Greg Harp 6 * 7 * This file is subject to the terms and conditions of the GNU General Public 8 * License. See the file COPYING in the main directory of this archive 9 * for more details. 10 */ 11 12 #ifndef _UAPI_ASM_M68K_BOOTINFO_H 13 #define _UAPI_ASM_M68K_BOOTINFO_H 14 15 16 #include <linux/types.h> 17 18 19 #ifndef __ASSEMBLY__ 20 21 /* 22 * Bootinfo definitions 23 * 24 * This is an easily parsable and extendable structure containing all 25 * information to be passed from the bootstrap to the kernel. 26 * 27 * This way I hope to keep all future changes back/forewards compatible. 28 * Thus, keep your fingers crossed... 29 * 30 * This structure is copied right after the kernel by the bootstrap 31 * routine. 32 */ 33 34 struct bi_record { 35 __be16 tag; /* tag ID */ 36 __be16 size; /* size of record (in bytes) */ 37 __be32 data[]; /* data */ 38 }; 39 40 41 struct mem_info { 42 __be32 addr; /* physical address of memory chunk */ 43 __be32 size; /* length of memory chunk (in bytes) */ 44 }; 45 46 #endif /* __ASSEMBLY__ */ 47 48 49 /* 50 * Tag Definitions 51 * 52 * Machine independent tags start counting from 0x0000 53 * Machine dependent tags start counting from 0x8000 54 */ 55 56 #define BI_LAST 0x0000 /* last record (sentinel) */ 57 #define BI_MACHTYPE 0x0001 /* machine type (__be32) */ 58 #define BI_CPUTYPE 0x0002 /* cpu type (__be32) */ 59 #define BI_FPUTYPE 0x0003 /* fpu type (__be32) */ 60 #define BI_MMUTYPE 0x0004 /* mmu type (__be32) */ 61 #define BI_MEMCHUNK 0x0005 /* memory chunk address and size */ 62 /* (struct mem_info) */ 63 #define BI_RAMDISK 0x0006 /* ramdisk address and size */ 64 /* (struct mem_info) */ 65 #define BI_COMMAND_LINE 0x0007 /* kernel command line parameters */ 66 /* (string) */ 67 /* 68 * A random seed used to initialize the RNG. Record format: 69 * 70 * - length [ 2 bytes, 16-bit big endian ] 71 * - seed data [ `length` bytes, padded to preserve 4-byte struct alignment ] 72 */ 73 #define BI_RNG_SEED 0x0008 74 75 76 /* 77 * Linux/m68k Architectures (BI_MACHTYPE) 78 */ 79 80 #define MACH_AMIGA 1 81 #define MACH_ATARI 2 82 #define MACH_MAC 3 83 #define MACH_APOLLO 4 84 #define MACH_SUN3 5 85 #define MACH_MVME147 6 86 #define MACH_MVME16x 7 87 #define MACH_BVME6000 8 88 #define MACH_HP300 9 89 #define MACH_Q40 10 90 #define MACH_SUN3X 11 91 #define MACH_M54XX 12 92 #define MACH_M5441X 13 93 #define MACH_VIRT 14 94 95 96 /* 97 * CPU, FPU and MMU types (BI_CPUTYPE, BI_FPUTYPE, BI_MMUTYPE) 98 * 99 * Note: we may rely on the following equalities: 100 * 101 * CPU_68020 == MMU_68851 102 * CPU_68030 == MMU_68030 103 * CPU_68040 == FPU_68040 == MMU_68040 104 * CPU_68060 == FPU_68060 == MMU_68060 105 */ 106 107 #define CPUB_68020 0 108 #define CPUB_68030 1 109 #define CPUB_68040 2 110 #define CPUB_68060 3 111 #define CPUB_COLDFIRE 4 112 113 #define CPU_68020 (1 << CPUB_68020) 114 #define CPU_68030 (1 << CPUB_68030) 115 #define CPU_68040 (1 << CPUB_68040) 116 #define CPU_68060 (1 << CPUB_68060) 117 #define CPU_COLDFIRE (1 << CPUB_COLDFIRE) 118 119 #define FPUB_68881 0 120 #define FPUB_68882 1 121 #define FPUB_68040 2 /* Internal FPU */ 122 #define FPUB_68060 3 /* Internal FPU */ 123 #define FPUB_SUNFPA 4 /* Sun-3 FPA */ 124 #define FPUB_COLDFIRE 5 /* ColdFire FPU */ 125 126 #define FPU_68881 (1 << FPUB_68881) 127 #define FPU_68882 (1 << FPUB_68882) 128 #define FPU_68040 (1 << FPUB_68040) 129 #define FPU_68060 (1 << FPUB_68060) 130 #define FPU_SUNFPA (1 << FPUB_SUNFPA) 131 #define FPU_COLDFIRE (1 << FPUB_COLDFIRE) 132 133 #define MMUB_68851 0 134 #define MMUB_68030 1 /* Internal MMU */ 135 #define MMUB_68040 2 /* Internal MMU */ 136 #define MMUB_68060 3 /* Internal MMU */ 137 #define MMUB_APOLLO 4 /* Custom Apollo */ 138 #define MMUB_SUN3 5 /* Custom Sun-3 */ 139 #define MMUB_COLDFIRE 6 /* Internal MMU */ 140 141 #define MMU_68851 (1 << MMUB_68851) 142 #define MMU_68030 (1 << MMUB_68030) 143 #define MMU_68040 (1 << MMUB_68040) 144 #define MMU_68060 (1 << MMUB_68060) 145 #define MMU_SUN3 (1 << MMUB_SUN3) 146 #define MMU_APOLLO (1 << MMUB_APOLLO) 147 #define MMU_COLDFIRE (1 << MMUB_COLDFIRE) 148 149 150 /* 151 * Stuff for bootinfo interface versioning 152 * 153 * At the start of kernel code, a 'struct bootversion' is located. 154 * bootstrap checks for a matching version of the interface before booting 155 * a kernel, to avoid user confusion if kernel and bootstrap don't work 156 * together :-) 157 * 158 * If incompatible changes are made to the bootinfo interface, the major 159 * number below should be stepped (and the minor reset to 0) for the 160 * appropriate machine. If a change is backward-compatible, the minor 161 * should be stepped. "Backwards-compatible" means that booting will work, 162 * but certain features may not. 163 */ 164 165 #define BOOTINFOV_MAGIC 0x4249561A /* 'BIV^Z' */ 166 #define MK_BI_VERSION(major, minor) (((major) << 16) + (minor)) 167 #define BI_VERSION_MAJOR(v) (((v) >> 16) & 0xffff) 168 #define BI_VERSION_MINOR(v) ((v) & 0xffff) 169 170 #ifndef __ASSEMBLY__ 171 172 struct bootversion { 173 __be16 branch; 174 __be32 magic; 175 struct { 176 __be32 machtype; 177 __be32 version; 178 } machversions[]; 179 } __packed; 180 181 #endif /* __ASSEMBLY__ */ 182 183 184 #endif /* _UAPI_ASM_M68K_BOOTINFO_H */ 185
Linux® is a registered trademark of Linus Torvalds in the United States and other countries.
TOMOYO® is a registered trademark of NTT DATA CORPORATION.