From 245c643cc8b73240c3b88cb55b2911b285a8c10d Mon Sep 17 00:00:00 2001 From: Laszlo Ersek Date: Tue, 13 Mar 2018 19:32:55 +0100 Subject: [PATCH] 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 --- .../Library/PlatformBootManagerLib/BdsPlatform.c | 16 ++++++++++------ 1 file changed, 10 insertions(+), 6 deletions(-) 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 (); } -- 2.39.2