fix some minor warning
[mirror_edk2.git] / EdkUnixPkg / Dxe / PlatformBds / Generic / BootMaint / Data.c
1 /*++
2
3 Copyright (c) 2006, Intel Corporation
4 All rights reserved. This program and the accompanying materials
5 are licensed and made available under the terms and conditions of the BSD License
6 which accompanies this distribution. The full text of the license may be found at
7 http://opensource.org/licenses/bsd-license.php
8
9 THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
10 WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
11
12 Module Name:
13
14 Data.c
15
16 Abstract:
17
18 Define some data used for Boot Maint
19
20 Revision History
21
22 --*/
23
24 #include "BootMaint.h"
25
26 EFI_HII_UPDATE_DATA *UpdateData;
27 STRING_DEPOSITORY *FileOptionStrDepository;
28 STRING_DEPOSITORY *ConsoleOptionStrDepository;
29 STRING_DEPOSITORY *BootOptionStrDepository;
30 STRING_DEPOSITORY *BootOptionHelpStrDepository;
31 STRING_DEPOSITORY *DriverOptionStrDepository;
32 STRING_DEPOSITORY *DriverOptionHelpStrDepository;
33 STRING_DEPOSITORY *TerminalStrDepository;
34
35 //
36 // Terminal type string token storage
37 //
38 UINT16 TerminalType[] = {
39 STRING_TOKEN(STR_COM_TYPE_0),
40 STRING_TOKEN(STR_COM_TYPE_1),
41 STRING_TOKEN(STR_COM_TYPE_2),
42 STRING_TOKEN(STR_COM_TYPE_3),
43 };
44
45 //
46 // File system selection menu
47 //
48 BM_MENU_OPTION FsOptionMenu = {
49 BM_MENU_OPTION_SIGNATURE,
50 { NULL, NULL},
51 0
52 };
53
54 //
55 // Console Input Device Selection Menu
56 //
57 BM_MENU_OPTION ConsoleInpMenu = {
58 BM_MENU_OPTION_SIGNATURE,
59 { NULL, NULL},
60 0
61 };
62
63 //
64 // Console Output Device Selection Menu
65 //
66 BM_MENU_OPTION ConsoleOutMenu = {
67 BM_MENU_OPTION_SIGNATURE,
68 { NULL, NULL},
69 0
70 };
71
72 //
73 // Error Output Device Selection Menu
74 //
75 BM_MENU_OPTION ConsoleErrMenu = {
76 BM_MENU_OPTION_SIGNATURE,
77 { NULL, NULL},
78 0
79 };
80
81 //
82 // Boot Option from variable Menu
83 //
84 BM_MENU_OPTION BootOptionMenu = {
85 BM_MENU_OPTION_SIGNATURE,
86 { NULL, NULL},
87 0
88 };
89
90 //
91 // Driver Option from variable menu
92 //
93 BM_MENU_OPTION DriverOptionMenu = {
94 BM_MENU_OPTION_SIGNATURE,
95 { NULL, NULL},
96 0
97 };
98
99 //
100 // Legacy FD Info from LegacyBios.GetBbsInfo()
101 //
102 BM_MENU_OPTION LegacyFDMenu = {
103 BM_MENU_OPTION_SIGNATURE,
104 { NULL, NULL},
105 0
106 };
107
108 //
109 // Legacy HD Info from LegacyBios.GetBbsInfo()
110 //
111 BM_MENU_OPTION LegacyHDMenu = {
112 BM_MENU_OPTION_SIGNATURE,
113 { NULL, NULL},
114 0
115 };
116
117 //
118 // Legacy CD Info from LegacyBios.GetBbsInfo()
119 //
120 BM_MENU_OPTION LegacyCDMenu = {
121 BM_MENU_OPTION_SIGNATURE,
122 { NULL, NULL},
123 0
124 };
125
126 //
127 // Legacy NET Info from LegacyBios.GetBbsInfo()
128 //
129 BM_MENU_OPTION LegacyNETMenu = {
130 BM_MENU_OPTION_SIGNATURE,
131 { NULL, NULL},
132 0
133 };
134
135 //
136 // Legacy NET Info from LegacyBios.GetBbsInfo()
137 //
138 BM_MENU_OPTION LegacyBEVMenu = {
139 BM_MENU_OPTION_SIGNATURE,
140 { NULL, NULL},
141 0
142 };
143
144 //
145 // Files and sub-directories in current directory menu
146 //
147 BM_MENU_OPTION DirectoryMenu = {
148 BM_MENU_OPTION_SIGNATURE,
149 { NULL, NULL},
150 0
151 };
152
153 //
154 // Handles in current system selection menu
155 //
156 BM_MENU_OPTION DriverMenu = {
157 BM_MENU_OPTION_SIGNATURE,
158 { NULL, NULL},
159 0
160 };
161
162 BM_MENU_OPTION TerminalMenu = {
163 BM_MENU_OPTION_SIGNATURE,
164 { NULL, NULL},
165 0
166 };
167
168 //
169 // Value and string token correspondency for BaudRate
170 //
171 COM_ATTR BaudRateList[19] = {
172 {
173 115200,
174 STRING_TOKEN(STR_COM_BAUD_RATE_0)
175 },
176 {
177 57600,
178 STRING_TOKEN(STR_COM_BAUD_RATE_1)
179 },
180 {
181 38400,
182 STRING_TOKEN(STR_COM_BAUD_RATE_2)
183 },
184 {
185 19200,
186 STRING_TOKEN(STR_COM_BAUD_RATE_3)
187 },
188 {
189 9600,
190 STRING_TOKEN(STR_COM_BAUD_RATE_4)
191 },
192 {
193 7200,
194 STRING_TOKEN(STR_COM_BAUD_RATE_5)
195 },
196 {
197 4800,
198 STRING_TOKEN(STR_COM_BAUD_RATE_6)
199 },
200 {
201 3600,
202 STRING_TOKEN(STR_COM_BAUD_RATE_7)
203 },
204 {
205 2400,
206 STRING_TOKEN(STR_COM_BAUD_RATE_8)
207 },
208 {
209 2000,
210 STRING_TOKEN(STR_COM_BAUD_RATE_9)
211 },
212 {
213 1800,
214 STRING_TOKEN(STR_COM_BAUD_RATE_10)
215 },
216 {
217 1200,
218 STRING_TOKEN(STR_COM_BAUD_RATE_11)
219 },
220 {
221 600,
222 STRING_TOKEN(STR_COM_BAUD_RATE_12)
223 },
224 {
225 300,
226 STRING_TOKEN(STR_COM_BAUD_RATE_13)
227 },
228 {
229 150,
230 STRING_TOKEN(STR_COM_BAUD_RATE_14)
231 },
232 {
233 134,
234 STRING_TOKEN(STR_COM_BAUD_RATE_15)
235 },
236 {
237 110,
238 STRING_TOKEN(STR_COM_BAUD_RATE_16)
239 },
240 {
241 75,
242 STRING_TOKEN(STR_COM_BAUD_RATE_17)
243 },
244 {
245 50,
246 STRING_TOKEN(STR_COM_BAUD_RATE_18)
247 }
248 };
249
250 //
251 // Value and string token correspondency for DataBits
252 //
253 COM_ATTR DataBitsList[4] = {
254 {
255 5,
256 STRING_TOKEN(STR_COM_DATA_BITS_0)
257 },
258 {
259 6,
260 STRING_TOKEN(STR_COM_DATA_BITS_1)
261 },
262 {
263 7,
264 STRING_TOKEN(STR_COM_DATA_BITS_2)
265 },
266 {
267 8,
268 STRING_TOKEN(STR_COM_DATA_BITS_3)
269 }
270 };
271
272 //
273 // Value and string token correspondency for Parity
274 //
275 COM_ATTR ParityList[5] = {
276 {
277 NoParity,
278 STRING_TOKEN(STR_COM_PAR_0)
279 },
280 {
281 EvenParity,
282 STRING_TOKEN(STR_COM_PAR_1)
283 },
284 {
285 OddParity,
286 STRING_TOKEN(STR_COM_PAR_2)
287 },
288 {
289 MarkParity,
290 STRING_TOKEN(STR_COM_PAR_3)
291 },
292 {
293 SpaceParity,
294 STRING_TOKEN(STR_COM_PAR_4)
295 }
296 };
297
298 //
299 // Value and string token correspondency for Baudreate
300 //
301 COM_ATTR StopBitsList[3] = {
302 {
303 OneStopBit,
304 STRING_TOKEN(STR_COM_STOP_BITS_0)
305 },
306 {
307 OneFiveStopBits,
308 STRING_TOKEN(STR_COM_STOP_BITS_1)
309 },
310 {
311 TwoStopBits,
312 STRING_TOKEN(STR_COM_STOP_BITS_2)
313 }
314 };
315
316 //
317 // Guid for messaging path, used in Serial port setting.
318 //
319 EFI_GUID Guid[4] = {
320 DEVICE_PATH_MESSAGING_PC_ANSI,
321 DEVICE_PATH_MESSAGING_VT_100,
322 DEVICE_PATH_MESSAGING_VT_100_PLUS,
323 DEVICE_PATH_MESSAGING_VT_UTF8
324 };