]>
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>
17 Connect devices based on the boot order retrieved from QEMU.
19 Attempt to retrieve the "bootorder" fw_cfg file from QEMU. Translate the
20 OpenFirmware device paths therein to UEFI device path fragments. Connect the
21 devices identified by the UEFI devpath prefixes as narrowly as possible, then
22 connect all their child devices, recursively.
24 If this function fails, then platform BDS should fall back to
25 EfiBootManagerConnectAll(), or some other method for connecting any expected
28 @retval RETURN_SUCCESS The "bootorder" fw_cfg file has been
29 parsed, and the referenced device-subtrees
32 @retval RETURN_UNSUPPORTED QEMU's fw_cfg is not supported.
34 @retval RETURN_NOT_FOUND Empty or nonexistent "bootorder" fw_cfg
37 @retval RETURN_INVALID_PARAMETER Parse error in the "bootorder" fw_cfg file.
39 @retval RETURN_OUT_OF_RESOURCES Memory allocation failed.
41 @return Error statuses propagated from underlying
46 ConnectDevicesFromQemu (
52 Set the boot order based on configuration retrieved from QEMU.
54 Attempt to retrieve the "bootorder" fw_cfg file from QEMU. Translate the
55 OpenFirmware device paths therein to UEFI device path fragments. Match the
56 translated fragments against the current list of boot options, and rewrite
57 the BootOrder NvVar so that it corresponds to the order described in fw_cfg.
59 Platform BDS should call this function after connecting any expected boot
60 devices and calling EfiBootManagerRefreshAllBootOption ().
62 @retval RETURN_SUCCESS BootOrder NvVar rewritten.
64 @retval RETURN_UNSUPPORTED QEMU's fw_cfg is not supported.
66 @retval RETURN_NOT_FOUND Empty or nonexistent "bootorder" fw_cfg
67 file, or no match found between the
68 "bootorder" fw_cfg file and BootOptionList.
70 @retval RETURN_INVALID_PARAMETER Parse error in the "bootorder" fw_cfg file.
72 @retval RETURN_OUT_OF_RESOURCES Memory allocation failed.
74 @return Values returned by gBS->LocateProtocol ()
75 or gRT->SetVariable ().
80 SetBootOrderFromQemu (
85 Calculate the number of seconds we should be showing the FrontPage progress
88 @return The TimeoutDefault argument for PlatformBdsEnterFrontPage().
92 GetFrontPageTimeoutFromQemu (