0001
0002
0003
0004
0005
0006
0007
0008
0009
0010
0011
0012
0013
0014
0015 #ifndef _UAPI__ASMARM_SETUP_H
0016 #define _UAPI__ASMARM_SETUP_H
0017
0018 #include <linux/types.h>
0019
0020 #define COMMAND_LINE_SIZE 1024
0021
0022
0023 #define ATAG_NONE 0x00000000
0024
0025 struct tag_header {
0026 __u32 size;
0027 __u32 tag;
0028 };
0029
0030
0031 #define ATAG_CORE 0x54410001
0032
0033 struct tag_core {
0034 __u32 flags;
0035 __u32 pagesize;
0036 __u32 rootdev;
0037 };
0038
0039
0040 #define ATAG_MEM 0x54410002
0041
0042 struct tag_mem32 {
0043 __u32 size;
0044 __u32 start;
0045 };
0046
0047
0048 #define ATAG_VIDEOTEXT 0x54410003
0049
0050 struct tag_videotext {
0051 __u8 x;
0052 __u8 y;
0053 __u16 video_page;
0054 __u8 video_mode;
0055 __u8 video_cols;
0056 __u16 video_ega_bx;
0057 __u8 video_lines;
0058 __u8 video_isvga;
0059 __u16 video_points;
0060 };
0061
0062
0063 #define ATAG_RAMDISK 0x54410004
0064
0065 struct tag_ramdisk {
0066 __u32 flags;
0067 __u32 size;
0068 __u32 start;
0069 };
0070
0071
0072
0073
0074
0075
0076 #define ATAG_INITRD 0x54410005
0077
0078
0079 #define ATAG_INITRD2 0x54420005
0080
0081 struct tag_initrd {
0082 __u32 start;
0083 __u32 size;
0084 };
0085
0086
0087 #define ATAG_SERIAL 0x54410006
0088
0089 struct tag_serialnr {
0090 __u32 low;
0091 __u32 high;
0092 };
0093
0094
0095 #define ATAG_REVISION 0x54410007
0096
0097 struct tag_revision {
0098 __u32 rev;
0099 };
0100
0101
0102
0103
0104 #define ATAG_VIDEOLFB 0x54410008
0105
0106 struct tag_videolfb {
0107 __u16 lfb_width;
0108 __u16 lfb_height;
0109 __u16 lfb_depth;
0110 __u16 lfb_linelength;
0111 __u32 lfb_base;
0112 __u32 lfb_size;
0113 __u8 red_size;
0114 __u8 red_pos;
0115 __u8 green_size;
0116 __u8 green_pos;
0117 __u8 blue_size;
0118 __u8 blue_pos;
0119 __u8 rsvd_size;
0120 __u8 rsvd_pos;
0121 };
0122
0123
0124 #define ATAG_CMDLINE 0x54410009
0125
0126 struct tag_cmdline {
0127 char cmdline[1];
0128 };
0129
0130
0131 #define ATAG_ACORN 0x41000101
0132
0133 struct tag_acorn {
0134 __u32 memc_control_reg;
0135 __u32 vram_pages;
0136 __u8 sounddefault;
0137 __u8 adfsdrives;
0138 };
0139
0140
0141 #define ATAG_MEMCLK 0x41000402
0142
0143 struct tag_memclk {
0144 __u32 fmemclk;
0145 };
0146
0147 struct tag {
0148 struct tag_header hdr;
0149 union {
0150 struct tag_core core;
0151 struct tag_mem32 mem;
0152 struct tag_videotext videotext;
0153 struct tag_ramdisk ramdisk;
0154 struct tag_initrd initrd;
0155 struct tag_serialnr serialnr;
0156 struct tag_revision revision;
0157 struct tag_videolfb videolfb;
0158 struct tag_cmdline cmdline;
0159
0160
0161
0162
0163 struct tag_acorn acorn;
0164
0165
0166
0167
0168 struct tag_memclk memclk;
0169 } u;
0170 };
0171
0172 struct tagtable {
0173 __u32 tag;
0174 int (*parse)(const struct tag *);
0175 };
0176
0177 #define tag_member_present(tag,member) \
0178 ((unsigned long)(&((struct tag *)0L)->member + 1) \
0179 <= (tag)->hdr.size * 4)
0180
0181 #define tag_next(t) ((struct tag *)((__u32 *)(t) + (t)->hdr.size))
0182 #define tag_size(type) ((sizeof(struct tag_header) + sizeof(struct type)) >> 2)
0183
0184 #define for_each_tag(t,base) \
0185 for (t = base; t->hdr.size; t = tag_next(t))
0186
0187
0188 #endif