]> git.proxmox.com Git - mirror_edk2.git/blame - SecurityPkg/VariableAuthenticated/SecureBootConfigDxe/SecureBootConfigImpl.h
Correct AtaAtapiPassThru module packaging info.
[mirror_edk2.git] / SecurityPkg / VariableAuthenticated / SecureBootConfigDxe / SecureBootConfigImpl.h
CommitLineData
beda2356 1/** @file\r
2 The header file of HII Config Access protocol implementation of SecureBoot\r
3 configuration module.\r
4\r
5Copyright (c) 2011, Intel Corporation. All rights reserved.<BR>\r
6This program and the accompanying materials \r
7are licensed and made available under the terms and conditions of the BSD License \r
8which accompanies this distribution. The full text of the license may be found at \r
9http://opensource.org/licenses/bsd-license.php\r
10\r
11THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, \r
12WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.\r
13\r
14**/\r
15\r
16#ifndef __SECUREBOOT_CONFIG_IMPL_H__\r
17#define __SECUREBOOT_CONFIG_IMPL_H__\r
18\r
19#include <Uefi.h>\r
20\r
21#include <Protocol/HiiConfigAccess.h>\r
22#include <Protocol/HiiConfigRouting.h>\r
23\r
24#include <Library/BaseLib.h>\r
25#include <Library/BaseMemoryLib.h>\r
26#include <Library/DebugLib.h>\r
27#include <Library/MemoryAllocationLib.h>\r
28#include <Library/UefiBootServicesTableLib.h>\r
29#include <Library/UefiRuntimeServicesTableLib.h>\r
30#include <Library/UefiHiiServicesLib.h>\r
31#include <Library/UefiLib.h>\r
32#include <Library/HiiLib.h>\r
33#include <Library/DevicePathLib.h>\r
34\r
35#include <Guid/MdeModuleHii.h>\r
36#include <Guid/AuthenticatedVariableFormat.h>\r
37\r
38#include "SecureBootConfigNvData.h"\r
39\r
40//\r
41// Tool generated IFR binary data and String package data\r
42//\r
43extern UINT8 SecureBootConfigBin[];\r
44extern UINT8 SecureBootConfigDxeStrings[];\r
45\r
46///\r
47/// HII specific Vendor Device Path definition.\r
48///\r
49typedef struct {\r
50 VENDOR_DEVICE_PATH VendorDevicePath;\r
51 EFI_DEVICE_PATH_PROTOCOL End;\r
52} HII_VENDOR_DEVICE_PATH;\r
53\r
54typedef struct {\r
55 UINTN Signature;\r
56\r
57 EFI_HII_CONFIG_ACCESS_PROTOCOL ConfigAccess;\r
58 EFI_HII_HANDLE HiiHandle;\r
59 EFI_HANDLE DriverHandle;\r
60\r
61} SECUREBOOT_CONFIG_PRIVATE_DATA;\r
62\r
63extern SECUREBOOT_CONFIG_PRIVATE_DATA mSecureBootConfigPrivateDateTemplate;\r
64\r
65#define SECUREBOOT_CONFIG_PRIVATE_DATA_SIGNATURE SIGNATURE_32 ('S', 'E', 'C', 'B')\r
beda2356 66\r
67/**\r
68 This function publish the SecureBoot configuration Form.\r
69\r
70 @param[in, out] PrivateData Points to SecureBoot configuration private data.\r
71\r
72 @retval EFI_SUCCESS HII Form is installed for this network device.\r
73 @retval EFI_OUT_OF_RESOURCES Not enough resource for HII Form installation.\r
74 @retval Others Other errors as indicated.\r
75\r
76**/\r
77EFI_STATUS\r
78InstallSecureBootConfigForm (\r
79 IN OUT SECUREBOOT_CONFIG_PRIVATE_DATA *PrivateData\r
80 );\r
81\r
82/**\r
83 This function removes SecureBoot configuration Form.\r
84\r
85 @param[in, out] PrivateData Points to SecureBoot configuration private data.\r
86\r
87**/\r
beda2356 88VOID\r
89UninstallSecureBootConfigForm (\r
90 IN OUT SECUREBOOT_CONFIG_PRIVATE_DATA *PrivateData\r
91 );\r
92\r
93/**\r
94 This function allows a caller to extract the current configuration for one\r
95 or more named elements from the target driver.\r
96\r
97 @param[in] This Points to the EFI_HII_CONFIG_ACCESS_PROTOCOL.\r
98 @param[in] Request A null-terminated Unicode string in\r
99 <ConfigRequest> format.\r
100 @param[out] Progress On return, points to a character in the Request\r
101 string. Points to the string's null terminator if\r
102 request was successful. Points to the most recent\r
103 '&' before the first failing name/value pair (or\r
104 the beginning of the string if the failure is in\r
105 the first name/value pair) if the request was not\r
106 successful.\r
107 @param[out] Results A null-terminated Unicode string in\r
108 <ConfigAltResp> format which has all values filled\r
109 in for the names in the Request string. String to\r
110 be allocated by the called function.\r
111\r
112 @retval EFI_SUCCESS The Results is filled with the requested values.\r
113 @retval EFI_OUT_OF_RESOURCES Not enough memory to store the results.\r
114 @retval EFI_INVALID_PARAMETER Request is illegal syntax, or unknown name.\r
115 @retval EFI_NOT_FOUND Routing data doesn't match any storage in this\r
116 driver.\r
117\r
118**/\r
119EFI_STATUS\r
120EFIAPI\r
121SecureBootExtractConfig (\r
122 IN CONST EFI_HII_CONFIG_ACCESS_PROTOCOL *This,\r
123 IN CONST EFI_STRING Request,\r
124 OUT EFI_STRING *Progress,\r
125 OUT EFI_STRING *Results\r
126 );\r
127\r
128/**\r
129 This function processes the results of changes in configuration.\r
130\r
131 @param[in] This Points to the EFI_HII_CONFIG_ACCESS_PROTOCOL.\r
132 @param[in] Configuration A null-terminated Unicode string in <ConfigResp>\r
133 format.\r
134 @param[out] Progress A pointer to a string filled in with the offset of\r
135 the most recent '&' before the first failing\r
136 name/value pair (or the beginning of the string if\r
137 the failure is in the first name/value pair) or\r
138 the terminating NULL if all was successful.\r
139\r
140 @retval EFI_SUCCESS The Results is processed successfully.\r
141 @retval EFI_INVALID_PARAMETER Configuration is NULL.\r
142 @retval EFI_NOT_FOUND Routing data doesn't match any storage in this\r
143 driver.\r
144\r
145**/\r
146EFI_STATUS\r
147EFIAPI\r
148SecureBootRouteConfig (\r
149 IN CONST EFI_HII_CONFIG_ACCESS_PROTOCOL *This,\r
150 IN CONST EFI_STRING Configuration,\r
151 OUT EFI_STRING *Progress\r
152 );\r
153\r
154/**\r
155 This function processes the results of changes in configuration.\r
156\r
157 @param[in] This Points to the EFI_HII_CONFIG_ACCESS_PROTOCOL.\r
158 @param[in] Action Specifies the type of action taken by the browser.\r
159 @param[in] QuestionId A unique value which is sent to the original\r
160 exporting driver so that it can identify the type\r
161 of data to expect.\r
162 @param[in] Type The type of value for the question.\r
163 @param[in] Value A pointer to the data being sent to the original\r
164 exporting driver.\r
165 @param[out] ActionRequest On return, points to the action requested by the\r
166 callback function.\r
167\r
168 @retval EFI_SUCCESS The callback successfully handled the action.\r
169 @retval EFI_OUT_OF_RESOURCES Not enough storage is available to hold the\r
170 variable and its data.\r
171 @retval EFI_DEVICE_ERROR The variable could not be saved.\r
172 @retval EFI_UNSUPPORTED The specified Action is not supported by the\r
173 callback.\r
174\r
175**/\r
176EFI_STATUS\r
177EFIAPI\r
178SecureBootCallback (\r
179 IN CONST EFI_HII_CONFIG_ACCESS_PROTOCOL *This,\r
180 IN EFI_BROWSER_ACTION Action,\r
181 IN EFI_QUESTION_ID QuestionId,\r
182 IN UINT8 Type,\r
183 IN EFI_IFR_TYPE_VALUE *Value,\r
184 OUT EFI_BROWSER_ACTION_REQUEST *ActionRequest\r
185 );\r
186\r
187#endif\r