1
2
3
4
5
6
7
8
9
10
11
12
13
14
15 #ifndef _UAPI__ASMARM_SETUP_H
16 #define _UAPI__ASMARM_SETUP_H
17
18 #include <linux/types.h>
19
20 #define COMMAND_LINE_SIZE 1024
21
22
23 #define ATAG_NONE 0x00000000
24
25 struct tag_header {
26 __u32 size;
27 __u32 tag;
28 };
29
30
31 #define ATAG_CORE 0x54410001
32
33 struct tag_core {
34 __u32 flags;
35 __u32 pagesize;
36 __u32 rootdev;
37 };
38
39
40 #define ATAG_MEM 0x54410002
41
42 struct tag_mem32 {
43 __u32 size;
44 __u32 start;
45 };
46
47
48 #define ATAG_VIDEOTEXT 0x54410003
49
50 struct tag_videotext {
51 __u8 x;
52 __u8 y;
53 __u16 video_page;
54 __u8 video_mode;
55 __u8 video_cols;
56 __u16 video_ega_bx;
57 __u8 video_lines;
58 __u8 video_isvga;
59 __u16 video_points;
60 };
61
62
63 #define ATAG_RAMDISK 0x54410004
64
65 struct tag_ramdisk {
66 __u32 flags;
67 __u32 size;
68 __u32 start;
69 };
70
71
72
73
74
75
76 #define ATAG_INITRD 0x54410005
77
78
79 #define ATAG_INITRD2 0x54420005
80
81 struct tag_initrd {
82 __u32 start;
83 __u32 size;
84 };
85
86
87 #define ATAG_SERIAL 0x54410006
88
89 struct tag_serialnr {
90 __u32 low;
91 __u32 high;
92 };
93
94
95 #define ATAG_REVISION 0x54410007
96
97 struct tag_revision {
98 __u32 rev;
99 };
100
101
102
103
104 #define ATAG_VIDEOLFB 0x54410008
105
106 struct tag_videolfb {
107 __u16 lfb_width;
108 __u16 lfb_height;
109 __u16 lfb_depth;
110 __u16 lfb_linelength;
111 __u32 lfb_base;
112 __u32 lfb_size;
113 __u8 red_size;
114 __u8 red_pos;
115 __u8 green_size;
116 __u8 green_pos;
117 __u8 blue_size;
118 __u8 blue_pos;
119 __u8 rsvd_size;
120 __u8 rsvd_pos;
121 };
122
123
124 #define ATAG_CMDLINE 0x54410009
125
126 struct tag_cmdline {
127 char cmdline[1];
128 };
129
130
131 #define ATAG_ACORN 0x41000101
132
133 struct tag_acorn {
134 __u32 memc_control_reg;
135 __u32 vram_pages;
136 __u8 sounddefault;
137 __u8 adfsdrives;
138 };
139
140
141 #define ATAG_MEMCLK 0x41000402
142
143 struct tag_memclk {
144 __u32 fmemclk;
145 };
146
147 struct tag {
148 struct tag_header hdr;
149 union {
150 struct tag_core core;
151 struct tag_mem32 mem;
152 struct tag_videotext videotext;
153 struct tag_ramdisk ramdisk;
154 struct tag_initrd initrd;
155 struct tag_serialnr serialnr;
156 struct tag_revision revision;
157 struct tag_videolfb videolfb;
158 struct tag_cmdline cmdline;
159
160
161
162
163 struct tag_acorn acorn;
164
165
166
167
168 struct tag_memclk memclk;
169 } u;
170 };
171
172 struct tagtable {
173 __u32 tag;
174 int (*parse)(const struct tag *);
175 };
176
177 #define tag_member_present(tag,member) \
178 ((unsigned long)(&((struct tag *)0L)->member + 1) \
179 <= (tag)->hdr.size * 4)
180
181 #define tag_next(t) ((struct tag *)((__u32 *)(t) + (t)->hdr.size))
182 #define tag_size(type) ((sizeof(struct tag_header) + sizeof(struct type)) >> 2)
183
184 #define for_each_tag(t,base) \
185 for (t = base; t->hdr.size; t = tag_next(t))
186
187
188 #endif