]>
Commit | Line | Data |
---|---|---|
1 | /** @file\r | |
2 | Rewrite the BootOrder NvVar based on QEMU's "bootorder" fw_cfg file --\r | |
3 | include file.\r | |
4 | \r | |
5 | Copyright (C) 2012-2014, Red Hat, Inc.\r | |
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 | |
16 | #ifndef __QEMU_BOOT_ORDER_LIB_H__\r | |
17 | #define __QEMU_BOOT_ORDER_LIB_H__\r | |
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 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 | |
31 | \r | |
32 | Platform BDS should call this function after EfiBootManagerConnectAll () and\r | |
33 | EfiBootManagerRefreshAllBootOption () return.\r | |
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 | |
51 | RETURN_STATUS\r | |
52 | EFIAPI\r | |
53 | SetBootOrderFromQemu (\r | |
54 | VOID\r | |
55 | );\r | |
56 | \r | |
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 | EFIAPI\r | |
66 | GetFrontPageTimeoutFromQemu (\r | |
67 | VOID\r | |
68 | );\r | |
69 | \r | |
70 | #endif\r |