]>
Commit | Line | Data |
---|---|---|
5267c89b LE |
1 | /** @file\r |
2 | \r | |
3 | Utility functions for serializing (persistently storing) and deserializing\r | |
4 | OVMF's platform configuration.\r | |
5 | \r | |
6 | Copyright (C) 2014, Red Hat, Inc.\r | |
7 | \r | |
8 | This program and the accompanying materials are licensed and made available\r | |
9 | under the terms and conditions of the BSD License which accompanies this\r | |
10 | distribution. The full text of the license may be found at\r | |
11 | http://opensource.org/licenses/bsd-license.php\r | |
12 | \r | |
13 | THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, WITHOUT\r | |
14 | WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.\r | |
15 | \r | |
16 | **/\r | |
17 | \r | |
18 | #ifndef _PLATFORM_CONFIG_H_\r | |
19 | #define _PLATFORM_CONFIG_H_\r | |
20 | \r | |
21 | #include <Base.h>\r | |
22 | \r | |
23 | //\r | |
24 | // This structure participates in driver configuration. It does not\r | |
25 | // (necessarily) reflect the wire format in the persistent store.\r | |
26 | //\r | |
27 | #pragma pack(1)\r | |
28 | typedef struct {\r | |
29 | //\r | |
30 | // preferred graphics console resolution when booting\r | |
31 | //\r | |
32 | UINT32 HorizontalResolution;\r | |
33 | UINT32 VerticalResolution;\r | |
34 | } PLATFORM_CONFIG;\r | |
35 | #pragma pack()\r | |
36 | \r | |
37 | //\r | |
38 | // Please see the API documentation near the function definitions.\r | |
39 | //\r | |
40 | EFI_STATUS\r | |
41 | EFIAPI\r | |
42 | PlatformConfigSave (\r | |
43 | IN PLATFORM_CONFIG *PlatformConfig\r | |
44 | );\r | |
45 | \r | |
46 | EFI_STATUS\r | |
47 | EFIAPI\r | |
48 | PlatformConfigLoad (\r | |
49 | OUT PLATFORM_CONFIG *PlatformConfig,\r | |
50 | OUT UINT64 *OptionalElements\r | |
51 | );\r | |
52 | \r | |
53 | //\r | |
54 | // Feature flags for OptionalElements.\r | |
55 | //\r | |
56 | #define PLATFORM_CONFIG_F_GRAPHICS_RESOLUTION BIT0\r | |
57 | #define PLATFORM_CONFIG_F_DOWNGRADE BIT63\r | |
58 | \r | |
59 | #endif // _PLATFORM_CONFIG_H_\r |