]> git.proxmox.com Git - mirror_edk2.git/blobdiff - OvmfPkg/Library/PlatformBootManagerLib/BdsPlatform.c
OvmfPkg/PlatformBootManagerLib: minimize the set of connected devices
[mirror_edk2.git] / OvmfPkg / Library / PlatformBootManagerLib / BdsPlatform.c
index 025252e72b3905453adef678aa7acb62bec39289..5ef0e828900d70490c5262a02adb67f71422a249 100644 (file)
@@ -1346,7 +1346,8 @@ Returns:
 \r
 --*/\r
 {\r
-  UINTN Index;\r
+  UINTN         Index;\r
+  RETURN_STATUS Status;\r
 \r
   DEBUG ((EFI_D_INFO, "PlatformBdsConnectSequence\n"));\r
 \r
@@ -1365,11 +1366,14 @@ Returns:
     Index++;\r
   }\r
 \r
-  //\r
-  // Just use the simple policy to connect all devices\r
-  //\r
-  DEBUG ((EFI_D_INFO, "EfiBootManagerConnectAll\n"));\r
-  EfiBootManagerConnectAll ();\r
+  Status = ConnectDevicesFromQemu ();\r
+  if (RETURN_ERROR (Status)) {\r
+    //\r
+    // Just use the simple policy to connect all devices\r
+    //\r
+    DEBUG ((DEBUG_INFO, "EfiBootManagerConnectAll\n"));\r
+    EfiBootManagerConnectAll ();\r
+  }\r
 \r
   PciAcpiInitialization ();\r
 }\r