iPXE
HiiConfigAccess.h
Go to the documentation of this file.
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 
8 Copyright (c) 2006 - 2016, Intel Corporation. All rights reserved.<BR>
9 This program and the accompanying materials are licensed and made available under
10 the terms and conditions of the BSD License that accompanies this distribution.
11 The full text of the license may be found at
12 http://opensource.org/licenses/bsd-license.php.
13 
14 THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
15 WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
16 
17 **/
18 
19 
20 #ifndef __EFI_HII_CONFIG_ACCESS_H__
21 #define __EFI_HII_CONFIG_ACCESS_H__
22 
23 FILE_LICENCE ( BSD3 );
24 
26 
27 #define EFI_HII_CONFIG_ACCESS_PROTOCOL_GUID \
28  { 0x330d4706, 0xf2a0, 0x4e4f, { 0xa3, 0x69, 0xb6, 0x6f, 0xa8, 0xd5, 0x43, 0x85 } }
29 
31 
33 
34 #define EFI_BROWSER_ACTION_CHANGING 0
35 #define EFI_BROWSER_ACTION_CHANGED 1
36 #define EFI_BROWSER_ACTION_RETRIEVE 2
37 #define EFI_BROWSER_ACTION_FORM_OPEN 3
38 #define EFI_BROWSER_ACTION_FORM_CLOSE 4
39 #define EFI_BROWSER_ACTION_SUBMITTED 5
40 #define EFI_BROWSER_ACTION_DEFAULT_STANDARD 0x1000
41 #define EFI_BROWSER_ACTION_DEFAULT_MANUFACTURING 0x1001
42 #define EFI_BROWSER_ACTION_DEFAULT_SAFE 0x1002
43 #define EFI_BROWSER_ACTION_DEFAULT_PLATFORM 0x2000
44 #define EFI_BROWSER_ACTION_DEFAULT_HARDWARE 0x3000
45 #define EFI_BROWSER_ACTION_DEFAULT_FIRMWARE 0x4000
46 
47 /**
48 
49  This function allows the caller to request the current
50  configuration for one or more named elements. The resulting
51  string is in <ConfigAltResp> format. Any and all alternative
52  configuration strings shall also be appended to the end of the
53  current configuration string. If they are, they must appear
54  after the current configuration. They must contain the same
55  routing (GUID, NAME, PATH) as the current configuration string.
56  They must have an additional description indicating the type of
57  alternative configuration the string represents,
58  "ALTCFG=<StringToken>". That <StringToken> (when
59  converted from Hex UNICODE to binary) is a reference to a
60  string in the associated string pack.
61 
62  @param This Points to the EFI_HII_CONFIG_ACCESS_PROTOCOL.
63 
64  @param Request A null-terminated Unicode string in
65  <ConfigRequest> format. Note that this
66  includes the routing information as well as
67  the configurable name / value pairs. It is
68  invalid for this string to be in
69  <MultiConfigRequest> format.
70  If a NULL is passed in for the Request field,
71  all of the settings being abstracted by this function
72  will be returned in the Results field. In addition,
73  if a ConfigHdr is passed in with no request elements,
74  all of the settings being abstracted for that particular
75  ConfigHdr reference will be returned in the Results Field.
76 
77  @param Progress On return, points to a character in the
78  Request string. Points to the string's null
79  terminator if request was successful. Points
80  to the most recent "&" before the first
81  failing name / value pair (or the beginning
82  of the string if the failure is in the first
83  name / value pair) if the request was not
84  successful.
85 
86  @param Results A null-terminated Unicode string in
87  <MultiConfigAltResp> format which has all values
88  filled in for the names in the Request string.
89  String to be allocated by the called function.
90 
91  @retval EFI_SUCCESS The Results string is filled with the
92  values corresponding to all requested
93  names.
94 
95  @retval EFI_OUT_OF_RESOURCES Not enough memory to store the
96  parts of the results that must be
97  stored awaiting possible future
98  protocols.
99 
100  @retval EFI_NOT_FOUND A configuration element matching
101  the routing data is not found.
102  Progress set to the first character
103  in the routing header.
104 
105  @retval EFI_INVALID_PARAMETER Illegal syntax. Progress set
106  to most recent "&" before the
107  error or the beginning of the
108  string.
109 
110  @retval EFI_INVALID_PARAMETER Unknown name. Progress points
111  to the & before the name in
112  question.
113 
114 **/
115 typedef
119  IN CONST EFI_STRING Request,
120  OUT EFI_STRING *Progress,
121  OUT EFI_STRING *Results
122 );
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 **/
165 typedef
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 **/
198 typedef
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 ///
219 } ;
220 
222 
223 #endif
224 
225 
EFI_STATUS(EFIAPI * EFI_HII_ACCESS_EXTRACT_CONFIG)(IN CONST EFI_HII_CONFIG_ACCESS_PROTOCOL *This, IN CONST EFI_STRING Request, OUT EFI_STRING *Progress, OUT EFI_STRING *Results)
This function allows the caller to request the current configuration for one or more named elements.
UINT8 Type
Definition: Acpi10.h:141
128 bit buffer containing a unique identifier value.
Definition: Base.h:263
EFI_HII_ACCESS_EXTRACT_CONFIG ExtractConfig
FILE_LICENCE(BSD3)
CHAR16 * EFI_STRING
unsigned char UINT8
Definition: ProcessorBind.h:62
EFI_HII_ACCESS_ROUTE_CONFIG RouteConfig
UINTN EFI_BROWSER_ACTION_REQUEST
Definition: FormBrowser2.h:58
This protocol provides a callable interface between the HII and drivers.
#define OUT
Definition: mlx_utils.h:29
#define EFIAPI
UINT64 UINTN
Unsigned value of native width.
Definition: ProcessorBind.h:71
EFI_STATUS(EFIAPI * EFI_HII_ACCESS_FORM_CALLBACK)(IN CONST EFI_HII_CONFIG_ACCESS_PROTOCOL *This, IN EFI_BROWSER_ACTION Action, IN EFI_QUESTION_ID QuestionId, IN UINT8 Type, IN OUT EFI_IFR_TYPE_VALUE *Value, OUT EFI_BROWSER_ACTION_REQUEST *ActionRequest)
This function is called to provide results data to the driver.
#define IN
Definition: mlx_utils.h:28
#define CONST
Datum is read-only.
Definition: Base.h:309
RETURN_STATUS EFI_STATUS
Function return status for EFI API.
Definition: UefiBaseType.h:35
EFI_HII_ACCESS_FORM_CALLBACK Callback
EFI_GUID gEfiHiiConfigAccessProtocolGuid
UINT16 EFI_QUESTION_ID
EFI_STATUS(EFIAPI * EFI_HII_ACCESS_ROUTE_CONFIG)(IN CONST EFI_HII_CONFIG_ACCESS_PROTOCOL *This, IN CONST EFI_STRING Configuration, OUT EFI_STRING *Progress)
This function applies changes in a driver's configuration.
This protocol is defined in UEFI spec.
UINTN EFI_BROWSER_ACTION