7e86211b4ec4a8fed46eb71d95aa1df365b2f177
[mirror_edk2.git] / MdeModulePkg / Application / UiApp / BootMaint / Data.c
1 /** @file
2 Define some data used for Boot Maint
3
4 Copyright (c) 2004 - 2015, Intel Corporation. All rights reserved.<BR>
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 #include "BootMaint.h"
16
17 VOID *mStartOpCodeHandle = NULL;
18 VOID *mEndOpCodeHandle = NULL;
19 EFI_IFR_GUID_LABEL *mStartLabel = NULL;
20 EFI_IFR_GUID_LABEL *mEndLabel = NULL;
21
22 STRING_DEPOSITORY *FileOptionStrDepository;
23 STRING_DEPOSITORY *ConsoleOptionStrDepository;
24 STRING_DEPOSITORY *BootOptionStrDepository;
25 STRING_DEPOSITORY *BootOptionHelpStrDepository;
26 STRING_DEPOSITORY *DriverOptionStrDepository;
27 STRING_DEPOSITORY *DriverOptionHelpStrDepository;
28 STRING_DEPOSITORY *TerminalStrDepository;
29
30 ///
31 /// Terminal type string token storage
32 ///
33 UINT16 TerminalType[] = {
34 STRING_TOKEN(STR_COM_TYPE_0),
35 STRING_TOKEN(STR_COM_TYPE_1),
36 STRING_TOKEN(STR_COM_TYPE_2),
37 STRING_TOKEN(STR_COM_TYPE_3),
38 };
39
40 ///
41 /// File system selection menu
42 ///
43 BM_MENU_OPTION FsOptionMenu = {
44 BM_MENU_OPTION_SIGNATURE,
45 {NULL},
46 0
47 };
48
49 ///
50 /// Console Input Device Selection Menu
51 ///
52 BM_MENU_OPTION ConsoleInpMenu = {
53 BM_MENU_OPTION_SIGNATURE,
54 {NULL},
55 0
56 };
57
58 ///
59 /// Console Output Device Selection Menu
60 ///
61 BM_MENU_OPTION ConsoleOutMenu = {
62 BM_MENU_OPTION_SIGNATURE,
63 {NULL},
64 0
65 };
66
67 ///
68 /// Error Output Device Selection Menu
69 ///
70 BM_MENU_OPTION ConsoleErrMenu = {
71 BM_MENU_OPTION_SIGNATURE,
72 {NULL},
73 0
74 };
75
76 ///
77 /// Boot Option from variable Menu
78 ///
79 BM_MENU_OPTION BootOptionMenu = {
80 BM_MENU_OPTION_SIGNATURE,
81 {NULL},
82 0
83 };
84
85 ///
86 /// Driver Option from variable menu
87 ///
88 BM_MENU_OPTION DriverOptionMenu = {
89 BM_MENU_OPTION_SIGNATURE,
90 {NULL},
91 0
92 };
93
94 ///
95 /// Files and sub-directories in current directory menu
96 ///
97 BM_MENU_OPTION DirectoryMenu = {
98 BM_MENU_OPTION_SIGNATURE,
99 {NULL},
100 0
101 };
102
103 ///
104 /// Handles in current system selection menu
105 ///
106 BM_MENU_OPTION DriverMenu = {
107 BM_MENU_OPTION_SIGNATURE,
108 {NULL},
109 0
110 };
111
112 BM_MENU_OPTION TerminalMenu = {
113 BM_MENU_OPTION_SIGNATURE,
114 {NULL},
115 0
116 };
117
118 ///
119 /// Value and string token correspondency for BaudRate
120 ///
121 COM_ATTR BaudRateList[19] = {
122 {
123 115200,
124 STRING_TOKEN(STR_COM_BAUD_RATE_0)
125 },
126 {
127 57600,
128 STRING_TOKEN(STR_COM_BAUD_RATE_1)
129 },
130 {
131 38400,
132 STRING_TOKEN(STR_COM_BAUD_RATE_2)
133 },
134 {
135 19200,
136 STRING_TOKEN(STR_COM_BAUD_RATE_3)
137 },
138 {
139 9600,
140 STRING_TOKEN(STR_COM_BAUD_RATE_4)
141 },
142 {
143 7200,
144 STRING_TOKEN(STR_COM_BAUD_RATE_5)
145 },
146 {
147 4800,
148 STRING_TOKEN(STR_COM_BAUD_RATE_6)
149 },
150 {
151 3600,
152 STRING_TOKEN(STR_COM_BAUD_RATE_7)
153 },
154 {
155 2400,
156 STRING_TOKEN(STR_COM_BAUD_RATE_8)
157 },
158 {
159 2000,
160 STRING_TOKEN(STR_COM_BAUD_RATE_9)
161 },
162 {
163 1800,
164 STRING_TOKEN(STR_COM_BAUD_RATE_10)
165 },
166 {
167 1200,
168 STRING_TOKEN(STR_COM_BAUD_RATE_11)
169 },
170 {
171 600,
172 STRING_TOKEN(STR_COM_BAUD_RATE_12)
173 },
174 {
175 300,
176 STRING_TOKEN(STR_COM_BAUD_RATE_13)
177 },
178 {
179 150,
180 STRING_TOKEN(STR_COM_BAUD_RATE_14)
181 },
182 {
183 134,
184 STRING_TOKEN(STR_COM_BAUD_RATE_15)
185 },
186 {
187 110,
188 STRING_TOKEN(STR_COM_BAUD_RATE_16)
189 },
190 {
191 75,
192 STRING_TOKEN(STR_COM_BAUD_RATE_17)
193 },
194 {
195 50,
196 STRING_TOKEN(STR_COM_BAUD_RATE_18)
197 }
198 };
199
200 ///
201 /// Value and string token correspondency for DataBits
202 ///
203 COM_ATTR DataBitsList[4] = {
204 {
205 5,
206 STRING_TOKEN(STR_COM_DATA_BITS_0)
207 },
208 {
209 6,
210 STRING_TOKEN(STR_COM_DATA_BITS_1)
211 },
212 {
213 7,
214 STRING_TOKEN(STR_COM_DATA_BITS_2)
215 },
216 {
217 8,
218 STRING_TOKEN(STR_COM_DATA_BITS_3)
219 }
220 };
221
222 ///
223 /// Value and string token correspondency for Parity
224 ///
225 COM_ATTR ParityList[5] = {
226 {
227 NoParity,
228 STRING_TOKEN(STR_COM_PAR_0)
229 },
230 {
231 EvenParity,
232 STRING_TOKEN(STR_COM_PAR_1)
233 },
234 {
235 OddParity,
236 STRING_TOKEN(STR_COM_PAR_2)
237 },
238 {
239 MarkParity,
240 STRING_TOKEN(STR_COM_PAR_3)
241 },
242 {
243 SpaceParity,
244 STRING_TOKEN(STR_COM_PAR_4)
245 }
246 };
247
248 ///
249 /// Value and string token correspondency for Baudreate
250 ///
251 COM_ATTR StopBitsList[3] = {
252 {
253 OneStopBit,
254 STRING_TOKEN(STR_COM_STOP_BITS_0)
255 },
256 {
257 OneFiveStopBits,
258 STRING_TOKEN(STR_COM_STOP_BITS_1)
259 },
260 {
261 TwoStopBits,
262 STRING_TOKEN(STR_COM_STOP_BITS_2)
263 }
264 };
265
266 ///
267 /// Guid for messaging path, used in Serial port setting.
268 ///
269 EFI_GUID TerminalTypeGuid[4] = {
270 DEVICE_PATH_MESSAGING_PC_ANSI,
271 DEVICE_PATH_MESSAGING_VT_100,
272 DEVICE_PATH_MESSAGING_VT_100_PLUS,
273 DEVICE_PATH_MESSAGING_VT_UTF8
274 };