aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGeert Uytterhoeven <geert@linux-m68k.org>2013-10-02 05:37:33 -0400
committerGeert Uytterhoeven <geert@linux-m68k.org>2013-11-26 05:09:15 -0500
commit4c3c522bcebe16a717d7a809fd14b11823794027 (patch)
tree3417a4d63d0b2a56da3111aa6278c177f8ceaee3
parent4edf07fd8f6520bea292384a3638088ccbfdcaa1 (diff)
m68k/UAPI: Disintegrate arch/m68k/include/asm/bootinfo.h
Export the bootinfo definitions that are used by bootstrap loaders, and split them up in generic and platform-specific parts. Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org>
-rw-r--r--arch/m68k/amiga/config.c1
-rw-r--r--arch/m68k/apollo/config.c1
-rw-r--r--arch/m68k/atari/config.c1
-rw-r--r--arch/m68k/bvme6000/config.c1
-rw-r--r--arch/m68k/hp300/config.c1
-rw-r--r--arch/m68k/include/asm/atarihw.h2
-rw-r--r--arch/m68k/include/asm/bootinfo.h213
-rw-r--r--arch/m68k/include/uapi/asm/Kbuild8
-rw-r--r--arch/m68k/include/uapi/asm/bootinfo-amiga.h31
-rw-r--r--arch/m68k/include/uapi/asm/bootinfo-apollo.h16
-rw-r--r--arch/m68k/include/uapi/asm/bootinfo-atari.h44
-rw-r--r--arch/m68k/include/uapi/asm/bootinfo-hp300.h25
-rw-r--r--arch/m68k/include/uapi/asm/bootinfo-mac.h59
-rw-r--r--arch/m68k/include/uapi/asm/bootinfo-q40.h16
-rw-r--r--arch/m68k/include/uapi/asm/bootinfo-vme.h46
-rw-r--r--arch/m68k/include/uapi/asm/bootinfo.h95
-rw-r--r--arch/m68k/kernel/head.S6
-rw-r--r--arch/m68k/mac/config.c1
-rw-r--r--arch/m68k/mvme147/config.c1
-rw-r--r--arch/m68k/mvme16x/config.c1
20 files changed, 356 insertions, 213 deletions
diff --git a/arch/m68k/amiga/config.c b/arch/m68k/amiga/config.c
index 65b5e937ebba..0c92c1baf9bf 100644
--- a/arch/m68k/amiga/config.c
+++ b/arch/m68k/amiga/config.c
@@ -28,6 +28,7 @@
28#include <linux/keyboard.h> 28#include <linux/keyboard.h>
29 29
30#include <asm/bootinfo.h> 30#include <asm/bootinfo.h>
31#include <asm/bootinfo-amiga.h>
31#include <asm/byteorder.h> 32#include <asm/byteorder.h>
32#include <asm/setup.h> 33#include <asm/setup.h>
33#include <asm/pgtable.h> 34#include <asm/pgtable.h>
diff --git a/arch/m68k/apollo/config.c b/arch/m68k/apollo/config.c
index 2bdde9685a29..c90c19e904bc 100644
--- a/arch/m68k/apollo/config.c
+++ b/arch/m68k/apollo/config.c
@@ -10,6 +10,7 @@
10 10
11#include <asm/setup.h> 11#include <asm/setup.h>
12#include <asm/bootinfo.h> 12#include <asm/bootinfo.h>
13#include <asm/bootinfo-apollo.h>
13#include <asm/pgtable.h> 14#include <asm/pgtable.h>
14#include <asm/apollohw.h> 15#include <asm/apollohw.h>
15#include <asm/irq.h> 16#include <asm/irq.h>
diff --git a/arch/m68k/atari/config.c b/arch/m68k/atari/config.c
index fb2d0bd9b3ad..9159195505d5 100644
--- a/arch/m68k/atari/config.c
+++ b/arch/m68k/atari/config.c
@@ -37,6 +37,7 @@
37#include <linux/module.h> 37#include <linux/module.h>
38 38
39#include <asm/bootinfo.h> 39#include <asm/bootinfo.h>
40#include <asm/bootinfo-atari.h>
40#include <asm/setup.h> 41#include <asm/setup.h>
41#include <asm/atarihw.h> 42#include <asm/atarihw.h>
42#include <asm/atariints.h> 43#include <asm/atariints.h>
diff --git a/arch/m68k/bvme6000/config.c b/arch/m68k/bvme6000/config.c
index 1b9e31e0130f..4d1b403822fa 100644
--- a/arch/m68k/bvme6000/config.c
+++ b/arch/m68k/bvme6000/config.c
@@ -28,6 +28,7 @@
28#include <linux/bcd.h> 28#include <linux/bcd.h>
29 29
30#include <asm/bootinfo.h> 30#include <asm/bootinfo.h>
31#include <asm/bootinfo-vme.h>
31#include <asm/pgtable.h> 32#include <asm/pgtable.h>
32#include <asm/setup.h> 33#include <asm/setup.h>
33#include <asm/irq.h> 34#include <asm/irq.h>
diff --git a/arch/m68k/hp300/config.c b/arch/m68k/hp300/config.c
index b7609f791522..892d0794fc0b 100644
--- a/arch/m68k/hp300/config.c
+++ b/arch/m68k/hp300/config.c
@@ -14,6 +14,7 @@
14#include <linux/console.h> 14#include <linux/console.h>
15 15
16#include <asm/bootinfo.h> 16#include <asm/bootinfo.h>
17#include <asm/bootinfo-hp300.h>
17#include <asm/machdep.h> 18#include <asm/machdep.h>
18#include <asm/blinken.h> 19#include <asm/blinken.h>
19#include <asm/io.h> /* readb() and writeb() */ 20#include <asm/io.h> /* readb() and writeb() */
diff --git a/arch/m68k/include/asm/atarihw.h b/arch/m68k/include/asm/atarihw.h
index d887050e6da6..972c8f33f055 100644
--- a/arch/m68k/include/asm/atarihw.h
+++ b/arch/m68k/include/asm/atarihw.h
@@ -21,7 +21,7 @@
21#define _LINUX_ATARIHW_H_ 21#define _LINUX_ATARIHW_H_
22 22
23#include <linux/types.h> 23#include <linux/types.h>
24#include <asm/bootinfo.h> 24#include <asm/bootinfo-atari.h>
25#include <asm/raw_io.h> 25#include <asm/raw_io.h>
26 26
27extern u_long atari_mch_cookie; 27extern u_long atari_mch_cookie;
diff --git a/arch/m68k/include/asm/bootinfo.h b/arch/m68k/include/asm/bootinfo.h
index 908c42f91e6a..9edc31893fb8 100644
--- a/arch/m68k/include/asm/bootinfo.h
+++ b/arch/m68k/include/asm/bootinfo.h
@@ -6,222 +6,11 @@
6** This file is subject to the terms and conditions of the GNU General Public 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 7** License. See the file COPYING in the main directory of this archive
8** for more details. 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 dependent union bi_un; for now it
14** contains just a model field to distinguish between TT and Falcon.
15** 26/7/96 Roman Zippel:
16** Renamed to setup.h; added some useful macros to allow gcc some
17** optimizations if possible.
18** 5/10/96 Geert Uytterhoeven:
19** Redesign of the boot information structure; renamed to bootinfo.h again
20** 27/11/96 Geert Uytterhoeven:
21** Backwards compatibility with bootinfo interface version 1.0
22*/ 9*/
23 10
24#ifndef _M68K_BOOTINFO_H 11#ifndef _M68K_BOOTINFO_H
25#define _M68K_BOOTINFO_H 12#define _M68K_BOOTINFO_H
26 13
27 14#include <uapi/asm/bootinfo.h>
28 /*
29 * Bootinfo definitions
30 *
31 * This is an easily parsable and extendable structure containing all
32 * information to be passed from the bootstrap to the kernel.
33 *
34 * This way I hope to keep all future changes back/forewards compatible.
35 * Thus, keep your fingers crossed...
36 *
37 * This structure is copied right after the kernel by the bootstrap
38 * routine.
39 */
40
41#ifndef __ASSEMBLY__
42
43struct bi_record {
44 unsigned short tag; /* tag ID */
45 unsigned short size; /* size of record (in bytes) */
46 unsigned long data[0]; /* data */
47};
48
49#endif /* __ASSEMBLY__ */
50
51
52 /*
53 * Tag Definitions
54 *
55 * Machine independent tags start counting from 0x0000
56 * Machine dependent tags start counting from 0x8000
57 */
58
59#define BI_LAST 0x0000 /* last record (sentinel) */
60#define BI_MACHTYPE 0x0001 /* machine type (u_long) */
61#define BI_CPUTYPE 0x0002 /* cpu type (u_long) */
62#define BI_FPUTYPE 0x0003 /* fpu type (u_long) */
63#define BI_MMUTYPE 0x0004 /* mmu type (u_long) */
64#define BI_MEMCHUNK 0x0005 /* memory chunk address and size */
65 /* (struct mem_info) */
66#define BI_RAMDISK 0x0006 /* ramdisk address and size */
67 /* (struct mem_info) */
68#define BI_COMMAND_LINE 0x0007 /* kernel command line parameters */
69 /* (string) */
70
71 /*
72 * Amiga-specific tags
73 */
74
75#define BI_AMIGA_MODEL 0x8000 /* model (u_long) */
76#define BI_AMIGA_AUTOCON 0x8001 /* AutoConfig device */
77 /* (struct ConfigDev) */
78#define BI_AMIGA_CHIP_SIZE 0x8002 /* size of Chip RAM (u_long) */
79#define BI_AMIGA_VBLANK 0x8003 /* VBLANK frequency (u_char) */
80#define BI_AMIGA_PSFREQ 0x8004 /* power supply frequency (u_char) */
81#define BI_AMIGA_ECLOCK 0x8005 /* EClock frequency (u_long) */
82#define BI_AMIGA_CHIPSET 0x8006 /* native chipset present (u_long) */
83#define BI_AMIGA_SERPER 0x8007 /* serial port period (u_short) */
84
85 /*
86 * Atari-specific tags
87 */
88
89#define BI_ATARI_MCH_COOKIE 0x8000 /* _MCH cookie from TOS (u_long) */
90#define BI_ATARI_MCH_TYPE 0x8001 /* special machine type (u_long) */
91 /* (values are ATARI_MACH_* defines */
92
93/* mch_cookie values (upper word) */
94#define ATARI_MCH_ST 0
95#define ATARI_MCH_STE 1
96#define ATARI_MCH_TT 2
97#define ATARI_MCH_FALCON 3
98
99/* mch_type values */
100#define ATARI_MACH_NORMAL 0 /* no special machine type */
101#define ATARI_MACH_MEDUSA 1 /* Medusa 040 */
102#define ATARI_MACH_HADES 2 /* Hades 040 or 060 */
103#define ATARI_MACH_AB40 3 /* Afterburner040 on Falcon */
104
105 /*
106 * VME-specific tags
107 */
108
109#define BI_VME_TYPE 0x8000 /* VME sub-architecture (u_long) */
110#define BI_VME_BRDINFO 0x8001 /* VME board information (struct) */
111
112/* BI_VME_TYPE codes */
113#define VME_TYPE_TP34V 0x0034 /* Tadpole TP34V */
114#define VME_TYPE_MVME147 0x0147 /* Motorola MVME147 */
115#define VME_TYPE_MVME162 0x0162 /* Motorola MVME162 */
116#define VME_TYPE_MVME166 0x0166 /* Motorola MVME166 */
117#define VME_TYPE_MVME167 0x0167 /* Motorola MVME167 */
118#define VME_TYPE_MVME172 0x0172 /* Motorola MVME172 */
119#define VME_TYPE_MVME177 0x0177 /* Motorola MVME177 */
120#define VME_TYPE_BVME4000 0x4000 /* BVM Ltd. BVME4000 */
121#define VME_TYPE_BVME6000 0x6000 /* BVM Ltd. BVME6000 */
122
123/* BI_VME_BRDINFO is a 32 byte struct as returned by the Bug code on
124 * Motorola VME boards. Contains board number, Bug version, board
125 * configuration options, etc. See include/asm/mvme16xhw.h for details.
126 */
127
128
129 /*
130 * Macintosh-specific tags (all u_long)
131 */
132
133#define BI_MAC_MODEL 0x8000 /* Mac Gestalt ID (model type) */
134#define BI_MAC_VADDR 0x8001 /* Mac video base address */
135#define BI_MAC_VDEPTH 0x8002 /* Mac video depth */
136#define BI_MAC_VROW 0x8003 /* Mac video rowbytes */
137#define BI_MAC_VDIM 0x8004 /* Mac video dimensions */
138#define BI_MAC_VLOGICAL 0x8005 /* Mac video logical base */
139#define BI_MAC_SCCBASE 0x8006 /* Mac SCC base address */
140#define BI_MAC_BTIME 0x8007 /* Mac boot time */
141#define BI_MAC_GMTBIAS 0x8008 /* Mac GMT timezone offset */
142#define BI_MAC_MEMSIZE 0x8009 /* Mac RAM size (sanity check) */
143#define BI_MAC_CPUID 0x800a /* Mac CPU type (sanity check) */
144#define BI_MAC_ROMBASE 0x800b /* Mac system ROM base address */
145
146 /*
147 * Macintosh hardware profile data - unused, see macintosh.h for
148 * reasonable type values
149 */
150
151#define BI_MAC_VIA1BASE 0x8010 /* Mac VIA1 base address (always present) */
152#define BI_MAC_VIA2BASE 0x8011 /* Mac VIA2 base address (type varies) */
153#define BI_MAC_VIA2TYPE 0x8012 /* Mac VIA2 type (VIA, RBV, OSS) */
154#define BI_MAC_ADBTYPE 0x8013 /* Mac ADB interface type */
155#define BI_MAC_ASCBASE 0x8014 /* Mac Apple Sound Chip base address */
156#define BI_MAC_SCSI5380 0x8015 /* Mac NCR 5380 SCSI (base address, multi) */
157#define BI_MAC_SCSIDMA 0x8016 /* Mac SCSI DMA (base address) */
158#define BI_MAC_SCSI5396 0x8017 /* Mac NCR 53C96 SCSI (base address, multi) */
159#define BI_MAC_IDETYPE 0x8018 /* Mac IDE interface type */
160#define BI_MAC_IDEBASE 0x8019 /* Mac IDE interface base address */
161#define BI_MAC_NUBUS 0x801a /* Mac Nubus type (none, regular, pseudo) */
162#define BI_MAC_SLOTMASK 0x801b /* Mac Nubus slots present */
163#define BI_MAC_SCCTYPE 0x801c /* Mac SCC serial type (normal, IOP) */
164#define BI_MAC_ETHTYPE 0x801d /* Mac builtin ethernet type (Sonic, MACE */
165#define BI_MAC_ETHBASE 0x801e /* Mac builtin ethernet base address */
166#define BI_MAC_PMU 0x801f /* Mac power management / poweroff hardware */
167#define BI_MAC_IOP_SWIM 0x8020 /* Mac SWIM floppy IOP */
168#define BI_MAC_IOP_ADB 0x8021 /* Mac ADB IOP */
169
170
171 /*
172 * Apollo-specific tags
173 */
174
175#define BI_APOLLO_MODEL 0x8000 /* model (u_long) */
176
177 /*
178 * HP300-specific tags
179 */
180
181#define BI_HP300_MODEL 0x8000 /* model (u_long) */
182#define BI_HP300_UART_SCODE 0x8001 /* UART select code (u_long) */
183#define BI_HP300_UART_ADDR 0x8002 /* phys. addr of UART (u_long) */
184
185 /*
186 * Stuff for bootinfo interface versioning
187 *
188 * At the start of kernel code, a 'struct bootversion' is located.
189 * bootstrap checks for a matching version of the interface before booting
190 * a kernel, to avoid user confusion if kernel and bootstrap don't work
191 * together :-)
192 *
193 * If incompatible changes are made to the bootinfo interface, the major
194 * number below should be stepped (and the minor reset to 0) for the
195 * appropriate machine. If a change is backward-compatible, the minor
196 * should be stepped. "Backwards-compatible" means that booting will work,
197 * but certain features may not.
198 */
199
200#define BOOTINFOV_MAGIC 0x4249561A /* 'BIV^Z' */
201#define MK_BI_VERSION(major,minor) (((major)<<16)+(minor))
202#define BI_VERSION_MAJOR(v) (((v) >> 16) & 0xffff)
203#define BI_VERSION_MINOR(v) ((v) & 0xffff)
204
205#ifndef __ASSEMBLY__
206
207struct bootversion {
208 unsigned short branch;
209 unsigned long magic;
210 struct {
211 unsigned long machtype;
212 unsigned long version;
213 } machversions[0];
214};
215
216#endif /* __ASSEMBLY__ */
217
218#define AMIGA_BOOTI_VERSION MK_BI_VERSION( 2, 0 )
219#define ATARI_BOOTI_VERSION MK_BI_VERSION( 2, 1 )
220#define MAC_BOOTI_VERSION MK_BI_VERSION( 2, 0 )
221#define MVME147_BOOTI_VERSION MK_BI_VERSION( 2, 0 )
222#define MVME16x_BOOTI_VERSION MK_BI_VERSION( 2, 0 )
223#define BVME6000_BOOTI_VERSION MK_BI_VERSION( 2, 0 )
224#define Q40_BOOTI_VERSION MK_BI_VERSION( 2, 0 )
225#define HP300_BOOTI_VERSION MK_BI_VERSION( 2, 0 )
226 15
227#endif /* _M68K_BOOTINFO_H */ 16#endif /* _M68K_BOOTINFO_H */
diff --git a/arch/m68k/include/uapi/asm/Kbuild b/arch/m68k/include/uapi/asm/Kbuild
index 1fef45ada097..6a2d257bdfb2 100644
--- a/arch/m68k/include/uapi/asm/Kbuild
+++ b/arch/m68k/include/uapi/asm/Kbuild
@@ -11,6 +11,14 @@ generic-y += termbits.h
11generic-y += termios.h 11generic-y += termios.h
12 12
13header-y += a.out.h 13header-y += a.out.h
14header-y += bootinfo.h
15header-y += bootinfo-amiga.h
16header-y += bootinfo-apollo.h
17header-y += bootinfo-atari.h
18header-y += bootinfo-hp300.h
19header-y += bootinfo-mac.h
20header-y += bootinfo-q40.h
21header-y += bootinfo-vme.h
14header-y += byteorder.h 22header-y += byteorder.h
15header-y += cachectl.h 23header-y += cachectl.h
16header-y += fcntl.h 24header-y += fcntl.h
diff --git a/arch/m68k/include/uapi/asm/bootinfo-amiga.h b/arch/m68k/include/uapi/asm/bootinfo-amiga.h
new file mode 100644
index 000000000000..2c32d671f232
--- /dev/null
+++ b/arch/m68k/include/uapi/asm/bootinfo-amiga.h
@@ -0,0 +1,31 @@
1/*
2** asm/bootinfo-amiga.h -- Amiga-specific boot information definitions
3*/
4
5#ifndef _UAPI_ASM_M68K_BOOTINFO_AMIGA_H
6#define _UAPI_ASM_M68K_BOOTINFO_AMIGA_H
7
8
9 /*
10 * Amiga-specific tags
11 */
12
13#define BI_AMIGA_MODEL 0x8000 /* model (u_long) */
14#define BI_AMIGA_AUTOCON 0x8001 /* AutoConfig device */
15 /* (AmigaOS struct ConfigDev) */
16#define BI_AMIGA_CHIP_SIZE 0x8002 /* size of Chip RAM (u_long) */
17#define BI_AMIGA_VBLANK 0x8003 /* VBLANK frequency (u_char) */
18#define BI_AMIGA_PSFREQ 0x8004 /* power supply frequency (u_char) */
19#define BI_AMIGA_ECLOCK 0x8005 /* EClock frequency (u_long) */
20#define BI_AMIGA_CHIPSET 0x8006 /* native chipset present (u_long) */
21#define BI_AMIGA_SERPER 0x8007 /* serial port period (u_short) */
22
23
24 /*
25 * Latest Amiga bootinfo version
26 */
27
28#define AMIGA_BOOTI_VERSION MK_BI_VERSION(2, 0)
29
30
31#endif /* _UAPI_ASM_M68K_BOOTINFO_AMIGA_H */
diff --git a/arch/m68k/include/uapi/asm/bootinfo-apollo.h b/arch/m68k/include/uapi/asm/bootinfo-apollo.h
new file mode 100644
index 000000000000..3a2051e822b0
--- /dev/null
+++ b/arch/m68k/include/uapi/asm/bootinfo-apollo.h
@@ -0,0 +1,16 @@
1/*
2** asm/bootinfo-apollo.h -- Apollo-specific boot information definitions
3*/
4
5#ifndef _UAPI_ASM_M68K_BOOTINFO_APOLLO_H
6#define _UAPI_ASM_M68K_BOOTINFO_APOLLO_H
7
8
9 /*
10 * Apollo-specific tags
11 */
12
13#define BI_APOLLO_MODEL 0x8000 /* model (u_long) */
14
15
16#endif /* _UAPI_ASM_M68K_BOOTINFO_APOLLO_H */
diff --git a/arch/m68k/include/uapi/asm/bootinfo-atari.h b/arch/m68k/include/uapi/asm/bootinfo-atari.h
new file mode 100644
index 000000000000..cca0a83fc0e5
--- /dev/null
+++ b/arch/m68k/include/uapi/asm/bootinfo-atari.h
@@ -0,0 +1,44 @@
1/*
2** asm/bootinfo-atari.h -- Atari-specific boot information definitions
3*/
4
5#ifndef _UAPI_ASM_M68K_BOOTINFO_ATARI_H
6#define _UAPI_ASM_M68K_BOOTINFO_ATARI_H
7
8
9 /*
10 * Atari-specific tags
11 */
12
13#define BI_ATARI_MCH_COOKIE 0x8000 /* _MCH cookie from TOS (u_long) */
14#define BI_ATARI_MCH_TYPE 0x8001 /* special machine type (u_long) */
15
16
17 /*
18 * mch_cookie values (upper word of BI_ATARI_MCH_COOKIE)
19 */
20
21#define ATARI_MCH_ST 0
22#define ATARI_MCH_STE 1
23#define ATARI_MCH_TT 2
24#define ATARI_MCH_FALCON 3
25
26
27 /*
28 * Atari machine types (BI_ATARI_MCH_TYPE)
29 */
30
31#define ATARI_MACH_NORMAL 0 /* no special machine type */
32#define ATARI_MACH_MEDUSA 1 /* Medusa 040 */
33#define ATARI_MACH_HADES 2 /* Hades 040 or 060 */
34#define ATARI_MACH_AB40 3 /* Afterburner040 on Falcon */
35
36
37 /*
38 * Latest Atari bootinfo version
39 */
40
41#define ATARI_BOOTI_VERSION MK_BI_VERSION(2, 1)
42
43
44#endif /* _UAPI_ASM_M68K_BOOTINFO_ATARI_H */
diff --git a/arch/m68k/include/uapi/asm/bootinfo-hp300.h b/arch/m68k/include/uapi/asm/bootinfo-hp300.h
new file mode 100644
index 000000000000..e7ed19cdafe5
--- /dev/null
+++ b/arch/m68k/include/uapi/asm/bootinfo-hp300.h
@@ -0,0 +1,25 @@
1/*
2** asm/bootinfo-hp300.h -- HP9000/300-specific boot information definitions
3*/
4
5#ifndef _UAPI_ASM_M68K_BOOTINFO_HP300_H
6#define _UAPI_ASM_M68K_BOOTINFO_HP300_H
7
8
9 /*
10 * HP9000/300-specific tags
11 */
12
13#define BI_HP300_MODEL 0x8000 /* model (u_long) */
14#define BI_HP300_UART_SCODE 0x8001 /* UART select code (u_long) */
15#define BI_HP300_UART_ADDR 0x8002 /* phys. addr of UART (u_long) */
16
17
18 /*
19 * Latest HP9000/300 bootinfo version
20 */
21
22#define HP300_BOOTI_VERSION MK_BI_VERSION(2, 0)
23
24
25#endif /* _UAPI_ASM_M68K_BOOTINFO_HP300_H */
diff --git a/arch/m68k/include/uapi/asm/bootinfo-mac.h b/arch/m68k/include/uapi/asm/bootinfo-mac.h
new file mode 100644
index 000000000000..d4ef2115c8f9
--- /dev/null
+++ b/arch/m68k/include/uapi/asm/bootinfo-mac.h
@@ -0,0 +1,59 @@
1/*
2** asm/bootinfo-mac.h -- Macintosh-specific boot information definitions
3*/
4
5#ifndef _UAPI_ASM_M68K_BOOTINFO_MAC_H
6#define _UAPI_ASM_M68K_BOOTINFO_MAC_H
7
8
9 /*
10 * Macintosh-specific tags (all u_long)
11 */
12
13#define BI_MAC_MODEL 0x8000 /* Mac Gestalt ID (model type) */
14#define BI_MAC_VADDR 0x8001 /* Mac video base address */
15#define BI_MAC_VDEPTH 0x8002 /* Mac video depth */
16#define BI_MAC_VROW 0x8003 /* Mac video rowbytes */
17#define BI_MAC_VDIM 0x8004 /* Mac video dimensions */
18#define BI_MAC_VLOGICAL 0x8005 /* Mac video logical base */
19#define BI_MAC_SCCBASE 0x8006 /* Mac SCC base address */
20#define BI_MAC_BTIME 0x8007 /* Mac boot time */
21#define BI_MAC_GMTBIAS 0x8008 /* Mac GMT timezone offset */
22#define BI_MAC_MEMSIZE 0x8009 /* Mac RAM size (sanity check) */
23#define BI_MAC_CPUID 0x800a /* Mac CPU type (sanity check) */
24#define BI_MAC_ROMBASE 0x800b /* Mac system ROM base address */
25
26
27 /*
28 * Macintosh hardware profile data - unused, see macintosh.h for
29 * reasonable type values
30 */
31
32#define BI_MAC_VIA1BASE 0x8010 /* Mac VIA1 base address (always present) */
33#define BI_MAC_VIA2BASE 0x8011 /* Mac VIA2 base address (type varies) */
34#define BI_MAC_VIA2TYPE 0x8012 /* Mac VIA2 type (VIA, RBV, OSS) */
35#define BI_MAC_ADBTYPE 0x8013 /* Mac ADB interface type */
36#define BI_MAC_ASCBASE 0x8014 /* Mac Apple Sound Chip base address */
37#define BI_MAC_SCSI5380 0x8015 /* Mac NCR 5380 SCSI (base address, multi) */
38#define BI_MAC_SCSIDMA 0x8016 /* Mac SCSI DMA (base address) */
39#define BI_MAC_SCSI5396 0x8017 /* Mac NCR 53C96 SCSI (base address, multi) */
40#define BI_MAC_IDETYPE 0x8018 /* Mac IDE interface type */
41#define BI_MAC_IDEBASE 0x8019 /* Mac IDE interface base address */
42#define BI_MAC_NUBUS 0x801a /* Mac Nubus type (none, regular, pseudo) */
43#define BI_MAC_SLOTMASK 0x801b /* Mac Nubus slots present */
44#define BI_MAC_SCCTYPE 0x801c /* Mac SCC serial type (normal, IOP) */
45#define BI_MAC_ETHTYPE 0x801d /* Mac builtin ethernet type (Sonic, MACE */
46#define BI_MAC_ETHBASE 0x801e /* Mac builtin ethernet base address */
47#define BI_MAC_PMU 0x801f /* Mac power management / poweroff hardware */
48#define BI_MAC_IOP_SWIM 0x8020 /* Mac SWIM floppy IOP */
49#define BI_MAC_IOP_ADB 0x8021 /* Mac ADB IOP */
50
51
52 /*
53 * Latest Macintosh bootinfo version
54 */
55
56#define MAC_BOOTI_VERSION MK_BI_VERSION(2, 0)
57
58
59#endif /* _UAPI_ASM_M68K_BOOTINFO_MAC_H */
diff --git a/arch/m68k/include/uapi/asm/bootinfo-q40.h b/arch/m68k/include/uapi/asm/bootinfo-q40.h
new file mode 100644
index 000000000000..c79fea7e555b
--- /dev/null
+++ b/arch/m68k/include/uapi/asm/bootinfo-q40.h
@@ -0,0 +1,16 @@
1/*
2** asm/bootinfo-q40.h -- Q40-specific boot information definitions
3*/
4
5#ifndef _UAPI_ASM_M68K_BOOTINFO_Q40_H
6#define _UAPI_ASM_M68K_BOOTINFO_Q40_H
7
8
9 /*
10 * Latest Q40 bootinfo version
11 */
12
13#define Q40_BOOTI_VERSION MK_BI_VERSION(2, 0)
14
15
16#endif /* _UAPI_ASM_M68K_BOOTINFO_Q40_H */
diff --git a/arch/m68k/include/uapi/asm/bootinfo-vme.h b/arch/m68k/include/uapi/asm/bootinfo-vme.h
new file mode 100644
index 000000000000..4643a55ed768
--- /dev/null
+++ b/arch/m68k/include/uapi/asm/bootinfo-vme.h
@@ -0,0 +1,46 @@
1/*
2** asm/bootinfo-vme.h -- VME-specific boot information definitions
3*/
4
5#ifndef _UAPI_ASM_M68K_BOOTINFO_VME_H
6#define _UAPI_ASM_M68K_BOOTINFO_VME_H
7
8
9 /*
10 * VME-specific tags
11 */
12
13#define BI_VME_TYPE 0x8000 /* VME sub-architecture (u_long) */
14#define BI_VME_BRDINFO 0x8001 /* VME board information (struct) */
15
16
17 /*
18 * VME models (BI_VME_TYPE)
19 */
20
21#define VME_TYPE_TP34V 0x0034 /* Tadpole TP34V */
22#define VME_TYPE_MVME147 0x0147 /* Motorola MVME147 */
23#define VME_TYPE_MVME162 0x0162 /* Motorola MVME162 */
24#define VME_TYPE_MVME166 0x0166 /* Motorola MVME166 */
25#define VME_TYPE_MVME167 0x0167 /* Motorola MVME167 */
26#define VME_TYPE_MVME172 0x0172 /* Motorola MVME172 */
27#define VME_TYPE_MVME177 0x0177 /* Motorola MVME177 */
28#define VME_TYPE_BVME4000 0x4000 /* BVM Ltd. BVME4000 */
29#define VME_TYPE_BVME6000 0x6000 /* BVM Ltd. BVME6000 */
30
31/* BI_VME_BRDINFO is a 32 byte struct as returned by the Bug code on
32 * Motorola VME boards. Contains board number, Bug version, board
33 * configuration options, etc. See include/asm/mvme16xhw.h for details.
34 */
35
36
37 /*
38 * Latest VME bootinfo versions
39 */
40
41#define MVME147_BOOTI_VERSION MK_BI_VERSION(2, 0)
42#define MVME16x_BOOTI_VERSION MK_BI_VERSION(2, 0)
43#define BVME6000_BOOTI_VERSION MK_BI_VERSION(2, 0)
44
45
46#endif /* _UAPI_ASM_M68K_BOOTINFO_VME_H */
diff --git a/arch/m68k/include/uapi/asm/bootinfo.h b/arch/m68k/include/uapi/asm/bootinfo.h
new file mode 100644
index 000000000000..74a6fae2a5bf
--- /dev/null
+++ b/arch/m68k/include/uapi/asm/bootinfo.h
@@ -0,0 +1,95 @@
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
32struct 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
83struct 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 */
diff --git a/arch/m68k/kernel/head.S b/arch/m68k/kernel/head.S
index 28f817481f3b..7d7913f5dce3 100644
--- a/arch/m68k/kernel/head.S
+++ b/arch/m68k/kernel/head.S
@@ -257,6 +257,12 @@
257#include <linux/linkage.h> 257#include <linux/linkage.h>
258#include <linux/init.h> 258#include <linux/init.h>
259#include <asm/bootinfo.h> 259#include <asm/bootinfo.h>
260#include <asm/bootinfo-amiga.h>
261#include <asm/bootinfo-atari.h>
262#include <asm/bootinfo-hp300.h>
263#include <asm/bootinfo-mac.h>
264#include <asm/bootinfo-q40.h>
265#include <asm/bootinfo-vme.h>
260#include <asm/setup.h> 266#include <asm/setup.h>
261#include <asm/entry.h> 267#include <asm/entry.h>
262#include <asm/pgtable.h> 268#include <asm/pgtable.h>
diff --git a/arch/m68k/mac/config.c b/arch/m68k/mac/config.c
index 677244e0371c..e48069da04ed 100644
--- a/arch/m68k/mac/config.c
+++ b/arch/m68k/mac/config.c
@@ -28,6 +28,7 @@
28 28
29#include <asm/setup.h> 29#include <asm/setup.h>
30#include <asm/bootinfo.h> 30#include <asm/bootinfo.h>
31#include <asm/bootinfo-mac.h>
31 32
32#include <asm/io.h> 33#include <asm/io.h>
33#include <asm/irq.h> 34#include <asm/irq.h>
diff --git a/arch/m68k/mvme147/config.c b/arch/m68k/mvme147/config.c
index 5c99154c67c8..3a1d47564e52 100644
--- a/arch/m68k/mvme147/config.c
+++ b/arch/m68k/mvme147/config.c
@@ -26,6 +26,7 @@
26#include <linux/interrupt.h> 26#include <linux/interrupt.h>
27 27
28#include <asm/bootinfo.h> 28#include <asm/bootinfo.h>
29#include <asm/bootinfo-vme.h>
29#include <asm/pgtable.h> 30#include <asm/pgtable.h>
30#include <asm/setup.h> 31#include <asm/setup.h>
31#include <asm/irq.h> 32#include <asm/irq.h>
diff --git a/arch/m68k/mvme16x/config.c b/arch/m68k/mvme16x/config.c
index 60d8a1bc837d..e05994fd048c 100644
--- a/arch/m68k/mvme16x/config.c
+++ b/arch/m68k/mvme16x/config.c
@@ -29,6 +29,7 @@
29#include <linux/module.h> 29#include <linux/module.h>
30 30
31#include <asm/bootinfo.h> 31#include <asm/bootinfo.h>
32#include <asm/bootinfo-vme.h>
32#include <asm/pgtable.h> 33#include <asm/pgtable.h>
33#include <asm/setup.h> 34#include <asm/setup.h>
34#include <asm/irq.h> 35#include <asm/irq.h>