]> git.proxmox.com Git - mirror_edk2.git/blob - ArmPkg/Application/LinuxLoader/Arm/LinuxAtag.h
BeagleBoardPkg/BeagleBoardPkg.dsc: remove the LinuxLoader application
[mirror_edk2.git] / ArmPkg / Application / LinuxLoader / Arm / LinuxAtag.h
1 /** @file
2 *
3 * Copyright (c) 2011-2015, ARM Limited. All rights reserved.
4 *
5 * This program and the accompanying materials
6 * are licensed and made available under the terms and conditions of the BSD License
7 * which accompanies this distribution. The full text of the license may be found at
8 * http://opensource.org/licenses/bsd-license.php
9 *
10 * THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
11 * WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
12 *
13 **/
14
15 #ifndef __LINUX_ATAG_H__
16 #define __LINUX_ATAG_H__
17
18 //
19 // ATAG Definitions
20 //
21
22 #define ATAG_MAX_SIZE 0x3000
23
24 /* ATAG : list of possible tags */
25 #define ATAG_NONE 0x00000000
26 #define ATAG_CORE 0x54410001
27 #define ATAG_MEM 0x54410002
28 #define ATAG_VIDEOTEXT 0x54410003
29 #define ATAG_RAMDISK 0x54410004
30 #define ATAG_INITRD2 0x54420005
31 #define ATAG_SERIAL 0x54410006
32 #define ATAG_REVISION 0x54410007
33 #define ATAG_VIDEOLFB 0x54410008
34 #define ATAG_CMDLINE 0x54410009
35 #define ATAG_ARM_MP_CORE 0x5441000A
36
37 #define next_tag_address(t) ((LINUX_ATAG*)((UINT32)(t) + (((t)->header.size) << 2) ))
38 #define tag_size(type) ((UINT32)((sizeof(LINUX_ATAG_HEADER) + sizeof(type)) >> 2))
39
40 typedef struct {
41 UINT32 size; /* length of tag in words including this header */
42 UINT32 type; /* tag type */
43 } LINUX_ATAG_HEADER;
44
45 typedef struct {
46 UINT32 flags;
47 UINT32 pagesize;
48 UINT32 rootdev;
49 } LINUX_ATAG_CORE;
50
51 typedef struct {
52 UINT32 size;
53 UINTN start;
54 } LINUX_ATAG_MEM;
55
56 typedef struct {
57 UINT8 x;
58 UINT8 y;
59 UINT16 video_page;
60 UINT8 video_mode;
61 UINT8 video_cols;
62 UINT16 video_ega_bx;
63 UINT8 video_lines;
64 UINT8 video_isvga;
65 UINT16 video_points;
66 } LINUX_ATAG_VIDEOTEXT;
67
68 typedef struct {
69 UINT32 flags;
70 UINT32 size;
71 UINTN start;
72 } LINUX_ATAG_RAMDISK;
73
74 typedef struct {
75 UINT32 start;
76 UINT32 size;
77 } LINUX_ATAG_INITRD2;
78
79 typedef struct {
80 UINT32 low;
81 UINT32 high;
82 } LINUX_ATAG_SERIALNR;
83
84 typedef struct {
85 UINT32 rev;
86 } LINUX_ATAG_REVISION;
87
88 typedef struct {
89 UINT16 lfb_width;
90 UINT16 lfb_height;
91 UINT16 lfb_depth;
92 UINT16 lfb_linelength;
93 UINT32 lfb_base;
94 UINT32 lfb_size;
95 UINT8 red_size;
96 UINT8 red_pos;
97 UINT8 green_size;
98 UINT8 green_pos;
99 UINT8 blue_size;
100 UINT8 blue_pos;
101 UINT8 rsvd_size;
102 UINT8 rsvd_pos;
103 } LINUX_ATAG_VIDEOLFB;
104
105 typedef struct {
106 CHAR8 cmdline[1];
107 } LINUX_ATAG_CMDLINE;
108
109 typedef struct {
110 LINUX_ATAG_HEADER header;
111 union {
112 LINUX_ATAG_CORE core_tag;
113 LINUX_ATAG_MEM mem_tag;
114 LINUX_ATAG_VIDEOTEXT videotext_tag;
115 LINUX_ATAG_RAMDISK ramdisk_tag;
116 LINUX_ATAG_INITRD2 initrd2_tag;
117 LINUX_ATAG_SERIALNR serialnr_tag;
118 LINUX_ATAG_REVISION revision_tag;
119 LINUX_ATAG_VIDEOLFB videolfb_tag;
120 LINUX_ATAG_CMDLINE cmdline_tag;
121 } body;
122 } LINUX_ATAG;
123
124 #endif /* __LINUX_ATAG_H__ */