]> git.proxmox.com Git - mirror_edk2.git/blobdiff - IntelFrameworkModulePkg/Universal/BdsDxe/BootMaint/BootMaint.h
IntelFrameworkModulePkg: Clean up source files
[mirror_edk2.git] / IntelFrameworkModulePkg / Universal / BdsDxe / BootMaint / BootMaint.h
index d5016043cb73daecf68fb94a18b4edf3d22c88c3..bdd22c8e7513e2b2d160c57622fd05c6db6981dc 100644 (file)
@@ -1,7 +1,7 @@
 /** @file\r
   Header file for boot maintenance module.\r
 \r
-Copyright (c) 2004 - 2012, Intel Corporation. All rights reserved.<BR>\r
+Copyright (c) 2004 - 2018, Intel Corporation. All rights reserved.<BR>\r
 This program and the accompanying materials\r
 are licensed and made available under the terms and conditions of the BSD License\r
 which accompanies this distribution.  The full text of the license may be found at\r
@@ -124,8 +124,9 @@ typedef enum _FILE_EXPLORER_DISPLAY_CONTEXT {
 #define FD_OPTION_OFFSET        0xC000\r
 #define HD_OPTION_OFFSET        0xB000\r
 #define CD_OPTION_OFFSET        0xA000\r
+#define FILE_OPTION_GOTO_OFFSET 0xC000\r
 #define FILE_OPTION_OFFSET      0x8000\r
-#define FILE_OPTION_MASK        0x7FFF\r
+#define FILE_OPTION_MASK        0x3FFF\r
 #define HANDLE_OPTION_OFFSET    0x7000\r
 #define CONSOLE_OPTION_OFFSET   0x6000\r
 #define TERMINAL_OPTION_OFFSET  0x5000\r
@@ -167,9 +168,13 @@ typedef enum _FILE_EXPLORER_DISPLAY_CONTEXT {
 #define CON_ERR_COM1_VAR_OFFSET         VAR_OFFSET (ConsoleErrorCOM1)\r
 #define CON_ERR_COM2_VAR_OFFSET         VAR_OFFSET (ConsoleErrorCOM2)\r
 #define CON_MODE_VAR_OFFSET             VAR_OFFSET (ConsoleOutMode)\r
-#define CON_DEVICE_VAR_OFFSET           VAR_OFFSET (ConsoleCheck)\r
-#define OPTION_ORDER_VAR_OFFSET         VAR_OFFSET (OptionOrder)\r
-#define OPTION_DEL_VAR_OFFSET           VAR_OFFSET (OptionDel)\r
+#define CON_IN_DEVICE_VAR_OFFSET        VAR_OFFSET (ConsoleInCheck)\r
+#define CON_OUT_DEVICE_VAR_OFFSET       VAR_OFFSET (ConsoleOutCheck)\r
+#define CON_ERR_DEVICE_VAR_OFFSET       VAR_OFFSET (ConsoleErrCheck)\r
+#define BOOT_OPTION_ORDER_VAR_OFFSET    VAR_OFFSET (BootOptionOrder)\r
+#define DRIVER_OPTION_ORDER_VAR_OFFSET  VAR_OFFSET (DriverOptionOrder)\r
+#define BOOT_OPTION_DEL_VAR_OFFSET      VAR_OFFSET (BootOptionDel)\r
+#define DRIVER_OPTION_DEL_VAR_OFFSET    VAR_OFFSET (DriverOptionDel)\r
 #define DRIVER_ADD_OPTION_VAR_OFFSET    VAR_OFFSET (DriverAddHandleOptionalData)\r
 #define COM_BAUD_RATE_VAR_OFFSET        VAR_OFFSET (COMBaudRate)\r
 #define COM_DATA_RATE_VAR_OFFSET        VAR_OFFSET (COMDataRate)\r
@@ -205,9 +210,13 @@ typedef enum _FILE_EXPLORER_DISPLAY_CONTEXT {
 #define CON_ERR_COM1_QUESTION_ID        QUESTION_ID (ConsoleErrorCOM1)\r
 #define CON_ERR_COM2_QUESTION_ID        QUESTION_ID (ConsoleErrorCOM2)\r
 #define CON_MODE_QUESTION_ID            QUESTION_ID (ConsoleOutMode)\r
-#define CON_DEVICE_QUESTION_ID          QUESTION_ID (ConsoleCheck)\r
-#define OPTION_ORDER_QUESTION_ID        QUESTION_ID (OptionOrder)\r
-#define OPTION_DEL_QUESTION_ID          QUESTION_ID (OptionDel)\r
+#define CON_IN_DEVICE_QUESTION_ID       QUESTION_ID (ConsoleInCheck)\r
+#define CON_OUT_DEVICE_QUESTION_ID      QUESTION_ID (ConsoleOutCheck)\r
+#define CON_ERR_DEVICE_QUESTION_ID      QUESTION_ID (ConsoleErrCheck)\r
+#define BOOT_OPTION_ORDER_QUESTION_ID   QUESTION_ID (BootOptionOrder)\r
+#define DRIVER_OPTION_ORDER_QUESTION_ID QUESTION_ID (DriverOptionOrder)\r
+#define BOOT_OPTION_DEL_QUESTION_ID     QUESTION_ID (BootOptionDel)\r
+#define DRIVER_OPTION_DEL_QUESTION_ID   QUESTION_ID (DriverOptionDel)\r
 #define DRIVER_ADD_OPTION_QUESTION_ID   QUESTION_ID (DriverAddHandleOptionalData)\r
 #define COM_BAUD_RATE_QUESTION_ID       QUESTION_ID (COMBaudRate)\r
 #define COM_DATA_RATE_QUESTION_ID       QUESTION_ID (COMDataRate)\r
@@ -464,7 +473,7 @@ BOpt_GetBootOptions (
 \r
   @return EFI_SUCESS The functin completes successfully.\r
   @retval EFI_OUT_OF_RESOURCES Not enough memory to compete the operation.\r
-  \r
+\r
 \r
 **/\r
 EFI_STATUS\r
