VirtualBox

source: vbox/trunk/src/VBox/Devices/EFI/Firmware/MdePkg/Include/Protocol/HiiConfigAccess.h

最後變更 在這個檔案是 105670,由 vboxsync 提交於 7 月 前

Devices/EFI/FirmwareNew: Merge edk2-stable-202405 and make it build on aarch64, bugref:4643

  • 屬性 svn:eol-style 設為 native
檔案大小: 9.5 KB
 
1/** @file
2
3 The EFI HII results processing protocol invokes this type of protocol
4 when it needs to forward results to a driver's configuration handler.
5 This protocol is published by drivers providing and requesting
6 configuration data from HII. It may only be invoked by HII.
7
8Copyright (c) 2006 - 2018, Intel Corporation. All rights reserved.<BR>
9SPDX-License-Identifier: BSD-2-Clause-Patent
10
11 @par Revision Reference:
12 This Protocol was introduced in UEFI Specification 2.1.
13
14**/
15
16#ifndef __EFI_HII_CONFIG_ACCESS_H__
17#define __EFI_HII_CONFIG_ACCESS_H__
18
19#include <Protocol/FormBrowser2.h>
20
21#define EFI_HII_CONFIG_ACCESS_PROTOCOL_GUID \
22 { 0x330d4706, 0xf2a0, 0x4e4f, { 0xa3, 0x69, 0xb6, 0x6f, 0xa8, 0xd5, 0x43, 0x85 } }
23
24typedef struct _EFI_HII_CONFIG_ACCESS_PROTOCOL EFI_HII_CONFIG_ACCESS_PROTOCOL;
25
26typedef UINTN EFI_BROWSER_ACTION;
27
28#define EFI_BROWSER_ACTION_CHANGING 0
29#define EFI_BROWSER_ACTION_CHANGED 1
30#define EFI_BROWSER_ACTION_RETRIEVE 2
31#define EFI_BROWSER_ACTION_FORM_OPEN 3
32#define EFI_BROWSER_ACTION_FORM_CLOSE 4
33#define EFI_BROWSER_ACTION_SUBMITTED 5
34#define EFI_BROWSER_ACTION_DEFAULT_STANDARD 0x1000
35#define EFI_BROWSER_ACTION_DEFAULT_MANUFACTURING 0x1001
36#define EFI_BROWSER_ACTION_DEFAULT_SAFE 0x1002
37#define EFI_BROWSER_ACTION_DEFAULT_PLATFORM 0x2000
38#define EFI_BROWSER_ACTION_DEFAULT_HARDWARE 0x3000
39#define EFI_BROWSER_ACTION_DEFAULT_FIRMWARE 0x4000
40
41/**
42
43 This function allows the caller to request the current
44 configuration for one or more named elements. The resulting
45 string is in <ConfigAltResp> format. Any and all alternative
46 configuration strings shall also be appended to the end of the
47 current configuration string. If they are, they must appear
48 after the current configuration. They must contain the same
49 routing (GUID, NAME, PATH) as the current configuration string.
50 They must have an additional description indicating the type of
51 alternative configuration the string represents,
52 "ALTCFG=<StringToken>". That <StringToken> (when
53 converted from Hex UNICODE to binary) is a reference to a
54 string in the associated string pack.
55
56 @param This Points to the EFI_HII_CONFIG_ACCESS_PROTOCOL.
57
58 @param Request A null-terminated Unicode string in
59 <ConfigRequest> format. Note that this
60 includes the routing information as well as
61 the configurable name / value pairs. It is
62 invalid for this string to be in
63 <MultiConfigRequest> format.
64 If a NULL is passed in for the Request field,
65 all of the settings being abstracted by this function
66 will be returned in the Results field. In addition,
67 if a ConfigHdr is passed in with no request elements,
68 all of the settings being abstracted for that particular
69 ConfigHdr reference will be returned in the Results Field.
70
71 @param Progress On return, points to a character in the
72 Request string. Points to the string's null
73 terminator if request was successful. Points
74 to the most recent "&" before the first
75 failing name / value pair (or the beginning
76 of the string if the failure is in the first
77 name / value pair) if the request was not
78 successful.
79
80 @param Results A null-terminated Unicode string in
81 <MultiConfigAltResp> format which has all values
82 filled in for the names in the Request string.
83 String to be allocated by the called function.
84
85 @retval EFI_SUCCESS The Results string is filled with the
86 values corresponding to all requested
87 names.
88
89 @retval EFI_OUT_OF_RESOURCES Not enough memory to store the
90 parts of the results that must be
91 stored awaiting possible future
92 protocols.
93
94 @retval EFI_NOT_FOUND A configuration element matching
95 the routing data is not found.
96 Progress set to the first character
97 in the routing header.
98
99 @retval EFI_INVALID_PARAMETER Illegal syntax. Progress set
100 to most recent "&" before the
101 error or the beginning of the
102 string.
103
104 @retval EFI_INVALID_PARAMETER Unknown name. Progress points
105 to the "&" before the name in
106 question.
107
108 @retval EFI_INVALID_PARAMETER If Results or Progress is NULL.
109
110 @retval EFI_ACCESS_DENIED The action violated a system policy.
111
112 @retval EFI_DEVICE_ERROR Failed to extract the current configuration
113 for one or more named elements.
114
115**/
116typedef
117EFI_STATUS
118(EFIAPI *EFI_HII_ACCESS_EXTRACT_CONFIG)(
119 IN CONST EFI_HII_CONFIG_ACCESS_PROTOCOL *This,
120 IN CONST EFI_STRING Request,
121 OUT EFI_STRING *Progress,
122 OUT EFI_STRING *Results
123 );
124
125/**
126
127 This function applies changes in a driver's configuration.
128 Input is a Configuration, which has the routing data for this
129 driver followed by name / value configuration pairs. The driver
130 must apply those pairs to its configurable storage. If the
131 driver's configuration is stored in a linear block of data
132 and the driver's name / value pairs are in <BlockConfig>
133 format, it may use the ConfigToBlock helper function (above) to
134 simplify the job.
135
136 @param This Points to the EFI_HII_CONFIG_ACCESS_PROTOCOL.
137
138 @param Configuration A null-terminated Unicode string in
139 <ConfigString> format.
140
141 @param Progress A pointer to a string filled in with the
142 offset of the most recent '&' before the
143 first failing name / value pair (or the
144 beginn ing of the string if the failure
145 is in the first name / value pair) or
146 the terminating NULL if all was
147 successful.
148
149 @retval EFI_SUCCESS The results have been distributed or are
150 awaiting distribution.
151
152 @retval EFI_OUT_OF_RESOURCES Not enough memory to store the
153 parts of the results that must be
154 stored awaiting possible future
155 protocols.
156
157 @retval EFI_INVALID_PARAMETERS Passing in a NULL for the
158 Results parameter would result
159 in this type of error.
160
161 @retval EFI_NOT_FOUND Target for the specified routing data
162 was not found
163
164**/
165typedef
166EFI_STATUS
167(EFIAPI *EFI_HII_ACCESS_ROUTE_CONFIG)(
168 IN CONST EFI_HII_CONFIG_ACCESS_PROTOCOL *This,
169 IN CONST EFI_STRING Configuration,
170 OUT EFI_STRING *Progress
171 );
172
173/**
174
175 This function is called to provide results data to the driver.
176 This data consists of a unique key that is used to identify
177 which data is either being passed back or being asked for.
178
179 @param This Points to the EFI_HII_CONFIG_ACCESS_PROTOCOL.
180 @param Action Specifies the type of action taken by the browser.
181 @param QuestionId A unique value which is sent to the original
182 exporting driver so that it can identify the type
183 of data to expect. The format of the data tends to
184 vary based on the opcode that generated the callback.
185 @param Type The type of value for the question.
186 @param Value A pointer to the data being sent to the original
187 exporting driver.
188 @param ActionRequest On return, points to the action requested by the
189 callback function.
190
191 @retval EFI_SUCCESS The callback successfully handled the action.
192 @retval EFI_OUT_OF_RESOURCES Not enough storage is available to hold the
193 variable and its data.
194 @retval EFI_DEVICE_ERROR The variable could not be saved.
195 @retval EFI_UNSUPPORTED The specified Action is not supported by the
196 callback.
197**/
198typedef
199EFI_STATUS
200(EFIAPI *EFI_HII_ACCESS_FORM_CALLBACK)(
201 IN CONST EFI_HII_CONFIG_ACCESS_PROTOCOL *This,
202 IN EFI_BROWSER_ACTION Action,
203 IN EFI_QUESTION_ID QuestionId,
204 IN UINT8 Type,
205 IN OUT EFI_IFR_TYPE_VALUE *Value,
206 OUT EFI_BROWSER_ACTION_REQUEST *ActionRequest
207 )
208;
209
210///
211/// This protocol provides a callable interface between the HII and
212/// drivers. Only drivers which provide IFR data to HII are required
213/// to publish this protocol.
214///
215struct _EFI_HII_CONFIG_ACCESS_PROTOCOL {
216 EFI_HII_ACCESS_EXTRACT_CONFIG ExtractConfig;
217 EFI_HII_ACCESS_ROUTE_CONFIG RouteConfig;
218 EFI_HII_ACCESS_FORM_CALLBACK Callback;
219};
220
221extern EFI_GUID gEfiHiiConfigAccessProtocolGuid;
222
223#endif
注意: 瀏覽 TracBrowser 來幫助您使用儲存庫瀏覽器

© 2025 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette