From: Laszlo Ersek Date: Thu, 15 Mar 2018 11:49:26 +0000 (+0100) Subject: OvmfPkg/PlatformBootManagerLib: process "-kernel" before boot devices X-Git-Tag: edk2-stable201903~2100 X-Git-Url: https://git.proxmox.com/?p=mirror_edk2.git;a=commitdiff_plain;h=a34a886962561f6d8550b2a1bb193798ca456431 OvmfPkg/PlatformBootManagerLib: process "-kernel" before boot devices 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 Cc: Jordan Justen Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Laszlo Ersek Reviewed-by: Ard Biesheuvel Tested-by: Gabriel Somlo --- diff --git a/OvmfPkg/Library/PlatformBootManagerLib/BdsPlatform.c b/OvmfPkg/Library/PlatformBootManagerLib/BdsPlatform.c index b624b8f225..862fa6ebb4 100644 --- a/OvmfPkg/Library/PlatformBootManagerLib/BdsPlatform.c +++ b/OvmfPkg/Library/PlatformBootManagerLib/BdsPlatform.c @@ -1450,14 +1450,14 @@ PlatformBootManagerAfterConsole ( PciAcpiInitialization (); // - // Perform some platform specific connect sequence + // Process QEMU's -kernel command line option // - PlatformBdsConnectSequence (); + TryRunningQemuKernel (); // - // Process QEMU's -kernel command line option + // Perform some platform specific connect sequence // - TryRunningQemuKernel (); + PlatformBdsConnectSequence (); EfiBootManagerRefreshAllBootOption ();