56#define VAR_CON_OUT_MODE L"ConOutMode"
61#define VAR_FLAG EFI_VARIABLE_BOOTSERVICE_ACCESS | EFI_VARIABLE_RUNTIME_ACCESS | EFI_VARIABLE_NON_VOLATILE
64extern CHAR16 mBootMaintStorageName[];
68extern UINT8 BootMaintenanceManagerBin[];
74#define BM_COM_ATTR_BUADRATE 19
75#define BM_COM_ATTR_DATABITS 4
76#define BM_COM_ATTR_PARITY 5
77#define BM_COM_ATTR_STOPBITS 3
82#define BMM_CALLBACK_DATA_SIGNATURE SIGNATURE_32 ('C', 'b', 'c', 'k')
83#define BMM_CALLBACK_DATA_FROM_THIS(a) CR (a, BMM_CALLBACK_DATA, BmmConfigAccess, BMM_CALLBACK_DATA_SIGNATURE)
88typedef UINT8 BBS_TYPE;
90typedef enum _TYPE_OF_TERMINAL {
91 TerminalTypePcAnsi = 0,
93 TerminalTypeVt100Plus,
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')
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
119#define BM_CONSOLE_IN_CONTEXT_SELECT 0x6
120#define BM_CONSOLE_OUT_CONTEXT_SELECT 0x7
121#define BM_CONSOLE_ERR_CONTEXT_SELECT 0x8
126#define UPDATE_DATA_SIZE 0x100000
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
151#define VAR_OFFSET(Field) ((UINT16) ((UINTN) &(((BMM_FAKE_NV_DATA *) 0)->Field)))
156#define QUESTION_ID(Field) (VAR_OFFSET (Field) + CONFIG_OPTION_OFFSET)
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)
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)
234#define STRING_DEPOSITORY_NUMBER 8
236#define NONE_BOOTNEXT_VALUE (0xFFFF + 1)
276 UINT16 FilePathListLength;
304 BOOLEAN IsRemovableMedia;
306 BOOLEAN IsBootLegacy;
324 UINT16 *DisplayString;
326 EFI_STRING_ID DisplayStringToken;
327 EFI_STRING_ID HelpStringToken;
328 UINTN ContextSelection;
329 VOID *VariableContext;
348 UINTN CurrentTerminal;
355 EFI_FORM_ID BmmCurrentPageId;
356 EFI_FORM_ID BmmPreviousPageId;
357 BOOLEAN BmmAskSaveOrNot;
611 IN BOOLEAN ChangeTerminal
668 IN UINT16 *DescriptionData,
669 IN UINT16 *OptionalData,
670 IN UINT8 ForceReconnect
931 IN EFI_FORM_ID FormId,
1181 OUT EFI_STRING *Progress,
1182 OUT EFI_STRING *Results
1222 IN CONST EFI_STRING Configuration,
1223 OUT EFI_STRING *Progress
1248 IN EFI_BROWSER_ACTION Action,
1249 IN EFI_QUESTION_ID QuestionId,
1252 OUT EFI_BROWSER_ACTION_REQUEST *ActionRequest
1317extern UINT32 mFlowControlValue[2];
1322extern VOID *mStartOpCodeHandle;
1323extern VOID *mEndOpCodeHandle;
VOID BOpt_FreeMenu(BM_MENU_OPTION *FreeMenu)
VOID ChangeVariableDevicePath(IN OUT EFI_DEVICE_PATH_PROTOCOL *DevicePath)
UINTN EfiDevicePathInstanceCount(IN EFI_DEVICE_PATH_PROTOCOL *DevicePath)
UINT16 BOpt_GetOptionNumber(CHAR16 *Type)
BM_MENU_ENTRY * BOpt_GetMenuEntry(BM_MENU_OPTION *MenuOption, UINTN MenuNumber)
UINT16 BOpt_GetDriverOptionNumber(VOID)
EFI_STATUS Var_DelBootOption(VOID)
VOID UpdateConModePage(IN BMM_CALLBACK_DATA *CallbackData)
EFI_STATUS EFIAPI BootMaintCallback(IN CONST EFI_HII_CONFIG_ACCESS_PROTOCOL *This, IN EFI_BROWSER_ACTION Action, IN EFI_QUESTION_ID QuestionId, IN UINT8 Type, IN EFI_IFR_TYPE_VALUE *Value, OUT EFI_BROWSER_ACTION_REQUEST *ActionRequest)
VOID DiscardChangeHandler(IN BMM_CALLBACK_DATA *Private, IN BMM_FAKE_NV_DATA *CurrentFakeNVMap)
BM_MENU_OPTION DriverMenu
VOID CleanUpPage(IN UINT16 LabelId, IN BMM_CALLBACK_DATA *CallbackData)
VOID UpdateConCOMPage(IN BMM_CALLBACK_DATA *CallbackData)
VOID BOpt_DestroyMenuEntry(BM_MENU_ENTRY *MenuEntry)
EFI_STATUS Var_UpdateDriverOption(IN BMM_CALLBACK_DATA *CallbackData, IN EFI_HII_HANDLE HiiHandle, IN UINT16 *DescriptionData, IN UINT16 *OptionalData, IN UINT8 ForceReconnect)
UINT16 * EfiLibStrFromDatahub(IN EFI_DEVICE_PATH_PROTOCOL *DevPath)
EFI_STATUS GetAllConsoles(VOID)
EFI_STATUS EFIAPI BootMaintExtractConfig(IN CONST EFI_HII_CONFIG_ACCESS_PROTOCOL *This, IN CONST EFI_STRING Request, OUT EFI_STRING *Progress, OUT EFI_STRING *Results)
VOID GetTerminalAttribute(IN BMM_CALLBACK_DATA *CallbackData)
BM_MENU_ENTRY * BOpt_CreateMenuEntry(UINTN MenuType)
COM_ATTR BaudRateList[19]
VOID UpdateDrvAddHandlePage(IN BMM_CALLBACK_DATA *CallbackData)
VOID GetConsoleOutCheck(IN BMM_CALLBACK_DATA *CallbackData)
EFI_STATUS Var_UpdateErrorOutOption(VOID)
EFI_STATUS BOpt_GetDriverOptions(IN BMM_CALLBACK_DATA *CallbackData)
VOID RefreshUpdateData(VOID)
VOID GetConsoleOutMode(IN BMM_CALLBACK_DATA *CallbackData)
VOID InitBootMaintenance(VOID)
VOID UpdateBootDelPage(IN BMM_CALLBACK_DATA *CallbackData)
BOOLEAN EFIAPI CreateDriverOptionFromFile(IN EFI_DEVICE_PATH_PROTOCOL *FilePath)
EFI_STATUS LocateSerialIo(VOID)
VOID CreateUpdateData(VOID)
EFI_STATUS Var_UpdateBootOrder(IN BMM_CALLBACK_DATA *CallbackData)
VOID GetConsoleErrCheck(IN BMM_CALLBACK_DATA *CallbackData)
VOID CleanUselessBeforeSubmit(IN BMM_CALLBACK_DATA *Private)
EFI_STATUS Var_UpdateBootNext(IN BMM_CALLBACK_DATA *CallbackData)
VOID UpdatePageBody(IN UINT16 UpdatePageId, IN BMM_CALLBACK_DATA *CallbackData)
VOID UpdateTerminalPage(IN BMM_CALLBACK_DATA *CallbackData)
UINT16 BOpt_GetBootOptionNumber(VOID)
CHAR16 * UiDevicePathToStr(IN EFI_DEVICE_PATH_PROTOCOL *DevPath)
BOOLEAN EFIAPI CreateBootOptionFromFile(IN EFI_DEVICE_PATH_PROTOCOL *FilePath)
EFI_STATUS EfiLibDeleteVariable(IN CHAR16 *VarName, IN EFI_GUID *VarGuid)
EFI_STATUS Var_UpdateConMode(IN BMM_CALLBACK_DATA *CallbackData)
EFI_STATUS Var_UpdateOutOfBandOption(IN UINT16 MenuIndex)
UINT16 mFlowControlType[2]
BM_MENU_OPTION ConsoleErrMenu
BM_MENU_OPTION DriverOptionMenu
EFI_STATUS BOpt_FindDrivers(VOID)
VOID GetBootOrder(IN BMM_CALLBACK_DATA *CallbackData)
BM_MENU_OPTION ConsoleOutMenu
EFI_STATUS Var_UpdateConsoleInpOption(VOID)
EFI_STATUS Var_UpdateDriverOrder(IN BMM_CALLBACK_DATA *CallbackData)
EFI_STATUS EFIAPI BootMaintRouteConfig(IN CONST EFI_HII_CONFIG_ACCESS_PROTOCOL *This, IN CONST EFI_STRING Configuration, OUT EFI_STRING *Progress)
BM_MENU_OPTION BootOptionMenu
EFI_STATUS FreeAllConsoles(VOID)
VOID GetConsoleInCheck(IN BMM_CALLBACK_DATA *CallbackData)
VOID UpdateDriverAddHandleDescPage(IN BMM_CALLBACK_DATA *CallbackData)
VOID * GetLegacyBootOptionVar(IN UINTN DeviceType, OUT UINTN *OptionIndex, OUT UINTN *OptionSize)
EFI_STATUS ChangeTerminalDevicePath(IN OUT EFI_DEVICE_PATH_PROTOCOL *DevicePath, IN BOOLEAN ChangeTerminal)
VOID UpdatePageId(BMM_CALLBACK_DATA *Private, UINT16 NewPageId)
EFI_STATUS Var_UpdateBootOption(IN BMM_CALLBACK_DATA *CallbackData)
VOID GetDriverOrder(IN BMM_CALLBACK_DATA *CallbackData)
BM_MENU_OPTION ConsoleInpMenu
EFI_STATUS Var_UpdateConsoleOutOption(VOID)
VOID UpdateDrvDelPage(IN BMM_CALLBACK_DATA *CallbackData)
EFI_STATUS Var_DelDriverOption(VOID)
EFI_GUID TerminalTypeGuid[9]
BOOLEAN EFIAPI BootFromFile(IN EFI_DEVICE_PATH_PROTOCOL *FilePath)
CHAR16 * ExtractFileNameFromDevicePath(IN EFI_DEVICE_PATH_PROTOCOL *DevicePath)
EFI_STATUS BOpt_GetBootOptions(IN BMM_CALLBACK_DATA *CallbackData)
VOID UpdateOptionPage(IN BMM_CALLBACK_DATA *CallbackData, IN EFI_FORM_ID FormId, IN EFI_DEVICE_PATH_PROTOCOL *DevicePath)
EFI_STATUS BmmSetConsoleMode(BOOLEAN IsSetupMode)
EFI_HII_CONFIG_ACCESS_PROTOCOL BmmConfigAccess