]> git.proxmox.com Git - mirror_edk2.git/blob - EdkModulePkg/Library/EdkGenericPlatformBdsLib/BootMaint/Bm.vfr
EdkGenericPlatformBdsLib added
[mirror_edk2.git] / EdkModulePkg / Library / EdkGenericPlatformBdsLib / BootMaint / Bm.vfr
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 // bm.vfr
15 //
16 // Abstract:
17 //
18 // Boot Maintenance Utility Formset
19 //
20 // Revision History:
21 //
22 // --*/
23
24 #include "EdkGenericPlatformBdsLibStrDefs.h"
25 #include "FormGuid.h"
26
27 #pragma pack(1)
28
29 //
30 // This is the structure that will be used to store the
31 // question's current value. Use it at initialize time to
32 // set default value for each question. When using at run
33 // time, this map is returned by the callback function,
34 // so dynamically changing the question's value will be
35 // possible through this mechanism
36 //
37 typedef struct {
38
39 //
40 // Three questions displayed at the main page
41 // for Timeout, BootNext Variables respectively
42 //
43 UINT16 BootTimeOut;
44 UINT16 BootNext;
45
46 //
47 // This is the COM1 Attributes value storage
48 //
49 UINT8 COM1BaudRate;
50 UINT8 COM1DataRate;
51 UINT8 COM1StopBits;
52 UINT8 COM1Parity;
53 UINT8 COM1TerminalType;
54
55 //
56 // This is the COM2 Attributes value storage
57 //
58 UINT8 COM2BaudRate;
59 UINT8 COM2DataRate;
60 UINT8 COM2StopBits;
61 UINT8 COM2Parity;
62 UINT8 COM2TerminalType;
63
64 //
65 // Driver Option Add Handle page storage
66 //
67 UINT16 DriverAddHandleDesc[100];
68 UINT16 DriverAddHandleOptionalData[100];
69 UINT8 DriverAddActive;
70 UINT8 DriverAddForceReconnect;
71
72 //
73 // Console Input/Output/Errorout using COM port check storage
74 //
75 UINT8 ConsoleInputCOM1;
76 UINT8 ConsoleInputCOM2;
77 UINT8 ConsoleOutputCOM1;
78 UINT8 ConsoleOutputCOM2;
79 UINT8 ConsoleErrorCOM1;
80 UINT8 ConsoleErrorCOM2;
81
82 //
83 // At most 100 input/output/errorout device for console storage
84 //
85 UINT8 ConsoleCheck[100];
86
87 //
88 // Boot or Driver Option Order storage
89 //
90 UINT8 OptionOrder[100];
91 UINT8 DriverOptionToBeDeleted[100];
92
93 //
94 // Boot Option Delete storage
95 //
96 UINT8 BootOptionDel[100];
97 UINT8 DriverOptionDel[100];
98
99 //
100 // This is the Terminal Attributes value storage
101 //
102 UINT8 COMBaudRate;
103 UINT8 COMDataRate;
104 UINT8 COMStopBits;
105 UINT8 COMParity;
106 UINT8 COMTerminalType;
107
108 //
109 // Legacy Device Order Selection Storage
110 //
111 UINT8 LegacyFD[100];
112 UINT8 LegacyHD[100];
113 UINT8 LegacyCD[100];
114 UINT8 LegacyNET[100];
115 UINT8 LegacyBEV[100];
116 } BMM_FAKE_NV_DATA;
117 #pragma pack()
118
119
120 #define FORM_MAIN_ID 0x0001
121 #define FORM_BOOT_ADD_ID 0x0002
122 #define FORM_BOOT_DEL_ID 0x0003
123 #define FORM_BOOT_CHG_ID 0x0004
124 #define FORM_DRV_ADD_ID 0x0005
125 #define FORM_DRV_DEL_ID 0x0006
126 #define FORM_DRV_CHG_ID 0x0007
127 #define FORM_CON_MAIN_ID 0x0008
128 #define FORM_CON_IN_ID 0x0009
129 #define FORM_CON_OUT_ID 0x000A
130 #define FORM_CON_ERR_ID 0x000B
131 #define FORM_FILE_SEEK_ID 0x000C
132 #define FORM_FILE_NEW_SEEK_ID 0x000D
133 #define FORM_DRV_ADD_FILE_ID 0x000E
134 #define FORM_DRV_ADD_HANDLE_ID 0x000F
135 #define FORM_DRV_ADD_HANDLE_DESC_ID 0x0010
136 #define FORM_BOOT_NEXT_ID 0x0011
137 #define FORM_TIME_OUT_ID 0x0012
138 #define FORM_RESET 0x0013
139 #define FORM_BOOT_SETUP_ID 0x0014
140 #define FORM_DRIVER_SETUP_ID 0x0015
141 #define FORM_BOOT_LEGACY_DEVICE_ID 0x0016
142 #define FORM_CON_COM_ID 0x0017
143 #define FORM_CON_COM_SETUP_ID 0x0018
144 #define FORM_SET_FD_ORDER_ID 0x0019
145 #define FORM_SET_HD_ORDER_ID 0x001A
146 #define FORM_SET_CD_ORDER_ID 0x001B
147 #define FORM_SET_NET_ORDER_ID 0x001C
148 #define FORM_SET_BEV_ORDER_ID 0x001D
149
150 #define KEY_VALUE_BOOT_FROM_FILE 0x0092
151
152 formset
153 guid = MAIN_FORMSET_GUID,
154 title = STRING_TOKEN(STR_FORM_MAIN_TITLE), // uint8 opcode, uint8 length, guid Handle, uint16 Title
155 help = STRING_TOKEN(STR_NULL_STRING),
156 class = 0,
157 subclass = 0,
158
159 form formid = FORM_MAIN_ID,
160 title = STRING_TOKEN(STR_FORM_MAIN_TITLE);
161
162 goto FORM_BOOT_SETUP_ID,
163 prompt = STRING_TOKEN(STR_FORM_BOOT_SETUP_TITLE),
164 help = STRING_TOKEN(STR_FORM_BOOT_SETUP_HELP),
165 flags = INTERACTIVE | NV_ACCESS,
166 key = FORM_BOOT_SETUP_ID;
167
168 subtitle text = STRING_TOKEN(STR_NULL_STRING);
169
170 goto FORM_DRIVER_SETUP_ID,
171 prompt = STRING_TOKEN(STR_FORM_DRIVER_SETUP_TITLE),
172 help = STRING_TOKEN(STR_FORM_DRIVER_SETUP_HELP),
173 flags = INTERACTIVE | NV_ACCESS,
174 key = FORM_DRIVER_SETUP_ID;
175
176 subtitle text = STRING_TOKEN(STR_NULL_STRING);
177
178 goto FORM_CON_MAIN_ID,
179 prompt = STRING_TOKEN(STR_FORM_CON_MAIN_TITLE),
180 help = STRING_TOKEN(STR_FORM_CON_MAIN_HELP),
181 flags = INTERACTIVE | NV_ACCESS,
182 key = FORM_CON_MAIN_ID;
183
184 subtitle text = STRING_TOKEN(STR_NULL_STRING);
185
186 text
187 help = STRING_TOKEN(STR_BOOT_FROM_FILE_HELP),
188 text = STRING_TOKEN(STR_BOOT_FROM_FILE),
189 text = STRING_TOKEN(STR_NULL_STRING),
190 flags = INTERACTIVE | NV_ACCESS,
191 key = KEY_VALUE_BOOT_FROM_FILE;
192
193 subtitle text = STRING_TOKEN(STR_NULL_STRING);
194
195 // label FORM_MAIN_ID;
196
197 goto FORM_BOOT_NEXT_ID,
198 prompt = STRING_TOKEN(STR_FORM_BOOT_NEXT_TITLE),
199 help = STRING_TOKEN(STR_FORM_BOOT_NEXT_HELP),
200 flags = INTERACTIVE | NV_ACCESS,
201 key = FORM_BOOT_NEXT_ID;
202
203 goto FORM_TIME_OUT_ID,
204 prompt = STRING_TOKEN(STR_FORM_TIME_OUT_TITLE),
205 help = STRING_TOKEN(STR_FORM_TIME_OUT_HELP),
206 flags = INTERACTIVE | NV_ACCESS,
207 key = FORM_TIME_OUT_ID;
208
209 subtitle text = STRING_TOKEN(STR_NULL_STRING);
210
211 goto FORM_MAIN_ID,
212 prompt = STRING_TOKEN(STR_RESET),
213 help = STRING_TOKEN(STR_RESET),
214 flags = INTERACTIVE | NV_ACCESS,
215 key = FORM_RESET;
216
217 endform;
218
219 form formid = FORM_BOOT_SETUP_ID,
220 title = STRING_TOKEN(STR_FORM_BOOT_SETUP_TITLE);
221
222 goto FORM_MAIN_ID,
223 prompt = STRING_TOKEN(STR_FORM_GOTO_MAIN),
224 help = STRING_TOKEN(STR_FORM_GOTO_MAIN),
225 flags = INTERACTIVE | NV_ACCESS,
226 key = FORM_MAIN_ID;
227
228 goto FORM_BOOT_ADD_ID,
229 prompt = STRING_TOKEN(STR_FORM_BOOT_ADD_TITLE),
230 help = STRING_TOKEN(STR_FORM_BOOT_ADD_HELP),
231 flags = INTERACTIVE | NV_ACCESS,
232 key = FORM_BOOT_ADD_ID;
233
234 goto FORM_BOOT_DEL_ID,
235 prompt = STRING_TOKEN(STR_FORM_BOOT_DEL_TITLE),
236 help = STRING_TOKEN(STR_FORM_NEXT_BOOT_HELP),
237 flags = INTERACTIVE | NV_ACCESS,
238 key = FORM_BOOT_DEL_ID;
239
240 goto FORM_BOOT_CHG_ID,
241 prompt = STRING_TOKEN(STR_FORM_BOOT_CHG_TITLE),
242 help = STRING_TOKEN(STR_FORM_NEXT_BOOT_HELP),
243 flags = INTERACTIVE | NV_ACCESS,
244 key = FORM_BOOT_CHG_ID;
245
246 subtitle text = STRING_TOKEN(STR_NULL_STRING);
247 //
248 // We will add "Select Legacy Boot Floppy Drive" and "Select Legacy Boot Hard Drive"
249 // here dynamically
250 //
251 label FORM_BOOT_LEGACY_DEVICE_ID;
252
253 endform;
254
255 form formid = FORM_DRIVER_SETUP_ID,
256 title = STRING_TOKEN(STR_FORM_DRIVER_SETUP_TITLE);
257
258 goto FORM_MAIN_ID,
259 prompt = STRING_TOKEN(STR_FORM_GOTO_MAIN),
260 help = STRING_TOKEN(STR_FORM_GOTO_MAIN),
261 flags = INTERACTIVE | NV_ACCESS,
262 key = FORM_MAIN_ID;
263
264 goto FORM_DRV_ADD_ID,
265 prompt = STRING_TOKEN(STR_FORM_DRV_ADD_TITLE),
266 help = STRING_TOKEN(STR_FORM_DRV_ADD_HELP),
267 flags = INTERACTIVE | NV_ACCESS,
268 key = FORM_DRV_ADD_ID;
269
270 goto FORM_DRV_DEL_ID,
271 prompt = STRING_TOKEN(STR_FORM_DRV_DEL_TITLE),
272 help = STRING_TOKEN(STR_FORM_NEXT_BOOT_HELP),
273 flags = INTERACTIVE | NV_ACCESS,
274 key = FORM_DRV_DEL_ID;
275
276 goto FORM_DRV_CHG_ID,
277 prompt = STRING_TOKEN(STR_FORM_DRV_CHG_TITLE),
278 help = STRING_TOKEN(STR_FORM_NEXT_BOOT_HELP),
279 flags = INTERACTIVE | NV_ACCESS,
280 key = FORM_DRV_CHG_ID;
281 endform;
282
283 form formid = FORM_BOOT_ADD_ID,
284 title = STRING_TOKEN(STR_FORM_BOOT_ADD_TITLE);
285
286 label FORM_BOOT_ADD_ID;
287 endform;
288
289 form formid = FORM_BOOT_DEL_ID,
290 title = STRING_TOKEN(STR_FORM_BOOT_DEL_TITLE);
291
292 label FORM_BOOT_DEL_ID;
293 endform;
294
295 form formid = FORM_BOOT_CHG_ID,
296 title = STRING_TOKEN(STR_FORM_BOOT_CHG_TITLE);
297
298 label FORM_BOOT_CHG_ID;
299
300 //
301 // This tag is added for bypassing issue of setup browser
302 // setup browser could not support dynamic form very well.
303 //
304 checkbox varid = BMM_FAKE_NV_DATA.OptionOrder[0],
305 prompt = STRING_TOKEN(STR_FORM_BOOT_CHG_TITLE),
306 help = STRING_TOKEN(STR_FORM_BOOT_CHG_TITLE),
307 flags = 1,
308 key = 0,
309 endcheckbox;
310
311 endform;
312
313 form formid = FORM_BOOT_NEXT_ID,
314 title = STRING_TOKEN(STR_FORM_BOOT_NEXT_TITLE);
315
316 label FORM_BOOT_NEXT_ID;
317 endform;
318
319 form formid = FORM_TIME_OUT_ID,
320 title = STRING_TOKEN(STR_FORM_TIME_OUT_TITLE);
321
322 label FORM_TIME_OUT_ID;
323 endform;
324
325 form formid = FORM_DRV_ADD_ID,
326 title = STRING_TOKEN(STR_FORM_DRV_ADD_TITLE);
327
328 goto FORM_MAIN_ID,
329 prompt = STRING_TOKEN(STR_FORM_GOTO_MAIN),
330 help = STRING_TOKEN(STR_FORM_GOTO_MAIN),
331 flags = INTERACTIVE | NV_ACCESS,
332 key = FORM_MAIN_ID;
333
334 goto FORM_DRV_ADD_FILE_ID,
335 prompt = STRING_TOKEN(STR_FORM_DRV_ADD_FILE_TITLE),
336 help = STRING_TOKEN(STR_FORM_DRV_ADD_FILE_TITLE),
337 flags = INTERACTIVE | NV_ACCESS,
338 key = FORM_DRV_ADD_FILE_ID;
339
340 endform;
341
342 form formid = FORM_DRV_DEL_ID,
343 title = STRING_TOKEN(STR_FORM_DRV_DEL_TITLE);
344
345 label FORM_DRV_DEL_ID;
346
347 endform;
348
349 form formid = FORM_DRV_CHG_ID,
350 title = STRING_TOKEN(STR_FORM_DRV_CHG_TITLE);
351
352 label FORM_DRV_CHG_ID;
353
354 //
355 // This tag is added for bypassing issue of setup browser
356 // setup browser could not support dynamic form very well.
357 //
358 checkbox varid = BMM_FAKE_NV_DATA.OptionOrder[0],
359 prompt = STRING_TOKEN(STR_FORM_DRV_CHG_TITLE),
360 help = STRING_TOKEN(STR_FORM_DRV_CHG_TITLE),
361 flags = 1,
362 key = 0,
363 endcheckbox;
364
365 endform;
366
367 form formid = FORM_CON_MAIN_ID,
368 title = STRING_TOKEN(STR_FORM_CON_MAIN_TITLE);
369
370 goto FORM_MAIN_ID,
371 prompt = STRING_TOKEN(STR_FORM_GOTO_MAIN),
372 help = STRING_TOKEN(STR_FORM_GOTO_MAIN),
373 flags = INTERACTIVE | NV_ACCESS,
374 key = FORM_MAIN_ID;
375
376 goto FORM_CON_IN_ID,
377 prompt = STRING_TOKEN(STR_FORM_CON_IN_TITLE),
378 help = STRING_TOKEN(STR_FORM_CON_IN_HELP),
379 flags = INTERACTIVE | NV_ACCESS,
380 key = FORM_CON_IN_ID;
381
382 goto FORM_CON_OUT_ID,
383 prompt = STRING_TOKEN(STR_FORM_CON_OUT_TITLE),
384 help = STRING_TOKEN(STR_FORM_CON_OUT_HELP),
385 flags = INTERACTIVE | NV_ACCESS,
386 key = FORM_CON_OUT_ID;
387
388 goto FORM_CON_ERR_ID,
389 prompt = STRING_TOKEN(STR_FORM_STD_ERR_TITLE),
390 help = STRING_TOKEN(STR_FORM_STD_ERR_HELP),
391 flags = INTERACTIVE | NV_ACCESS,
392 key = FORM_CON_ERR_ID;
393
394 goto FORM_CON_COM_ID,
395 prompt = STRING_TOKEN(STR_FORM_COM_TITLE),
396 help = STRING_TOKEN(STR_FORM_COM_HELP),
397 flags = INTERACTIVE | NV_ACCESS,
398 key = FORM_CON_COM_ID;
399 endform;
400
401 form formid = FORM_CON_COM_ID,
402 title = STRING_TOKEN(STR_FORM_COM_TITLE);
403
404 label FORM_CON_COM_ID;
405 endform;
406
407 form formid = FORM_CON_COM_SETUP_ID,
408 title = STRING_TOKEN(STR_CON_COM_SETUP);
409
410 label FORM_CON_COM_SETUP_ID;
411 endform;
412
413 form formid = FORM_FILE_SEEK_ID,
414 title = STRING_TOKEN(STR_FORM_BOOT_ADD_TITLE);
415
416 label FORM_FILE_SEEK_ID;
417 endform;
418
419 form formid = FORM_FILE_NEW_SEEK_ID,
420 title = STRING_TOKEN(STR_FORM_BOOT_ADD_TITLE);
421
422 label FORM_FILE_NEW_SEEK_ID;
423 endform;
424
425 form formid = FORM_DRV_ADD_FILE_ID,
426 title = STRING_TOKEN(STR_FORM_DRV_ADD_FILE_TITLE);
427
428 label FORM_DRV_ADD_FILE_ID;
429 endform;
430
431 form formid = FORM_DRV_ADD_HANDLE_ID,
432 title = STRING_TOKEN(STR_FORM_DRV_ADD_HANDLE_TITLE);
433
434 label FORM_DRV_ADD_HANDLE_ID;
435 endform;
436
437 form formid = FORM_DRV_ADD_HANDLE_DESC_ID,
438 title = STRING_TOKEN(STR_FORM_DRV_ADD_DESC_TITLE);
439
440 label FORM_DRV_ADD_HANDLE_DESC_ID;
441
442 endform;
443
444 form formid = FORM_CON_IN_ID,
445 title = STRING_TOKEN(STR_FORM_CON_IN_TITLE);
446
447 label FORM_CON_IN_ID;
448
449 endform;
450
451 form formid = FORM_CON_OUT_ID,
452 title = STRING_TOKEN(STR_FORM_CON_OUT_TITLE);
453
454 label FORM_CON_OUT_ID;
455
456 endform;
457
458 form formid = FORM_CON_ERR_ID,
459 title = STRING_TOKEN(STR_FORM_STD_ERR_TITLE);
460
461 label FORM_CON_ERR_ID;
462
463 endform;
464
465 form formid = FORM_SET_FD_ORDER_ID,
466 title = STRING_TOKEN(STR_FORM_SET_FD_ORDER_TITLE);
467
468 label FORM_SET_FD_ORDER_ID;
469 endform;
470
471 form formid = FORM_SET_HD_ORDER_ID,
472 title = STRING_TOKEN(STR_FORM_SET_HD_ORDER_TITLE);
473
474 label FORM_SET_HD_ORDER_ID;
475 endform;
476
477 form formid = FORM_SET_CD_ORDER_ID,
478 title = STRING_TOKEN(STR_FORM_SET_CD_ORDER_TITLE);
479
480 label FORM_SET_CD_ORDER_ID;
481 endform;
482
483 form formid = FORM_SET_NET_ORDER_ID,
484 title = STRING_TOKEN(STR_FORM_SET_NET_ORDER_TITLE);
485
486 label FORM_SET_NET_ORDER_ID;
487 endform;
488
489 form formid = FORM_SET_BEV_ORDER_ID,
490 title = STRING_TOKEN(STR_FORM_SET_BEV_ORDER_TITLE);
491
492 label FORM_SET_BEV_ORDER_ID;
493 endform;
494
495 endformset;