]>
git.proxmox.com Git - mirror_edk2.git/blob - OvmfPkg/Include/Library/QemuBootOrderLib.h
2 Rewrite the BootOrder NvVar based on QEMU's "bootorder" fw_cfg file --
5 Copyright (C) 2012-2014, Red Hat, Inc.
7 SPDX-License-Identifier: BSD-2-Clause-Patent
10 #ifndef __QEMU_BOOT_ORDER_LIB_H__
11 #define __QEMU_BOOT_ORDER_LIB_H__
13 #include <Uefi/UefiBaseType.h>
18 Connect devices based on the boot order retrieved from QEMU.
20 Attempt to retrieve the "bootorder" fw_cfg file from QEMU. Translate the
21 OpenFirmware device paths therein to UEFI device path fragments. Connect the
22 devices identified by the UEFI devpath prefixes as narrowly as possible, then
23 connect all their child devices, recursively.
25 If this function fails, then platform BDS should fall back to
26 EfiBootManagerConnectAll(), or some other method for connecting any expected
29 @retval RETURN_SUCCESS The "bootorder" fw_cfg file has been
30 parsed, and the referenced device-subtrees
33 @retval RETURN_UNSUPPORTED QEMU's fw_cfg is not supported.
35 @retval RETURN_NOT_FOUND Empty or nonexistent "bootorder" fw_cfg
38 @retval RETURN_INVALID_PARAMETER Parse error in the "bootorder" fw_cfg file.
40 @retval RETURN_OUT_OF_RESOURCES Memory allocation failed.
42 @return Error statuses propagated from underlying
47 ConnectDevicesFromQemu (
54 Set the boot order based on configuration retrieved from QEMU.
56 Attempt to retrieve the "bootorder" fw_cfg file from QEMU. Translate the
57 OpenFirmware device paths therein to UEFI device path fragments. Match the
58 translated fragments against the current list of boot options, and rewrite
59 the BootOrder NvVar so that it corresponds to the order described in fw_cfg.
61 Platform BDS should call this function after connecting any expected boot
62 devices and calling EfiBootManagerRefreshAllBootOption ().
64 @retval RETURN_SUCCESS BootOrder NvVar rewritten.
66 @retval RETURN_UNSUPPORTED QEMU's fw_cfg is not supported.
68 @retval RETURN_NOT_FOUND Empty or nonexistent "bootorder" fw_cfg
69 file, or no match found between the
70 "bootorder" fw_cfg file and BootOptionList.
72 @retval RETURN_INVALID_PARAMETER Parse error in the "bootorder" fw_cfg file.
74 @retval RETURN_OUT_OF_RESOURCES Memory allocation failed.
76 @return Values returned by gBS->LocateProtocol ()
77 or gRT->SetVariable ().
82 SetBootOrderFromQemu (
88 Calculate the number of seconds we should be showing the FrontPage progress
91 @return The TimeoutDefault argument for PlatformBdsEnterFrontPage().
95 GetFrontPageTimeoutFromQemu (