]> git.proxmox.com Git - mirror_edk2.git/blob - IntelFrameworkModulePkg/Universal/BdsDxe/BootMaint/BBSsupport.h
0fa35186d9623112e29c727d281a81e603e6a8a9
[mirror_edk2.git] / IntelFrameworkModulePkg / Universal / BdsDxe / BootMaint / BBSsupport.h
1 /** @file
2 declares interface functions
3
4 Copyright (c) 2004 - 2018, Intel Corporation. All rights reserved.<BR>
5 SPDX-License-Identifier: BSD-2-Clause-Patent
6
7 **/
8
9 #ifndef _EFI_BDS_BBS_SUPPORT_H_
10 #define _EFI_BDS_BBS_SUPPORT_H_
11
12 #include "BootMaint.h"
13
14 /**
15 Build Legacy Device Name String according.
16
17 @param CurBBSEntry BBS Table.
18 @param Index Index.
19 @param BufSize The buffer size.
20 @param BootString The output string.
21
22 @return VOID No output.
23
24 **/
25 VOID
26 BdsBuildLegacyDevNameString (
27 IN BBS_TABLE *CurBBSEntry,
28 IN UINTN Index,
29 IN UINTN BufSize,
30 OUT CHAR16 *BootString
31 );
32
33 /**
34 Group the legacy boot options in the BootOption.
35
36 The routine assumes the boot options in the beginning that covers all the device
37 types are ordered properly and re-position the following boot options just after
38 the corresponding boot options with the same device type.
39 For example:
40 1. Input = [Harddisk1 CdRom2 Efi1 Harddisk0 CdRom0 CdRom1 Harddisk2 Efi0]
41 Assuming [Harddisk1 CdRom2 Efi1] is ordered properly
42 Output = [Harddisk1 Harddisk0 Harddisk2 CdRom2 CdRom0 CdRom1 Efi1 Efi0]
43
44 2. Input = [Efi1 Efi0 CdRom1 Harddisk0 Harddisk1 Harddisk2 CdRom0 CdRom2]
45 Assuming [Efi1 Efi0 CdRom1 Harddisk0] is ordered properly
46 Output = [Efi1 Efi0 CdRom1 CdRom0 CdRom2 Harddisk0 Harddisk1 Harddisk2]
47 **/
48 VOID
49 GroupMultipleLegacyBootOption4SameType (
50 VOID
51 );
52
53 /**
54 Re-order the Boot Option according to the DevOrder.
55
56 The routine re-orders the Boot Option in BootOption array according to
57 the order specified by DevOrder.
58
59 @param DevOrder Pointer to buffer containing the BBS Index,
60 high 8-bit value 0xFF indicating a disabled boot option
61 @param DevOrderCount Count of the BBS Index
62 @param EnBootOption Callee allocated buffer containing the enabled Boot Option Numbers
63 @param EnBootOptionCount Count of the enabled Boot Option Numbers
64 @param DisBootOption Callee allocated buffer containing the disabled Boot Option Numbers
65 @param DisBootOptionCount Count of the disabled Boot Option Numbers
66 **/
67 VOID
68 OrderLegacyBootOption4SameType (
69 UINT16 *DevOrder,
70 UINTN DevOrderCount,
71 UINT16 **EnBootOption,
72 UINTN *EnBootOptionCount,
73 UINT16 **DisBootOption,
74 UINTN *DisBootOptionCount
75 );
76 #endif