]> git.proxmox.com Git - mirror_edk2.git/blobdiff - ArmVirtPkg/Library/PlatformBootManagerLib/PlatformBm.c
ArmVirtPkg/PlatformBootManagerLib: return to "-kernel before boot devices"
[mirror_edk2.git] / ArmVirtPkg / Library / PlatformBootManagerLib / PlatformBm.c
index c11196a8a59c9be9329cedfc78b8727d679d8485..5d5e51d8c870cec53f733cc3d71434443dd3397e 100644 (file)
@@ -578,11 +578,18 @@ PlatformBootManagerBeforeConsole (
   VOID\r
   )\r
 {\r
+  RETURN_STATUS PcdStatus;\r
+\r
   //\r
   // Signal EndOfDxe PI Event\r
   //\r
   EfiEventGroupSignal (&gEfiEndOfDxeEventGroupGuid);\r
 \r
+  //\r
+  // Dispatch deferred images after EndOfDxe event.\r
+  //\r
+  EfiBootManagerDispatchDeferredImages ();\r
+\r
   //\r
   // Locate the PCI root bridges and make the PCI bus driver connect each,\r
   // non-recursively. This will produce a number of child handles with PciIo on\r
@@ -629,7 +636,9 @@ PlatformBootManagerBeforeConsole (
   //\r
   // Set the front page timeout from the QEMU configuration.\r
   //\r
-  PcdSet16 (PcdPlatformBootTimeOut, GetFrontPageTimeoutFromQemu ());\r
+  PcdStatus = PcdSet16S (PcdPlatformBootTimeOut,\r
+                GetFrontPageTimeoutFromQemu ());\r
+  ASSERT_RETURN_ERROR (PcdStatus);\r
 \r
   //\r
   // Register platform-specific boot options and keyboard shortcuts.\r
@@ -654,29 +663,31 @@ PlatformBootManagerAfterConsole (
   VOID\r
   )\r
 {\r
+  RETURN_STATUS Status;\r
+\r
   //\r
   // Show the splash screen.\r
   //\r
-  BootLogoEnableLogo (\r
-    ImageFormatBmp,                          // ImageFormat\r
-    PcdGetPtr (PcdLogoFile),                 // Logo\r
-    EdkiiPlatformLogoDisplayAttributeCenter, // Attribute\r
-    0,                                       // OffsetX\r
-    0                                        // OffsetY\r
-    );\r
+  BootLogoEnableLogo ();\r
 \r
   //\r
-  // Connect the rest of the devices.\r
+  // Process QEMU's -kernel command line option. The kernel booted this way\r
+  // will receive ACPI tables: in PlatformBootManagerBeforeConsole(), we\r
+  // connected any and all PCI root bridges, and then signaled the ACPI\r
+  // platform driver.\r
   //\r
-  EfiBootManagerConnectAll ();\r
+  TryRunningQemuKernel ();\r
 \r
   //\r
-  // Process QEMU's -kernel command line option. Note that the kernel booted\r
-  // this way should receive ACPI tables, which is why we connect all devices\r
-  // first (see above) -- PCI enumeration blocks ACPI table installation, if\r
-  // there is a PCI host.\r
+  // Connect the purported boot devices.\r
   //\r
-  TryRunningQemuKernel ();\r
+  Status = ConnectDevicesFromQemu ();\r
+  if (RETURN_ERROR (Status)) {\r
+    //\r
+    // Connect the rest of the devices.\r
+    //\r
+    EfiBootManagerConnectAll ();\r
+  }\r
 \r
   //\r
   // Enumerate all possible boot options, then filter and reorder them based on\r
@@ -688,7 +699,7 @@ PlatformBootManagerAfterConsole (
   // Register UEFI Shell\r
   //\r
   PlatformRegisterFvBootOption (\r
-    PcdGetPtr (PcdShellFile), L"EFI Internal Shell", LOAD_OPTION_ACTIVE\r
+    &gUefiShellFileGuid, L"EFI Internal Shell", LOAD_OPTION_ACTIVE\r
     );\r
 \r
   RemoveStaleFvFileOptions ();\r