[edk2] [PATCH 5/5] OvmfPkg/PlatformBootManagerLib: process "-kernel" before boot devices

Laszlo Ersek posted 5 patches 6 years, 9 months ago
[edk2] [PATCH 5/5] OvmfPkg/PlatformBootManagerLib: process "-kernel" before boot devices
Posted by Laszlo Ersek 6 years, 9 months ago
This improves the UEFI boot time for VMs that have "-kernel", many disks
or NICs, and no "bootindex" properties.

(Unlike in ArmVirt commit 23d04b58e27b, in OvmfPkg commit 52fba28994e9 we
introduced TryRunningQemuKernel() right from the start *after*
BdsLibConnectAll(). Therefore, unlike in patch
'ArmVirtPkg/PlatformBootManagerLib: return to "-kernel before boot
devices"', we adopt the logic as new in this patch.)

Cc: Ard Biesheuvel <ard.biesheuvel@linaro.org>
Cc: Jordan Justen <jordan.l.justen@intel.com>
Contributed-under: TianoCore Contribution Agreement 1.1
Signed-off-by: Laszlo Ersek <lersek@redhat.com>
---
 OvmfPkg/Library/PlatformBootManagerLib/BdsPlatform.c | 10 +++++-----
 1 file changed, 5 insertions(+), 5 deletions(-)

diff --git a/OvmfPkg/Library/PlatformBootManagerLib/BdsPlatform.c b/OvmfPkg/Library/PlatformBootManagerLib/BdsPlatform.c
index b624b8f22535..862fa6ebb4e5 100644
--- a/OvmfPkg/Library/PlatformBootManagerLib/BdsPlatform.c
+++ b/OvmfPkg/Library/PlatformBootManagerLib/BdsPlatform.c
@@ -1446,22 +1446,22 @@ PlatformBootManagerAfterConsole (
 
   //
   // Set PCI Interrupt Line registers and ACPI SCI_EN
   //
   PciAcpiInitialization ();
 
-  //
-  // Perform some platform specific connect sequence
-  //
-  PlatformBdsConnectSequence ();
-
   //
   // Process QEMU's -kernel command line option
   //
   TryRunningQemuKernel ();
 
+  //
+  // Perform some platform specific connect sequence
+  //
+  PlatformBdsConnectSequence ();
+
   EfiBootManagerRefreshAllBootOption ();
 
   //
   // Register UEFI Shell
   //
   PlatformRegisterFvBootOption (
-- 
2.14.1.3.gb7cf6e02401b

_______________________________________________
edk2-devel mailing list
edk2-devel@lists.01.org
https://lists.01.org/mailman/listinfo/edk2-devel