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