1a6b53f03c7c03c5bd28a1d582585b2b86fe70d59Ben Cheng/****************************************************************************
2a6b53f03c7c03c5bd28a1d582585b2b86fe70d59Ben Cheng ****************************************************************************
3a6b53f03c7c03c5bd28a1d582585b2b86fe70d59Ben Cheng ***
4a6b53f03c7c03c5bd28a1d582585b2b86fe70d59Ben Cheng ***   This header was automatically generated from a Linux kernel header
5a6b53f03c7c03c5bd28a1d582585b2b86fe70d59Ben Cheng ***   of the same name, to make information necessary for userspace to
6a6b53f03c7c03c5bd28a1d582585b2b86fe70d59Ben Cheng ***   call into the kernel available to libc.  It contains only constants,
7a6b53f03c7c03c5bd28a1d582585b2b86fe70d59Ben Cheng ***   structures, and macros generated from the original header, and thus,
8a6b53f03c7c03c5bd28a1d582585b2b86fe70d59Ben Cheng ***   contains no copyrightable information.
9a6b53f03c7c03c5bd28a1d582585b2b86fe70d59Ben Cheng ***
10a6b53f03c7c03c5bd28a1d582585b2b86fe70d59Ben Cheng ***   To edit the content of this header, modify the corresponding
11a6b53f03c7c03c5bd28a1d582585b2b86fe70d59Ben Cheng ***   source file (e.g. under external/kernel-headers/original/) then
12a6b53f03c7c03c5bd28a1d582585b2b86fe70d59Ben Cheng ***   run bionic/libc/kernel/tools/update_all.py
13a6b53f03c7c03c5bd28a1d582585b2b86fe70d59Ben Cheng ***
14a6b53f03c7c03c5bd28a1d582585b2b86fe70d59Ben Cheng ***   Any manual change here will be lost the next time this script will
15a6b53f03c7c03c5bd28a1d582585b2b86fe70d59Ben Cheng ***   be run. You've been warned!
16a6b53f03c7c03c5bd28a1d582585b2b86fe70d59Ben Cheng ***
17a6b53f03c7c03c5bd28a1d582585b2b86fe70d59Ben Cheng ****************************************************************************
18a6b53f03c7c03c5bd28a1d582585b2b86fe70d59Ben Cheng ****************************************************************************/
19a6b53f03c7c03c5bd28a1d582585b2b86fe70d59Ben Cheng#ifndef _UAPI__ASMARM_SETUP_H
20a6b53f03c7c03c5bd28a1d582585b2b86fe70d59Ben Cheng#define _UAPI__ASMARM_SETUP_H
21a6b53f03c7c03c5bd28a1d582585b2b86fe70d59Ben Cheng#include <linux/types.h>
22a6b53f03c7c03c5bd28a1d582585b2b86fe70d59Ben Cheng#define COMMAND_LINE_SIZE 1024
23a6b53f03c7c03c5bd28a1d582585b2b86fe70d59Ben Cheng/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
24a6b53f03c7c03c5bd28a1d582585b2b86fe70d59Ben Cheng#define ATAG_NONE 0x00000000
25a6b53f03c7c03c5bd28a1d582585b2b86fe70d59Ben Chengstruct tag_header {
26d7db594b8d1dab36b711bd887a9dd21675c87243Tao Bao  __u32 size;
27d7db594b8d1dab36b711bd887a9dd21675c87243Tao Bao  __u32 tag;
28a6b53f03c7c03c5bd28a1d582585b2b86fe70d59Ben Cheng/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
29a6b53f03c7c03c5bd28a1d582585b2b86fe70d59Ben Cheng};
30a6b53f03c7c03c5bd28a1d582585b2b86fe70d59Ben Cheng#define ATAG_CORE 0x54410001
31a6b53f03c7c03c5bd28a1d582585b2b86fe70d59Ben Chengstruct tag_core {
32d7db594b8d1dab36b711bd887a9dd21675c87243Tao Bao  __u32 flags;
33a6b53f03c7c03c5bd28a1d582585b2b86fe70d59Ben Cheng/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
34d7db594b8d1dab36b711bd887a9dd21675c87243Tao Bao  __u32 pagesize;
35d7db594b8d1dab36b711bd887a9dd21675c87243Tao Bao  __u32 rootdev;
36a6b53f03c7c03c5bd28a1d582585b2b86fe70d59Ben Cheng};
37a6b53f03c7c03c5bd28a1d582585b2b86fe70d59Ben Cheng#define ATAG_MEM 0x54410002
38a6b53f03c7c03c5bd28a1d582585b2b86fe70d59Ben Cheng/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
39a6b53f03c7c03c5bd28a1d582585b2b86fe70d59Ben Chengstruct tag_mem32 {
40d7db594b8d1dab36b711bd887a9dd21675c87243Tao Bao  __u32 size;
41d7db594b8d1dab36b711bd887a9dd21675c87243Tao Bao  __u32 start;
42a6b53f03c7c03c5bd28a1d582585b2b86fe70d59Ben Cheng};
43a6b53f03c7c03c5bd28a1d582585b2b86fe70d59Ben Cheng/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
44a6b53f03c7c03c5bd28a1d582585b2b86fe70d59Ben Cheng#define ATAG_VIDEOTEXT 0x54410003
45a6b53f03c7c03c5bd28a1d582585b2b86fe70d59Ben Chengstruct tag_videotext {
46d7db594b8d1dab36b711bd887a9dd21675c87243Tao Bao  __u8 x;
47d7db594b8d1dab36b711bd887a9dd21675c87243Tao Bao  __u8 y;
48a6b53f03c7c03c5bd28a1d582585b2b86fe70d59Ben Cheng/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
49d7db594b8d1dab36b711bd887a9dd21675c87243Tao Bao  __u16 video_page;
50d7db594b8d1dab36b711bd887a9dd21675c87243Tao Bao  __u8 video_mode;
51d7db594b8d1dab36b711bd887a9dd21675c87243Tao Bao  __u8 video_cols;
52d7db594b8d1dab36b711bd887a9dd21675c87243Tao Bao  __u16 video_ega_bx;
53a6b53f03c7c03c5bd28a1d582585b2b86fe70d59Ben Cheng/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
54d7db594b8d1dab36b711bd887a9dd21675c87243Tao Bao  __u8 video_lines;
55d7db594b8d1dab36b711bd887a9dd21675c87243Tao Bao  __u8 video_isvga;
56d7db594b8d1dab36b711bd887a9dd21675c87243Tao Bao  __u16 video_points;
57a6b53f03c7c03c5bd28a1d582585b2b86fe70d59Ben Cheng};
58a6b53f03c7c03c5bd28a1d582585b2b86fe70d59Ben Cheng/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
59a6b53f03c7c03c5bd28a1d582585b2b86fe70d59Ben Cheng#define ATAG_RAMDISK 0x54410004
60a6b53f03c7c03c5bd28a1d582585b2b86fe70d59Ben Chengstruct tag_ramdisk {
61d7db594b8d1dab36b711bd887a9dd21675c87243Tao Bao  __u32 flags;
62d7db594b8d1dab36b711bd887a9dd21675c87243Tao Bao  __u32 size;
63a6b53f03c7c03c5bd28a1d582585b2b86fe70d59Ben Cheng/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
64d7db594b8d1dab36b711bd887a9dd21675c87243Tao Bao  __u32 start;
65a6b53f03c7c03c5bd28a1d582585b2b86fe70d59Ben Cheng};
66a6b53f03c7c03c5bd28a1d582585b2b86fe70d59Ben Cheng#define ATAG_INITRD 0x54410005
67a6b53f03c7c03c5bd28a1d582585b2b86fe70d59Ben Cheng#define ATAG_INITRD2 0x54420005
68a6b53f03c7c03c5bd28a1d582585b2b86fe70d59Ben Cheng/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
69a6b53f03c7c03c5bd28a1d582585b2b86fe70d59Ben Chengstruct tag_initrd {
70d7db594b8d1dab36b711bd887a9dd21675c87243Tao Bao  __u32 start;
71d7db594b8d1dab36b711bd887a9dd21675c87243Tao Bao  __u32 size;
72a6b53f03c7c03c5bd28a1d582585b2b86fe70d59Ben Cheng};
73a6b53f03c7c03c5bd28a1d582585b2b86fe70d59Ben Cheng/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
74a6b53f03c7c03c5bd28a1d582585b2b86fe70d59Ben Cheng#define ATAG_SERIAL 0x54410006
75a6b53f03c7c03c5bd28a1d582585b2b86fe70d59Ben Chengstruct tag_serialnr {
76d7db594b8d1dab36b711bd887a9dd21675c87243Tao Bao  __u32 low;
77d7db594b8d1dab36b711bd887a9dd21675c87243Tao Bao  __u32 high;
78a6b53f03c7c03c5bd28a1d582585b2b86fe70d59Ben Cheng/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
79a6b53f03c7c03c5bd28a1d582585b2b86fe70d59Ben Cheng};
80a6b53f03c7c03c5bd28a1d582585b2b86fe70d59Ben Cheng#define ATAG_REVISION 0x54410007
81a6b53f03c7c03c5bd28a1d582585b2b86fe70d59Ben Chengstruct tag_revision {
82d7db594b8d1dab36b711bd887a9dd21675c87243Tao Bao  __u32 rev;
83a6b53f03c7c03c5bd28a1d582585b2b86fe70d59Ben Cheng/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
84a6b53f03c7c03c5bd28a1d582585b2b86fe70d59Ben Cheng};
85a6b53f03c7c03c5bd28a1d582585b2b86fe70d59Ben Cheng#define ATAG_VIDEOLFB 0x54410008
86a6b53f03c7c03c5bd28a1d582585b2b86fe70d59Ben Chengstruct tag_videolfb {
87d7db594b8d1dab36b711bd887a9dd21675c87243Tao Bao  __u16 lfb_width;
88a6b53f03c7c03c5bd28a1d582585b2b86fe70d59Ben Cheng/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
89d7db594b8d1dab36b711bd887a9dd21675c87243Tao Bao  __u16 lfb_height;
90d7db594b8d1dab36b711bd887a9dd21675c87243Tao Bao  __u16 lfb_depth;
91d7db594b8d1dab36b711bd887a9dd21675c87243Tao Bao  __u16 lfb_linelength;
92d7db594b8d1dab36b711bd887a9dd21675c87243Tao Bao  __u32 lfb_base;
93a6b53f03c7c03c5bd28a1d582585b2b86fe70d59Ben Cheng/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
94d7db594b8d1dab36b711bd887a9dd21675c87243Tao Bao  __u32 lfb_size;
95d7db594b8d1dab36b711bd887a9dd21675c87243Tao Bao  __u8 red_size;
96d7db594b8d1dab36b711bd887a9dd21675c87243Tao Bao  __u8 red_pos;
97d7db594b8d1dab36b711bd887a9dd21675c87243Tao Bao  __u8 green_size;
98a6b53f03c7c03c5bd28a1d582585b2b86fe70d59Ben Cheng/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
99d7db594b8d1dab36b711bd887a9dd21675c87243Tao Bao  __u8 green_pos;
100d7db594b8d1dab36b711bd887a9dd21675c87243Tao Bao  __u8 blue_size;
101d7db594b8d1dab36b711bd887a9dd21675c87243Tao Bao  __u8 blue_pos;
102d7db594b8d1dab36b711bd887a9dd21675c87243Tao Bao  __u8 rsvd_size;
103a6b53f03c7c03c5bd28a1d582585b2b86fe70d59Ben Cheng/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
104d7db594b8d1dab36b711bd887a9dd21675c87243Tao Bao  __u8 rsvd_pos;
105a6b53f03c7c03c5bd28a1d582585b2b86fe70d59Ben Cheng};
106a6b53f03c7c03c5bd28a1d582585b2b86fe70d59Ben Cheng#define ATAG_CMDLINE 0x54410009
107a6b53f03c7c03c5bd28a1d582585b2b86fe70d59Ben Chengstruct tag_cmdline {
108a6b53f03c7c03c5bd28a1d582585b2b86fe70d59Ben Cheng/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
109d7db594b8d1dab36b711bd887a9dd21675c87243Tao Bao  char cmdline[1];
110a6b53f03c7c03c5bd28a1d582585b2b86fe70d59Ben Cheng};
111a6b53f03c7c03c5bd28a1d582585b2b86fe70d59Ben Cheng#define ATAG_ACORN 0x41000101
112a6b53f03c7c03c5bd28a1d582585b2b86fe70d59Ben Chengstruct tag_acorn {
113a6b53f03c7c03c5bd28a1d582585b2b86fe70d59Ben Cheng/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
114d7db594b8d1dab36b711bd887a9dd21675c87243Tao Bao  __u32 memc_control_reg;
115d7db594b8d1dab36b711bd887a9dd21675c87243Tao Bao  __u32 vram_pages;
116d7db594b8d1dab36b711bd887a9dd21675c87243Tao Bao  __u8 sounddefault;
117d7db594b8d1dab36b711bd887a9dd21675c87243Tao Bao  __u8 adfsdrives;
118a6b53f03c7c03c5bd28a1d582585b2b86fe70d59Ben Cheng/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
119a6b53f03c7c03c5bd28a1d582585b2b86fe70d59Ben Cheng};
120a6b53f03c7c03c5bd28a1d582585b2b86fe70d59Ben Cheng#define ATAG_MEMCLK 0x41000402
121a6b53f03c7c03c5bd28a1d582585b2b86fe70d59Ben Chengstruct tag_memclk {
122d7db594b8d1dab36b711bd887a9dd21675c87243Tao Bao  __u32 fmemclk;
123a6b53f03c7c03c5bd28a1d582585b2b86fe70d59Ben Cheng/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
124a6b53f03c7c03c5bd28a1d582585b2b86fe70d59Ben Cheng};
125a6b53f03c7c03c5bd28a1d582585b2b86fe70d59Ben Chengstruct tag {
126d7db594b8d1dab36b711bd887a9dd21675c87243Tao Bao  struct tag_header hdr;
127d7db594b8d1dab36b711bd887a9dd21675c87243Tao Bao  union {
128a6b53f03c7c03c5bd28a1d582585b2b86fe70d59Ben Cheng/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
129d7db594b8d1dab36b711bd887a9dd21675c87243Tao Bao    struct tag_core core;
130d7db594b8d1dab36b711bd887a9dd21675c87243Tao Bao    struct tag_mem32 mem;
131d7db594b8d1dab36b711bd887a9dd21675c87243Tao Bao    struct tag_videotext videotext;
132d7db594b8d1dab36b711bd887a9dd21675c87243Tao Bao    struct tag_ramdisk ramdisk;
133a6b53f03c7c03c5bd28a1d582585b2b86fe70d59Ben Cheng/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
134d7db594b8d1dab36b711bd887a9dd21675c87243Tao Bao    struct tag_initrd initrd;
135d7db594b8d1dab36b711bd887a9dd21675c87243Tao Bao    struct tag_serialnr serialnr;
136d7db594b8d1dab36b711bd887a9dd21675c87243Tao Bao    struct tag_revision revision;
137d7db594b8d1dab36b711bd887a9dd21675c87243Tao Bao    struct tag_videolfb videolfb;
138a6b53f03c7c03c5bd28a1d582585b2b86fe70d59Ben Cheng/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
139d7db594b8d1dab36b711bd887a9dd21675c87243Tao Bao    struct tag_cmdline cmdline;
140d7db594b8d1dab36b711bd887a9dd21675c87243Tao Bao    struct tag_acorn acorn;
141d7db594b8d1dab36b711bd887a9dd21675c87243Tao Bao    struct tag_memclk memclk;
142d7db594b8d1dab36b711bd887a9dd21675c87243Tao Bao  } u;
143a6b53f03c7c03c5bd28a1d582585b2b86fe70d59Ben Cheng/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
144a6b53f03c7c03c5bd28a1d582585b2b86fe70d59Ben Cheng};
145a6b53f03c7c03c5bd28a1d582585b2b86fe70d59Ben Chengstruct tagtable {
146d7db594b8d1dab36b711bd887a9dd21675c87243Tao Bao  __u32 tag;
147d7db594b8d1dab36b711bd887a9dd21675c87243Tao Bao  int(* parse) (const struct tag *);
148a6b53f03c7c03c5bd28a1d582585b2b86fe70d59Ben Cheng/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
149a6b53f03c7c03c5bd28a1d582585b2b86fe70d59Ben Cheng};
150d7db594b8d1dab36b711bd887a9dd21675c87243Tao Bao#define tag_member_present(tag,member) ((unsigned long) (& ((struct tag *) 0L)->member + 1) <= (tag)->hdr.size * 4)
151d7db594b8d1dab36b711bd887a9dd21675c87243Tao Bao#define tag_next(t) ((struct tag *) ((__u32 *) (t) + (t)->hdr.size))
152a6b53f03c7c03c5bd28a1d582585b2b86fe70d59Ben Cheng#define tag_size(type) ((sizeof(struct tag_header) + sizeof(struct type)) >> 2)
153a6b53f03c7c03c5bd28a1d582585b2b86fe70d59Ben Cheng/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
154d7db594b8d1dab36b711bd887a9dd21675c87243Tao Bao#define for_each_tag(t,base) for(t = base; t->hdr.size; t = tag_next(t))
155a6b53f03c7c03c5bd28a1d582585b2b86fe70d59Ben Cheng#endif
156