]> git.proxmox.com Git - mirror_edk2.git/blobdiff - IntelFrameworkModulePkg/Universal/BdsDxe/BootMaint/BBSsupport.h
IntelFrameworkModulePkg/BdsDxe: rebase to ARRAY_SIZE()
[mirror_edk2.git] / IntelFrameworkModulePkg / Universal / BdsDxe / BootMaint / BBSsupport.h
index 711b1096a644825ed80896890b111836b5c884f3..e73dc859959cfbe275bb3bb7d34fe007446b815b 100644 (file)
@@ -1,8 +1,8 @@
 /** @file\r
   declares interface functions\r
 \r
-Copyright (c) 2004 - 2008, Intel Corporation. <BR>\r
-All rights reserved. This program and the accompanying materials\r
+Copyright (c) 2004 - 2012, 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
 http://opensource.org/licenses/bsd-license.php\r
@@ -17,8 +17,6 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
 \r
 #include "BootMaint.h"\r
 \r
-#define MAX_BBS_ENTRIES 0x100\r
-\r
 /**\r
   Build Legacy Device Name String according.\r
 \r
@@ -38,4 +36,47 @@ BdsBuildLegacyDevNameString (
   OUT CHAR16                       *BootString\r
   );\r
 \r
+/**\r
+  Group the legacy boot options in the BootOption.\r
+\r
+  The routine assumes the boot options in the beginning that covers all the device \r
+  types are ordered properly and re-position the following boot options just after\r
+  the corresponding boot options with the same device type.\r
+  For example:\r
+  1. Input  = [Harddisk1 CdRom2 Efi1 Harddisk0 CdRom0 CdRom1 Harddisk2 Efi0]\r
+     Assuming [Harddisk1 CdRom2 Efi1] is ordered properly\r
+     Output = [Harddisk1 Harddisk0 Harddisk2 CdRom2 CdRom0 CdRom1 Efi1 Efi0]\r
+\r
+  2. Input  = [Efi1 Efi0 CdRom1 Harddisk0 Harddisk1 Harddisk2 CdRom0 CdRom2]\r
+     Assuming [Efi1 Efi0 CdRom1 Harddisk0] is ordered properly\r
+     Output = [Efi1 Efi0 CdRom1 CdRom0 CdRom2 Harddisk0 Harddisk1 Harddisk2]\r
+**/\r
+VOID\r
+GroupMultipleLegacyBootOption4SameType (\r
+  VOID\r
+  );\r
+\r
+/**\r
+  Re-order the Boot Option according to the DevOrder.\r
+\r
+  The routine re-orders the Boot Option in BootOption array according to\r
+  the order specified by DevOrder.\r
+\r
+  @param DevOrder           Pointer to buffer containing the BBS Index,\r
+                            high 8-bit value 0xFF indicating a disabled boot option\r
+  @param DevOrderCount      Count of the BBS Index\r
+  @param EnBootOption       Callee allocated buffer containing the enabled Boot Option Numbers\r
+  @param EnBootOptionCount  Count of the enabled Boot Option Numbers\r
+  @param DisBootOption      Callee allocated buffer containing the disabled Boot Option Numbers\r
+  @param DisBootOptionCount Count of the disabled Boot Option Numbers\r
+**/\r
+VOID\r
+OrderLegacyBootOption4SameType (\r
+  UINT16                   *DevOrder,\r
+  UINTN                    DevOrderCount,\r
+  UINT16                   **EnBootOption,\r
+  UINTN                    *EnBootOptionCount,\r
+  UINT16                   **DisBootOption,\r
+  UINTN                    *DisBootOptionCount\r
+  );\r
 #endif\r