Path: blob/master/arch/m68k/include/uapi/asm/bootinfo.h
26495 views
/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */1/*2* asm/bootinfo.h -- Definition of the Linux/m68k boot information structure3*4* Copyright 1992 by Greg Harp5*6* This file is subject to the terms and conditions of the GNU General Public7* License. See the file COPYING in the main directory of this archive8* for more details.9*/1011#ifndef _UAPI_ASM_M68K_BOOTINFO_H12#define _UAPI_ASM_M68K_BOOTINFO_H131415#include <linux/types.h>161718#ifndef __ASSEMBLER__1920/*21* Bootinfo definitions22*23* This is an easily parsable and extendable structure containing all24* information to be passed from the bootstrap to the kernel.25*26* This way I hope to keep all future changes back/forewards compatible.27* Thus, keep your fingers crossed...28*29* This structure is copied right after the kernel by the bootstrap30* routine.31*/3233struct bi_record {34__be16 tag; /* tag ID */35__be16 size; /* size of record (in bytes) */36__be32 data[]; /* data */37};383940struct mem_info {41__be32 addr; /* physical address of memory chunk */42__be32 size; /* length of memory chunk (in bytes) */43};4445#endif /* __ASSEMBLER__ */464748/*49* Tag Definitions50*51* Machine independent tags start counting from 0x000052* Machine dependent tags start counting from 0x800053*/5455#define BI_LAST 0x0000 /* last record (sentinel) */56#define BI_MACHTYPE 0x0001 /* machine type (__be32) */57#define BI_CPUTYPE 0x0002 /* cpu type (__be32) */58#define BI_FPUTYPE 0x0003 /* fpu type (__be32) */59#define BI_MMUTYPE 0x0004 /* mmu type (__be32) */60#define BI_MEMCHUNK 0x0005 /* memory chunk address and size */61/* (struct mem_info) */62#define BI_RAMDISK 0x0006 /* ramdisk address and size */63/* (struct mem_info) */64#define BI_COMMAND_LINE 0x0007 /* kernel command line parameters */65/* (string) */66/*67* A random seed used to initialize the RNG. Record format:68*69* - length [ 2 bytes, 16-bit big endian ]70* - seed data [ `length` bytes, padded to preserve 4-byte struct alignment ]71*/72#define BI_RNG_SEED 0x0008737475/*76* Linux/m68k Architectures (BI_MACHTYPE)77*/7879#define MACH_AMIGA 180#define MACH_ATARI 281#define MACH_MAC 382#define MACH_APOLLO 483#define MACH_SUN3 584#define MACH_MVME147 685#define MACH_MVME16x 786#define MACH_BVME6000 887#define MACH_HP300 988#define MACH_Q40 1089#define MACH_SUN3X 1190#define MACH_M54XX 1291#define MACH_M5441X 1392#define MACH_VIRT 14939495/*96* CPU, FPU and MMU types (BI_CPUTYPE, BI_FPUTYPE, BI_MMUTYPE)97*98* Note: we may rely on the following equalities:99*100* CPU_68020 == MMU_68851101* CPU_68030 == MMU_68030102* CPU_68040 == FPU_68040 == MMU_68040103* CPU_68060 == FPU_68060 == MMU_68060104*/105106#define CPUB_68020 0107#define CPUB_68030 1108#define CPUB_68040 2109#define CPUB_68060 3110#define CPUB_COLDFIRE 4111112#define CPU_68020 (1 << CPUB_68020)113#define CPU_68030 (1 << CPUB_68030)114#define CPU_68040 (1 << CPUB_68040)115#define CPU_68060 (1 << CPUB_68060)116#define CPU_COLDFIRE (1 << CPUB_COLDFIRE)117118#define FPUB_68881 0119#define FPUB_68882 1120#define FPUB_68040 2 /* Internal FPU */121#define FPUB_68060 3 /* Internal FPU */122#define FPUB_SUNFPA 4 /* Sun-3 FPA */123#define FPUB_COLDFIRE 5 /* ColdFire FPU */124125#define FPU_68881 (1 << FPUB_68881)126#define FPU_68882 (1 << FPUB_68882)127#define FPU_68040 (1 << FPUB_68040)128#define FPU_68060 (1 << FPUB_68060)129#define FPU_SUNFPA (1 << FPUB_SUNFPA)130#define FPU_COLDFIRE (1 << FPUB_COLDFIRE)131132#define MMUB_68851 0133#define MMUB_68030 1 /* Internal MMU */134#define MMUB_68040 2 /* Internal MMU */135#define MMUB_68060 3 /* Internal MMU */136#define MMUB_APOLLO 4 /* Custom Apollo */137#define MMUB_SUN3 5 /* Custom Sun-3 */138#define MMUB_COLDFIRE 6 /* Internal MMU */139140#define MMU_68851 (1 << MMUB_68851)141#define MMU_68030 (1 << MMUB_68030)142#define MMU_68040 (1 << MMUB_68040)143#define MMU_68060 (1 << MMUB_68060)144#define MMU_SUN3 (1 << MMUB_SUN3)145#define MMU_APOLLO (1 << MMUB_APOLLO)146#define MMU_COLDFIRE (1 << MMUB_COLDFIRE)147148149/*150* Stuff for bootinfo interface versioning151*152* At the start of kernel code, a 'struct bootversion' is located.153* bootstrap checks for a matching version of the interface before booting154* a kernel, to avoid user confusion if kernel and bootstrap don't work155* together :-)156*157* If incompatible changes are made to the bootinfo interface, the major158* number below should be stepped (and the minor reset to 0) for the159* appropriate machine. If a change is backward-compatible, the minor160* should be stepped. "Backwards-compatible" means that booting will work,161* but certain features may not.162*/163164#define BOOTINFOV_MAGIC 0x4249561A /* 'BIV^Z' */165#define MK_BI_VERSION(major, minor) (((major) << 16) + (minor))166#define BI_VERSION_MAJOR(v) (((v) >> 16) & 0xffff)167#define BI_VERSION_MINOR(v) ((v) & 0xffff)168169#ifndef __ASSEMBLER__170171struct bootversion {172__be16 branch;173__be32 magic;174struct {175__be32 machtype;176__be32 version;177} machversions[];178} __packed;179180#endif /* __ASSEMBLER__ */181182183#endif /* _UAPI_ASM_M68K_BOOTINFO_H */184185186