summaryrefslogtreecommitdiff
path: root/IntelFrameworkModulePkg/Universal/BdsDxe/BootMaint/BootMaint.c
diff options
context:
space:
mode:
authorniruiyu <niruiyu@6f19259b-4bc3-4df7-8a09-765794883524>2012-06-01 03:39:39 +0000
committerniruiyu <niruiyu@6f19259b-4bc3-4df7-8a09-765794883524>2012-06-01 03:39:39 +0000
commit16e5944abde9ea3f01c9ccff2a86a41e5a6a1dd0 (patch)
tree7cc5e5a08187212a83be8953ea9bbf2b7227d104 /IntelFrameworkModulePkg/Universal/BdsDxe/BootMaint/BootMaint.c
parent38fcd0270fff574ac82e2acad451fbcb36674398 (diff)
downloadedk2-platforms-16e5944abde9ea3f01c9ccff2a86a41e5a6a1dd0.tar.xz
Refine BdsDxe driver and GenericBdsLib library so that the GenericBdsLib doesn't depend on the BdsDxe implementation.
Signed-off-by: Ruiyu Ni <ruiyu.ni@intel.com> Reviewed-by: Eric Dong <eric.dong@intel.com> git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@13418 6f19259b-4bc3-4df7-8a09-765794883524
Diffstat (limited to 'IntelFrameworkModulePkg/Universal/BdsDxe/BootMaint/BootMaint.c')
-rw-r--r--IntelFrameworkModulePkg/Universal/BdsDxe/BootMaint/BootMaint.c66
1 files changed, 7 insertions, 59 deletions
diff --git a/IntelFrameworkModulePkg/Universal/BdsDxe/BootMaint/BootMaint.c b/IntelFrameworkModulePkg/Universal/BdsDxe/BootMaint/BootMaint.c
index 1186c0cb19..d1705a0b9c 100644
--- a/IntelFrameworkModulePkg/Universal/BdsDxe/BootMaint/BootMaint.c
+++ b/IntelFrameworkModulePkg/Universal/BdsDxe/BootMaint/BootMaint.c
@@ -1,7 +1,7 @@
/** @file
The functions for Boot Maintainence Main menu.
-Copyright (c) 2004 - 2011, Intel Corporation. All rights reserved.<BR>
+Copyright (c) 2004 - 2012, Intel Corporation. All rights reserved.<BR>
This program and the accompanying materials
are licensed and made available under the terms and conditions of the BSD License
which accompanies this distribution. The full text of the license may be found at
@@ -1016,7 +1016,7 @@ InitializeBM (
UpdateTerminalPage (BmmCallbackInfo);
}
- Status = EfiLibLocateProtocol (&gEfiLegacyBiosProtocolGuid, (VOID **) &LegacyBios);
+ Status = gBS->LocateProtocol (&gEfiLegacyBiosProtocolGuid, NULL, (VOID **) &LegacyBios);
if (!EFI_ERROR (Status)) {
RefreshUpdateData ();
mStartLabel->Number = FORM_BOOT_LEGACY_DEVICE_ID;
@@ -1328,6 +1328,11 @@ BdsStartBootMaint (
BdsLibEnumerateAllBootOption (&BdsBootOptionList);
//
+ // Group the legacy boot options for the same device type
+ //
+ GroupMultipleLegacyBootOption4SameType ();
+
+ //
// Init the BMM
//
Status = InitializeBM ();
@@ -1404,60 +1409,3 @@ FormSetDispatcher (
return Status;
}
-
-/**
- Deletete the Boot Option from EFI Variable. The Boot Order Arrray
- is also updated.
-
- @param OptionNumber The number of Boot option want to be deleted.
- @param BootOrder The Boot Order array.
- @param BootOrderSize The size of the Boot Order Array.
-
- @retval EFI_SUCCESS The Boot Option Variable was found and removed
- @retval EFI_UNSUPPORTED The Boot Option Variable store was inaccessible
- @retval EFI_NOT_FOUND The Boot Option Variable was not found
-**/
-EFI_STATUS
-EFIAPI
-BdsDeleteBootOption (
- IN UINTN OptionNumber,
- IN OUT UINT16 *BootOrder,
- IN OUT UINTN *BootOrderSize
- )
-{
- UINT16 BootOption[100];
- UINTN Index;
- EFI_STATUS Status;
- UINTN Index2Del;
-
- Status = EFI_SUCCESS;
- Index2Del = 0;
-
- UnicodeSPrint (BootOption, sizeof (BootOption), L"Boot%04x", OptionNumber);
- Status = EfiLibDeleteVariable (BootOption, &gEfiGlobalVariableGuid);
-
- //
- // adjust boot order array
- //
- for (Index = 0; Index < *BootOrderSize / sizeof (UINT16); Index++) {
- if (BootOrder[Index] == OptionNumber) {
- Index2Del = Index;
- break;
- }
- }
-
- if (Index != *BootOrderSize / sizeof (UINT16)) {
- for (Index = 0; Index < *BootOrderSize / sizeof (UINT16) - 1; Index++) {
- if (Index >= Index2Del) {
- BootOrder[Index] = BootOrder[Index + 1];
- }
- }
-
- *BootOrderSize -= sizeof (UINT16);
- }
-
- return Status;
-
-}
-
-