@@ -708,11 +717,11 @@ ChangeVariableDevicePath (
 \r
 /**\r
   Update the multi-instance device path of Terminal Device based on\r
-  the global TerminalMenu. If ChangeTernimal is TRUE, the terminal \r
+  the global TerminalMenu. If ChangeTernimal is TRUE, the terminal\r
   device path in the Terminal Device in TerminalMenu is also updated.\r
 \r
   @param DevicePath      The multi-instance device path.\r
-  @param ChangeTerminal  TRUE, then device path in the Terminal Device \r
+  @param ChangeTerminal  TRUE, then device path in the Terminal Device\r
                          in TerminalMenu is also updated; FALSE, no update.\r
 \r
   @return EFI_SUCCESS    The function completes successfully.\r
@@ -728,8 +737,8 @@ ChangeTerminalDevicePath (
 // Variable operation by menu selection\r
 //\r
 /**\r
-  This function create a currently loaded Boot Option from \r
-  the BMM. It then appends this Boot Option to the end of \r
+  This function create a currently loaded Boot Option from\r
+  the BMM. It then appends this Boot Option to the end of\r
   the "BootOrder" list. It also append this Boot Opotion to the end\r
   of BootOptionMenu.\r
 \r
@@ -751,9 +760,9 @@ Var_UpdateBootOption (
   After deleting this boot option, call Var_ChangeBootOrder to\r
   make sure BootOrder is in valid state.\r
 \r
-  @retval EFI_SUCCESS   If all boot load option EFI Variables corresponding to  \r
+  @retval EFI_SUCCESS   If all boot load option EFI Variables corresponding to\r
                         BM_LOAD_CONTEXT marked for deletion is deleted\r
-  @return Others        If failed to update the "BootOrder" variable after deletion. \r
+  @return Others        If failed to update the "BootOrder" variable after deletion.\r
 \r
 **/\r
 EFI_STATUS\r
@@ -777,8 +786,8 @@ Var_ChangeBootOrder (
   );\r
 \r
 /**\r
-  This function create a currently loaded Drive Option from \r
-  the BMM. It then appends this Driver Option to the end of \r
+  This function create a currently loaded Drive Option from\r
+  the BMM. It then appends this Driver Option to the end of\r
   the "DriverOrder" list. It append this Driver Opotion to the end\r
   of DriverOptionMenu.\r
 \r
@@ -867,7 +876,7 @@ Var_UpdateErrorOutOption (
   );\r
 \r
 /**\r
-  Update the device path of "ConOut", "ConIn" and "ErrOut" based on the new BaudRate, Data Bits, \r
+  Update the device path of "ConOut", "ConIn" and "ErrOut" based on the new BaudRate, Data Bits,\r
   parity and stop Bits set.\r
 \r
 **/\r
@@ -877,7 +886,7 @@ Var_UpdateAllConsoleOption (
   );\r
 \r
 /**\r
-  This function update the "BootNext" EFI Variable. If there is no "BootNex" specified in BMM, \r
+  This function update the "BootNext" EFI Variable. If there is no "BootNex" specified in BMM,\r
   this EFI Variable is deleted.\r
   It also update the BMM context data specified the "BootNext" value.\r
 \r
@@ -893,7 +902,7 @@ Var_UpdateBootNext (
   );\r
 \r
 /**\r
-  This function update the "BootOrder" EFI Variable based on BMM Formset's NV map. It then refresh \r
+  This function update the "BootOrder" EFI Variable based on BMM Formset's NV map. It then refresh\r
   BootOptionMenu with the new "BootOrder" list.\r
 \r
   @param CallbackData           The BMM context data.\r
@@ -931,6 +940,7 @@ Var_UpdateDriverOrder (
   is also updated.\r
 \r
   @param CallbackData    The context data for BMM.\r
+  @param FormId          The form id.\r
 \r
   @return EFI_SUCCESS    The function completed successfully.\r
   @retval EFI_NOT_FOUND  If VAR_LEGACY_DEV_ORDER and gEfiLegacyDevOrderVariableGuid EFI Variable can not be found.\r
@@ -938,7 +948,8 @@ Var_UpdateDriverOrder (
 **/\r
 EFI_STATUS\r
 Var_UpdateBBSOption (\r
-  IN BMM_CALLBACK_DATA            *CallbackData\r
+  IN BMM_CALLBACK_DATA            *CallbackData,\r
+  IN EFI_FORM_ID                  FormId\r
   );\r
 \r
 /**\r
@@ -969,7 +980,7 @@ RefreshUpdateData (
 \r
 /**\r
   Clean up the dynamic opcode at label and form specified by\r
-  both LabelId. \r
+  both LabelId.\r
 \r
   @param LabelId         It is both the Form ID and Label ID for\r
                          opcode deletion.\r
@@ -1166,7 +1177,7 @@ EfiReallocatePool (
 \r
   @param VarName            A Null-terminated Unicode string that is\r
                             the name of the vendor's variable.\r
-                         \r
+\r
   @param VarGuid            A unique identifier for the vendor.\r
 \r
   @retval  EFI_SUCCESS           The variable was found and removed\r
@@ -1231,7 +1242,7 @@ CreateMenuStringToken (
   );\r
 \r
 /**\r
-  Get a string from the Data Hub record based on \r
+  Get a string from the Data Hub record based on\r
   a device path.\r
 \r
   @param DevPath         The device Path.\r
@@ -1246,23 +1257,6 @@ EfiLibStrFromDatahub (
   IN EFI_DEVICE_PATH_PROTOCOL                 *DevPath\r
   );\r
 \r
-/**\r
-  Get the index number (#### in Boot####) for the boot option pointed to a BBS legacy device type\r
-  specified by DeviceType.\r
-\r
-  @param DeviceType      The legacy device type. It can be floppy, network, harddisk, cdrom,\r
-                         etc.\r
-  @param OptionIndex     Returns the index number (#### in Boot####).\r
-  @param OptionSize      Return the size of the Boot### variable.\r
-\r
-**/\r
-VOID *\r
-GetLegacyBootOptionVar (\r
-  IN  UINTN                            DeviceType,\r
-  OUT UINTN                            *OptionIndex,\r
-  OUT UINTN                            *OptionSize\r
-  );\r
-\r
 /**\r
   Initialize the Boot Maintenance Utitliy.\r
 \r
@@ -1444,6 +1438,47 @@ FileExplorerCallback (
   OUT EFI_BROWSER_ACTION_REQUEST             *ActionRequest\r
   );\r
 \r
+/**\r
+  This function applies changes in a driver's configuration.\r
+  Input is a Configuration, which has the routing data for this\r
+  driver followed by name / value configuration pairs. The driver\r
+  must apply those pairs to its configurable storage. If the\r
+  driver's configuration is stored in a linear block of data\r
+  and the driver's name / value pairs are in <BlockConfig>\r
+  format, it may use the ConfigToBlock helper function (above) to\r
+  simplify the job. Currently not implemented.\r
+\r
+  @param[in]  This                Points to the EFI_HII_CONFIG_ACCESS_PROTOCOL.\r
+  @param[in]  Configuration       A null-terminated Unicode string in\r
+                                  <ConfigString> format.\r
+  @param[out] Progress            A pointer to a string filled in with the\r
+                                  offset of the most recent '&' before the\r
+                                  first failing name / value pair (or the\r
+                                  beginn ing of the string if the failure\r
+                                  is in the first name / value pair) or\r
+                                  the terminating NULL if all was\r
+                                  successful.\r
+\r
+  @retval EFI_SUCCESS             The results have been distributed or are\r
+                                  awaiting distribution.\r
+  @retval EFI_OUT_OF_RESOURCES    Not enough memory to store the\r
+                                  parts of the results that must be\r
+                                  stored awaiting possible future\r
+                                  protocols.\r
+  @retval EFI_INVALID_PARAMETERS  Passing in a NULL for the\r
+                                  Results parameter would result\r
+                                  in this type of error.\r
+  @retval EFI_NOT_FOUND           Target for the specified routing data\r
+                                  was not found.\r
+**/\r
+EFI_STATUS\r
+EFIAPI\r
+FileExplorerRouteConfig (\r
+  IN CONST EFI_HII_CONFIG_ACCESS_PROTOCOL *This,\r
+  IN CONST EFI_STRING                     Configuration,\r
+  OUT EFI_STRING                          *Progress\r
+  );\r
+\r
 /**\r
   Dispatch BMM formset and FileExplorer formset.\r
 \r
@@ -1477,6 +1512,129 @@ EfiLibGetVariable (
   IN EFI_GUID             *VendorGuid\r
   );\r
 \r
+/**\r
+  Get option number according to Boot#### and BootOrder variable.\r
+  The value is saved as #### + 1.\r
+\r
+  @param CallbackData    The BMM context data.\r
+**/\r
+VOID\r
+GetBootOrder (\r
+  IN  BMM_CALLBACK_DATA    *CallbackData\r
+  );\r
+\r
+/**\r
+  Get driver option order from globalc DriverOptionMenu.\r
+\r
+  @param CallbackData    The BMM context data.\r
+\r
+**/\r
+VOID\r
+GetDriverOrder (\r
+  IN  BMM_CALLBACK_DATA    *CallbackData\r
+  );\r
+\r
+/**\r
+  Intall BootMaint and FileExplorer HiiPackages.\r
+\r
+**/\r
+EFI_STATUS\r
+InitBMPackage (\r
+  VOID\r
+  );\r
+\r
+/**\r
+  Remvoe the intalled BootMaint and FileExplorer HiiPackages.\r
+\r
+**/\r
+VOID\r
+FreeBMPackage (\r
+  VOID\r
+  );\r
+\r
+/**\r
+  According to LegacyDevOrder variable to get legacy FD\HD\CD\NET\BEV\r
+  devices list .\r
+\r
+  @param CallbackData    The BMM context data.\r
+**/\r
+VOID\r
+GetLegacyDeviceOrder (\r
+  IN  BMM_CALLBACK_DATA    *CallbackData\r
+  );\r
+\r
+/**\r
+\r
+  Initialize console input device check box to ConsoleInCheck[MAX_MENU_NUMBER]\r
+  in BMM_FAKE_NV_DATA structure.\r
+\r
+  @param CallbackData    The BMM context data.\r
+\r
+**/\r
+VOID\r
+GetConsoleInCheck (\r
+  IN  BMM_CALLBACK_DATA    *CallbackData\r
+  );\r
+\r
+/**\r
+\r
+  Initialize console output device check box to ConsoleOutCheck[MAX_MENU_NUMBER]\r
+  in BMM_FAKE_NV_DATA structure.\r
+\r
+  @param CallbackData    The BMM context data.\r
+\r
+**/\r
+VOID\r
+GetConsoleOutCheck (\r
+  IN  BMM_CALLBACK_DATA    *CallbackData\r
+  );\r
+\r
+/**\r
+\r
+  Initialize standard error output device check box to ConsoleErrCheck[MAX_MENU_NUMBER]\r
+  in BMM_FAKE_NV_DATA structure.\r
+\r
+  @param CallbackData    The BMM context data.\r
+\r
+**/\r
+VOID\r
+GetConsoleErrCheck (\r
+  IN  BMM_CALLBACK_DATA    *CallbackData\r
+  );\r
+\r
+/**\r
+\r
+  Initialize terminal attributes (baudrate, data rate, stop bits, parity and terminal type)\r
+  to BMM_FAKE_NV_DATA structure.\r
+\r
+  @param CallbackData    The BMM context data.\r
+\r
+**/\r
+VOID\r
+GetTerminalAttribute (\r
+  IN  BMM_CALLBACK_DATA    *CallbackData\r
+  );\r
+\r
+/**\r
+\r
+  Find the first instance of this Protocol\r
+  in the system and return it's interface.\r
+\r
+\r
+  @param ProtocolGuid    Provides the protocol to search for\r
+  @param Interface       On return, a pointer to the first interface\r
+                         that matches ProtocolGuid\r
+\r
+  @retval  EFI_SUCCESS      A protocol instance matching ProtocolGuid was found\r
+  @retval  EFI_NOT_FOUND    No protocol instances were found that match ProtocolGuid\r
+\r
+**/\r
+EFI_STATUS\r
+EfiLibLocateProtocol (\r
+  IN  EFI_GUID    *ProtocolGuid,\r
+  OUT VOID        **Interface\r
+  );\r
+\r
 //\r
 // Global variable in this program (defined in data.c)\r
 //\r