• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 /** @file
2   declares interface functions
3 
4 Copyright (c) 2004 - 2012, 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 _EFI_BDS_BBS_SUPPORT_H_
16 #define _EFI_BDS_BBS_SUPPORT_H_
17 
18 #include "BootMaint.h"
19 
20 /**
21   Build Legacy Device Name String according.
22 
23   @param CurBBSEntry     BBS Table.
24   @param Index           Index.
25   @param BufSize         The buffer size.
26   @param BootString      The output string.
27 
28   @return VOID           No output.
29 
30 **/
31 VOID
32 BdsBuildLegacyDevNameString (
33   IN BBS_TABLE                     *CurBBSEntry,
34   IN UINTN                         Index,
35   IN UINTN                         BufSize,
36   OUT CHAR16                       *BootString
37   );
38 
39 /**
40   Group the legacy boot options in the BootOption.
41 
42   The routine assumes the boot options in the beginning that covers all the device
43   types are ordered properly and re-position the following boot options just after
44   the corresponding boot options with the same device type.
45   For example:
46   1. Input  = [Harddisk1 CdRom2 Efi1 Harddisk0 CdRom0 CdRom1 Harddisk2 Efi0]
47      Assuming [Harddisk1 CdRom2 Efi1] is ordered properly
48      Output = [Harddisk1 Harddisk0 Harddisk2 CdRom2 CdRom0 CdRom1 Efi1 Efi0]
49 
50   2. Input  = [Efi1 Efi0 CdRom1 Harddisk0 Harddisk1 Harddisk2 CdRom0 CdRom2]
51      Assuming [Efi1 Efi0 CdRom1 Harddisk0] is ordered properly
52      Output = [Efi1 Efi0 CdRom1 CdRom0 CdRom2 Harddisk0 Harddisk1 Harddisk2]
53 **/
54 VOID
55 GroupMultipleLegacyBootOption4SameType (
56   VOID
57   );
58 
59 /**
60   Re-order the Boot Option according to the DevOrder.
61 
62   The routine re-orders the Boot Option in BootOption array according to
63   the order specified by DevOrder.
64 
65   @param DevOrder           Pointer to buffer containing the BBS Index,
66                             high 8-bit value 0xFF indicating a disabled boot option
67   @param DevOrderCount      Count of the BBS Index
68   @param EnBootOption       Callee allocated buffer containing the enabled Boot Option Numbers
69   @param EnBootOptionCount  Count of the enabled Boot Option Numbers
70   @param DisBootOption      Callee allocated buffer containing the disabled Boot Option Numbers
71   @param DisBootOptionCount Count of the disabled Boot Option Numbers
72 **/
73 VOID
74 OrderLegacyBootOption4SameType (
75   UINT16                   *DevOrder,
76   UINTN                    DevOrderCount,
77   UINT16                   **EnBootOption,
78   UINTN                    *EnBootOptionCount,
79   UINT16                   **DisBootOption,
80   UINTN                    *DisBootOptionCount
81   );
82 #endif
83