summaryrefslogtreecommitdiffstats
path: root/OvmfPkg/Library
diff options
context:
space:
mode:
authorLaszlo Ersek <lersek@redhat.com>2018-03-13 19:32:55 +0100
committerLaszlo Ersek <lersek@redhat.com>2018-03-14 11:24:28 +0100
commit245c643cc8b73240c3b88cb55b2911b285a8c10d (patch)
treea165029a8f158191a7c102f06fe095f1242be956 /OvmfPkg/Library
parent51bd1f7699796de6a6209cc035640f2c06a5fc1b (diff)
downloadedk2-245c643cc8b73240c3b88cb55b2911b285a8c10d.tar.gz
edk2-245c643cc8b73240c3b88cb55b2911b285a8c10d.tar.bz2
edk2-245c643cc8b73240c3b88cb55b2911b285a8c10d.zip
OvmfPkg/PlatformBootManagerLib: minimize the set of connected devices
Prefer ConnectDevicesFromQemu() to EfiBootManagerConnectAll(). Cc: Ard Biesheuvel <ard.biesheuvel@linaro.org> Cc: Jordan Justen <jordan.l.justen@intel.com> Cc: Shannon Zhao <zhaoshenglong@huawei.com> Cc: Xiang Zheng <xiang.zheng@linaro.org> Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Laszlo Ersek <lersek@redhat.com> Tested-by: Ard Biesheuvel <ard.biesheuvel@linaro.org> # ArmVirtQemu Reviewed-by: Ard Biesheuvel <ard.biesheuvel@linaro.org> Tested-by: Xiang Zheng <xiang.zheng@linaro.org>
Diffstat (limited to 'OvmfPkg/Library')
-rw-r--r--OvmfPkg/Library/PlatformBootManagerLib/BdsPlatform.c16
1 files 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 ();
}