]>
Commit | Line | Data |
---|---|---|
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 | |
29 | translated fragments against BootOptionList, and rewrite the BootOrder NvVar\r | |
30 | so that it corresponds to the order described in fw_cfg.\r | |
31 | \r | |
32 | @param[in] BootOptionList A boot option list, created with\r | |
33 | BdsLibEnumerateAllBootOption ().\r | |
34 | \r | |
35 | \r | |
36 | @retval RETURN_SUCCESS BootOrder NvVar rewritten.\r | |
37 | \r | |
38 | @retval RETURN_UNSUPPORTED QEMU's fw_cfg is not supported.\r | |
39 | \r | |
40 | @retval RETURN_NOT_FOUND Empty or nonexistent "bootorder" fw_cfg\r | |
41 | file, or no match found between the\r | |
42 | "bootorder" fw_cfg file and BootOptionList.\r | |
43 | \r | |
44 | @retval RETURN_INVALID_PARAMETER Parse error in the "bootorder" fw_cfg file.\r | |
45 | \r | |
46 | @retval RETURN_OUT_OF_RESOURCES Memory allocation failed.\r | |
47 | \r | |
48 | @return Values returned by gBS->LocateProtocol ()\r | |
49 | or gRT->SetVariable ().\r | |
50 | \r | |
51 | **/\r | |
52 | RETURN_STATUS\r | |
53 | SetBootOrderFromQemu (\r | |
54 | IN CONST LIST_ENTRY *BootOptionList\r | |
55 | );\r | |
cca7475b | 56 | \r |
9253c14d LE |
57 | \r |
58 | /**\r | |
59 | Calculate the number of seconds we should be showing the FrontPage progress\r | |
60 | bar for.\r | |
61 | \r | |
62 | @return The TimeoutDefault argument for PlatformBdsEnterFrontPage().\r | |
63 | **/\r | |
64 | UINT16\r | |
65 | GetFrontPageTimeoutFromQemu (\r | |
66 | VOID\r | |
67 | );\r | |
68 | \r | |
cca7475b | 69 | #endif\r |