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