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