]>
code.delx.au - refind/blob - EfiLib/legacy.h
618c755d193a74c402e45549795818ae7e630028
3 * CSM/legacy boot support functions
5 * Taken from Tianocore source code (mostly IntelFrameworkModulePkg/Universal/BdsDxe/BootMaint/BBSsupport.c)
7 * Copyright (c) 2004 - 2011, Intel Corporation. All rights reserved.<BR>
8 * This program and the accompanying materials
9 * are licensed and made available under the terms and conditions of the BSD License
10 * which accompanies this distribution. The full text of the license may be found at
11 * http://opensource.org/licenses/bsd-license.php
13 * THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
14 * WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
21 typedef UINT8 BBS_TYPE
;
23 #define VAR_FLAG EFI_VARIABLE_BOOTSERVICE_ACCESS | EFI_VARIABLE_RUNTIME_ACCESS | EFI_VARIABLE_NON_VOLATILE
27 /// For each legacy boot option in BBS table, a corresponding Boot#### variables is created.
28 /// The structure saves the mapping relationship between #### and the index in the BBS table.
31 UINT16 BootOptionNumber
;
34 } BOOT_OPTION_BBS_MAPPING
;
41 /// Length = sizeof (UINT16) + sizeof (Data)
45 } LEGACY_DEV_ORDER_ENTRY
;
50 BdsAddNonExistingLegacyBootOptions (
55 Delete all the invalid legacy boot options.
57 @retval EFI_SUCCESS All invalide legacy boot options are deleted.
58 @retval EFI_OUT_OF_RESOURCES Fail to allocate necessary memory.
59 @retval EFI_NOT_FOUND Fail to retrive variable of boot order.
63 BdsDeleteAllInvalidLegacyBootOptions (
68 Add the legacy boot devices from BBS table into
69 the legacy device boot order.
71 @retval EFI_SUCCESS The boot devices are added successfully.
72 @retval EFI_NOT_FOUND The legacy boot devices are not found.
73 @retval EFI_OUT_OF_RESOURCES Memmory or storage is not enough.
74 @retval EFI_DEVICE_ERROR Fail to add the legacy device boot order into EFI variable
75 because of hardware error.
79 BdsUpdateLegacyDevOrder (