]>
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 This program and the accompanying materials are licensed and made available
8 under the terms and conditions of the BSD License which accompanies this
9 distribution. The full text of the license may be found at
10 http://opensource.org/licenses/bsd-license.php
12 THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, WITHOUT
13 WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
16 #ifndef __QEMU_BOOT_ORDER_LIB_H__
17 #define __QEMU_BOOT_ORDER_LIB_H__
19 #include <Uefi/UefiBaseType.h>
24 Connect devices based on the boot order retrieved from QEMU.
26 Attempt to retrieve the "bootorder" fw_cfg file from QEMU. Translate the
27 OpenFirmware device paths therein to UEFI device path fragments. Connect the
28 devices identified by the UEFI devpath prefixes as narrowly as possible, then
29 connect all their child devices, recursively.
31 If this function fails, then platform BDS should fall back to
32 EfiBootManagerConnectAll(), or some other method for connecting any expected
35 @retval RETURN_SUCCESS The "bootorder" fw_cfg file has been
36 parsed, and the referenced device-subtrees
39 @retval RETURN_UNSUPPORTED QEMU's fw_cfg is not supported.
41 @retval RETURN_NOT_FOUND Empty or nonexistent "bootorder" fw_cfg
44 @retval RETURN_INVALID_PARAMETER Parse error in the "bootorder" fw_cfg file.
46 @retval RETURN_OUT_OF_RESOURCES Memory allocation failed.
48 @return Error statuses propagated from underlying
53 ConnectDevicesFromQemu (
60 Set the boot order based on configuration retrieved from QEMU.
62 Attempt to retrieve the "bootorder" fw_cfg file from QEMU. Translate the
63 OpenFirmware device paths therein to UEFI device path fragments. Match the
64 translated fragments against the current list of boot options, and rewrite
65 the BootOrder NvVar so that it corresponds to the order described in fw_cfg.
67 Platform BDS should call this function after connecting any expected boot
68 devices and calling EfiBootManagerRefreshAllBootOption ().
70 @retval RETURN_SUCCESS BootOrder NvVar rewritten.
72 @retval RETURN_UNSUPPORTED QEMU's fw_cfg is not supported.
74 @retval RETURN_NOT_FOUND Empty or nonexistent "bootorder" fw_cfg
75 file, or no match found between the
76 "bootorder" fw_cfg file and BootOptionList.
78 @retval RETURN_INVALID_PARAMETER Parse error in the "bootorder" fw_cfg file.
80 @retval RETURN_OUT_OF_RESOURCES Memory allocation failed.
82 @return Values returned by gBS->LocateProtocol ()
83 or gRT->SetVariable ().
88 SetBootOrderFromQemu (
94 Calculate the number of seconds we should be showing the FrontPage progress
97 @return The TimeoutDefault argument for PlatformBdsEnterFrontPage().
101 GetFrontPageTimeoutFromQemu (