]> git.proxmox.com Git - mirror_edk2.git/blame - IntelFrameworkModulePkg/Universal/BdsDxe/BootMaint/BBSsupport.h
BDS enhancement: enumerate & show all legacy boot options in Boot Manager so that...
[mirror_edk2.git] / IntelFrameworkModulePkg / Universal / BdsDxe / BootMaint / BBSsupport.h
CommitLineData
5c08e117 1/** @file\r
2 declares interface functions\r
3\r
180a5a35
HT
4Copyright (c) 2004 - 2008, Intel Corporation. All rights reserved.<BR>\r
5This program and the accompanying materials\r
5c08e117 6are licensed and made available under the terms and conditions of the BSD License\r
7which accompanies this distribution. The full text of the license may be found at\r
8http://opensource.org/licenses/bsd-license.php\r
9\r
10THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,\r
11WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.\r
12\r
13**/\r
14\r
15#ifndef _EFI_BDS_BBS_SUPPORT_H_\r
16#define _EFI_BDS_BBS_SUPPORT_H_\r
17\r
18#include "BootMaint.h"\r
19\r
5c08e117 20/**\r
21 Build Legacy Device Name String according.\r
22\r
23 @param CurBBSEntry BBS Table.\r
24 @param Index Index.\r
25 @param BufSize The buffer size.\r
26 @param BootString The output string.\r
27\r
28 @return VOID No output.\r
29\r
30**/\r
31VOID\r
32BdsBuildLegacyDevNameString (\r
33 IN BBS_TABLE *CurBBSEntry,\r
34 IN UINTN Index,\r
35 IN UINTN BufSize,\r
36 OUT CHAR16 *BootString\r
37 );\r
38\r
22d1f978
RN
39/**\r
40 Group the legacy boot options in the BootOption.\r
41\r
42 The routine assumes the boot options in the beginning that covers all the device \r
43 types are ordered properly and re-position the following boot options just after\r
44 the corresponding boot options with the same device type.\r
45 For example:\r
46 1. Input = [Harddisk1 CdRom2 Efi1 Harddisk0 CdRom0 CdRom1 Harddisk2 Efi0]\r
47 Assuming [Harddisk1 CdRom2 Efi1] is ordered properly\r
48 Output = [Harddisk1 Harddisk0 Harddisk2 CdRom2 CdRom0 CdRom1 Efi1 Efi0]\r
49\r
50 2. Input = [Efi1 Efi0 CdRom1 Harddisk0 Harddisk1 Harddisk2 CdRom0 CdRom2]\r
51 Assuming [Efi1 Efi0 CdRom1 Harddisk0] is ordered properly\r
52 Output = [Efi1 Efi0 CdRom1 CdRom0 CdRom2 Harddisk0 Harddisk1 Harddisk2]\r
53\r
54 @param BootOption Pointer to buffer containing Boot Option Numbers\r
55 @param BootOptionCount Count of the Boot Option Numbers\r
56**/\r
57VOID\r
58GroupMultipleLegacyBootOption4SameType (\r
59 UINT16 *BootOption,\r
60 UINTN BootOptionCount\r
61 );\r
62\r
63/**\r
64 Re-order the Boot Option according to the DevOrder.\r
65\r
66 The routine re-orders the Boot Option in BootOption array according to\r
67 the order specified by DevOrder.\r
68\r
69 @param BootOption Pointer to buffer containing the Boot Option Numbers\r
70 @param BootOptionCount Count of the Boot Option Numbers\r
71 @param DevOrder Pointer to buffer containing the BBS Index,\r
72 high 8-bit value 0xFF indicating a disabled boot option\r
73 @param DevOrderCount Count of the BBS Index\r
74 @param EnBootOption Pointer to buffer receiving the enabled Boot Option Numbers\r
75 @param EnBootOptionCount Count of the enabled Boot Option Numbers\r
76 @param DisBootOption Pointer to buffer receiving the disabled Boot Option Numbers\r
77 @param DisBootOptionCount Count of the disabled Boot Option Numbers\r
78**/\r
79VOID\r
80OrderLegacyBootOption4SameType (\r
81 UINT16 *BootOption,\r
82 UINTN BootOptionCount,\r
83 UINT16 *DevOrder,\r
84 UINTN DevOrderCount,\r
85 UINT16 *EnBootOption,\r
86 UINTN *EnBootOptionCount,\r
87 UINT16 *DisBootOption,\r
88 UINTN *DisBootOptionCount\r
89 );\r
5c08e117 90#endif\r