blob: 07c01776cd839edbedb51794b05449b22e4cd4cd [file] [log] [blame]
Elliott Hughes180edef2023-11-02 00:08:05 +00001/*
2 * This file is auto-generated. Modifications will be lost.
3 *
4 * See https://android.googlesource.com/platform/bionic/+/master/libc/kernel/
5 * for more information.
6 */
Ben Chenga6b53f02013-11-06 15:51:05 -08007#ifndef _UAPI__ASMARM_SETUP_H
8#define _UAPI__ASMARM_SETUP_H
9#include <linux/types.h>
Christopher Ferrisfcc3b4f2021-07-01 01:30:21 +000010#define COMMAND_LINE_SIZE 1024
Ben Chenga6b53f02013-11-06 15:51:05 -080011#define ATAG_NONE 0x00000000
12struct tag_header {
Tao Baod7db5942015-01-28 10:07:51 -080013 __u32 size;
14 __u32 tag;
Ben Chenga6b53f02013-11-06 15:51:05 -080015};
16#define ATAG_CORE 0x54410001
17struct tag_core {
Tao Baod7db5942015-01-28 10:07:51 -080018 __u32 flags;
Tao Baod7db5942015-01-28 10:07:51 -080019 __u32 pagesize;
20 __u32 rootdev;
Ben Chenga6b53f02013-11-06 15:51:05 -080021};
22#define ATAG_MEM 0x54410002
Ben Chenga6b53f02013-11-06 15:51:05 -080023struct tag_mem32 {
Tao Baod7db5942015-01-28 10:07:51 -080024 __u32 size;
25 __u32 start;
Ben Chenga6b53f02013-11-06 15:51:05 -080026};
Ben Chenga6b53f02013-11-06 15:51:05 -080027#define ATAG_VIDEOTEXT 0x54410003
28struct tag_videotext {
Tao Baod7db5942015-01-28 10:07:51 -080029 __u8 x;
30 __u8 y;
Tao Baod7db5942015-01-28 10:07:51 -080031 __u16 video_page;
32 __u8 video_mode;
33 __u8 video_cols;
34 __u16 video_ega_bx;
Tao Baod7db5942015-01-28 10:07:51 -080035 __u8 video_lines;
36 __u8 video_isvga;
37 __u16 video_points;
Ben Chenga6b53f02013-11-06 15:51:05 -080038};
Ben Chenga6b53f02013-11-06 15:51:05 -080039#define ATAG_RAMDISK 0x54410004
40struct tag_ramdisk {
Tao Baod7db5942015-01-28 10:07:51 -080041 __u32 flags;
42 __u32 size;
Tao Baod7db5942015-01-28 10:07:51 -080043 __u32 start;
Ben Chenga6b53f02013-11-06 15:51:05 -080044};
45#define ATAG_INITRD 0x54410005
46#define ATAG_INITRD2 0x54420005
Ben Chenga6b53f02013-11-06 15:51:05 -080047struct tag_initrd {
Tao Baod7db5942015-01-28 10:07:51 -080048 __u32 start;
49 __u32 size;
Ben Chenga6b53f02013-11-06 15:51:05 -080050};
Ben Chenga6b53f02013-11-06 15:51:05 -080051#define ATAG_SERIAL 0x54410006
52struct tag_serialnr {
Tao Baod7db5942015-01-28 10:07:51 -080053 __u32 low;
54 __u32 high;
Ben Chenga6b53f02013-11-06 15:51:05 -080055};
56#define ATAG_REVISION 0x54410007
57struct tag_revision {
Tao Baod7db5942015-01-28 10:07:51 -080058 __u32 rev;
Ben Chenga6b53f02013-11-06 15:51:05 -080059};
60#define ATAG_VIDEOLFB 0x54410008
61struct tag_videolfb {
Tao Baod7db5942015-01-28 10:07:51 -080062 __u16 lfb_width;
Tao Baod7db5942015-01-28 10:07:51 -080063 __u16 lfb_height;
64 __u16 lfb_depth;
65 __u16 lfb_linelength;
66 __u32 lfb_base;
Tao Baod7db5942015-01-28 10:07:51 -080067 __u32 lfb_size;
68 __u8 red_size;
69 __u8 red_pos;
70 __u8 green_size;
Tao Baod7db5942015-01-28 10:07:51 -080071 __u8 green_pos;
72 __u8 blue_size;
73 __u8 blue_pos;
74 __u8 rsvd_size;
Tao Baod7db5942015-01-28 10:07:51 -080075 __u8 rsvd_pos;
Ben Chenga6b53f02013-11-06 15:51:05 -080076};
77#define ATAG_CMDLINE 0x54410009
78struct tag_cmdline {
Tao Baod7db5942015-01-28 10:07:51 -080079 char cmdline[1];
Ben Chenga6b53f02013-11-06 15:51:05 -080080};
81#define ATAG_ACORN 0x41000101
82struct tag_acorn {
Tao Baod7db5942015-01-28 10:07:51 -080083 __u32 memc_control_reg;
84 __u32 vram_pages;
85 __u8 sounddefault;
86 __u8 adfsdrives;
Ben Chenga6b53f02013-11-06 15:51:05 -080087};
88#define ATAG_MEMCLK 0x41000402
89struct tag_memclk {
Tao Baod7db5942015-01-28 10:07:51 -080090 __u32 fmemclk;
Ben Chenga6b53f02013-11-06 15:51:05 -080091};
92struct tag {
Tao Baod7db5942015-01-28 10:07:51 -080093 struct tag_header hdr;
94 union {
Tao Baod7db5942015-01-28 10:07:51 -080095 struct tag_core core;
96 struct tag_mem32 mem;
97 struct tag_videotext videotext;
98 struct tag_ramdisk ramdisk;
Tao Baod7db5942015-01-28 10:07:51 -080099 struct tag_initrd initrd;
100 struct tag_serialnr serialnr;
101 struct tag_revision revision;
102 struct tag_videolfb videolfb;
Tao Baod7db5942015-01-28 10:07:51 -0800103 struct tag_cmdline cmdline;
104 struct tag_acorn acorn;
105 struct tag_memclk memclk;
106 } u;
Ben Chenga6b53f02013-11-06 15:51:05 -0800107};
108struct tagtable {
Tao Baod7db5942015-01-28 10:07:51 -0800109 __u32 tag;
110 int(* parse) (const struct tag *);
Ben Chenga6b53f02013-11-06 15:51:05 -0800111};
Tao Baod7db5942015-01-28 10:07:51 -0800112#define tag_member_present(tag,member) ((unsigned long) (& ((struct tag *) 0L)->member + 1) <= (tag)->hdr.size * 4)
113#define tag_next(t) ((struct tag *) ((__u32 *) (t) + (t)->hdr.size))
Ben Chenga6b53f02013-11-06 15:51:05 -0800114#define tag_size(type) ((sizeof(struct tag_header) + sizeof(struct type)) >> 2)
Tao Baod7db5942015-01-28 10:07:51 -0800115#define for_each_tag(t,base) for(t = base; t->hdr.size; t = tag_next(t))
Ben Chenga6b53f02013-11-06 15:51:05 -0800116#endif