]>
Commit | Line | Data |
---|---|---|
c95d9ab8 SZ |
1 | /** @file\r |
2 | Include file for platform variable cleanup.\r | |
3 | \r | |
4 | Copyright (c) 2015, Intel Corporation. All rights reserved.<BR>\r | |
5 | This program and the accompanying materials\r | |
6 | are licensed and made available under the terms and conditions of the BSD License\r | |
7 | which accompanies this distribution. The full text of the license may be found at\r | |
8 | http://opensource.org/licenses/bsd-license.php\r | |
9 | \r | |
10 | THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,\r | |
11 | WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.\r | |
12 | \r | |
13 | **/\r | |
14 | \r | |
15 | #ifndef _PLAT_VAR_CLEANUP_\r | |
16 | #define _PLAT_VAR_CLEANUP_\r | |
17 | \r | |
18 | #include <Library/UefiBootServicesTableLib.h>\r | |
19 | #include <Library/UefiRuntimeServicesTableLib.h>\r | |
20 | #include <Library/BaseLib.h>\r | |
21 | #include <Library/DebugLib.h>\r | |
22 | #include <Library/BaseMemoryLib.h>\r | |
23 | #include <Library/PrintLib.h>\r | |
24 | #include <Library/MemoryAllocationLib.h>\r | |
25 | #include <Library/HiiLib.h>\r | |
26 | #include <Library/PlatformVarCleanupLib.h>\r | |
27 | \r | |
28 | #include <Protocol/Variable.h>\r | |
29 | #include <Protocol/VarCheck.h>\r | |
30 | #include <Protocol/FormBrowser2.h>\r | |
31 | #include <Protocol/HiiConfigAccess.h>\r | |
32 | #include <Protocol/HiiConfigRouting.h>\r | |
33 | #include <Protocol/DevicePath.h>\r | |
34 | \r | |
35 | #include <Guid/EventGroup.h>\r | |
36 | #include <Guid/MdeModuleHii.h>\r | |
37 | #include <Guid/ImageAuthentication.h>\r | |
38 | #include <Guid/VarErrorFlag.h>\r | |
39 | \r | |
40 | #include "PlatVarCleanupHii.h"\r | |
41 | \r | |
42 | //\r | |
43 | // This is the generated IFR binary data for each formset defined in VFR.\r | |
44 | // This data array is ready to be used as input of HiiAddPackages() to\r | |
45 | // create a packagelist (which contains Form packages, String packages, etc).\r | |
46 | //\r | |
47 | extern UINT8 PlatVarCleanupBin[];\r | |
48 | \r | |
49 | //\r | |
50 | // This is the generated String package data for all .UNI files.\r | |
51 | // This data array is ready to be used as input of HiiAddPackages() to\r | |
52 | // create a packagelist (which contains Form packages, String packages, etc).\r | |
53 | //\r | |
54 | extern UINT8 PlatformVarCleanupLibStrings[];\r | |
55 | \r | |
56 | #define USER_VARIABLE_NODE_SIGNATURE SIGNATURE_32 ('U', 'V', 'N', 'S')\r | |
57 | \r | |
58 | typedef struct {\r | |
59 | UINTN Signature;\r | |
60 | LIST_ENTRY Link;\r | |
61 | EFI_GUID Guid;\r | |
62 | CHAR16 *PromptString;\r | |
63 | LIST_ENTRY NameLink;\r | |
64 | } USER_VARIABLE_NODE;\r | |
65 | \r | |
66 | #define USER_VARIABLE_FROM_LINK(a) CR (a, USER_VARIABLE_NODE, Link, USER_VARIABLE_NODE_SIGNATURE)\r | |
67 | \r | |
68 | #define USER_VARIABLE_NAME_NODE_SIGNATURE SIGNATURE_32 ('U', 'V', 'N', 'N')\r | |
69 | \r | |
70 | typedef struct {\r | |
71 | UINTN Signature;\r | |
72 | LIST_ENTRY Link;\r | |
73 | CHAR16 *Name;\r | |
74 | UINTN DataSize;\r | |
75 | UINT32 Attributes;\r | |
76 | UINT16 Index;\r | |
77 | EFI_QUESTION_ID QuestionId;\r | |
78 | CHAR16 *PromptString;\r | |
79 | CHAR16 *HelpString;\r | |
80 | BOOLEAN Deleted;\r | |
81 | } USER_VARIABLE_NAME_NODE;\r | |
82 | \r | |
83 | #define USER_VARIABLE_NAME_FROM_LINK(a) CR (a, USER_VARIABLE_NAME_NODE, Link, USER_VARIABLE_NAME_NODE_SIGNATURE)\r | |
84 | \r | |
85 | #pragma pack(1)\r | |
86 | //\r | |
87 | // HII specific Vendor Device Path definition.\r | |
88 | //\r | |
89 | typedef struct {\r | |
90 | VENDOR_DEVICE_PATH VendorDevicePath;\r | |
91 | EFI_DEVICE_PATH_PROTOCOL End;\r | |
92 | } HII_VENDOR_DEVICE_PATH;\r | |
93 | #pragma pack()\r | |
94 | \r | |
95 | #define VARIABLE_CLEANUP_HII_PRIVATE_SIGNATURE SIGNATURE_32 ('V', 'C', 'H', 'P')\r | |
96 | \r | |
97 | typedef struct {\r | |
98 | UINTN Signature;\r | |
99 | EFI_HANDLE DriverHandle;\r | |
100 | EFI_HII_HANDLE HiiHandle;\r | |
101 | EFI_HII_CONFIG_ACCESS_PROTOCOL ConfigAccess;\r | |
102 | EFI_HII_CONFIG_ROUTING_PROTOCOL *ConfigRouting;\r | |
103 | VARIABLE_CLEANUP_DATA VariableCleanupData;\r | |
104 | } VARIABLE_CLEANUP_HII_PRIVATE_DATA;\r | |
105 | \r | |
106 | #define VARIABLE_CLEANUP_HII_PRIVATE_FROM_THIS(a) CR (a, VARIABLE_CLEANUP_HII_PRIVATE_DATA, ConfigAccess, VARIABLE_CLEANUP_HII_PRIVATE_SIGNATURE)\r | |
107 | \r | |
108 | #endif\r |