]> git.proxmox.com Git - mirror_edk2.git/blob - MdeModulePkg/Library/BootMaintenanceManagerLib/BootMaintenanceManager.h
6934a692a6e91285d99ee1feea8916181b960663
[mirror_edk2.git] / MdeModulePkg / Library / BootMaintenanceManagerLib / BootMaintenanceManager.h
1 /** @file
2 Header file for boot maintenance module.
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 #ifndef _BOOT_MAINT_H_
16 #define _BOOT_MAINT_H_
17
18 #include "FormGuid.h"
19
20 #include <Guid/TtyTerm.h>
21 #include <Guid/MdeModuleHii.h>
22 #include <Guid/FileSystemVolumeLabelInfo.h>
23 #include <Guid/GlobalVariable.h>
24 #include <Guid/HiiBootMaintenanceFormset.h>
25
26 #include <Protocol/LoadFile.h>
27 #include <Protocol/HiiConfigAccess.h>
28 #include <Protocol/SimpleFileSystem.h>
29 #include <Protocol/SerialIo.h>
30 #include <Protocol/DevicePathToText.h>
31
32 #include <Library/PrintLib.h>
33 #include <Library/DebugLib.h>
34 #include <Library/BaseMemoryLib.h>
35 #include <Library/UefiBootServicesTableLib.h>
36 #include <Library/UefiLib.h>
37 #include <Library/MemoryAllocationLib.h>
38 #include <Library/UefiRuntimeServicesTableLib.h>
39 #include <Library/DevicePathLib.h>
40 #include <Library/HiiLib.h>
41 #include <Library/UefiHiiServicesLib.h>
42 #include <Library/UefiBootManagerLib.h>
43 #include <Library/FileExplorerLib.h>
44
45 #pragma pack(1)
46
47 ///
48 /// HII specific Vendor Device Path definition.
49 ///
50 typedef struct {
51 VENDOR_DEVICE_PATH VendorDevicePath;
52 EFI_DEVICE_PATH_PROTOCOL End;
53 } HII_VENDOR_DEVICE_PATH;
54 #pragma pack()
55
56 //
57 // Constants which are variable names used to access variables
58 //
59
60 #define VAR_CON_OUT_MODE L"ConOutMode"
61
62 //
63 // Variable created with this flag will be "Efi:...."
64 //
65 #define VAR_FLAG EFI_VARIABLE_BOOTSERVICE_ACCESS | EFI_VARIABLE_RUNTIME_ACCESS | EFI_VARIABLE_NON_VOLATILE
66
67 extern EFI_GUID mBootMaintGuid;
68 extern CHAR16 mBootMaintStorageName[];
69 //
70 // These are the VFR compiler generated data representing our VFR data.
71 //
72 extern UINT8 BootMaintenanceManagerBin[];
73
74 //
75 // Below are the number of options in Baudrate, Databits,
76 // Parity and Stopbits selection for serial ports.
77 //
78 #define BM_COM_ATTR_BUADRATE 19
79 #define BM_COM_ATTR_DATABITS 4
80 #define BM_COM_ATTR_PARITY 5
81 #define BM_COM_ATTR_STOPBITS 3
82
83 //
84 // Callback function helper
85 //
86 #define BMM_CALLBACK_DATA_SIGNATURE SIGNATURE_32 ('C', 'b', 'c', 'k')
87 #define BMM_CALLBACK_DATA_FROM_THIS(a) CR (a, BMM_CALLBACK_DATA, BmmConfigAccess, BMM_CALLBACK_DATA_SIGNATURE)
88
89 //
90 // Enumeration type definition
91 //
92 typedef UINT8 BBS_TYPE;
93
94 typedef enum _TYPE_OF_TERMINAL {
95 TerminalTypePcAnsi = 0,
96 TerminalTypeVt100,
97 TerminalTypeVt100Plus,
98 TerminalTypeVtUtf8,
99 TerminalTypeTtyTerm
100 } TYPE_OF_TERMINAL;
101
102 //
103 // All of the signatures that will be used in list structure
104 //
105 #define BM_MENU_OPTION_SIGNATURE SIGNATURE_32 ('m', 'e', 'n', 'u')
106 #define BM_LOAD_OPTION_SIGNATURE SIGNATURE_32 ('l', 'o', 'a', 'd')
107 #define BM_CONSOLE_OPTION_SIGNATURE SIGNATURE_32 ('c', 'n', 's', 'l')
108 #define BM_FILE_OPTION_SIGNATURE SIGNATURE_32 ('f', 'i', 'l', 'e')
109 #define BM_HANDLE_OPTION_SIGNATURE SIGNATURE_32 ('h', 'n', 'd', 'l')
110 #define BM_TERMINAL_OPTION_SIGNATURE SIGNATURE_32 ('t', 'r', 'm', 'l')
111 #define BM_MENU_ENTRY_SIGNATURE SIGNATURE_32 ('e', 'n', 't', 'r')
112
113 #define BM_LOAD_CONTEXT_SELECT 0x0
114 #define BM_CONSOLE_CONTEXT_SELECT 0x1
115 #define BM_FILE_CONTEXT_SELECT 0x2
116 #define BM_HANDLE_CONTEXT_SELECT 0x3
117 #define BM_TERMINAL_CONTEXT_SELECT 0x5
118
119 #define BM_CONSOLE_IN_CONTEXT_SELECT 0x6
120 #define BM_CONSOLE_OUT_CONTEXT_SELECT 0x7
121 #define BM_CONSOLE_ERR_CONTEXT_SELECT 0x8
122
123 //
124 // Buffer size for update data
125 //
126 #define UPDATE_DATA_SIZE 0x100000
127
128 //
129 // Namespace of callback keys used in display and file system navigation
130 //
131 #define MAX_BBS_OFFSET 0xE000
132 #define NET_OPTION_OFFSET 0xD800
133 #define BEV_OPTION_OFFSET 0xD000
134 #define FD_OPTION_OFFSET 0xC000
135 #define HD_OPTION_OFFSET 0xB000
136 #define CD_OPTION_OFFSET 0xA000
137 #define FILE_OPTION_OFFSET 0x8000
138 #define FILE_OPTION_MASK 0x7FFF
139 #define HANDLE_OPTION_OFFSET 0x7000
140 #define CONSOLE_OPTION_OFFSET 0x6000
141 #define TERMINAL_OPTION_OFFSET 0x5000
142 #define CONFIG_OPTION_OFFSET 0x1200
143 #define KEY_VALUE_OFFSET 0x1100
144 #define FORM_ID_OFFSET 0x1000
145
146 //
147 // VarOffset that will be used to create question
148 // all these values are computed from the structure
149 // defined below
150 //
151 #define VAR_OFFSET(Field) ((UINT16) ((UINTN) &(((BMM_FAKE_NV_DATA *) 0)->Field)))
152
153 //
154 // Question Id of Zero is invalid, so add an offset to it
155 //
156 #define QUESTION_ID(Field) (VAR_OFFSET (Field) + CONFIG_OPTION_OFFSET)
157
158 #define BOOT_TIME_OUT_VAR_OFFSET VAR_OFFSET (BootTimeOut)
159 #define BOOT_NEXT_VAR_OFFSET VAR_OFFSET (BootNext)
160 #define COM1_BAUD_RATE_VAR_OFFSET VAR_OFFSET (COM1BaudRate)
161 #define COM1_DATA_RATE_VAR_OFFSET VAR_OFFSET (COM1DataRate)
162 #define COM1_STOP_BITS_VAR_OFFSET VAR_OFFSET (COM1StopBits)
163 #define COM1_PARITY_VAR_OFFSET VAR_OFFSET (COM1Parity)
164 #define COM1_TERMINAL_VAR_OFFSET VAR_OFFSET (COM2TerminalType)
165 #define COM2_BAUD_RATE_VAR_OFFSET VAR_OFFSET (COM2BaudRate)
166 #define COM2_DATA_RATE_VAR_OFFSET VAR_OFFSET (COM2DataRate)
167 #define COM2_STOP_BITS_VAR_OFFSET VAR_OFFSET (COM2StopBits)
168 #define COM2_PARITY_VAR_OFFSET VAR_OFFSET (COM2Parity)
169 #define COM2_TERMINAL_VAR_OFFSET VAR_OFFSET (COM2TerminalType)
170 #define DRV_ADD_HANDLE_DESC_VAR_OFFSET VAR_OFFSET (DriverAddHandleDesc)
171 #define DRV_ADD_ACTIVE_VAR_OFFSET VAR_OFFSET (DriverAddActive)
172 #define DRV_ADD_RECON_VAR_OFFSET VAR_OFFSET (DriverAddForceReconnect)
173 #define CON_IN_COM1_VAR_OFFSET VAR_OFFSET (ConsoleInputCOM1)
174 #define CON_IN_COM2_VAR_OFFSET VAR_OFFSET (ConsoleInputCOM2)
175 #define CON_OUT_COM1_VAR_OFFSET VAR_OFFSET (ConsoleOutputCOM1)
176 #define CON_OUT_COM2_VAR_OFFSET VAR_OFFSET (ConsoleOutputCOM2)
177 #define CON_ERR_COM1_VAR_OFFSET VAR_OFFSET (ConsoleErrorCOM1)
178 #define CON_ERR_COM2_VAR_OFFSET VAR_OFFSET (ConsoleErrorCOM2)
179 #define CON_MODE_VAR_OFFSET VAR_OFFSET (ConsoleOutMode)
180 #define CON_DEVICE_VAR_OFFSET VAR_OFFSET (ConsoleCheck)
181 #define CON_IN_DEVICE_VAR_OFFSET VAR_OFFSET (ConsoleInCheck)
182 #define CON_OUT_DEVICE_VAR_OFFSET VAR_OFFSET (ConsoleOutCheck)
183 #define CON_ERR_DEVICE_VAR_OFFSET VAR_OFFSET (ConsoleErrCheck)
184 #define BOOT_OPTION_ORDER_VAR_OFFSET VAR_OFFSET (BootOptionOrder)
185 #define DRIVER_OPTION_ORDER_VAR_OFFSET VAR_OFFSET (DriverOptionOrder)
186 #define BOOT_OPTION_DEL_VAR_OFFSET VAR_OFFSET (BootOptionDel)
187 #define DRIVER_OPTION_DEL_VAR_OFFSET VAR_OFFSET (DriverOptionDel)
188 #define DRIVER_ADD_OPTION_VAR_OFFSET VAR_OFFSET (DriverAddHandleOptionalData)
189 #define COM_BAUD_RATE_VAR_OFFSET VAR_OFFSET (COMBaudRate)
190 #define COM_DATA_RATE_VAR_OFFSET VAR_OFFSET (COMDataRate)
191 #define COM_STOP_BITS_VAR_OFFSET VAR_OFFSET (COMStopBits)
192 #define COM_PARITY_VAR_OFFSET VAR_OFFSET (COMParity)
193 #define COM_TERMINAL_VAR_OFFSET VAR_OFFSET (COMTerminalType)
194 #define COM_FLOWCONTROL_VAR_OFFSET VAR_OFFSET (COMFlowControl)
195
196 #define BOOT_TIME_OUT_QUESTION_ID QUESTION_ID (BootTimeOut)
197 #define BOOT_NEXT_QUESTION_ID QUESTION_ID (BootNext)
198 #define COM1_BAUD_RATE_QUESTION_ID QUESTION_ID (COM1BaudRate)
199 #define COM1_DATA_RATE_QUESTION_ID QUESTION_ID (COM1DataRate)
200 #define COM1_STOP_BITS_QUESTION_ID QUESTION_ID (COM1StopBits)
201 #define COM1_PARITY_QUESTION_ID QUESTION_ID (COM1Parity)
202 #define COM1_TERMINAL_QUESTION_ID QUESTION_ID (COM2TerminalType)
203 #define COM2_BAUD_RATE_QUESTION_ID QUESTION_ID (COM2BaudRate)
204 #define COM2_DATA_RATE_QUESTION_ID QUESTION_ID (COM2DataRate)
205 #define COM2_STOP_BITS_QUESTION_ID QUESTION_ID (COM2StopBits)
206 #define COM2_PARITY_QUESTION_ID QUESTION_ID (COM2Parity)
207 #define COM2_TERMINAL_QUESTION_ID QUESTION_ID (COM2TerminalType)
208 #define DRV_ADD_HANDLE_DESC_QUESTION_ID QUESTION_ID (DriverAddHandleDesc)
209 #define DRV_ADD_ACTIVE_QUESTION_ID QUESTION_ID (DriverAddActive)
210 #define DRV_ADD_RECON_QUESTION_ID QUESTION_ID (DriverAddForceReconnect)
211 #define CON_IN_COM1_QUESTION_ID QUESTION_ID (ConsoleInputCOM1)
212 #define CON_IN_COM2_QUESTION_ID QUESTION_ID (ConsoleInputCOM2)
213 #define CON_OUT_COM1_QUESTION_ID QUESTION_ID (ConsoleOutputCOM1)
214 #define CON_OUT_COM2_QUESTION_ID QUESTION_ID (ConsoleOutputCOM2)
215 #define CON_ERR_COM1_QUESTION_ID QUESTION_ID (ConsoleErrorCOM1)
216 #define CON_ERR_COM2_QUESTION_ID QUESTION_ID (ConsoleErrorCOM2)
217 #define CON_MODE_QUESTION_ID QUESTION_ID (ConsoleOutMode)
218 #define CON_DEVICE_QUESTION_ID QUESTION_ID (ConsoleCheck)
219 #define CON_IN_DEVICE_QUESTION_ID QUESTION_ID (ConsoleInCheck)
220 #define CON_OUT_DEVICE_QUESTION_ID QUESTION_ID (ConsoleOutCheck)
221 #define CON_ERR_DEVICE_QUESTION_ID QUESTION_ID (ConsoleErrCheck)
222 #define BOOT_OPTION_ORDER_QUESTION_ID QUESTION_ID (BootOptionOrder)
223 #define DRIVER_OPTION_ORDER_QUESTION_ID QUESTION_ID (DriverOptionOrder)
224 #define BOOT_OPTION_DEL_QUESTION_ID QUESTION_ID (BootOptionDel)
225 #define DRIVER_OPTION_DEL_QUESTION_ID QUESTION_ID (DriverOptionDel)
226 #define DRIVER_ADD_OPTION_QUESTION_ID QUESTION_ID (DriverAddHandleOptionalData)
227 #define COM_BAUD_RATE_QUESTION_ID QUESTION_ID (COMBaudRate)
228 #define COM_DATA_RATE_QUESTION_ID QUESTION_ID (COMDataRate)
229 #define COM_STOP_BITS_QUESTION_ID QUESTION_ID (COMStopBits)
230 #define COM_PARITY_QUESTION_ID QUESTION_ID (COMParity)
231 #define COM_TERMINAL_QUESTION_ID QUESTION_ID (COMTerminalType)
232 #define COM_FLOWCONTROL_QUESTION_ID QUESTION_ID (COMFlowControl)
233
234 #define STRING_DEPOSITORY_NUMBER 8
235
236 ///
237 /// Serial Ports attributes, first one is the value for
238 /// return from callback function, stringtoken is used to
239 /// display the value properly
240 ///
241 typedef struct {
242 UINTN Value;
243 UINT16 StringToken;
244 } COM_ATTR;
245
246 typedef struct {
247 UINT64 BaudRate;
248 UINT8 DataBits;
249 UINT8 Parity;
250 UINT8 StopBits;
251
252 UINT8 BaudRateIndex;
253 UINT8 DataBitsIndex;
254 UINT8 ParityIndex;
255 UINT8 StopBitsIndex;
256
257 UINT8 FlowControl;
258
259 UINT8 IsConIn;
260 UINT8 IsConOut;
261 UINT8 IsStdErr;
262 UINT8 TerminalType;
263
264 EFI_DEVICE_PATH_PROTOCOL *DevicePath;
265 } BM_TERMINAL_CONTEXT;
266
267 typedef struct {
268 BOOLEAN IsBootNext;
269 BOOLEAN LoadOptionModified;
270 BOOLEAN Deleted;
271
272 BOOLEAN IsLegacy;
273 BOOLEAN IsActive;
274 BOOLEAN ForceReconnect;
275 UINTN OptionalDataSize;
276
277 UINTN LoadOptionSize;
278 UINT8 *LoadOption;
279
280 UINT32 Attributes;
281 UINT16 FilePathListLength;
282 UINT16 *Description;
283 EFI_DEVICE_PATH_PROTOCOL *FilePathList;
284 UINT8 *OptionalData;
285
286 UINT16 BbsIndex;
287 } BM_LOAD_CONTEXT;
288
289 typedef struct {
290
291 BOOLEAN IsActive;
292
293 BOOLEAN IsTerminal;
294
295 EFI_DEVICE_PATH_PROTOCOL *DevicePath;
296 } BM_CONSOLE_CONTEXT;
297
298 typedef struct {
299 UINTN Column;
300 UINTN Row;
301 } CONSOLE_OUT_MODE;
302
303 typedef struct {
304 EFI_HANDLE Handle;
305 EFI_DEVICE_PATH_PROTOCOL *DevicePath;
306 EFI_FILE_HANDLE FHandle;
307 UINT16 *FileName;
308 EFI_FILE_SYSTEM_VOLUME_LABEL *Info;
309
310 BOOLEAN IsRoot;
311 BOOLEAN IsDir;
312 BOOLEAN IsRemovableMedia;
313 BOOLEAN IsLoadFile;
314 BOOLEAN IsBootLegacy;
315 } BM_FILE_CONTEXT;
316
317 typedef struct {
318 EFI_HANDLE Handle;
319 EFI_DEVICE_PATH_PROTOCOL *DevicePath;
320 } BM_HANDLE_CONTEXT;
321
322 typedef struct {
323 UINTN Signature;
324 LIST_ENTRY Head;
325 UINTN MenuNumber;
326 } BM_MENU_OPTION;
327
328 typedef struct {
329 UINTN Signature;
330 LIST_ENTRY Link;
331 UINTN OptionNumber;
332 UINT16 *DisplayString;
333 UINT16 *HelpString;
334 EFI_STRING_ID DisplayStringToken;
335 EFI_STRING_ID HelpStringToken;
336 UINTN ContextSelection;
337 VOID *VariableContext;
338 } BM_MENU_ENTRY;
339
340 typedef struct {
341
342 UINTN Signature;
343
344 EFI_HII_HANDLE BmmHiiHandle;
345 EFI_HANDLE BmmDriverHandle;
346 ///
347 /// Boot Maintenance Manager Produced protocols
348 ///
349 EFI_HII_CONFIG_ACCESS_PROTOCOL BmmConfigAccess;
350 EFI_FORM_BROWSER2_PROTOCOL *FormBrowser2;
351
352 BM_MENU_ENTRY *MenuEntry;
353 BM_HANDLE_CONTEXT *HandleContext;
354 BM_FILE_CONTEXT *FileContext;
355 BM_LOAD_CONTEXT *LoadContext;
356 BM_TERMINAL_CONTEXT *TerminalContext;
357 UINTN CurrentTerminal;
358 BBS_TYPE BbsType;
359
360 //
361 // BMM main formset callback data.
362 //
363
364 EFI_FORM_ID BmmCurrentPageId;
365 EFI_FORM_ID BmmPreviousPageId;
366 BOOLEAN BmmAskSaveOrNot;
367 BMM_FAKE_NV_DATA BmmFakeNvData;
368 BMM_FAKE_NV_DATA BmmOldFakeNVData;
369
370 } BMM_CALLBACK_DATA;
371
372 /**
373
374 Find drivers that will be added as Driver#### variables from handles
375 in current system environment
376 All valid handles in the system except those consume SimpleFs, LoadFile
377 are stored in DriverMenu for future use.
378
379 @retval EFI_SUCCESS The function complets successfully.
380 @return Other value if failed to build the DriverMenu.
381
382 **/
383 EFI_STATUS
384 BOpt_FindDrivers (
385 VOID
386 );
387
388 /**
389
390 Build the BootOptionMenu according to BootOrder Variable.
391 This Routine will access the Boot#### to get EFI_LOAD_OPTION.
392
393 @param CallbackData The BMM context data.
394
395 @return The number of the Var Boot####.
396
397 **/
398 EFI_STATUS
399 BOpt_GetBootOptions (
400 IN BMM_CALLBACK_DATA *CallbackData
401 );
402
403 /**
404
405 Build up all DriverOptionMenu
406
407 @param CallbackData The BMM context data.
408
409 @return EFI_SUCESS The functin completes successfully.
410 @retval EFI_OUT_OF_RESOURCES Not enough memory to compete the operation.
411
412
413 **/
414 EFI_STATUS
415 BOpt_GetDriverOptions (
416 IN BMM_CALLBACK_DATA *CallbackData
417 );
418
419 /**
420 Free resources allocated in Allocate Rountine.
421
422 @param FreeMenu Menu to be freed
423
424 **/
425 VOID
426 BOpt_FreeMenu (
427 BM_MENU_OPTION *FreeMenu
428 );
429
430 /**
431
432 Get the Option Number that has not been allocated for use.
433
434 @param Type The type of Option.
435
436 @return The available Option Number.
437
438 **/
439 UINT16
440 BOpt_GetOptionNumber (
441 CHAR16 *Type
442 );
443
444 /**
445
446 Get the Option Number for Boot#### that does not used.
447
448 @return The available Option Number.
449
450 **/
451 UINT16
452 BOpt_GetBootOptionNumber (
453 VOID
454 );
455
456 /**
457
458 Get the Option Number for Driver#### that does not used.
459
460 @return The unused Option Number.
461
462 **/
463 UINT16
464 BOpt_GetDriverOptionNumber (
465 VOID
466 );
467
468 /**
469 Create a menu entry give a Menu type.
470
471 @param MenuType The Menu type to be created.
472
473
474 @retval NULL If failed to create the menu.
475 @return The menu.
476
477 **/
478 BM_MENU_ENTRY *
479 BOpt_CreateMenuEntry (
480 UINTN MenuType
481 );
482
483 /**
484 Free up all resource allocated for a BM_MENU_ENTRY.
485
486 @param MenuEntry A pointer to BM_MENU_ENTRY.
487
488 **/
489 VOID
490 BOpt_DestroyMenuEntry (
491 BM_MENU_ENTRY *MenuEntry
492 );
493
494 /**
495 Get the Menu Entry from the list in Menu Entry List.
496
497 If MenuNumber is great or equal to the number of Menu
498 Entry in the list, then ASSERT.
499
500 @param MenuOption The Menu Entry List to read the menu entry.
501 @param MenuNumber The index of Menu Entry.
502
503 @return The Menu Entry.
504
505 **/
506 BM_MENU_ENTRY *
507 BOpt_GetMenuEntry (
508 BM_MENU_OPTION *MenuOption,
509 UINTN MenuNumber
510 );
511
512 /**
513 Get option number according to Boot#### and BootOrder variable.
514 The value is saved as #### + 1.
515
516 @param CallbackData The BMM context data.
517 **/
518 VOID
519 GetBootOrder (
520 IN BMM_CALLBACK_DATA *CallbackData
521 );
522
523 /**
524 Get driver option order from globalc DriverOptionMenu.
525
526 @param CallbackData The BMM context data.
527
528 **/
529 VOID
530 GetDriverOrder (
531 IN BMM_CALLBACK_DATA *CallbackData
532 );
533
534 //
535 // Locate all serial io devices for console
536 //
537 /**
538 Build a list containing all serial devices.
539
540 @retval EFI_SUCCESS The function complete successfully.
541 @retval EFI_UNSUPPORTED No serial ports present.
542
543 **/
544 EFI_STATUS
545 LocateSerialIo (
546 VOID
547 );
548
549 //
550 // Initializing Console menu
551 //
552 /**
553 Build up ConsoleOutMenu, ConsoleInpMenu and ConsoleErrMenu
554
555 @retval EFI_SUCCESS The function always complete successfully.
556
557 **/
558 EFI_STATUS
559 GetAllConsoles(
560 VOID
561 );
562
563 //
564 // Get current mode information
565 //
566 /**
567 Get mode number according to column and row
568
569 @param CallbackData The BMM context data.
570 **/
571 VOID
572 GetConsoleOutMode (
573 IN BMM_CALLBACK_DATA *CallbackData
574 );
575
576 //
577 // Cleaning up console menu
578 //
579 /**
580 Free ConsoleOutMenu, ConsoleInpMenu and ConsoleErrMenu
581
582 @retval EFI_SUCCESS The function always complete successfully.
583 **/
584 EFI_STATUS
585 FreeAllConsoles (
586 VOID
587 );
588
589 /**
590 Update the device path that describing a terminal device
591 based on the new BaudRate, Data Bits, parity and Stop Bits
592 set.
593
594 @param DevicePath The devicepath protocol instance wanted to be updated.
595
596 **/
597 VOID
598 ChangeVariableDevicePath (
599 IN OUT EFI_DEVICE_PATH_PROTOCOL *DevicePath
600 );
601
602 /**
603 Update the multi-instance device path of Terminal Device based on
604 the global TerminalMenu. If ChangeTernimal is TRUE, the terminal
605 device path in the Terminal Device in TerminalMenu is also updated.
606
607 @param DevicePath The multi-instance device path.
608 @param ChangeTerminal TRUE, then device path in the Terminal Device
609 in TerminalMenu is also updated; FALSE, no update.
610
611 @return EFI_SUCCESS The function completes successfully.
612
613 **/
614 EFI_STATUS
615 ChangeTerminalDevicePath (
616 IN OUT EFI_DEVICE_PATH_PROTOCOL *DevicePath,
617 IN BOOLEAN ChangeTerminal
618 );
619
620 //
621 // Variable operation by menu selection
622 //
623 /**
624 This function create a currently loaded Boot Option from
625 the BMM. It then appends this Boot Option to the end of
626 the "BootOrder" list. It also append this Boot Opotion to the end
627 of BootOptionMenu.
628
629 @param CallbackData The BMM context data.
630
631 @retval EFI_OUT_OF_RESOURCES If not enought memory to complete the operation.
632 @retval EFI_SUCCESS If function completes successfully.
633
634 **/
635 EFI_STATUS
636 Var_UpdateBootOption (
637 IN BMM_CALLBACK_DATA *CallbackData
638 );
639
640 /**
641 Delete Boot Option that represent a Deleted state in BootOptionMenu.
642 After deleting this boot option, call Var_ChangeBootOrder to
643 make sure BootOrder is in valid state.
644
645 @retval EFI_SUCCESS If all boot load option EFI Variables corresponding to
646 BM_LOAD_CONTEXT marked for deletion is deleted
647 @return Others If failed to update the "BootOrder" variable after deletion.
648
649 **/
650 EFI_STATUS
651 Var_DelBootOption (
652 VOID
653 );
654
655 /**
656 After any operation on Boot####, there will be a discrepancy in BootOrder.
657 Since some are missing but in BootOrder, while some are present but are
658 not reflected by BootOrder. Then a function rebuild BootOrder from
659 scratch by content from BootOptionMenu is needed.
660
661 @retval EFI_SUCCESS The boot order is updated successfully.
662 @return other than EFI_SUCCESS if failed to change the "BootOrder" EFI Variable.
663
664 **/
665 EFI_STATUS
666 Var_ChangeBootOrder (
667 VOID
668 );
669
670 /**
671 This function create a currently loaded Drive Option from
672 the BMM. It then appends this Driver Option to the end of
673 the "DriverOrder" list. It append this Driver Opotion to the end
674 of DriverOptionMenu.
675
676 @param CallbackData The BMM context data.
677 @param HiiHandle The HII handle associated with the BMM formset.
678 @param DescriptionData The description of this driver option.
679 @param OptionalData The optional load option.
680 @param ForceReconnect If to force reconnect.
681
682 @retval EFI_OUT_OF_RESOURCES If not enought memory to complete the operation.
683 @retval EFI_SUCCESS If function completes successfully.
684
685 **/
686 EFI_STATUS
687 Var_UpdateDriverOption (
688 IN BMM_CALLBACK_DATA *CallbackData,
689 IN EFI_HII_HANDLE HiiHandle,
690 IN UINT16 *DescriptionData,
691 IN UINT16 *OptionalData,
692 IN UINT8 ForceReconnect
693 );
694
695 /**
696 Delete Load Option that represent a Deleted state in BootOptionMenu.
697 After deleting this Driver option, call Var_ChangeDriverOrder to
698 make sure DriverOrder is in valid state.
699
700 @retval EFI_SUCCESS Load Option is successfully updated.
701 @return Other value than EFI_SUCCESS if failed to update "Driver Order" EFI
702 Variable.
703
704 **/
705 EFI_STATUS
706 Var_DelDriverOption (
707 VOID
708 );
709
710 /**
711 After any operation on Driver####, there will be a discrepancy in
712 DriverOrder. Since some are missing but in DriverOrder, while some
713 are present but are not reflected by DriverOrder. Then a function
714 rebuild DriverOrder from scratch by content from DriverOptionMenu is
715 needed.
716
717 @retval EFI_SUCCESS The driver order is updated successfully.
718 @return other than EFI_SUCCESS if failed to set the "DriverOrder" EFI Variable.
719
720 **/
721 EFI_STATUS
722 Var_ChangeDriverOrder (
723 VOID
724 );
725
726 /**
727 This function delete and build multi-instance device path ConIn
728 console device.
729
730 @retval EFI_SUCCESS The function complete successfully.
731 @return The EFI variable can not be saved. See gRT->SetVariable for detail return information.
732 **/
733 EFI_STATUS
734 Var_UpdateConsoleInpOption (
735 VOID
736 );
737
738 /**
739 This function delete and build multi-instance device path ConOut console device.
740
741 @retval EFI_SUCCESS The function complete successfully.
742 @return The EFI variable can not be saved. See gRT->SetVariable for detail return information.
743 **/
744 EFI_STATUS
745 Var_UpdateConsoleOutOption (
746 VOID
747 );
748
749 /**
750 This function delete and build multi-instance device path ErrOut console device.
751
752 @retval EFI_SUCCESS The function complete successfully.
753 @return The EFI variable can not be saved. See gRT->SetVariable for detail return information.
754 **/
755 EFI_STATUS
756 Var_UpdateErrorOutOption (
757 VOID
758 );
759
760 /**
761 This function delete and build Out of Band console device.
762
763 @param MenuIndex Menu index which user select in the terminal menu list.
764
765 @retval EFI_SUCCESS The function complete successfully.
766 @return The EFI variable can not be saved. See gRT->SetVariable for detail return information.
767 **/
768 EFI_STATUS
769 Var_UpdateOutOfBandOption (
770 IN UINT16 MenuIndex
771 );
772
773 /**
774 Update the device path of "ConOut", "ConIn" and "ErrOut" based on the new BaudRate, Data Bits,
775 parity and stop Bits set.
776
777 **/
778 VOID
779 Var_UpdateAllConsoleOption (
780 VOID
781 );
782
783 /**
784 This function update the "BootNext" EFI Variable. If there is no "BootNex" specified in BMM,
785 this EFI Variable is deleted.
786 It also update the BMM context data specified the "BootNext" value.
787
788 @param CallbackData The BMM context data.
789
790 @retval EFI_SUCCESS The function complete successfully.
791 @return The EFI variable can not be saved. See gRT->SetVariable for detail return information.
792
793 **/
794 EFI_STATUS
795 Var_UpdateBootNext (
796 IN BMM_CALLBACK_DATA *CallbackData
797 );
798
799 /**
800 This function update the "BootOrder" EFI Variable based on BMM Formset's NV map. It then refresh
801 BootOptionMenu with the new "BootOrder" list.
802
803 @param CallbackData The BMM context data.
804
805 @retval EFI_SUCCESS The function complete successfully.
806 @retval EFI_OUT_OF_RESOURCES Not enough memory to complete the function.
807 @return not The EFI variable can not be saved. See gRT->SetVariable for detail return information.
808
809 **/
810 EFI_STATUS
811 Var_UpdateBootOrder (
812 IN BMM_CALLBACK_DATA *CallbackData
813 );
814
815 /**
816 This function update the "DriverOrder" EFI Variable based on
817 BMM Formset's NV map. It then refresh DriverOptionMenu
818 with the new "DriverOrder" list.
819
820 @param CallbackData The BMM context data.
821
822 @retval EFI_SUCCESS The function complete successfully.
823 @retval EFI_OUT_OF_RESOURCES Not enough memory to complete the function.
824 @return The EFI variable can not be saved. See gRT->SetVariable for detail return information.
825
826 **/
827 EFI_STATUS
828 Var_UpdateDriverOrder (
829 IN BMM_CALLBACK_DATA *CallbackData
830 );
831
832 /**
833 Update the Text Mode of Console.
834
835 @param CallbackData The context data for BMM.
836
837 @retval EFI_SUCCSS If the Text Mode of Console is updated.
838 @return Other value if the Text Mode of Console is not updated.
839
840 **/
841 EFI_STATUS
842 Var_UpdateConMode (
843 IN BMM_CALLBACK_DATA *CallbackData
844 );
845
846 //
847 // Following are page create and refresh functions
848 //
849 /**
850 Create the global UpdateData structure.
851
852 **/
853 VOID
854 CreateUpdateData (
855 VOID
856 );
857
858 /**
859 Refresh the global UpdateData structure.
860
861 **/
862 VOID
863 RefreshUpdateData (
864 VOID
865 );
866
867 /**
868 Clean up the dynamic opcode at label and form specified by
869 both LabelId.
870
871 @param LabelId It is both the Form ID and Label ID for
872 opcode deletion.
873 @param CallbackData The BMM context data.
874
875 **/
876 VOID
877 CleanUpPage (
878 IN UINT16 LabelId,
879 IN BMM_CALLBACK_DATA *CallbackData
880 );
881
882 /**
883 Create a lit of boot option from global BootOptionMenu. It
884 allow user to delete the boot option.
885
886 @param CallbackData The BMM context data.
887
888 **/
889 VOID
890 UpdateBootDelPage (
891 IN BMM_CALLBACK_DATA *CallbackData
892 );
893
894 /**
895 Create a lit of driver option from global DriverMenu.
896
897 @param CallbackData The BMM context data.
898 **/
899 VOID
900 UpdateDrvAddHandlePage (
901 IN BMM_CALLBACK_DATA *CallbackData
902 );
903
904 /**
905 Create a lit of driver option from global DriverOptionMenu. It
906 allow user to delete the driver option.
907
908 @param CallbackData The BMM context data.
909 **/
910 VOID
911 UpdateDrvDelPage (
912 IN BMM_CALLBACK_DATA *CallbackData
913 );
914
915 /**
916 Prepare the page to allow user to add description for a Driver Option.
917
918 @param CallbackData The BMM context data.
919 **/
920 VOID
921 UpdateDriverAddHandleDescPage (
922 IN BMM_CALLBACK_DATA *CallbackData
923 );
924
925 /**
926 Dispatch the correct update page function to call based on the UpdatePageId.
927
928 @param UpdatePageId The form ID.
929 @param CallbackData The BMM context data.
930 **/
931 VOID
932 UpdatePageBody (
933 IN UINT16 UpdatePageId,
934 IN BMM_CALLBACK_DATA *CallbackData
935 );
936
937 /**
938 Create the dynamic page to allow user to set the "BootNext" vaule.
939
940 @param CallbackData The BMM context data.
941 **/
942 VOID
943 UpdateBootNextPage (
944 IN BMM_CALLBACK_DATA *CallbackData
945 );
946
947 /**
948 Create the dynamic page to allow user to set the "TimeOut" vaule.
949
950 @param CallbackData The BMM context data.
951 **/
952 VOID
953 UpdateTimeOutPage (
954 IN BMM_CALLBACK_DATA *CallbackData
955 );
956
957 /**
958 Create the dynamic page which allows user to set the property such as Baud Rate, Data Bits,
959 Parity, Stop Bits, Terminal Type.
960
961 @param CallbackData The BMM context data.
962 **/
963 VOID
964 UpdateTerminalPage (
965 IN BMM_CALLBACK_DATA *CallbackData
966 );
967
968 /**
969 Refresh the text mode page
970
971 @param CallbackData The BMM context data.
972 **/
973 VOID
974 UpdateConModePage (
975 IN BMM_CALLBACK_DATA *CallbackData
976 );
977
978 /**
979 Create a list of Goto Opcode for all terminal devices logged
980 by TerminaMenu. This list will be inserted to form FORM_CON_COM_SETUP_ID.
981
982 @param CallbackData The BMM context data.
983 **/
984 VOID
985 UpdateConCOMPage (
986 IN BMM_CALLBACK_DATA *CallbackData
987 );
988
989 /**
990 Update add boot/driver option page.
991
992 @param CallbackData The BMM context data.
993 @param FormId The form ID to be updated.
994 @param DevicePath Device path.
995
996 **/
997 VOID
998 UpdateOptionPage(
999 IN BMM_CALLBACK_DATA *CallbackData,
1000 IN EFI_FORM_ID FormId,
1001 IN EFI_DEVICE_PATH_PROTOCOL *DevicePath
1002 );
1003
1004 /**
1005 Function deletes the variable specified by VarName and VarGuid.
1006
1007
1008 @param VarName A Null-terminated Unicode string that is
1009 the name of the vendor's variable.
1010
1011 @param VarGuid A unique identifier for the vendor.
1012
1013 @retval EFI_SUCCESS The variable was found and removed
1014 @retval EFI_UNSUPPORTED The variable store was inaccessible
1015 @retval EFI_OUT_OF_RESOURCES The temporary buffer was not available
1016 @retval EFI_NOT_FOUND The variable was not found
1017
1018 **/
1019 EFI_STATUS
1020 EfiLibDeleteVariable (
1021 IN CHAR16 *VarName,
1022 IN EFI_GUID *VarGuid
1023 );
1024
1025 /**
1026 Function is used to determine the number of device path instances
1027 that exist in a device path.
1028
1029
1030 @param DevicePath A pointer to a device path data structure.
1031
1032 @return This function counts and returns the number of device path instances
1033 in DevicePath.
1034
1035 **/
1036 UINTN
1037 EfiDevicePathInstanceCount (
1038 IN EFI_DEVICE_PATH_PROTOCOL *DevicePath
1039 );
1040
1041 /**
1042 Get a string from the Data Hub record based on
1043 a device path.
1044
1045 @param DevPath The device Path.
1046
1047 @return A string located from the Data Hub records based on
1048 the device path.
1049 @retval NULL If failed to get the String from Data Hub.
1050
1051 **/
1052 UINT16 *
1053 EfiLibStrFromDatahub (
1054 IN EFI_DEVICE_PATH_PROTOCOL *DevPath
1055 );
1056
1057 /**
1058 Get the index number (#### in Boot####) for the boot option pointed to a BBS legacy device type
1059 specified by DeviceType.
1060
1061 @param DeviceType The legacy device type. It can be floppy, network, harddisk, cdrom,
1062 etc.
1063 @param OptionIndex Returns the index number (#### in Boot####).
1064 @param OptionSize Return the size of the Boot### variable.
1065
1066 **/
1067 VOID *
1068 GetLegacyBootOptionVar (
1069 IN UINTN DeviceType,
1070 OUT UINTN *OptionIndex,
1071 OUT UINTN *OptionSize
1072 );
1073
1074 /**
1075 Discard all changes done to the BMM pages such as Boot Order change,
1076 Driver order change.
1077
1078 @param Private The BMM context data.
1079 @param CurrentFakeNVMap The current Fack NV Map.
1080
1081 **/
1082 VOID
1083 DiscardChangeHandler (
1084 IN BMM_CALLBACK_DATA *Private,
1085 IN BMM_FAKE_NV_DATA *CurrentFakeNVMap
1086 );
1087
1088 /**
1089 Dispatch the display to the next page based on NewPageId.
1090
1091 @param Private The BMM context data.
1092 @param NewPageId The original page ID.
1093
1094 **/
1095 VOID
1096 UpdatePageId (
1097 BMM_CALLBACK_DATA *Private,
1098 UINT16 NewPageId
1099 );
1100
1101 /**
1102 Remove the installed BootMaint and FileExplorer HiiPackages.
1103
1104 **/
1105 VOID
1106 FreeBMPackage(
1107 VOID
1108 );
1109
1110 /**
1111 Install BootMaint and FileExplorer HiiPackages.
1112
1113 **/
1114 VOID
1115 InitBootMaintenance(
1116 VOID
1117 );
1118
1119 /**
1120
1121 Initialize console input device check box to ConsoleInCheck[MAX_MENU_NUMBER]
1122 in BMM_FAKE_NV_DATA structure.
1123
1124 @param CallbackData The BMM context data.
1125
1126 **/
1127 VOID
1128 GetConsoleInCheck (
1129 IN BMM_CALLBACK_DATA *CallbackData
1130 );
1131
1132 /**
1133
1134 Initialize console output device check box to ConsoleOutCheck[MAX_MENU_NUMBER]
1135 in BMM_FAKE_NV_DATA structure.
1136
1137 @param CallbackData The BMM context data.
1138
1139 **/
1140 VOID
1141 GetConsoleOutCheck (
1142 IN BMM_CALLBACK_DATA *CallbackData
1143 );
1144
1145 /**
1146
1147 Initialize standard error output device check box to ConsoleErrCheck[MAX_MENU_NUMBER]
1148 in BMM_FAKE_NV_DATA structure.
1149
1150 @param CallbackData The BMM context data.
1151
1152 **/
1153 VOID
1154 GetConsoleErrCheck (
1155 IN BMM_CALLBACK_DATA *CallbackData
1156 );
1157
1158 /**
1159
1160 Initialize terminal attributes (baudrate, data rate, stop bits, parity and terminal type)
1161 to BMM_FAKE_NV_DATA structure.
1162
1163 @param CallbackData The BMM context data.
1164
1165 **/
1166 VOID
1167 GetTerminalAttribute (
1168 IN BMM_CALLBACK_DATA *CallbackData
1169 );
1170
1171 /**
1172 This function will change video resolution and text mode
1173 according to defined setup mode or defined boot mode
1174
1175 @param IsSetupMode Indicate mode is changed to setup mode or boot mode.
1176
1177 @retval EFI_SUCCESS Mode is changed successfully.
1178 @retval Others Mode failed to be changed.
1179
1180 **/
1181 EFI_STATUS
1182 EFIAPI
1183 BmmBdsSetConsoleMode (
1184 BOOLEAN IsSetupMode
1185 );
1186
1187
1188 /**
1189 This function converts an input device structure to a Unicode string.
1190
1191 @param DevPath A pointer to the device path structure.
1192
1193 @return A new allocated Unicode string that represents the device path.
1194
1195 **/
1196 CHAR16 *
1197 UiDevicePathToStr (
1198 IN EFI_DEVICE_PATH_PROTOCOL *DevPath
1199 );
1200
1201 /**
1202 Extract filename from device path. The returned buffer is allocated using AllocateCopyPool.
1203 The caller is responsible for freeing the allocated buffer using FreePool().
1204
1205 @param DevicePath Device path.
1206
1207 @return A new allocated string that represents the file name.
1208
1209 **/
1210 CHAR16 *
1211 ExtractFileNameFromDevicePath (
1212 IN EFI_DEVICE_PATH_PROTOCOL *DevicePath
1213 );
1214
1215 /**
1216 This function allows a caller to extract the current configuration for one
1217 or more named elements from the target driver.
1218
1219 @param This Points to the EFI_HII_CONFIG_ACCESS_PROTOCOL.
1220 @param Request A null-terminated Unicode string in <ConfigRequest> format.
1221 @param Progress On return, points to a character in the Request string.
1222 Points to the string's null terminator if request was successful.
1223 Points to the most recent '&' before the first failing name/value
1224 pair (or the beginning of the string if the failure is in the
1225 first name/value pair) if the request was not successful.
1226 @param Results A null-terminated Unicode string in <ConfigAltResp> format which
1227 has all values filled in for the names in the Request string.
1228 String to be allocated by the called function.
1229
1230 @retval EFI_SUCCESS The Results is filled with the requested values.
1231 @retval EFI_OUT_OF_RESOURCES Not enough memory to store the results.
1232 @retval EFI_INVALID_PARAMETER Request is NULL, illegal syntax, or unknown name.
1233 @retval EFI_NOT_FOUND Routing data doesn't match any storage in this driver.
1234
1235 **/
1236 EFI_STATUS
1237 EFIAPI
1238 BootMaintExtractConfig (
1239 IN CONST EFI_HII_CONFIG_ACCESS_PROTOCOL *This,
1240 IN CONST EFI_STRING Request,
1241 OUT EFI_STRING *Progress,
1242 OUT EFI_STRING *Results
1243 );
1244
1245 /**
1246 This function applies changes in a driver's configuration.
1247 Input is a Configuration, which has the routing data for this
1248 driver followed by name / value configuration pairs. The driver
1249 must apply those pairs to its configurable storage. If the
1250 driver's configuration is stored in a linear block of data
1251 and the driver's name / value pairs are in <BlockConfig>
1252 format, it may use the ConfigToBlock helper function (above) to
1253 simplify the job. Currently not implemented.
1254
1255 @param[in] This Points to the EFI_HII_CONFIG_ACCESS_PROTOCOL.
1256 @param[in] Configuration A null-terminated Unicode string in
1257 <ConfigString> format.
1258 @param[out] Progress A pointer to a string filled in with the
1259 offset of the most recent '&' before the
1260 first failing name / value pair (or the
1261 beginn ing of the string if the failure
1262 is in the first name / value pair) or
1263 the terminating NULL if all was
1264 successful.
1265
1266 @retval EFI_SUCCESS The results have been distributed or are
1267 awaiting distribution.
1268 @retval EFI_OUT_OF_RESOURCES Not enough memory to store the
1269 parts of the results that must be
1270 stored awaiting possible future
1271 protocols.
1272 @retval EFI_INVALID_PARAMETERS Passing in a NULL for the
1273 Results parameter would result
1274 in this type of error.
1275 @retval EFI_NOT_FOUND Target for the specified routing data
1276 was not found.
1277 **/
1278 EFI_STATUS
1279 EFIAPI
1280 BootMaintRouteConfig (
1281 IN CONST EFI_HII_CONFIG_ACCESS_PROTOCOL *This,
1282 IN CONST EFI_STRING Configuration,
1283 OUT EFI_STRING *Progress
1284 );
1285
1286 /**
1287 This function processes the results of changes in configuration.
1288
1289
1290 @param This Points to the EFI_HII_CONFIG_ACCESS_PROTOCOL.
1291 @param Action Specifies the type of action taken by the browser.
1292 @param QuestionId A unique value which is sent to the original exporting driver
1293 so that it can identify the type of data to expect.
1294 @param Type The type of value for the question.
1295 @param Value A pointer to the data being sent to the original exporting driver.
1296 @param ActionRequest On return, points to the action requested by the callback function.
1297
1298 @retval EFI_SUCCESS The callback successfully handled the action.
1299 @retval EFI_OUT_OF_RESOURCES Not enough storage is available to hold the variable and its data.
1300 @retval EFI_DEVICE_ERROR The variable could not be saved.
1301 @retval EFI_UNSUPPORTED The specified Action is not supported by the callback.
1302 @retval EFI_INVALID_PARAMETER The parameter of Value or ActionRequest is invalid.
1303 **/
1304 EFI_STATUS
1305 EFIAPI
1306 BootMaintCallback (
1307 IN CONST EFI_HII_CONFIG_ACCESS_PROTOCOL *This,
1308 IN EFI_BROWSER_ACTION Action,
1309 IN EFI_QUESTION_ID QuestionId,
1310 IN UINT8 Type,
1311 IN EFI_IFR_TYPE_VALUE *Value,
1312 OUT EFI_BROWSER_ACTION_REQUEST *ActionRequest
1313 );
1314
1315 /**
1316 Create boot option base on the input file path info.
1317
1318 @param FilePath Point to the file path.
1319
1320 @retval TRUE Exit caller function.
1321 @retval FALSE Not exit caller function.
1322
1323 **/
1324 BOOLEAN
1325 CreateBootOptionFromFile (
1326 IN EFI_DEVICE_PATH_PROTOCOL *FilePath
1327 );
1328
1329 /**
1330 Create driver option base on the input file path info.
1331
1332 @param FilePath Point to the file path.
1333
1334 @retval TRUE Exit caller function.
1335 @retval FALSE Not exit caller function.
1336 **/
1337 BOOLEAN
1338 CreateDriverOptionFromFile (
1339 IN EFI_DEVICE_PATH_PROTOCOL *FilePath
1340 );
1341
1342 /**
1343 Boot the file specified by the input file path info.
1344
1345 @param FilePath Point to the file path.
1346
1347 @retval TRUE Exit caller function.
1348 @retval FALSE Not exit caller function.
1349
1350 **/
1351 BOOLEAN
1352 BootFromFile (
1353 IN EFI_DEVICE_PATH_PROTOCOL *FilePath
1354 );
1355
1356 //
1357 // Global variable in this program (defined in data.c)
1358 //
1359 extern BM_MENU_OPTION BootOptionMenu;
1360 extern BM_MENU_OPTION DriverOptionMenu;
1361 extern BM_MENU_OPTION ConsoleInpMenu;
1362 extern BM_MENU_OPTION ConsoleOutMenu;
1363 extern BM_MENU_OPTION ConsoleErrMenu;
1364 extern BM_MENU_OPTION DriverMenu;
1365 extern BM_MENU_OPTION TerminalMenu;
1366 extern UINT16 TerminalType[5];
1367 extern COM_ATTR BaudRateList[19];
1368 extern COM_ATTR DataBitsList[4];
1369 extern COM_ATTR ParityList[5];
1370 extern COM_ATTR StopBitsList[3];
1371 extern EFI_GUID TerminalTypeGuid[5];
1372 extern EFI_DEVICE_PATH_PROTOCOL EndDevicePath[];
1373 extern UINT16 mFlowControlType[2];
1374 extern UINT32 mFlowControlValue[2];
1375
1376 //
1377 // Shared IFR form update data
1378 //
1379 extern VOID *mStartOpCodeHandle;
1380 extern VOID *mEndOpCodeHandle;
1381 extern EFI_IFR_GUID_LABEL *mStartLabel;
1382 extern EFI_IFR_GUID_LABEL *mEndLabel;
1383 extern BMM_CALLBACK_DATA gBootMaintenancePrivate;
1384 extern BMM_CALLBACK_DATA *mBmmCallbackInfo;
1385
1386 #endif