blob: b4da2d146af47c095f6848cff9d8f9e0359f05a0 [file] [log] [blame]
Ben Chenga6b53f02013-11-06 15:51:05 -08001/****************************************************************************
2 ****************************************************************************
3 ***
4 *** This header was automatically generated from a Linux kernel header
5 *** of the same name, to make information necessary for userspace to
6 *** call into the kernel available to libc. It contains only constants,
7 *** structures, and macros generated from the original header, and thus,
8 *** contains no copyrightable information.
9 ***
10 *** To edit the content of this header, modify the corresponding
11 *** source file (e.g. under external/kernel-headers/original/) then
12 *** run bionic/libc/kernel/tools/update_all.py
13 ***
14 *** Any manual change here will be lost the next time this script will
15 *** be run. You've been warned!
16 ***
17 ****************************************************************************
18 ****************************************************************************/
19#ifndef _UAPI__ASMARM_SETUP_H
20#define _UAPI__ASMARM_SETUP_H
21#include <linux/types.h>
Christopher Ferris32ff3f82020-12-14 13:10:04 -080022#define COMMAND_LINE_SIZE 2048
Ben Chenga6b53f02013-11-06 15:51:05 -080023#define ATAG_NONE 0x00000000
24struct tag_header {
Tao Baod7db5942015-01-28 10:07:51 -080025 __u32 size;
26 __u32 tag;
Ben Chenga6b53f02013-11-06 15:51:05 -080027};
28#define ATAG_CORE 0x54410001
29struct tag_core {
Tao Baod7db5942015-01-28 10:07:51 -080030 __u32 flags;
Tao Baod7db5942015-01-28 10:07:51 -080031 __u32 pagesize;
32 __u32 rootdev;
Ben Chenga6b53f02013-11-06 15:51:05 -080033};
34#define ATAG_MEM 0x54410002
Ben Chenga6b53f02013-11-06 15:51:05 -080035struct tag_mem32 {
Tao Baod7db5942015-01-28 10:07:51 -080036 __u32 size;
37 __u32 start;
Ben Chenga6b53f02013-11-06 15:51:05 -080038};
Ben Chenga6b53f02013-11-06 15:51:05 -080039#define ATAG_VIDEOTEXT 0x54410003
40struct tag_videotext {
Tao Baod7db5942015-01-28 10:07:51 -080041 __u8 x;
42 __u8 y;
Tao Baod7db5942015-01-28 10:07:51 -080043 __u16 video_page;
44 __u8 video_mode;
45 __u8 video_cols;
46 __u16 video_ega_bx;
Tao Baod7db5942015-01-28 10:07:51 -080047 __u8 video_lines;
48 __u8 video_isvga;
49 __u16 video_points;
Ben Chenga6b53f02013-11-06 15:51:05 -080050};
Ben Chenga6b53f02013-11-06 15:51:05 -080051#define ATAG_RAMDISK 0x54410004
52struct tag_ramdisk {
Tao Baod7db5942015-01-28 10:07:51 -080053 __u32 flags;
54 __u32 size;
Tao Baod7db5942015-01-28 10:07:51 -080055 __u32 start;
Ben Chenga6b53f02013-11-06 15:51:05 -080056};
57#define ATAG_INITRD 0x54410005
58#define ATAG_INITRD2 0x54420005
Ben Chenga6b53f02013-11-06 15:51:05 -080059struct tag_initrd {
Tao Baod7db5942015-01-28 10:07:51 -080060 __u32 start;
61 __u32 size;
Ben Chenga6b53f02013-11-06 15:51:05 -080062};
Ben Chenga6b53f02013-11-06 15:51:05 -080063#define ATAG_SERIAL 0x54410006
64struct tag_serialnr {
Tao Baod7db5942015-01-28 10:07:51 -080065 __u32 low;
66 __u32 high;
Ben Chenga6b53f02013-11-06 15:51:05 -080067};
68#define ATAG_REVISION 0x54410007
69struct tag_revision {
Tao Baod7db5942015-01-28 10:07:51 -080070 __u32 rev;
Ben Chenga6b53f02013-11-06 15:51:05 -080071};
72#define ATAG_VIDEOLFB 0x54410008
73struct tag_videolfb {
Tao Baod7db5942015-01-28 10:07:51 -080074 __u16 lfb_width;
Tao Baod7db5942015-01-28 10:07:51 -080075 __u16 lfb_height;
76 __u16 lfb_depth;
77 __u16 lfb_linelength;
78 __u32 lfb_base;
Tao Baod7db5942015-01-28 10:07:51 -080079 __u32 lfb_size;
80 __u8 red_size;
81 __u8 red_pos;
82 __u8 green_size;
Tao Baod7db5942015-01-28 10:07:51 -080083 __u8 green_pos;
84 __u8 blue_size;
85 __u8 blue_pos;
86 __u8 rsvd_size;
Tao Baod7db5942015-01-28 10:07:51 -080087 __u8 rsvd_pos;
Ben Chenga6b53f02013-11-06 15:51:05 -080088};
89#define ATAG_CMDLINE 0x54410009
90struct tag_cmdline {
Tao Baod7db5942015-01-28 10:07:51 -080091 char cmdline[1];
Ben Chenga6b53f02013-11-06 15:51:05 -080092};
93#define ATAG_ACORN 0x41000101
94struct tag_acorn {
Tao Baod7db5942015-01-28 10:07:51 -080095 __u32 memc_control_reg;
96 __u32 vram_pages;
97 __u8 sounddefault;
98 __u8 adfsdrives;
Ben Chenga6b53f02013-11-06 15:51:05 -080099};
100#define ATAG_MEMCLK 0x41000402
101struct tag_memclk {
Tao Baod7db5942015-01-28 10:07:51 -0800102 __u32 fmemclk;
Ben Chenga6b53f02013-11-06 15:51:05 -0800103};
104struct tag {
Tao Baod7db5942015-01-28 10:07:51 -0800105 struct tag_header hdr;
106 union {
Tao Baod7db5942015-01-28 10:07:51 -0800107 struct tag_core core;
108 struct tag_mem32 mem;
109 struct tag_videotext videotext;
110 struct tag_ramdisk ramdisk;
Tao Baod7db5942015-01-28 10:07:51 -0800111 struct tag_initrd initrd;
112 struct tag_serialnr serialnr;
113 struct tag_revision revision;
114 struct tag_videolfb videolfb;
Tao Baod7db5942015-01-28 10:07:51 -0800115 struct tag_cmdline cmdline;
116 struct tag_acorn acorn;
117 struct tag_memclk memclk;
118 } u;
Ben Chenga6b53f02013-11-06 15:51:05 -0800119};
120struct tagtable {
Tao Baod7db5942015-01-28 10:07:51 -0800121 __u32 tag;
122 int(* parse) (const struct tag *);
Ben Chenga6b53f02013-11-06 15:51:05 -0800123};
Tao Baod7db5942015-01-28 10:07:51 -0800124#define tag_member_present(tag,member) ((unsigned long) (& ((struct tag *) 0L)->member + 1) <= (tag)->hdr.size * 4)
125#define tag_next(t) ((struct tag *) ((__u32 *) (t) + (t)->hdr.size))
Ben Chenga6b53f02013-11-06 15:51:05 -0800126#define tag_size(type) ((sizeof(struct tag_header) + sizeof(struct type)) >> 2)
Tao Baod7db5942015-01-28 10:07:51 -0800127#define for_each_tag(t,base) for(t = base; t->hdr.size; t = tag_next(t))
Ben Chenga6b53f02013-11-06 15:51:05 -0800128#endif