1/*
2 * This header was generated from the Linux kernel headers by update_headers.py,
3 * to provide necessary information from kernel to userspace, such as constants,
4 * structures, and macros, and thus, contains no copyrightable information.
5 */
6#ifndef __ASMARM_SETUP_H
7#define __ASMARM_SETUP_H
8#include <linux/types.h>
9#define COMMAND_LINE_SIZE 1024
10#define ATAG_NONE	0x00000000
11struct tag_header {
12	__u32 size;
13	__u32 tag;
14};
15#define ATAG_CORE	0x54410001
16struct tag_core {
17	__u32 flags;
18	__u32 pagesize;
19	__u32 rootdev;
20};
21#define ATAG_MEM	0x54410002
22struct tag_mem32 {
23	__u32	size;
24	__u32	start;
25};
26#define ATAG_VIDEOTEXT	0x54410003
27struct tag_videotext {
28	__u8		x;
29	__u8		y;
30	__u16		video_page;
31	__u8		video_mode;
32	__u8		video_cols;
33	__u16		video_ega_bx;
34	__u8		video_lines;
35	__u8		video_isvga;
36	__u16		video_points;
37};
38#define ATAG_RAMDISK	0x54410004
39struct tag_ramdisk {
40	__u32 flags;
41	__u32 size;
42	__u32 start;
43};
44#define ATAG_INITRD	0x54410005
45#define ATAG_INITRD2	0x54420005
46struct tag_initrd {
47	__u32 start;
48	__u32 size;
49};
50#define ATAG_SERIAL	0x54410006
51struct tag_serialnr {
52	__u32 low;
53	__u32 high;
54};
55#define ATAG_REVISION	0x54410007
56struct tag_revision {
57	__u32 rev;
58};
59#define ATAG_VIDEOLFB	0x54410008
60struct tag_videolfb {
61	__u16		lfb_width;
62	__u16		lfb_height;
63	__u16		lfb_depth;
64	__u16		lfb_linelength;
65	__u32		lfb_base;
66	__u32		lfb_size;
67	__u8		red_size;
68	__u8		red_pos;
69	__u8		green_size;
70	__u8		green_pos;
71	__u8		blue_size;
72	__u8		blue_pos;
73	__u8		rsvd_size;
74	__u8		rsvd_pos;
75};
76#define ATAG_CMDLINE	0x54410009
77struct tag_cmdline {
78	char	cmdline[1];
79};
80#define ATAG_ACORN	0x41000101
81struct tag_acorn {
82	__u32 memc_control_reg;
83	__u32 vram_pages;
84	__u8 sounddefault;
85	__u8 adfsdrives;
86};
87#define ATAG_MEMCLK	0x41000402
88struct tag_memclk {
89	__u32 fmemclk;
90};
91struct tag {
92	struct tag_header hdr;
93	union {
94		struct tag_core		core;
95		struct tag_mem32	mem;
96		struct tag_videotext	videotext;
97		struct tag_ramdisk	ramdisk;
98		struct tag_initrd	initrd;
99		struct tag_serialnr	serialnr;
100		struct tag_revision	revision;
101		struct tag_videolfb	videolfb;
102		struct tag_cmdline	cmdline;
103
104		struct tag_acorn	acorn;
105
106		struct tag_memclk	memclk;
107	} u;
108};
109struct tagtable {
110	__u32 tag;
111	int (*parse)(const struct tag *);
112};
113#define tag_member_present(tag,member)				\
114	((unsigned long)(&((struct tag *)0L)->member + 1)	\
115		<= (tag)->hdr.size * 4)
116#define tag_next(t)	((struct tag *)((__u32 *)(t) + (t)->hdr.size))
117#define tag_size(type)	((sizeof(struct tag_header) + sizeof(struct type)) >> 2)
118#define for_each_tag(t,base)		\
119	for (t = base; t->hdr.size; t = tag_next(t))
120#endif
121