]> git.proxmox.com Git - mirror_edk2.git/commitdiff
OvmfPkg/PlatformBootManagerLib: Postpone the shell registration
authorGary Lin <glin@suse.com>
Wed, 11 May 2016 08:40:49 +0000 (16:40 +0800)
committerLaszlo Ersek <lersek@redhat.com>
Thu, 12 May 2016 08:25:15 +0000 (10:25 +0200)
We currently register the shell before creating the boot options for
the block devices and the network devices, so the boot manager boots
into the internal shell if the user doesn't specify the boot order.
However, Xen doesn't support fw_cfg, so there is no way to change the
boot order with the external command, and the firmware will always
boot into the internal shell if the user doesn't interfere the boot
process.

This patch postpones the shell registration after MdeModulePkg/BDS
creates all the boot options for the block and network devices, so
that firmware will try to boot the block/network devices first.

Cc: Laszlo Ersek <lersek@redhat.com>
Cc: Jordan Justen <jordan.l.justen@intel.com>
Cc: Ruiyu Ni <ruiyu.ni@intel.com>
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Gary Lin <glin@suse.com>
Reviewed-by: Laszlo Ersek <lersek@redhat.com>
Reviewed-by: Ruiyu Ni <ruiyu.ni@intel.com>
OvmfPkg/Library/PlatformBootManagerLib/BdsPlatform.c

index cf774a16a78bde5e1a8e77f495d6bca13a9a18f1..a16453d289ded5930fb58e0089b3eded7721c5de 100644 (file)
@@ -184,12 +184,6 @@ PlatformRegisterOptionsAndKeys (
              NULL, (UINT16) BootOption.OptionNumber, 0, &Esc, NULL\r
              );\r
   ASSERT (Status == EFI_SUCCESS || Status == EFI_ALREADY_STARTED);\r
-  //\r
-  // Register UEFI Shell\r
-  //\r
-  PlatformRegisterFvBootOption (\r
-    PcdGetPtr (PcdShellFile), L"EFI Internal Shell", LOAD_OPTION_ACTIVE\r
-    );\r
 }\r
 \r
 EFI_STATUS\r
@@ -1304,6 +1298,13 @@ Routine Description:
 \r
   EfiBootManagerRefreshAllBootOption ();\r
 \r
+  //\r
+  // Register UEFI Shell\r
+  //\r
+  PlatformRegisterFvBootOption (\r
+    PcdGetPtr (PcdShellFile), L"EFI Internal Shell", LOAD_OPTION_ACTIVE\r
+    );\r
+\r
   SetBootOrderFromQemu (NULL);\r
 }\r
 \r