]> git.proxmox.com Git - mirror_edk2.git/blobdiff - IntelFrameworkModulePkg/Universal/BdsDxe/BdsEntry.c
Clean up the private GUID definition in module Level.
[mirror_edk2.git] / IntelFrameworkModulePkg / Universal / BdsDxe / BdsEntry.c
index f89d8b8ebef1ca5951a0a27fa9cbaa6330baf950..1cc383e3e51f7d0d679fb5f5dd94120a9e83e4ba 100644 (file)
@@ -5,7 +5,7 @@
   After DxeCore finish DXE phase, gEfiBdsArchProtocolGuid->BdsEntry will be invoked\r
   to enter BDS phase.\r
 \r
-Copyright (c) 2004 - 2008, Intel Corporation. All rights reserved.<BR>\r
+Copyright (c) 2004 - 2010, Intel Corporation. All rights reserved.<BR>\r
 This program and the accompanying materials\r
 are licensed and made available under the terms and conditions of the BSD License\r
 which accompanies this distribution.  The full text of the license may be found at\r
@@ -38,8 +38,6 @@ EFI_BDS_ARCH_PROTOCOL  gBds = {
 \r
 UINT16                          *mBootNext = NULL;\r
 \r
-EFI_HANDLE                      mBdsImageHandle;\r
-\r
 /**\r
 \r
   Install Boot Device Selection Protocol\r
@@ -61,8 +59,6 @@ BdsInitialize (
 {\r
   EFI_STATUS  Status;\r
 \r
-  mBdsImageHandle = ImageHandle;\r
-\r
   //\r
   // Install protocol interface\r
   //\r
@@ -147,6 +143,17 @@ BdsBootDeviceSelect (
   // Parse the boot order to get boot option\r
   //\r
   BdsLibBuildOptionFromVar (&BootLists, L"BootOrder");\r
+\r
+  //\r
+  // When we didn't have chance to build boot option variables in the first \r
+  // full configuration boot (e.g.: Reset in the first page or in Device Manager),\r
+  // we have no boot options in the following mini configuration boot.\r
+  // Give the last chance to enumerate the boot options.\r
+  //\r
+  if (IsListEmpty (&BootLists)) {\r
+    BdsLibEnumerateAllBootOption (&BootLists);\r
+  }\r
+\r
   Link = BootLists.ForwardLink;\r
 \r
   //\r