]> git.proxmox.com Git - mirror_edk2.git/commitdiff
OvmfPkg, ArmVirtPkg: clean up SetBootOrderFromQemu() parameter list
authorLaszlo Ersek <lersek@redhat.com>
Tue, 17 May 2016 17:22:17 +0000 (19:22 +0200)
committerLaszlo Ersek <lersek@redhat.com>
Wed, 25 May 2016 10:25:19 +0000 (12:25 +0200)
With OvmfPkg's original QemuBootOrderLib (and USE_OLD_BDS) gone, we no
longer need the BootOptionList parameter in the SetBootOrderFromQemu()
prototype. Update the library class header file (including the function's
documentation), and adapt the library instance and the call sites.

Cc: Ard Biesheuvel <ard.biesheuvel@linaro.org>
Cc: Gary Ching-Pang Lin <glin@suse.com>
Cc: Jordan Justen <jordan.l.justen@intel.com>
Cc: Ruiyu Ni <ruiyu.ni@intel.com>
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Laszlo Ersek <lersek@redhat.com>
Reviewed-by: Ard Biesheuvel <ard.biesheuvel@linaro.org>
Reviewed-by: Jordan Justen <jordan.l.justen@intel.com>
ArmVirtPkg/Library/PlatformBootManagerLib/PlatformBm.c
OvmfPkg/Include/Library/QemuBootOrderLib.h
OvmfPkg/Library/PlatformBootManagerLib/BdsPlatform.c
OvmfPkg/Library/QemuNewBootOrderLib/QemuBootOrderLib.c

index d4bfcd0c071572b0d20d2bcac688183dc1758140..cc6d21e30007887a9747baae8f2468cd6a959504 100644 (file)
@@ -551,7 +551,7 @@ PlatformBootManagerAfterConsole (
   // the QEMU configuration.\r
   //\r
   EfiBootManagerRefreshAllBootOption ();\r
-  SetBootOrderFromQemu (NULL);\r
+  SetBootOrderFromQemu ();\r
 }\r
 \r
 /**\r
index 80d02c80c260dedf683fbb68972eb36af0fe1c5a..743a7178247116b67b28376e49d25298daece289 100644 (file)
 \r
   Attempt to retrieve the "bootorder" fw_cfg file from QEMU. Translate the\r
   OpenFirmware device paths therein to UEFI device path fragments. Match the\r
-  translated fragments against BootOptionList, and rewrite the BootOrder NvVar\r
-  so that it corresponds to the order described in fw_cfg.\r
-\r
-  @param[in] BootOptionList  A boot option list, created with\r
-                             BdsLibEnumerateAllBootOption ().\r
+  translated fragments against the current list of boot options, and rewrite\r
+  the BootOrder NvVar so that it corresponds to the order described in fw_cfg.\r
 \r
+  Platform BDS should call this function after EfiBootManagerConnectAll () and\r
+  EfiBootManagerRefreshAllBootOption () return.\r
 \r
   @retval RETURN_SUCCESS            BootOrder NvVar rewritten.\r
 \r
@@ -51,7 +50,7 @@
 **/\r
 RETURN_STATUS\r
 SetBootOrderFromQemu (\r
-  IN  CONST LIST_ENTRY *BootOptionList\r
+  VOID\r
   );\r
 \r
 \r
index a16453d289ded5930fb58e0089b3eded7721c5de..da4cb728c6783bf7535f29ef12e3d16dc8ee7992 100644 (file)
@@ -1305,7 +1305,7 @@ Routine Description:
     PcdGetPtr (PcdShellFile), L"EFI Internal Shell", LOAD_OPTION_ACTIVE\r
     );\r
 \r
-  SetBootOrderFromQemu (NULL);\r
+  SetBootOrderFromQemu ();\r
 }\r
 \r
 /**\r
index c5f165ae4e234f64b03309384a844ad6f22df011..86082301a8f517d1a85f93cc9e45550a4a7c96ac 100644 (file)
@@ -1696,12 +1696,11 @@ PruneBootVariables (
 \r
   Attempt to retrieve the "bootorder" fw_cfg file from QEMU. Translate the\r
   OpenFirmware device paths therein to UEFI device path fragments. Match the\r
-  translated fragments against BootOptionList, and rewrite the BootOrder NvVar\r
-  so that it corresponds to the order described in fw_cfg.\r
-\r
-  @param[in] BootOptionList  A boot option list, created with\r
-                             BdsLibEnumerateAllBootOption ().\r
+  translated fragments against the current list of boot options, and rewrite\r
+  the BootOrder NvVar so that it corresponds to the order described in fw_cfg.\r
 \r
+  Platform BDS should call this function after EfiBootManagerConnectAll () and\r
+  EfiBootManagerRefreshAllBootOption () return.\r
 \r
   @retval RETURN_SUCCESS            BootOrder NvVar rewritten.\r
 \r
@@ -1721,7 +1720,7 @@ PruneBootVariables (
 **/\r
 RETURN_STATUS\r
 SetBootOrderFromQemu (\r
-  IN  CONST LIST_ENTRY *BootOptionList\r
+  VOID\r
   )\r
 {\r
   RETURN_STATUS                    Status;\r
@@ -1741,15 +1740,6 @@ SetBootOrderFromQemu (
   EFI_BOOT_MANAGER_LOAD_OPTION     *BootOptions;\r
   UINTN                            BootOptionCount;\r
 \r
-  //\r
-  // The QemuBootOrderLib is linked by OvmfPkg and ArmVirtPkg.\r
-  // OvmfPkg was changed to use the new BDS @ MdeModulePkg, so boot options\r
-  // are no longer stored in linked list.\r
-  // But we don't change the QemuBootOrderLib class interface because\r
-  // ArmVirtPkg are still using old BDS @ IntelFrameworkModulePkg.\r
-  //\r
-  ASSERT (BootOptionList == NULL);\r
-\r
   Status = QemuFwCfgFindFile ("bootorder", &FwCfgItem, &FwCfgSize);\r
   if (Status != RETURN_SUCCESS) {\r
     return Status;\r