From 34711bf19833c2822f257725c216f192b62696c7 Mon Sep 17 00:00:00 2001 From: Laszlo Ersek Date: Thu, 15 Mar 2018 12:49:26 +0100 Subject: [PATCH] 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 --- .../Library/PlatformBootManagerLib/PlatformBm.c | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) 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. -- 2.39.2