]> git.zerfleddert.de Git - linexec-j720/blame - setup.h
Initial import of xdadeveloper linexec sources
[linexec-j720] / setup.h
CommitLineData
77a37381 1/*\r
2 * linux/include/asm/setup.h\r
3 *\r
4 * Copyright (C) 1997-1999 Russell King\r
5 *\r
6 * This program is free software; you can redistribute it and/or modify\r
7 * it under the terms of the GNU General Public License version 2 as\r
8 * published by the Free Software Foundation.\r
9 *\r
10 * Structure passed to kernel to tell it about the\r
11 * hardware it's running on. See linux/Documentation/arm/Setup\r
12 * for more info.\r
13 *\r
14 * NOTE:\r
15 * This file contains two ways to pass information from the boot\r
16 * loader to the kernel. The old struct param_struct is deprecated,\r
17 * but it will be kept in the kernel for 5 years from now\r
18 * (2001). This will allow boot loaders to convert to the new struct\r
19 * tag way.\r
20 */\r
21#ifndef __ASMARM_SETUP_H\r
22#define __ASMARM_SETUP_H\r\r
23\r\r
24#define u32 UINT32\r\r
25#define u16 UINT16\r\r
26#define u8 UINT8\r\r
27\r
28\r
29/*#ifndef CONFIG_ACCEPT_GPL\r
30#error This file covered by GPL but CONFIG_ACCEPT_GPL undefined.\r
31#endif*/\r
32\r
33/*\r
34 * Usage:\r
35 * - do not go blindly adding fields, add them at the end\r
36 * - when adding fields, don't rely on the address until\r
37 * a patch from me has been released\r
38 * - unused fields should be zero (for future expansion)\r
39 * - this structure is relatively short-lived - only\r
40 * guaranteed to contain useful data in setup_arch()\r
41 */\r
42#define COMMAND_LINE_SIZE 1024\r
43\r
44/* This is the old deprecated way to pass parameters to the kernel */\r
45struct param_struct {\r
46 union {\r
47 struct {\r
48 unsigned long page_size; /* 0 */\r
49 unsigned long nr_pages; /* 4 */\r
50 unsigned long ramdisk_size; /* 8 */\r
51 unsigned long flags; /* 12 */\r
52#define FLAG_READONLY 1\r
53#define FLAG_RDLOAD 4\r
54#define FLAG_RDPROMPT 8\r
55 unsigned long rootdev; /* 16 */\r
56 unsigned long video_num_cols; /* 20 */\r
57 unsigned long video_num_rows; /* 24 */\r
58 unsigned long video_x; /* 28 */\r
59 unsigned long video_y; /* 32 */\r
60 unsigned long memc_control_reg; /* 36 */\r
61 unsigned char sounddefault; /* 40 */\r
62 unsigned char adfsdrives; /* 41 */\r
63 unsigned char bytes_per_char_h; /* 42 */\r
64 unsigned char bytes_per_char_v; /* 43 */\r
65 unsigned long pages_in_bank[4]; /* 44 */\r
66 unsigned long pages_in_vram; /* 60 */\r
67 unsigned long initrd_start; /* 64 */\r
68 unsigned long initrd_size; /* 68 */\r
69 unsigned long rd_start; /* 72 */\r
70 unsigned long system_rev; /* 76 */\r
71 unsigned long system_serial_low; /* 80 */\r
72 unsigned long system_serial_high; /* 84 */\r
73 unsigned long mem_fclk_21285; /* 88 */\r
74 } s;\r
75 char unused[256];\r
76 } u1;\r
77 union {\r
78 char paths[8][128];\r
79 struct {\r
80 unsigned long magic;\r
81 char n[1024 - sizeof(unsigned long)];\r
82 } s;\r
83 } u2;\r
84 char commandline[COMMAND_LINE_SIZE];\r
85};\r
86\r
87\r
88\r
89/*\r
90 * The new way of passing information: a list of tagged entries\r
91 */\r
92\r
93/* The list ends with an ATAG_NONE node. */\r
94#define ATAG_NONE 0x00000000\r
95\r
96struct tag_header {\r
97 u32 size;\r
98 u32 tag;\r
99};\r
100\r
101/* The list must start with an ATAG_CORE node */\r
102#define ATAG_CORE 0x54410001\r
103\r
104struct tag_core {\r
105 u32 flags; /* bit 0 = read-only */\r
106 u32 pagesize;\r
107 u32 rootdev;\r
108};\r
109\r
110/* it is allowed to have multiple ATAG_MEM nodes */\r
111#define ATAG_MEM 0x54410002\r
112\r
113struct tag_mem32 {\r
114 u32 size;\r
115 u32 start; /* physical start address */\r
116};\r
117\r
118/* VGA text type displays */\r
119#define ATAG_VIDEOTEXT 0x54410003\r
120\r
121struct tag_videotext {\r
122 u8 x;\r
123 u8 y;\r
124 u16 video_page;\r
125 u8 video_mode;\r
126 u8 video_cols;\r
127 u16 video_ega_bx;\r
128 u8 video_lines;\r
129 u8 video_isvga;\r
130 u16 video_points;\r
131};\r
132\r
133/* describes how the ramdisk will be used in kernel */\r
134#define ATAG_RAMDISK 0x54410004\r
135\r
136struct tag_ramdisk {\r
137 u32 flags; /* bit 0 = load, bit 1 = prompt */\r
138 u32 size; /* decompressed ramdisk size in _kilo_ bytes */\r
139 u32 start; /* starting block of floppy-based RAM disk image */\r
140};\r
141\r
142/* describes where the compressed ramdisk image lives */\r
143#define ATAG_INITRD 0x54410005\r\r
144\r\r
145#define ATAG_INITRD2 0x54420005\r
146\r
147struct tag_initrd {\r
148 u32 start; /* physical start address */\r
149 u32 size; /* size of compressed ramdisk image in bytes */\r
150};\r
151\r
152/* board serial number. "64 bits should be enough for everybody" */\r
153#define ATAG_SERIAL 0x54410006\r
154\r
155struct tag_serialnr {\r
156 u32 low;\r
157 u32 high;\r
158};\r
159\r
160/* board revision */\r
161#define ATAG_REVISION 0x54410007\r
162\r
163struct tag_revision {\r
164 u32 rev;\r
165};\r
166\r
167/* initial values for vesafb-type framebuffers. see struct screen_info\r
168 * in include/linux/tty.h\r
169 */\r
170#define ATAG_VIDEOLFB 0x54410008\r
171\r
172struct tag_videolfb {\r
173 u16 lfb_width;\r
174 u16 lfb_height;\r
175 u16 lfb_depth;\r
176 u16 lfb_linelength;\r
177 u32 lfb_base;\r
178 u32 lfb_size;\r
179 u8 red_size;\r
180 u8 red_pos;\r
181 u8 green_size;\r
182 u8 green_pos;\r
183 u8 blue_size;\r
184 u8 blue_pos;\r
185 u8 rsvd_size;\r
186 u8 rsvd_pos;\r
187};\r
188\r
189/* command line: \0 terminated string */\r
190#define ATAG_CMDLINE 0x54410009\r
191\r
192struct tag_cmdline {\r
193 char cmdline[1]; /* this is the minimum size */\r
194};\r
195\r
196/* acorn RiscPC specific information */\r
197#define ATAG_ACORN 0x41000101\r
198\r
199struct tag_acorn {\r
200 u32 memc_control_reg;\r
201 u32 vram_pages;\r
202 u8 sounddefault;\r
203 u8 adfsdrives;\r
204};\r
205\r
206#define ATAG_PTABLE 0x53410001\r
207\r
208/* footbridge memory clock, see arch/arm/mach-footbridge/arch.c */\r
209#define ATAG_MEMCLK 0x41000402\r
210\r
211struct tag_memclk {\r
212 u32 fmemclk;\r
213};\r
214\r
215struct tag {\r
216 struct tag_header hdr;\r
217 union {\r
218 struct tag_core core;\r
219 struct tag_mem32 mem;\r
220 struct tag_videotext videotext;\r
221 struct tag_ramdisk ramdisk;\r
222 struct tag_initrd initrd;\r
223 struct tag_serialnr serialnr;\r
224 struct tag_revision revision;\r
225 struct tag_videolfb videolfb;\r
226 struct tag_cmdline cmdline;\r
227// struct tag_ptable ptable; \r
228\r
229 /*\r
230 * Acorn specific\r
231 */\r
232 struct tag_acorn acorn;\r
233\r
234 /*\r
235 * DC21285 specific\r
236 */\r
237 struct tag_memclk memclk;\r
238 \r
239 } u;\r
240};\r
241\r
242struct tagtable {\r
243 u32 tag;\r
244 int (*parse)(const struct tag *);\r
245};\r
246\r
247#define __tag __attribute__((unused, __section__(".taglist")))\r
248#define __tagtable(tag, fn) \\r
249static struct tagtable __tagtable_##fn __tag = { tag, fn }\r
250\r
251#define tag_member_present(tag,member) \\r
252 ((unsigned long)(&((struct tag *)0L)->member + 1) \\r
253 <= (tag)->hdr.size * 4)\r
254\r
255#define tag_next(t) ((struct tag *)((u32 *)(t) + (t)->hdr.size))\r
256#define tag_size(type) ((sizeof(struct tag_header) + sizeof(struct type)) >> 2)\r
257\r
258#define for_each_tag(t,base) \\r
259 for (t = base; t->hdr.size; t = tag_next(t))\r
260\r
261/*\r
262 * Memory map description\r
263 */\r
264#define NR_BANKS 8\r
265\r
266struct meminfo {\r
267 int nr_banks;\r
268 unsigned long end;\r
269 struct {\r
270 unsigned long start;\r
271 unsigned long size;\r
272 int node;\r
273 } bank[NR_BANKS];\r
274};\r
275\r
276extern struct meminfo meminfo;\r
277\r
278#endif\r
Impressum, Datenschutz