From: Laszlo Ersek Date: Thu, 15 Mar 2018 11:49:26 +0000 (+0100) Subject: ArmVirtPkg/PlatformBootManagerLib: return to "-kernel before boot devices" X-Git-Tag: edk2-stable201903~2104 X-Git-Url: https://git.proxmox.com/?p=mirror_edk2.git;a=commitdiff_plain;h=34711bf19833c2822f257725c216f192b62696c7;ds=sidebyside ArmVirtPkg/PlatformBootManagerLib: return to "-kernel before boot devices" Move the TryRunningQemuKernel() call back to its original place. This improves the UEFI boot time for VMs that have "-kernel", many disks or NICs, and no "bootindex" properties. A well-known example is guestfish/libguestfs. For more info on the TryRunningQemuKernel() location, see the following commits: 23d04b58e27b, a78c4836ea0b, 158990b941e4. Cc: Ard Biesheuvel Cc: Xiang Zheng Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Laszlo Ersek Tested-by: Richard W.M. Jones Reviewed-by: Ard Biesheuvel --- diff --git a/ArmVirtPkg/Library/PlatformBootManagerLib/PlatformBm.c b/ArmVirtPkg/Library/PlatformBootManagerLib/PlatformBm.c index 36e0eed238..5d5e51d8c8 100644 --- a/ArmVirtPkg/Library/PlatformBootManagerLib/PlatformBm.c +++ b/ArmVirtPkg/Library/PlatformBootManagerLib/PlatformBm.c @@ -670,6 +670,14 @@ PlatformBootManagerAfterConsole ( // BootLogoEnableLogo (); + // + // Process QEMU's -kernel command line option. The kernel booted this way + // will receive ACPI tables: in PlatformBootManagerBeforeConsole(), we + // connected any and all PCI root bridges, and then signaled the ACPI + // platform driver. + // + TryRunningQemuKernel (); + // // Connect the purported boot devices. // @@ -681,14 +689,6 @@ PlatformBootManagerAfterConsole ( EfiBootManagerConnectAll (); } - // - // Process QEMU's -kernel command line option. Note that the kernel booted - // this way should receive ACPI tables, which is why we connect all devices - // first (see above) -- PCI enumeration blocks ACPI table installation, if - // there is a PCI host. - // - TryRunningQemuKernel (); - // // Enumerate all possible boot options, then filter and reorder them based on // the QEMU configuration.