\r
Copyright (C) 2012-2014, Red Hat, Inc.\r
\r
- This program and the accompanying materials are licensed and made available\r
- under the terms and conditions of the BSD License which accompanies this\r
- distribution. The full text of the license may be found at\r
- http://opensource.org/licenses/bsd-license.php\r
-\r
- THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, WITHOUT\r
- WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.\r
+ SPDX-License-Identifier: BSD-2-Clause-Patent\r
**/\r
\r
#ifndef __QEMU_BOOT_ORDER_LIB_H__\r
#include <Uefi/UefiBaseType.h>\r
#include <Base.h>\r
\r
+/**\r
+ Connect devices based on the boot order retrieved from QEMU.\r
+\r
+ Attempt to retrieve the "bootorder" fw_cfg file from QEMU. Translate the\r
+ OpenFirmware device paths therein to UEFI device path fragments. Connect the\r
+ devices identified by the UEFI devpath prefixes as narrowly as possible, then\r
+ connect all their child devices, recursively.\r
+\r
+ If this function fails, then platform BDS should fall back to\r
+ EfiBootManagerConnectAll(), or some other method for connecting any expected\r
+ boot devices.\r
+\r
+ @retval RETURN_SUCCESS The "bootorder" fw_cfg file has been\r
+ parsed, and the referenced device-subtrees\r
+ have been connected.\r
+\r
+ @retval RETURN_UNSUPPORTED QEMU's fw_cfg is not supported.\r
+\r
+ @retval RETURN_NOT_FOUND Empty or nonexistent "bootorder" fw_cfg\r
+ file.\r
+\r
+ @retval RETURN_INVALID_PARAMETER Parse error in the "bootorder" fw_cfg file.\r
+\r
+ @retval RETURN_OUT_OF_RESOURCES Memory allocation failed.\r
+\r
+ @return Error statuses propagated from underlying\r
+ functions.\r
+**/\r
+RETURN_STATUS\r
+EFIAPI\r
+ConnectDevicesFromQemu (\r
+ VOID\r
+ );\r
\r
/**\r
\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
+ Platform BDS should call this function after connecting any expected boot\r
+ devices and calling EfiBootManagerRefreshAllBootOption ().\r
\r
@retval RETURN_SUCCESS BootOrder NvVar rewritten.\r
\r
VOID\r
);\r
\r
-\r
/**\r
Calculate the number of seconds we should be showing the FrontPage progress\r
bar for.\r