]> git.proxmox.com Git - mirror_edk2.git/blobdiff - IntelFrameworkModulePkg/Universal/BdsDxe/BootMngr/BootManager.h
Move BdsDxe and GenericBdsLib to IntelFrameworkModulePkg, these modules need dependen...
[mirror_edk2.git] / IntelFrameworkModulePkg / Universal / BdsDxe / BootMngr / BootManager.h
diff --git a/IntelFrameworkModulePkg/Universal/BdsDxe/BootMngr/BootManager.h b/IntelFrameworkModulePkg/Universal/BdsDxe/BootMngr/BootManager.h
new file mode 100644 (file)
index 0000000..4e46078
--- /dev/null
@@ -0,0 +1,108 @@
+/** @file\r
+  The platform boot manager reference implement\r
+\r
+Copyright (c) 2004 - 2008, Intel Corporation. <BR>\r
+All rights reserved. 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
+http://opensource.org/licenses/bsd-license.php\r
+\r
+THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,\r
+WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.\r
+\r
+**/\r
+\r
+#ifndef _EFI_BOOT_MANAGER_H_\r
+#define _EFI_BOOT_MANAGER_H_\r
+\r
+#include "Bds.h"\r
+#include "FrontPage.h"\r
+\r
+//\r
+// These are defined as the same with vfr file\r
+//\r
+#define BOOT_MANAGER_FORMSET_GUID \\r
+  { \\r
+  0x847bc3fe, 0xb974, 0x446d, {0x94, 0x49, 0x5a, 0xd5, 0x41, 0x2e, 0x99, 0x3b} \\r
+  }\r
+\r
+#define BOOT_MANAGER_FORM_ID     0x1000\r
+\r
+#define LABEL_BOOT_OPTION        0x00\r
+\r
+//\r
+// These are the VFR compiler generated data representing our VFR data.\r
+//\r
+extern UINT8 BootManagerVfrBin[];\r
+\r
+#define BOOT_MANAGER_CALLBACK_DATA_SIGNATURE  SIGNATURE_32 ('B', 'M', 'C', 'B')\r
+\r
+typedef struct {\r
+  UINTN                           Signature;\r
+\r
+  //\r
+  // HII relative handles\r
+  //\r
+  EFI_HII_HANDLE                  HiiHandle;\r
+  EFI_HANDLE                      DriverHandle;\r
+\r
+  //\r
+  // Produced protocols\r
+  //\r
+  EFI_HII_CONFIG_ACCESS_PROTOCOL   ConfigAccess;\r
+} BOOT_MANAGER_CALLBACK_DATA;\r
+\r
+/**\r
+  This call back funtion is registered with Boot Manager formset.\r
+  When user selects a boot option, this call back function will\r
+  be triggered. The boot option is saved for later processing.\r
+\r
+\r
+  @param This            Points to the EFI_HII_CONFIG_ACCESS_PROTOCOL.\r
+  @param Action          Specifies the type of action taken by the browser.\r
+  @param QuestionId      A unique value which is sent to the original exporting driver\r
+                         so that it can identify the type of data to expect.\r
+  @param Type            The type of value for the question.\r
+  @param Value           A pointer to the data being sent to the original exporting driver.\r
+  @param ActionRequest   On return, points to the action requested by the callback function.\r
+\r
+  @retval  EFI_SUCCESS           The callback successfully handled the action.\r
+  @retval  EFI_INVALID_PARAMETER The setup browser call this function with invalid parameters.\r
+\r
+**/\r
+EFI_STATUS\r
+EFIAPI\r
+BootManagerCallback (\r
+  IN  CONST EFI_HII_CONFIG_ACCESS_PROTOCOL   *This,\r
+  IN  EFI_BROWSER_ACTION                     Action,\r
+  IN  EFI_QUESTION_ID                        QuestionId,\r
+  IN  UINT8                                  Type,\r
+  IN  EFI_IFR_TYPE_VALUE                     *Value,\r
+  OUT EFI_BROWSER_ACTION_REQUEST             *ActionRequest\r
+  );\r
+\r
+/**\r
+\r
+  Registers HII packages for the Boot Manger to HII Database.\r
+  It also registers the browser call back function.\r
+\r
+  @return Status of HiiLibCreateHiiDriverHandle() and gHiiDatabase->NewPackageList()\r
+**/\r
+EFI_STATUS\r
+InitializeBootManager (\r
+  VOID\r
+  );\r
+\r
+/**\r
+  This funtion invokees Boot Manager. If all devices have not a chance to be connected,\r
+  the connect all will be triggered. It then enumerate all boot options. If \r
+  a boot option from the Boot Manager page is selected, Boot Manager will boot\r
+  from this boot option.\r
+  \r
+**/\r
+VOID\r
+CallBootManager (\r
+  VOID\r
+  );\r
+\r
+#endif\r