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