OvmfPkg/MemEncryptSevLib: find pages of initial SMRAM save state map
[mirror_edk2.git] / OvmfPkg / Include / Library / QemuBootOrderLib.h
CommitLineData
2cd086a6 1/** @file\r
2 Rewrite the BootOrder NvVar based on QEMU's "bootorder" fw_cfg file --\r
3 include file.\r
4\r
cca7475b 5 Copyright (C) 2012-2014, Red Hat, Inc.\r
2cd086a6 6\r
7 This program and the accompanying materials are licensed and made available\r
8 under the terms and conditions of the BSD License which accompanies this\r
9 distribution. The full text of the license may be found at\r
10 http://opensource.org/licenses/bsd-license.php\r
11\r
12 THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, WITHOUT\r
13 WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.\r
14**/\r
15\r
cca7475b
LE
16#ifndef __QEMU_BOOT_ORDER_LIB_H__\r
17#define __QEMU_BOOT_ORDER_LIB_H__\r
2cd086a6 18\r
19#include <Uefi/UefiBaseType.h>\r
20#include <Base.h>\r
21\r
22\r
23/**\r
24\r
25 Set the boot order based on configuration retrieved from QEMU.\r
26\r
27 Attempt to retrieve the "bootorder" fw_cfg file from QEMU. Translate the\r
28 OpenFirmware device paths therein to UEFI device path fragments. Match the\r
2542feea
LE
29 translated fragments against the current list of boot options, and rewrite\r
30 the BootOrder NvVar so that it corresponds to the order described in fw_cfg.\r
2cd086a6 31\r
2542feea
LE
32 Platform BDS should call this function after EfiBootManagerConnectAll () and\r
33 EfiBootManagerRefreshAllBootOption () return.\r
2cd086a6 34\r
35 @retval RETURN_SUCCESS BootOrder NvVar rewritten.\r
36\r
37 @retval RETURN_UNSUPPORTED QEMU's fw_cfg is not supported.\r
38\r
39 @retval RETURN_NOT_FOUND Empty or nonexistent "bootorder" fw_cfg\r
40 file, or no match found between the\r
41 "bootorder" fw_cfg file and BootOptionList.\r
42\r
43 @retval RETURN_INVALID_PARAMETER Parse error in the "bootorder" fw_cfg file.\r
44\r
45 @retval RETURN_OUT_OF_RESOURCES Memory allocation failed.\r
46\r
47 @return Values returned by gBS->LocateProtocol ()\r
48 or gRT->SetVariable ().\r
49\r
50**/\r
51RETURN_STATUS\r
52SetBootOrderFromQemu (\r
2542feea 53 VOID\r
2cd086a6 54 );\r
cca7475b 55\r
9253c14d
LE
56\r
57/**\r
58 Calculate the number of seconds we should be showing the FrontPage progress\r
59 bar for.\r
60\r
61 @return The TimeoutDefault argument for PlatformBdsEnterFrontPage().\r
62**/\r
63UINT16\r
64GetFrontPageTimeoutFromQemu (\r
65 VOID\r
66 );\r
67\r
cca7475b 68#endif\r