]> git.proxmox.com Git - mirror_edk2.git/blame - MdeModulePkg/Universal/BdsDxe/BootMaint/BBSsupport.h
Clean up BootMaint module in BdsDxe.
[mirror_edk2.git] / MdeModulePkg / Universal / BdsDxe / BootMaint / BBSsupport.h
CommitLineData
fd6a62f3 1/** @file\r
2 declares interface functions\r
93e3992d 3\r
fd6a62f3 4Copyright (c) 2004 - 2008, Intel Corporation. <BR>\r
93e3992d 5All rights reserved. This program and the accompanying materials\r
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
fd6a62f3 13**/\r
93e3992d 14\r
744fc758 15#ifndef _EFI_BDS_BBS_SUPPORT_H_\r
16#define _EFI_BDS_BBS_SUPPORT_H_\r
93e3992d 17\r
18#include "BootMaint.h"\r
744fc758 19\r
dce655e8 20#define MAX_BBS_ENTRIES 0x100\r
21\r
b30312ba 22/**\r
744fc758 23 Build Legacy Device Name String according.\r
b30312ba 24\r
744fc758 25 @param CurBBSEntry BBS Table.\r
26 @param Index Index.\r
27 @param BufSize The buffer size.\r
28 @param BootString The output string.\r
b30312ba 29\r
744fc758 30 @return VOID No output.\r
b30312ba 31\r
32**/\r
93e3992d 33VOID\r
34BdsBuildLegacyDevNameString (\r
35 IN BBS_TABLE *CurBBSEntry,\r
36 IN UINTN Index,\r
37 IN UINTN BufSize,\r
38 OUT CHAR16 *BootString\r
39 );\r
40\r
b30312ba 41/**\r
744fc758 42 Delete all the invalid legacy boot options.\r
b30312ba 43\r
744fc758 44 \r
b30312ba 45\r
744fc758 46 @retval EFI_SUCCESS All invalide legacy boot options are deleted.\r
47 @retval EFI_OUT_OF_RESOURCES Fail to allocate necessary memory.\r
48 @retval EFI_NOT_FOUND Fail to retrive variable of boot order.\r
b30312ba 49**/\r
93e3992d 50EFI_STATUS\r
51BdsDeleteAllInvalidLegacyBootOptions (\r
52 VOID\r
53 );\r
54\r
b30312ba 55/**\r
93e3992d 56\r
57 Add the legacy boot options from BBS table if they do not exist.\r
58\r
93e3992d 59\r
744fc758 60 \r
93e3992d 61\r
b30312ba 62 @retval EFI_SUCCESS The boot options are added successfully or they are already in boot options.\r
63 @retval others An error occurred when creating legacy boot options.\r
93e3992d 64\r
b30312ba 65**/\r
66EFI_STATUS\r
67BdsAddNonExistingLegacyBootOptions (\r
68 VOID\r
69 )\r
93e3992d 70;\r
71\r
b30312ba 72/**\r
b30312ba 73\r
744fc758 74 Add the legacy boot devices from BBS table into \r
75 the legacy device boot order.\r
b30312ba 76\r
744fc758 77 @retval EFI_SUCCESS The boot devices are added successfully.\r
b30312ba 78\r
79**/\r
93e3992d 80EFI_STATUS\r
81BdsUpdateLegacyDevOrder (\r
82 VOID\r
83 );\r
84\r
b30312ba 85/**\r
b30312ba 86\r
744fc758 87 Set the boot priority for BBS entries based on boot option entry and boot order.\r
b30312ba 88\r
744fc758 89 @param Entry The boot option is to be checked for refresh BBS table.\r
90 \r
91 @retval EFI_SUCCESS The boot priority for BBS entries is refreshed successfully.\r
b30312ba 92\r
93**/\r
93e3992d 94EFI_STATUS\r
95BdsRefreshBbsTableForBoot (\r
96 IN BDS_COMMON_OPTION *Entry\r
97 );\r
98\r
99#endif\r