From: Laszlo Ersek Date: Tue, 13 Mar 2018 18:32:55 +0000 (+0100) Subject: OvmfPkg/PlatformBootManagerLib: minimize the set of connected devices X-Git-Tag: edk2-stable201903~2142 X-Git-Url: https://git.proxmox.com/?p=mirror_edk2.git;a=commitdiff_plain;h=245c643cc8b73240c3b88cb55b2911b285a8c10d OvmfPkg/PlatformBootManagerLib: minimize the set of connected devices Prefer ConnectDevicesFromQemu() to EfiBootManagerConnectAll(). Cc: Ard Biesheuvel Cc: Jordan Justen Cc: Shannon Zhao Cc: Xiang Zheng Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Laszlo Ersek Tested-by: Ard Biesheuvel # ArmVirtQemu Reviewed-by: Ard Biesheuvel Tested-by: Xiang Zheng --- diff --git a/OvmfPkg/Library/PlatformBootManagerLib/BdsPlatform.c b/OvmfPkg/Library/PlatformBootManagerLib/BdsPlatform.c index 025252e72b..5ef0e82890 100644 --- a/OvmfPkg/Library/PlatformBootManagerLib/BdsPlatform.c +++ b/OvmfPkg/Library/PlatformBootManagerLib/BdsPlatform.c @@ -1346,7 +1346,8 @@ Returns: --*/ { - UINTN Index; + UINTN Index; + RETURN_STATUS Status; DEBUG ((EFI_D_INFO, "PlatformBdsConnectSequence\n")); @@ -1365,11 +1366,14 @@ Returns: Index++; } - // - // Just use the simple policy to connect all devices - // - DEBUG ((EFI_D_INFO, "EfiBootManagerConnectAll\n")); - EfiBootManagerConnectAll (); + Status = ConnectDevicesFromQemu (); + if (RETURN_ERROR (Status)) { + // + // Just use the simple policy to connect all devices + // + DEBUG ((DEBUG_INFO, "EfiBootManagerConnectAll\n")); + EfiBootManagerConnectAll (); + } PciAcpiInitialization (); }