]> git.proxmox.com Git - mirror_edk2.git/blame - MdeModulePkg/Universal/SetupBrowserDxe/Setup.h
Refine data copy and data compare logic.
[mirror_edk2.git] / MdeModulePkg / Universal / SetupBrowserDxe / Setup.h
CommitLineData
7936fb6a 1/** @file\r
d66e6c16 2Private MACRO, structure and function definitions for Setup Browser module.\r
7936fb6a 3\r
80a047f0 4Copyright (c) 2007 - 2013, Intel Corporation. All rights reserved.<BR>\r
e5eed7d3 5This program and the accompanying materials\r
7936fb6a 6are licensed and made available under the terms and conditions of the BSD License\r
7which accompanies this distribution. The full text of the license may be found at\r
8http://opensource.org/licenses/bsd-license.php\r
9\r
10THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,\r
11WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.\r
12\r
13\r
14**/\r
15\r
16#ifndef _SETUP_H_\r
17#define _SETUP_H_\r
18\r
19\r
39099938 20#include <PiDxe.h>\r
7936fb6a 21\r
7936fb6a 22#include <Protocol/SimpleTextOut.h>\r
23#include <Protocol/SimpleTextIn.h>\r
24#include <Protocol/FormBrowser2.h>\r
7c6c064c
ED
25#include <Protocol/FormBrowserEx2.h>\r
26#include <Protocol/DisplayProtocol.h>\r
7936fb6a 27#include <Protocol/DevicePath.h>\r
28#include <Protocol/UnicodeCollation.h>\r
29#include <Protocol/HiiConfigAccess.h>\r
30#include <Protocol/HiiConfigRouting.h>\r
31#include <Protocol/HiiDatabase.h>\r
32#include <Protocol/HiiString.h>\r
cbf73e50 33#include <Protocol/UserManager.h>\r
80a047f0 34#include <Protocol/DevicePathFromText.h>\r
7936fb6a 35\r
5c526736 36#include <Guid/MdeModuleHii.h>\r
0a1147ed 37#include <Guid/HiiPlatformSetupFormset.h>\r
2573712e 38#include <Guid/HiiFormMapMethodGuid.h>\r
7936fb6a 39\r
7936fb6a 40#include <Library/PrintLib.h>\r
41#include <Library/DebugLib.h>\r
42#include <Library/BaseMemoryLib.h>\r
43#include <Library/UefiRuntimeServicesTableLib.h>\r
44#include <Library/UefiDriverEntryPoint.h>\r
45#include <Library/UefiBootServicesTableLib.h>\r
46#include <Library/BaseLib.h>\r
47#include <Library/MemoryAllocationLib.h>\r
7936fb6a 48#include <Library/HiiLib.h>\r
f511d656 49#include <Library/PcdLib.h>\r
cb7d01c0 50#include <Library/DevicePathLib.h>\r
7c6c064c 51#include <Library/UefiLib.h>\r
7936fb6a 52\r
7936fb6a 53\r
54//\r
55// This is the generated header file which includes whatever needs to be exported (strings + IFR)\r
56//\r
57\r
7c6c064c
ED
58#define UI_ACTION_NONE 0\r
59#define UI_ACTION_REFRESH_FORM 1\r
60#define UI_ACTION_REFRESH_FORMSET 2\r
61#define UI_ACTION_EXIT 3\r
7936fb6a 62\r
63//\r
7936fb6a 64//\r
65// Time definitions\r
66//\r
67#define ONE_SECOND 10000000\r
68\r
7936fb6a 69// Incremental string lenght of ConfigRequest\r
70//\r
71#define CONFIG_REQUEST_STRING_INCREMENTAL 1024\r
72\r
7936fb6a 73//\r
74// Incremental size of stack for expression\r
75//\r
76#define EXPRESSION_STACK_SIZE_INCREMENT 0x100\r
77\r
0269d14b 78#define EFI_IFR_SPECIFICATION_VERSION (UINT16) (((EFI_SYSTEM_TABLE_REVISION >> 16) << 8) | (((EFI_SYSTEM_TABLE_REVISION & 0xFFFF) / 10) << 4) | ((EFI_SYSTEM_TABLE_REVISION & 0xFFFF) % 10))\r
7936fb6a 79\r
7936fb6a 80\r
f3f2e05d 81#define SETUP_DRIVER_SIGNATURE SIGNATURE_32 ('F', 'B', 'D', 'V')\r
7936fb6a 82typedef struct {\r
83 UINT32 Signature;\r
84\r
85 EFI_HANDLE Handle;\r
86\r
87 //\r
88 // Produced protocol\r
89 //\r
7c6c064c
ED
90 EFI_FORM_BROWSER2_PROTOCOL FormBrowser2;\r
91 EFI_FORM_BROWSER_EXTENSION_PROTOCOL FormBrowserEx;\r
7936fb6a 92\r
7c6c064c 93 EDKII_FORM_BROWSER_EXTENSION2_PROTOCOL FormBrowserEx2;\r
7936fb6a 94\r
7c6c064c 95} SETUP_DRIVER_PRIVATE_DATA;\r
25361615 96\r
7936fb6a 97//\r
98// IFR relative definition\r
99//\r
100#define EFI_HII_EXPRESSION_INCONSISTENT_IF 0\r
101#define EFI_HII_EXPRESSION_NO_SUBMIT_IF 1\r
102#define EFI_HII_EXPRESSION_GRAY_OUT_IF 2\r
103#define EFI_HII_EXPRESSION_SUPPRESS_IF 3\r
104#define EFI_HII_EXPRESSION_DISABLE_IF 4\r
105#define EFI_HII_EXPRESSION_VALUE 5\r
106#define EFI_HII_EXPRESSION_RULE 6\r
2573712e
LG
107#define EFI_HII_EXPRESSION_READ 7\r
108#define EFI_HII_EXPRESSION_WRITE 8\r
1c0d306f 109#define EFI_HII_EXPRESSION_WARNING_IF 9\r
7936fb6a 110\r
111#define EFI_HII_VARSTORE_BUFFER 0\r
112#define EFI_HII_VARSTORE_NAME_VALUE 1\r
c0462ea7
ED
113#define EFI_HII_VARSTORE_EFI_VARIABLE 2 // EFI Varstore type follow UEFI spec before 2.3.1.\r
114#define EFI_HII_VARSTORE_EFI_VARIABLE_BUFFER 3 // EFI varstore type follow UEFI spec 2.3.1 and later.\r
7936fb6a 115\r
116#define FORM_INCONSISTENT_VALIDATION 0\r
117#define FORM_NO_SUBMIT_VALIDATION 1\r
118\r
f3f2e05d 119#define NAME_VALUE_NODE_SIGNATURE SIGNATURE_32 ('N', 'V', 'S', 'T')\r
7936fb6a 120\r
121typedef struct {\r
122 UINTN Signature;\r
123 LIST_ENTRY Link;\r
124 CHAR16 *Name;\r
125 CHAR16 *Value;\r
126 CHAR16 *EditValue;\r
127} NAME_VALUE_NODE;\r
128\r
129#define NAME_VALUE_NODE_FROM_LINK(a) CR (a, NAME_VALUE_NODE, Link, NAME_VALUE_NODE_SIGNATURE)\r
130\r
94f3aae7 131#define BROWSER_STORAGE_SIGNATURE SIGNATURE_32 ('B', 'S', 'T', 'G')\r
7936fb6a 132\r
133typedef struct {\r
134 UINTN Signature;\r
135 LIST_ENTRY Link;\r
136\r
137 UINT8 Type; // Storage type\r
138\r
7936fb6a 139 EFI_GUID Guid;\r
140\r
141 CHAR16 *Name; // For EFI_IFR_VARSTORE\r
142 UINT16 Size;\r
143 UINT8 *Buffer;\r
144 UINT8 *EditBuffer; // Edit copy for Buffer Storage\r
145\r
146 LIST_ENTRY NameValueListHead; // List of NAME_VALUE_NODE\r
147\r
148 UINT32 Attributes; // For EFI_IFR_VARSTORE_EFI: EFI Variable attribute\r
149\r
150 CHAR16 *ConfigHdr; // <ConfigHdr>\r
efffd9c1
ED
151 CHAR16 *ConfigRequest; // <ConfigRequest> = <ConfigHdr> + <RequestElement>\r
152 // <RequestElement> includes all fields which is used by current form sets.\r
153 UINTN SpareStrLen; // Spare length of ConfigRequest string buffer\r
94f3aae7
ED
154} BROWSER_STORAGE;\r
155\r
156#define BROWSER_STORAGE_FROM_LINK(a) CR (a, BROWSER_STORAGE, Link, BROWSER_STORAGE_SIGNATURE)\r
157\r
158#define FORMSET_STORAGE_SIGNATURE SIGNATURE_32 ('F', 'S', 'T', 'G')\r
159\r
160typedef struct {\r
161 UINTN Signature;\r
162 LIST_ENTRY Link;\r
163\r
164 UINT16 VarStoreId;\r
165\r
166 BROWSER_STORAGE *BrowserStorage;\r
167\r
7936fb6a 168 CHAR16 *ConfigRequest; // <ConfigRequest> = <ConfigHdr> + <RequestElement>\r
7c6c064c 169 CHAR16 *ConfigElements;// Elements need to load initial data.\r
7936fb6a 170 UINTN ElementCount; // Number of <RequestElement> in the <ConfigRequest>\r
171 UINTN SpareStrLen; // Spare length of ConfigRequest string buffer\r
172} FORMSET_STORAGE;\r
173\r
174#define FORMSET_STORAGE_FROM_LINK(a) CR (a, FORMSET_STORAGE, Link, FORMSET_STORAGE_SIGNATURE)\r
175\r
2573712e
LG
176typedef union {\r
177 EFI_STRING_ID VarName;\r
178 UINT16 VarOffset;\r
179} VAR_STORE_INFO;\r
180\r
f3f2e05d 181#define EXPRESSION_OPCODE_SIGNATURE SIGNATURE_32 ('E', 'X', 'O', 'P')\r
7936fb6a 182\r
183typedef struct {\r
184 UINTN Signature;\r
185 LIST_ENTRY Link;\r
186\r
187 UINT8 Operand;\r
188\r
189 UINT8 Format; // For EFI_IFR_TO_STRING, EFI_IFR_FIND\r
190 UINT8 Flags; // For EFI_IFR_SPAN\r
191 UINT8 RuleId; // For EFI_IFR_RULE_REF\r
192\r
193 EFI_HII_VALUE Value; // For EFI_IFR_EQ_ID_VAL, EFI_IFR_UINT64, EFI_IFR_UINT32, EFI_IFR_UINT16, EFI_IFR_UINT8, EFI_IFR_STRING_REF1\r
194\r
2654f642 195 EFI_QUESTION_ID QuestionId; // For EFI_IFR_EQ_ID_ID, EFI_IFR_EQ_ID_VAL_LIST, EFI_IFR_QUESTION_REF1\r
7936fb6a 196 EFI_QUESTION_ID QuestionId2;\r
197\r
2654f642 198 UINT16 ListLength; // For EFI_IFR_EQ_ID_VAL_LIST\r
7936fb6a 199 UINT16 *ValueList;\r
200\r
201 EFI_STRING_ID DevicePath; // For EFI_IFR_QUESTION_REF3_2, EFI_IFR_QUESTION_REF3_3\r
202 EFI_GUID Guid;\r
2573712e 203\r
94f3aae7 204 BROWSER_STORAGE *VarStorage; // For EFI_IFR_SET, EFI_IFR_GET\r
2573712e
LG
205 VAR_STORE_INFO VarStoreInfo;// For EFI_IFR_SET, EFI_IFR_GET\r
206 UINT8 ValueType; // For EFI_IFR_SET, EFI_IFR_GET\r
207 UINT8 ValueWidth; // For EFI_IFR_SET, EFI_IFR_GET\r
208 CHAR16 *ValueName; // For EFI_IFR_SET, EFI_IFR_GET\r
209 LIST_ENTRY MapExpressionList; // nested expressions inside of Map opcode.\r
7936fb6a 210} EXPRESSION_OPCODE;\r
211\r
212#define EXPRESSION_OPCODE_FROM_LINK(a) CR (a, EXPRESSION_OPCODE, Link, EXPRESSION_OPCODE_SIGNATURE)\r
213\r
f3f2e05d 214#define FORM_EXPRESSION_SIGNATURE SIGNATURE_32 ('F', 'E', 'X', 'P')\r
7936fb6a 215\r
216typedef struct {\r
217 UINTN Signature;\r
218 LIST_ENTRY Link;\r
219\r
220 UINT8 Type; // Type for this expression\r
221\r
222 UINT8 RuleId; // For EFI_IFR_RULE only\r
223 EFI_STRING_ID Error; // For EFI_IFR_NO_SUBMIT_IF, EFI_IFR_INCONSISTENT_IF only\r
224\r
225 EFI_HII_VALUE Result; // Expression evaluation result\r
226\r
1c0d306f
ED
227 UINT8 TimeOut; // For EFI_IFR_WARNING_IF\r
228\r
7936fb6a 229 LIST_ENTRY OpCodeListHead; // OpCodes consist of this expression (EXPRESSION_OPCODE)\r
230} FORM_EXPRESSION;\r
231\r
232#define FORM_EXPRESSION_FROM_LINK(a) CR (a, FORM_EXPRESSION, Link, FORM_EXPRESSION_SIGNATURE)\r
233\r
31585af4
ED
234#define FORM_EXPRESSION_LIST_SIGNATURE SIGNATURE_32 ('F', 'E', 'X', 'R')\r
235\r
236typedef struct {\r
237 UINTN Signature;\r
238 UINTN Count;\r
239 FORM_EXPRESSION *Expression[1]; // Array[Count] of expressions\r
240} FORM_EXPRESSION_LIST;\r
241\r
f3f2e05d 242#define QUESTION_DEFAULT_SIGNATURE SIGNATURE_32 ('Q', 'D', 'F', 'T')\r
7936fb6a 243\r
244typedef struct {\r
245 UINTN Signature;\r
246 LIST_ENTRY Link;\r
247\r
248 UINT16 DefaultId;\r
249 EFI_HII_VALUE Value; // Default value\r
250\r
251 FORM_EXPRESSION *ValueExpression; // Not-NULL indicates default value is provided by EFI_IFR_VALUE\r
252} QUESTION_DEFAULT;\r
253\r
254#define QUESTION_DEFAULT_FROM_LINK(a) CR (a, QUESTION_DEFAULT, Link, QUESTION_DEFAULT_SIGNATURE)\r
255\r
f3f2e05d 256#define QUESTION_OPTION_SIGNATURE SIGNATURE_32 ('Q', 'O', 'P', 'T')\r
7936fb6a 257\r
258typedef struct {\r
31585af4
ED
259 UINTN Signature;\r
260 LIST_ENTRY Link;\r
7c6c064c
ED
261 \r
262 EFI_IFR_ONE_OF_OPTION *OpCode; // OneOfOption Data\r
7936fb6a 263\r
31585af4
ED
264 EFI_STRING_ID Text;\r
265 UINT8 Flags;\r
266 EFI_HII_VALUE Value;\r
267 EFI_IMAGE_ID ImageId;\r
7936fb6a 268\r
31585af4 269 FORM_EXPRESSION_LIST *SuppressExpression; // Non-NULL indicates nested inside of SuppressIf\r
7936fb6a 270} QUESTION_OPTION;\r
271\r
272#define QUESTION_OPTION_FROM_LINK(a) CR (a, QUESTION_OPTION, Link, QUESTION_OPTION_SIGNATURE)\r
273\r
31585af4
ED
274typedef enum {\r
275 ExpressFalse = 0,\r
276 ExpressGrayOut, \r
277 ExpressSuppress,\r
278 ExpressDisable\r
279} EXPRESS_RESULT;\r
280\r
281typedef enum {\r
282 ExpressNone = 0,\r
283 ExpressForm, \r
284 ExpressStatement,\r
285 ExpressOption\r
286} EXPRESS_LEVEL;\r
287\r
f3f2e05d 288#define FORM_BROWSER_STATEMENT_SIGNATURE SIGNATURE_32 ('F', 'S', 'T', 'A')\r
1ccdbf2a 289\r
7936fb6a 290typedef struct {\r
291 UINTN Signature;\r
292 LIST_ENTRY Link;\r
293\r
294 UINT8 Operand; // The operand (first byte) of this Statement or Question\r
7c6c064c 295 EFI_IFR_OP_HEADER *OpCode;\r
7936fb6a 296\r
297 //\r
298 // Statement Header\r
299 //\r
300 EFI_STRING_ID Prompt;\r
301 EFI_STRING_ID Help;\r
302 EFI_STRING_ID TextTwo; // For EFI_IFR_TEXT\r
303\r
7c6c064c
ED
304 //\r
305 // Fake Question Id, used for statement not has true QuestionId.\r
306 //\r
307 EFI_QUESTION_ID FakeQuestionId;\r
308\r
7936fb6a 309 //\r
310 // Question Header\r
311 //\r
312 EFI_QUESTION_ID QuestionId; // The value of zero is reserved\r
313 EFI_VARSTORE_ID VarStoreId; // A value of zero indicates no variable storage\r
94f3aae7 314 BROWSER_STORAGE *Storage;\r
1ccdbf2a 315 VAR_STORE_INFO VarStoreInfo;\r
7936fb6a 316 UINT16 StorageWidth;\r
317 UINT8 QuestionFlags;\r
318 CHAR16 *VariableName; // Name/Value or EFI Variable name\r
319 CHAR16 *BlockName; // Buffer storage block name: "OFFSET=...WIDTH=..."\r
320\r
321 EFI_HII_VALUE HiiValue; // Edit copy for checkbox, numberic, oneof\r
322 UINT8 *BufferValue; // Edit copy for string, password, orderedlist\r
d02847d3 323 UINT8 ValueType; // Data type for orderedlist value array\r
7936fb6a 324\r
325 //\r
326 // OpCode specific members\r
327 //\r
328 UINT8 Flags; // for EFI_IFR_CHECKBOX, EFI_IFR_DATE, EFI_IFR_NUMERIC, EFI_IFR_ONE_OF,\r
329 // EFI_IFR_ORDERED_LIST, EFI_IFR_STRING,EFI_IFR_SUBTITLE,EFI_IFR_TIME, EFI_IFR_BANNER\r
330 UINT8 MaxContainers; // for EFI_IFR_ORDERED_LIST\r
331\r
332 UINT16 BannerLineNumber; // for EFI_IFR_BANNER, 1-based line number\r
333 EFI_STRING_ID QuestionConfig; // for EFI_IFR_ACTION, if 0 then no configuration string will be processed\r
334\r
335 UINT64 Minimum; // for EFI_IFR_ONE_OF/EFI_IFR_NUMERIC, it's Min/Max value\r
336 UINT64 Maximum; // for EFI_IFR_STRING/EFI_IFR_PASSWORD, it's Min/Max length\r
337 UINT64 Step;\r
338\r
339 EFI_DEFAULT_ID DefaultId; // for EFI_IFR_RESET_BUTTON\r
211cc6e5 340 EFI_GUID RefreshGuid; // for EFI_IFR_REFRESH_ID\r
f67c4382 341 BOOLEAN Locked; // Whether this statement is locked.\r
7c6c064c 342 BOOLEAN ValueChanged; // Whether this statement's value is changed.\r
7936fb6a 343 //\r
344 // Get from IFR parsing\r
345 //\r
346 FORM_EXPRESSION *ValueExpression; // nested EFI_IFR_VALUE, provide Question value and indicate Question is ReadOnly\r
347 LIST_ENTRY DefaultListHead; // nested EFI_IFR_DEFAULT list (QUESTION_DEFAULT), provide default values\r
348 LIST_ENTRY OptionListHead; // nested EFI_IFR_ONE_OF_OPTION list (QUESTION_OPTION)\r
349\r
350 EFI_IMAGE_ID ImageId; // nested EFI_IFR_IMAGE\r
351 UINT8 RefreshInterval; // nested EFI_IFR_REFRESH, refresh interval(in seconds) for Question value, 0 means no refresh\r
352 BOOLEAN InSubtitle; // nesting inside of EFI_IFR_SUBTITLE\r
353\r
354 LIST_ENTRY InconsistentListHead;// nested inconsistent expression list (FORM_EXPRESSION)\r
355 LIST_ENTRY NoSubmitListHead; // nested nosubmit expression list (FORM_EXPRESSION)\r
1c0d306f 356 LIST_ENTRY WarningListHead; // nested warning expression list (FORM_EXPRESSION)\r
31585af4 357 FORM_EXPRESSION_LIST *Expression; // nesting inside of GrayOutIf/DisableIf/SuppressIf\r
7936fb6a 358\r
2573712e
LG
359 FORM_EXPRESSION *ReadExpression; // nested EFI_IFR_READ, provide this question value by read expression.\r
360 FORM_EXPRESSION *WriteExpression; // nested EFI_IFR_WRITE, evaluate write expression after this question value is set.\r
7936fb6a 361} FORM_BROWSER_STATEMENT;\r
362\r
363#define FORM_BROWSER_STATEMENT_FROM_LINK(a) CR (a, FORM_BROWSER_STATEMENT, Link, FORM_BROWSER_STATEMENT_SIGNATURE)\r
364\r
b18e7050
ED
365#define FORM_BROWSER_CONFIG_REQUEST_SIGNATURE SIGNATURE_32 ('F', 'C', 'R', 'S')\r
366typedef struct {\r
367 UINTN Signature;\r
368 LIST_ENTRY Link;\r
369\r
370 CHAR16 *ConfigRequest; // <ConfigRequest> = <ConfigHdr> + <RequestElement>\r
371 UINTN ElementCount; // Number of <RequestElement> in the <ConfigRequest> \r
372 UINTN SpareStrLen;\r
373\r
94f3aae7 374 BROWSER_STORAGE *Storage;\r
b18e7050
ED
375} FORM_BROWSER_CONFIG_REQUEST;\r
376#define FORM_BROWSER_CONFIG_REQUEST_FROM_LINK(a) CR (a, FORM_BROWSER_CONFIG_REQUEST, Link, FORM_BROWSER_CONFIG_REQUEST_SIGNATURE)\r
377\r
f3f2e05d 378#define FORM_BROWSER_FORM_SIGNATURE SIGNATURE_32 ('F', 'F', 'R', 'M')\r
2573712e 379#define STANDARD_MAP_FORM_TYPE 0x01\r
7936fb6a 380\r
381typedef struct {\r
31585af4
ED
382 UINTN Signature;\r
383 LIST_ENTRY Link;\r
7936fb6a 384\r
31585af4
ED
385 UINT16 FormId; // FormId of normal form or formmap form.\r
386 EFI_STRING_ID FormTitle; // FormTile of normal form, or FormMapMethod title of formmap form.\r
387 UINT16 FormType; // Specific form type for the different form.\r
7936fb6a 388\r
31585af4 389 EFI_IMAGE_ID ImageId;\r
7936fb6a 390\r
31585af4
ED
391 BOOLEAN ModalForm; // Whether this is a modal form.\r
392 BOOLEAN Locked; // Whether this form is locked.\r
b00964a9 393\r
31585af4
ED
394 LIST_ENTRY ExpressionListHead; // List of Expressions (FORM_EXPRESSION)\r
395 LIST_ENTRY StatementListHead; // List of Statements and Questions (FORM_BROWSER_STATEMENT)\r
396 LIST_ENTRY ConfigRequestHead; // List of configreques for all storage.\r
397 FORM_EXPRESSION_LIST *SuppressExpression; // nesting inside of SuppressIf\r
7936fb6a 398} FORM_BROWSER_FORM;\r
399\r
400#define FORM_BROWSER_FORM_FROM_LINK(a) CR (a, FORM_BROWSER_FORM, Link, FORM_BROWSER_FORM_SIGNATURE)\r
401\r
f3f2e05d 402#define FORMSET_DEFAULTSTORE_SIGNATURE SIGNATURE_32 ('F', 'D', 'F', 'S')\r
7936fb6a 403\r
404typedef struct {\r
405 UINTN Signature;\r
406 LIST_ENTRY Link;\r
407\r
408 UINT16 DefaultId;\r
409 EFI_STRING_ID DefaultName;\r
410} FORMSET_DEFAULTSTORE;\r
411\r
412#define FORMSET_DEFAULTSTORE_FROM_LINK(a) CR (a, FORMSET_DEFAULTSTORE, Link, FORMSET_DEFAULTSTORE_SIGNATURE)\r
413\r
48a9d5f7
LG
414#define FORM_BROWSER_FORMSET_SIGNATURE SIGNATURE_32 ('F', 'B', 'F', 'S')\r
415\r
7936fb6a 416typedef struct {\r
48a9d5f7
LG
417 UINTN Signature;\r
418 LIST_ENTRY Link;\r
419 EFI_HII_HANDLE HiiHandle; // unique id for formset.\r
7936fb6a 420 EFI_HANDLE DriverHandle;\r
421 EFI_HII_CONFIG_ACCESS_PROTOCOL *ConfigAccess;\r
422 EFI_DEVICE_PATH_PROTOCOL *DevicePath;\r
423\r
424 UINTN IfrBinaryLength;\r
425 UINT8 *IfrBinaryData;\r
426\r
7c6c064c 427 BOOLEAN QuestionInited; // Have finished question initilization?\r
7936fb6a 428 EFI_GUID Guid;\r
429 EFI_STRING_ID FormSetTitle;\r
430 EFI_STRING_ID Help;\r
0a1147ed
LG
431 UINT8 NumberOfClassGuid;\r
432 EFI_GUID ClassGuid[3]; // Up to three ClassGuid\r
433 UINT16 Class; // Tiano extended Class code\r
434 UINT16 SubClass; // Tiano extended Subclass code\r
7936fb6a 435 EFI_IMAGE_ID ImageId;\r
436\r
437 FORM_BROWSER_STATEMENT *StatementBuffer; // Buffer for all Statements and Questions\r
438 EXPRESSION_OPCODE *ExpressionBuffer; // Buffer for all Expression OpCode\r
439\r
7c6c064c 440 LIST_ENTRY StatementListOSF; // Statement list out side of the form.\r
7936fb6a 441 LIST_ENTRY StorageListHead; // Storage list (FORMSET_STORAGE)\r
442 LIST_ENTRY DefaultStoreListHead; // DefaultStore list (FORMSET_DEFAULTSTORE)\r
443 LIST_ENTRY FormListHead; // Form list (FORM_BROWSER_FORM)\r
0c66bc76 444 LIST_ENTRY ExpressionListHead; // List of Expressions (FORM_EXPRESSION)\r
7936fb6a 445} FORM_BROWSER_FORMSET;\r
25361615 446#define FORM_BROWSER_FORMSET_FROM_LINK(a) CR (a, FORM_BROWSER_FORMSET, Link, FORM_BROWSER_FORMSET_SIGNATURE)\r
b9feb4bd 447\r
7c6c064c
ED
448typedef struct {\r
449 LIST_ENTRY Link;\r
450 EFI_EVENT RefreshEvent;\r
451} FORM_BROWSER_REFRESH_EVENT_NODE;\r
452\r
453#define FORM_BROWSER_REFRESH_EVENT_FROM_LINK(a) BASE_CR (a, FORM_BROWSER_REFRESH_EVENT_NODE, Link)\r
454\r
b9feb4bd 455\r
48a9d5f7 456typedef struct {\r
7c6c064c 457 EFI_HII_HANDLE Handle;\r
48a9d5f7 458\r
7c6c064c
ED
459 //\r
460 // Target formset/form/Question information\r
461 //\r
462 EFI_GUID FormSetGuid;\r
463 UINT16 FormId;\r
464 UINT16 QuestionId;\r
465 UINTN Sequence; // used for time/date only.\r
466\r
467 UINTN TopRow;\r
468 UINTN BottomRow;\r
469 UINTN PromptCol;\r
470 UINTN OptionCol;\r
471 UINTN CurrentRow;\r
472\r
473 //\r
474 // Ation for Browser to taken:\r
475 // UI_ACTION_NONE - navigation inside a form\r
476 // UI_ACTION_REFRESH_FORM - re-evaluate expressions and repaint form\r
477 // UI_ACTION_REFRESH_FORMSET - re-parse formset IFR binary\r
478 //\r
479 UINTN Action;\r
480\r
481 //\r
482 // Current selected fomset/form/Question\r
483 //\r
484 FORM_BROWSER_FORMSET *FormSet;\r
485 FORM_BROWSER_FORM *Form;\r
486 FORM_BROWSER_STATEMENT *Statement;\r
487\r
488 //\r
489 // Whether the Form is editable\r
490 //\r
491 BOOLEAN FormEditable;\r
492\r
493 FORM_ENTRY_INFO *CurrentMenu;\r
494} UI_MENU_SELECTION;\r
48a9d5f7 495\r
5a9f73bf
ED
496#define BROWSER_CONTEXT_SIGNATURE SIGNATURE_32 ('B', 'C', 'T', 'X')\r
497\r
498typedef struct {\r
499 UINTN Signature;\r
500 LIST_ENTRY Link;\r
501\r
502 //\r
503 // Globals defined in Setup.c\r
504 //\r
505 BOOLEAN ResetRequired;\r
506 BOOLEAN ExitRequired;\r
507 EFI_HII_HANDLE HiiHandle;\r
508 EFI_GUID FormSetGuid;\r
509 EFI_FORM_ID FormId;\r
510 UI_MENU_SELECTION *Selection;\r
511\r
512 LIST_ENTRY FormHistoryList;\r
513} BROWSER_CONTEXT;\r
514\r
515#define BROWSER_CONTEXT_FROM_LINK(a) CR (a, BROWSER_CONTEXT, Link, BROWSER_CONTEXT_SIGNATURE)\r
516\r
09cdd7d2
ED
517//\r
518// Scope for get defaut value. It may be GetDefaultForNoStorage, GetDefaultForStorage or GetDefaultForAll.\r
519//\r
520typedef enum {\r
521 GetDefaultForNoStorage, // Get default value for question which not has storage.\r
522 GetDefaultForStorage, // Get default value for question which has storage.\r
523 GetDefaultForAll, // Get default value for all questions.\r
524 GetDefaultForMax // Invalid value.\r
525} BROWSER_GET_DEFAULT_VALUE;\r
526\r
816a7110
ED
527//\r
528// Get/set question value from/to.\r
529//\r
530typedef enum {\r
531 GetSetValueWithEditBuffer, // Get/Set question value from/to editbuffer in the storage.\r
532 GetSetValueWithBuffer, // Get/Set question value from/to buffer in the storage.\r
533 GetSetValueWithHiiDriver, // Get/Set question value from/to hii driver.\r
534 GetSetValueWithMax // Invalid value.\r
535} GET_SET_QUESTION_VALUE_WITH;\r
536\r
7936fb6a 537extern EFI_HII_DATABASE_PROTOCOL *mHiiDatabase;\r
7936fb6a 538extern EFI_HII_CONFIG_ROUTING_PROTOCOL *mHiiConfigRouting;\r
80a047f0 539extern EFI_DEVICE_PATH_FROM_TEXT_PROTOCOL *mPathFromText;\r
7c6c064c 540extern EDKII_FORM_DISPLAY_ENGINE_PROTOCOL *mFormDisplay;\r
7936fb6a 541\r
7936fb6a 542extern BOOLEAN gResetRequired;\r
7c6c064c 543extern BOOLEAN gExitRequired;\r
798e4d22 544extern BOOLEAN gFinishRetrieveCall;\r
48a9d5f7
LG
545extern LIST_ENTRY gBrowserFormSetList;\r
546extern LIST_ENTRY gBrowserHotKeyList;\r
547extern BROWSER_SETTING_SCOPE gBrowserSettingScope;\r
548extern EXIT_HANDLER ExitHandlerFunction;\r
7c6c064c 549extern EFI_HII_HANDLE mCurrentHiiHandle;\r
184f3a02 550extern SETUP_DRIVER_PRIVATE_DATA mPrivateData;\r
7936fb6a 551//\r
552// Browser Global Strings\r
553//\r
7936fb6a 554extern CHAR16 *gEmptyString;\r
7936fb6a 555\r
556extern EFI_GUID gZeroGuid;\r
7936fb6a 557\r
7c6c064c
ED
558extern UI_MENU_SELECTION *gCurrentSelection;\r
559\r
7936fb6a 560//\r
561// Global Procedure Defines\r
562//\r
7c6c064c 563#include "Expression.h"\r
7936fb6a 564\r
565/**\r
566 Initialize the HII String Token to the correct values.\r
567\r
568**/\r
569VOID\r
570InitializeBrowserStrings (\r
571 VOID\r
ed66e1bc 572 );\r
7936fb6a 573\r
7936fb6a 574/**\r
575 Parse opcodes in the formset IFR binary.\r
576\r
577 @param FormSet Pointer of the FormSet data structure.\r
578\r
579 @retval EFI_SUCCESS Opcode parse success.\r
580 @retval Other Opcode parse fail.\r
581\r
582**/\r
583EFI_STATUS\r
584ParseOpCodes (\r
585 IN FORM_BROWSER_FORMSET *FormSet\r
ed66e1bc 586 );\r
7936fb6a 587\r
588/**\r
589 Free resources allocated for a FormSet.\r
590\r
591 @param FormSet Pointer of the FormSet\r
592\r
593**/\r
594VOID\r
595DestroyFormSet (\r
596 IN OUT FORM_BROWSER_FORMSET *FormSet\r
ed66e1bc 597 );\r
7936fb6a 598\r
7936fb6a 599\r
600/**\r
601 Create a new string in HII Package List.\r
602\r
603 @param String The String to be added\r
604 @param HiiHandle The package list in the HII database to insert the\r
605 specified string.\r
606\r
607 @return The output string.\r
608\r
609**/\r
610EFI_STRING_ID\r
611NewString (\r
612 IN CHAR16 *String,\r
613 IN EFI_HII_HANDLE HiiHandle\r
ed66e1bc 614 );\r
7936fb6a 615\r
616/**\r
617 Delete a string from HII Package List.\r
618\r
619 @param StringId Id of the string in HII database.\r
620 @param HiiHandle The HII package list handle.\r
621\r
622 @retval EFI_SUCCESS The string was deleted successfully.\r
623\r
624**/\r
625EFI_STATUS\r
626DeleteString (\r
627 IN EFI_STRING_ID StringId,\r
628 IN EFI_HII_HANDLE HiiHandle\r
ed66e1bc 629 );\r
7936fb6a 630\r
631/**\r
632 Get the string based on the StringId and HII Package List Handle.\r
633\r
634 @param Token The String's ID.\r
635 @param HiiHandle The package list in the HII database to search for\r
636 the specified string.\r
637\r
638 @return The output string.\r
639\r
640**/\r
641CHAR16 *\r
642GetToken (\r
643 IN EFI_STRING_ID Token,\r
644 IN EFI_HII_HANDLE HiiHandle\r
ed66e1bc 645 );\r
7936fb6a 646\r
2573712e
LG
647/**\r
648 Get Value for given Name from a NameValue Storage.\r
649\r
650 @param Storage The NameValue Storage.\r
651 @param Name The Name.\r
652 @param Value The retured Value.\r
816a7110 653 @param GetValueFrom Where to get source value, from EditValue or Value.\r
2573712e
LG
654\r
655 @retval EFI_SUCCESS Value found for given Name.\r
656 @retval EFI_NOT_FOUND No such Name found in NameValue storage.\r
657\r
658**/\r
659EFI_STATUS\r
660GetValueByName (\r
94f3aae7 661 IN BROWSER_STORAGE *Storage,\r
816a7110
ED
662 IN CHAR16 *Name,\r
663 IN OUT CHAR16 **Value,\r
664 IN GET_SET_QUESTION_VALUE_WITH GetValueFrom\r
2573712e
LG
665 );\r
666\r
667/**\r
668 Set Value of given Name in a NameValue Storage.\r
669\r
670 @param Storage The NameValue Storage.\r
671 @param Name The Name.\r
672 @param Value The Value to set.\r
816a7110 673 @param SetValueTo Whether update editValue or Value.\r
7c6c064c 674 @param ReturnNode The node use the input name.\r
2573712e
LG
675\r
676 @retval EFI_SUCCESS Value found for given Name.\r
677 @retval EFI_NOT_FOUND No such Name found in NameValue storage.\r
678\r
679**/\r
680EFI_STATUS\r
681SetValueByName (\r
7c6c064c
ED
682 IN BROWSER_STORAGE *Storage,\r
683 IN CHAR16 *Name,\r
684 IN CHAR16 *Value,\r
685 IN GET_SET_QUESTION_VALUE_WITH SetValueTo,\r
686 OUT NAME_VALUE_NODE **ReturnNode\r
687 );\r
688\r
689/**\r
690 Validate whether this question's value has changed.\r
691\r
692 @param FormSet FormSet data structure.\r
693 @param Form Form data structure.\r
694 @param Question Question to be initialized.\r
695 @param GetValueFrom Where to get value, may from editbuffer, buffer or hii driver.\r
696\r
697 @retval TRUE Question's value has changed.\r
698 @retval FALSE Question's value has not changed\r
699\r
700**/\r
701BOOLEAN\r
702IsQuestionValueChanged (\r
703 IN FORM_BROWSER_FORMSET *FormSet,\r
704 IN FORM_BROWSER_FORM *Form,\r
705 IN OUT FORM_BROWSER_STATEMENT *Question,\r
706 IN GET_SET_QUESTION_VALUE_WITH GetValueFrom\r
2573712e
LG
707 );\r
708\r
7936fb6a 709/**\r
710 Get Question's current Value.\r
711\r
712 @param FormSet FormSet data structure.\r
713 @param Form Form data structure.\r
714 @param Question Question to be initialized.\r
816a7110 715 @param GetValueFrom Where to get value, may from editbuffer, buffer or hii driver.\r
7936fb6a 716\r
717 @retval EFI_SUCCESS The function completed successfully.\r
718\r
719**/\r
720EFI_STATUS\r
721GetQuestionValue (\r
722 IN FORM_BROWSER_FORMSET *FormSet,\r
723 IN FORM_BROWSER_FORM *Form,\r
724 IN OUT FORM_BROWSER_STATEMENT *Question,\r
816a7110 725 IN GET_SET_QUESTION_VALUE_WITH GetValueFrom\r
ed66e1bc 726 );\r
7936fb6a 727\r
728/**\r
729 Save Question Value to edit copy(cached) or Storage(uncached).\r
730\r
731 @param FormSet FormSet data structure.\r
732 @param Form Form data structure.\r
733 @param Question Pointer to the Question.\r
816a7110 734 @param SetValueTo Update the question value to editbuffer , buffer or hii driver.\r
7936fb6a 735\r
736 @retval EFI_SUCCESS The function completed successfully.\r
737\r
738**/\r
739EFI_STATUS\r
740SetQuestionValue (\r
741 IN FORM_BROWSER_FORMSET *FormSet,\r
742 IN FORM_BROWSER_FORM *Form,\r
743 IN OUT FORM_BROWSER_STATEMENT *Question,\r
816a7110 744 IN GET_SET_QUESTION_VALUE_WITH SetValueTo\r
ed66e1bc 745 );\r
7936fb6a 746\r
747/**\r
748 Perform inconsistent check for a Form.\r
749\r
750 @param FormSet FormSet data structure.\r
751 @param Form Form data structure.\r
752 @param Question The Question to be validated.\r
753 @param Type Validation type: InConsistent or NoSubmit\r
754\r
755 @retval EFI_SUCCESS Form validation pass.\r
756 @retval other Form validation failed.\r
757\r
758**/\r
759EFI_STATUS\r
760ValidateQuestion (\r
761 IN FORM_BROWSER_FORMSET *FormSet,\r
762 IN FORM_BROWSER_FORM *Form,\r
763 IN FORM_BROWSER_STATEMENT *Question,\r
764 IN UINTN Type\r
ed66e1bc 765 );\r
7936fb6a 766\r
48a9d5f7 767\r
7936fb6a 768/**\r
48a9d5f7 769 Discard data based on the input setting scope (Form, FormSet or System).\r
7936fb6a 770\r
771 @param FormSet FormSet data structure.\r
772 @param Form Form data structure.\r
48a9d5f7 773 @param SettingScope Setting Scope for Discard action.\r
b18e7050
ED
774\r
775 @retval EFI_SUCCESS The function completed successfully.\r
48a9d5f7 776 @retval EFI_UNSUPPORTED Unsupport SettingScope.\r
b18e7050
ED
777\r
778**/\r
779EFI_STATUS\r
780DiscardForm (\r
781 IN FORM_BROWSER_FORMSET *FormSet,\r
782 IN FORM_BROWSER_FORM *Form,\r
48a9d5f7 783 IN BROWSER_SETTING_SCOPE SettingScope\r
b18e7050
ED
784 );\r
785\r
786/**\r
48a9d5f7 787 Submit data based on the input Setting level (Form, FormSet or System).\r
b18e7050
ED
788\r
789 @param FormSet FormSet data structure.\r
790 @param Form Form data structure.\r
48a9d5f7 791 @param SettingScope Setting Scope for Submit action.\r
7936fb6a 792\r
793 @retval EFI_SUCCESS The function completed successfully.\r
48a9d5f7 794 @retval EFI_UNSUPPORTED Unsupport SettingScope.\r
7936fb6a 795\r
796**/\r
797EFI_STATUS\r
798SubmitForm (\r
799 IN FORM_BROWSER_FORMSET *FormSet,\r
b18e7050 800 IN FORM_BROWSER_FORM *Form,\r
48a9d5f7 801 IN BROWSER_SETTING_SCOPE SettingScope\r
ed66e1bc 802 );\r
7936fb6a 803\r
804/**\r
805 Reset Question to its default value.\r
806\r
807 @param FormSet The form set.\r
808 @param Form The form.\r
809 @param Question The question.\r
810 @param DefaultId The Class of the default.\r
811\r
812 @retval EFI_SUCCESS Question is reset to default value.\r
813\r
814**/\r
815EFI_STATUS\r
816GetQuestionDefault (\r
817 IN FORM_BROWSER_FORMSET *FormSet,\r
818 IN FORM_BROWSER_FORM *Form,\r
819 IN FORM_BROWSER_STATEMENT *Question,\r
820 IN UINT16 DefaultId\r
ed66e1bc 821 );\r
7936fb6a 822\r
823/**\r
824 Get current setting of Questions.\r
825\r
826 @param FormSet FormSet data structure.\r
827\r
7936fb6a 828**/\r
7c6c064c 829VOID\r
7936fb6a 830InitializeCurrentSetting (\r
831 IN OUT FORM_BROWSER_FORMSET *FormSet\r
ed66e1bc 832 );\r
7936fb6a 833\r
834/**\r
835 Initialize the internal data structure of a FormSet.\r
836\r
837 @param Handle PackageList Handle\r
838 @param FormSetGuid GUID of a formset. If not specified (NULL or zero\r
839 GUID), take the first FormSet found in package\r
840 list.\r
841 @param FormSet FormSet data structure.\r
842\r
843 @retval EFI_SUCCESS The function completed successfully.\r
844 @retval EFI_NOT_FOUND The specified FormSet could not be found.\r
845\r
846**/\r
847EFI_STATUS\r
848InitializeFormSet (\r
849 IN EFI_HII_HANDLE Handle,\r
850 IN OUT EFI_GUID *FormSetGuid,\r
7c6c064c 851 OUT FORM_BROWSER_FORMSET *FormSet \r
ed66e1bc 852 );\r
7936fb6a 853\r
854/**\r
9776099f 855 Reset Questions to their initial value or default value in a Form, Formset or System.\r
7936fb6a 856\r
09cdd7d2
ED
857 GetDefaultValueScope parameter decides which questions will reset \r
858 to its default value.\r
859\r
7936fb6a 860 @param FormSet FormSet data structure.\r
48a9d5f7 861 @param Form Form data structure.\r
7936fb6a 862 @param DefaultId The Class of the default.\r
48a9d5f7 863 @param SettingScope Setting Scope for Default action.\r
09cdd7d2 864 @param GetDefaultValueScope Get default value scope.\r
3347d410 865 @param Storage Get default value only for this storage.\r
9776099f
ED
866 @param RetrieveValueFirst Whether call the retrieve call back to\r
867 get the initial value before get default\r
868 value.\r
7936fb6a 869\r
870 @retval EFI_SUCCESS The function completed successfully.\r
48a9d5f7 871 @retval EFI_UNSUPPORTED Unsupport SettingScope.\r
7936fb6a 872\r
873**/\r
874EFI_STATUS\r
48a9d5f7 875ExtractDefault (\r
7936fb6a 876 IN FORM_BROWSER_FORMSET *FormSet,\r
48a9d5f7
LG
877 IN FORM_BROWSER_FORM *Form,\r
878 IN UINT16 DefaultId,\r
3347d410 879 IN BROWSER_SETTING_SCOPE SettingScope,\r
09cdd7d2 880 IN BROWSER_GET_DEFAULT_VALUE GetDefaultValueScope,\r
94f3aae7 881 IN BROWSER_STORAGE *Storage,\r
9776099f 882 IN BOOLEAN RetrieveValueFirst\r
ed66e1bc 883 );\r
7936fb6a 884\r
885/**\r
886 Initialize Question's Edit copy from Storage.\r
887\r
eccfeab1
LG
888 @param Selection Selection contains the information about \r
889 the Selection, form and formset to be displayed.\r
890 Selection action may be updated in retrieve callback.\r
7d1b202d 891 If Selection is NULL, only initialize Question value.\r
7936fb6a 892 @param FormSet FormSet data structure.\r
893 @param Form Form data structure.\r
894\r
895 @retval EFI_SUCCESS The function completed successfully.\r
896\r
897**/\r
898EFI_STATUS\r
899LoadFormConfig (\r
eccfeab1
LG
900 IN OUT UI_MENU_SELECTION *Selection,\r
901 IN FORM_BROWSER_FORMSET *FormSet,\r
902 IN FORM_BROWSER_FORM *Form\r
ed66e1bc 903 );\r
7936fb6a 904\r
d66e6c16 905/**\r
906 Initialize Question's Edit copy from Storage for the whole Formset.\r
907\r
eccfeab1
LG
908 @param Selection Selection contains the information about \r
909 the Selection, form and formset to be displayed.\r
910 Selection action may be updated in retrieve callback.\r
7d1b202d 911 If Selection is NULL, only initialize Question value.\r
d66e6c16 912 @param FormSet FormSet data structure.\r
913\r
914 @retval EFI_SUCCESS The function completed successfully.\r
915\r
916**/\r
917EFI_STATUS\r
918LoadFormSetConfig (\r
eccfeab1
LG
919 IN OUT UI_MENU_SELECTION *Selection,\r
920 IN FORM_BROWSER_FORMSET *FormSet\r
d66e6c16 921 );\r
922\r
7936fb6a 923/**\r
924 Convert setting of Buffer Storage or NameValue Storage to <ConfigResp>.\r
925\r
94f3aae7 926 @param Storage The Storage to be conveted.\r
7936fb6a 927 @param ConfigResp The returned <ConfigResp>.\r
94f3aae7 928 @param ConfigRequest The ConfigRequest string.\r
7c6c064c 929 @param GetEditBuf Get the data from editbuffer or buffer.\r
7936fb6a 930\r
931 @retval EFI_SUCCESS Convert success.\r
932 @retval EFI_INVALID_PARAMETER Incorrect storage type.\r
933\r
934**/\r
935EFI_STATUS\r
936StorageToConfigResp (\r
94f3aae7 937 IN BROWSER_STORAGE *Storage,\r
b18e7050 938 IN CHAR16 **ConfigResp,\r
7c6c064c
ED
939 IN CHAR16 *ConfigRequest,\r
940 IN BOOLEAN GetEditBuf\r
ed66e1bc 941 );\r
7936fb6a 942\r
943/**\r
944 Convert <ConfigResp> to settings in Buffer Storage or NameValue Storage.\r
945\r
946 @param Storage The Storage to receive the settings.\r
947 @param ConfigResp The <ConfigResp> to be converted.\r
948\r
949 @retval EFI_SUCCESS Convert success.\r
950 @retval EFI_INVALID_PARAMETER Incorrect storage type.\r
951\r
952**/\r
953EFI_STATUS\r
954ConfigRespToStorage (\r
94f3aae7 955 IN BROWSER_STORAGE *Storage,\r
7936fb6a 956 IN CHAR16 *ConfigResp\r
ed66e1bc 957 );\r
7936fb6a 958\r
959/**\r
960 Fill storage's edit copy with settings requested from Configuration Driver.\r
961\r
962 @param FormSet FormSet data structure.\r
963 @param Storage Buffer Storage.\r
964\r
7936fb6a 965**/\r
7c6c064c 966VOID\r
7936fb6a 967LoadStorage (\r
968 IN FORM_BROWSER_FORMSET *FormSet,\r
969 IN FORMSET_STORAGE *Storage\r
ed66e1bc 970 );\r
7936fb6a 971\r
972/**\r
973 Fetch the Ifr binary data of a FormSet.\r
974\r
975 @param Handle PackageList Handle\r
976 @param FormSetGuid GUID of a formset. If not specified (NULL or zero\r
977 GUID), take the first FormSet found in package\r
978 list.\r
979 @param BinaryLength The length of the FormSet IFR binary.\r
980 @param BinaryData The buffer designed to receive the FormSet.\r
981\r
982 @retval EFI_SUCCESS Buffer filled with the requested FormSet.\r
983 BufferLength was updated.\r
984 @retval EFI_INVALID_PARAMETER The handle is unknown.\r
985 @retval EFI_NOT_FOUND A form or FormSet on the requested handle cannot\r
986 be found with the requested FormId.\r
987\r
988**/\r
989EFI_STATUS\r
990GetIfrBinaryData (\r
991 IN EFI_HII_HANDLE Handle,\r
992 IN OUT EFI_GUID *FormSetGuid,\r
993 OUT UINTN *BinaryLength,\r
994 OUT UINT8 **BinaryData\r
ed66e1bc 995 );\r
7936fb6a 996\r
ce6d12cc 997/**\r
998 Save globals used by previous call to SendForm(). SendForm() may be called from \r
999 HiiConfigAccess.Callback(), this will cause SendForm() be reentried.\r
1000 So, save globals of previous call to SendForm() and restore them upon exit.\r
1001\r
1002**/\r
1003VOID\r
1004SaveBrowserContext (\r
1005 VOID\r
1006 );\r
1007\r
1008/**\r
1009 Restore globals used by previous call to SendForm().\r
1010\r
1011**/\r
1012VOID\r
1013RestoreBrowserContext (\r
1014 VOID\r
1015 );\r
1016\r
7936fb6a 1017/**\r
1018 This is the routine which an external caller uses to direct the browser\r
1019 where to obtain it's information.\r
1020\r
1021\r
1022 @param This The Form Browser protocol instanse.\r
1023 @param Handles A pointer to an array of Handles. If HandleCount > 1 we\r
1024 display a list of the formsets for the handles specified.\r
1025 @param HandleCount The number of Handles specified in Handle.\r
1026 @param FormSetGuid This field points to the EFI_GUID which must match the Guid\r
1027 field in the EFI_IFR_FORM_SET op-code for the specified\r
1028 forms-based package. If FormSetGuid is NULL, then this\r
1029 function will display the first found forms package.\r
1030 @param FormId This field specifies which EFI_IFR_FORM to render as the first\r
1031 displayable page. If this field has a value of 0x0000, then\r
1032 the forms browser will render the specified forms in their encoded order.\r
1033 ScreenDimenions - This allows the browser to be called so that it occupies a\r
1034 portion of the physical screen instead of dynamically determining the screen dimensions.\r
1035 ActionRequest - Points to the action recommended by the form.\r
d66e6c16 1036 @param ScreenDimensions Points to recommended form dimensions, including any non-content area, in\r
7936fb6a 1037 characters.\r
1038 @param ActionRequest Points to the action recommended by the form.\r
1039\r
1040 @retval EFI_SUCCESS The function completed successfully.\r
1041 @retval EFI_INVALID_PARAMETER One of the parameters has an invalid value.\r
1042 @retval EFI_NOT_FOUND No valid forms could be found to display.\r
1043\r
1044**/\r
1045EFI_STATUS\r
1046EFIAPI\r
1047SendForm (\r
1048 IN CONST EFI_FORM_BROWSER2_PROTOCOL *This,\r
1049 IN EFI_HII_HANDLE *Handles,\r
1050 IN UINTN HandleCount,\r
1051 IN EFI_GUID *FormSetGuid, OPTIONAL\r
1052 IN UINT16 FormId, OPTIONAL\r
1053 IN CONST EFI_SCREEN_DESCRIPTOR *ScreenDimensions, OPTIONAL\r
1054 OUT EFI_BROWSER_ACTION_REQUEST *ActionRequest OPTIONAL\r
ed66e1bc 1055 );\r
7936fb6a 1056\r
1057/**\r
1058 This function is called by a callback handler to retrieve uncommitted state\r
1059 data from the browser.\r
1060\r
1061 @param This A pointer to the EFI_FORM_BROWSER2_PROTOCOL\r
1062 instance.\r
1063 @param ResultsDataSize A pointer to the size of the buffer associated\r
1064 with ResultsData.\r
1065 @param ResultsData A string returned from an IFR browser or\r
1066 equivalent. The results string will have no\r
1067 routing information in them.\r
1068 @param RetrieveData A BOOLEAN field which allows an agent to retrieve\r
1069 (if RetrieveData = TRUE) data from the uncommitted\r
1070 browser state information or set (if RetrieveData\r
1071 = FALSE) data in the uncommitted browser state\r
1072 information.\r
1073 @param VariableGuid An optional field to indicate the target variable\r
1074 GUID name to use.\r
1075 @param VariableName An optional field to indicate the target\r
1076 human-readable variable name.\r
1077\r
1078 @retval EFI_SUCCESS The results have been distributed or are awaiting\r
1079 distribution.\r
1080 @retval EFI_BUFFER_TOO_SMALL The ResultsDataSize specified was too small to\r
1081 contain the results data.\r
1082\r
1083**/\r
1084EFI_STATUS\r
1085EFIAPI\r
1086BrowserCallback (\r
1087 IN CONST EFI_FORM_BROWSER2_PROTOCOL *This,\r
1088 IN OUT UINTN *ResultsDataSize,\r
1089 IN OUT EFI_STRING ResultsData,\r
1090 IN BOOLEAN RetrieveData,\r
1091 IN CONST EFI_GUID *VariableGuid, OPTIONAL\r
1092 IN CONST CHAR16 *VariableName OPTIONAL\r
ed66e1bc 1093 );\r
7936fb6a 1094\r
b18e7050
ED
1095/**\r
1096 Find menu which will show next time.\r
1097\r
1098 @param Selection On input, Selection tell setup browser the information\r
1099 about the Selection, form and formset to be displayed.\r
1100 On output, Selection return the screen item that is selected\r
1101 by user.\r
7c6c064c
ED
1102 @param SettingLevel Input Settting level, if it is FormLevel, just exit current form. \r
1103 else, we need to exit current formset.\r
b18e7050 1104 \r
7c6c064c
ED
1105 @retval TRUE Exit current form.\r
1106 @retval FALSE User press ESC and keep in current form.\r
b18e7050
ED
1107**/\r
1108BOOLEAN\r
1109FindNextMenu (\r
7c6c064c
ED
1110 IN OUT UI_MENU_SELECTION *Selection,\r
1111 IN BROWSER_SETTING_SCOPE SettingLevel\r
b18e7050
ED
1112 );\r
1113\r
1114/**\r
7c6c064c 1115 check whether the form need to update the NV.\r
b18e7050 1116\r
7c6c064c 1117 @param Form Form data structure.\r
b18e7050 1118\r
7c6c064c
ED
1119 @retval TRUE Need to update the NV.\r
1120 @retval FALSE No need to update the NV.\r
b18e7050 1121**/\r
7c6c064c
ED
1122BOOLEAN\r
1123IsNvUpdateRequiredForForm (\r
1124 IN FORM_BROWSER_FORM *Form\r
b18e7050
ED
1125 );\r
1126\r
1127/**\r
1128 check whether the formset need to update the NV.\r
1129\r
1130 @param FormSet FormSet data structure.\r
1131\r
1132 @retval TRUE Need to update the NV.\r
1133 @retval FALSE No need to update the NV.\r
1134**/\r
7c6c064c
ED
1135BOOLEAN\r
1136IsNvUpdateRequiredForFormSet (\r
25361615 1137 IN FORM_BROWSER_FORMSET *FormSet\r
b9feb4bd
ED
1138 );\r
1139\r
7c6c064c
ED
1140/**\r
1141 Check whether the storage data for current form set is changed.\r
1142\r
1143 @param FormSet FormSet data structure.\r
1144\r
1145 @retval TRUE Data is changed.\r
1146 @retval FALSE Data is not changed.\r
1147**/\r
1148BOOLEAN \r
1149IsStorageDataChangedForFormSet (\r
1150 IN FORM_BROWSER_FORMSET *FormSet\r
1151 );\r
1152\r
b18e7050
ED
1153/**\r
1154 Call the call back function for the question and process the return action.\r
1155\r
1156 @param Selection On input, Selection tell setup browser the information\r
1157 about the Selection, form and formset to be displayed.\r
1158 On output, Selection return the screen item that is selected\r
1159 by user.\r
798e4d22
ED
1160 @param FormSet The formset this question belong to.\r
1161 @param Form The form this question belong to.\r
1162 @param Question The Question which need to call.\r
b18e7050
ED
1163 @param Action The action request.\r
1164 @param SkipSaveOrDiscard Whether skip save or discard action.\r
1165\r
1166 @retval EFI_SUCCESS The call back function excutes successfully.\r
1167 @return Other value if the call back function failed to excute. \r
1168**/\r
1169EFI_STATUS \r
1170ProcessCallBackFunction (\r
1171 IN OUT UI_MENU_SELECTION *Selection,\r
798e4d22
ED
1172 IN FORM_BROWSER_FORMSET *FormSet,\r
1173 IN FORM_BROWSER_FORM *Form,\r
b18e7050
ED
1174 IN FORM_BROWSER_STATEMENT *Question,\r
1175 IN EFI_BROWSER_ACTION Action,\r
1176 IN BOOLEAN SkipSaveOrDiscard\r
1177 );\r
9776099f
ED
1178 \r
1179/**\r
1180 Call the retrieve type call back function for one question to get the initialize data.\r
1181 \r
1182 This function only used when in the initialize stage, because in this stage, the \r
1183 Selection->Form is not ready. For other case, use the ProcessCallBackFunction instead.\r
1184\r
1185 @param ConfigAccess The config access protocol produced by the hii driver.\r
1186 @param Statement The Question which need to call.\r
1187\r
1188 @retval EFI_SUCCESS The call back function excutes successfully.\r
1189 @return Other value if the call back function failed to excute. \r
1190**/\r
1191EFI_STATUS \r
1192ProcessRetrieveForQuestion (\r
1193 IN EFI_HII_CONFIG_ACCESS_PROTOCOL *ConfigAccess,\r
1194 IN FORM_BROWSER_STATEMENT *Statement\r
1195 );\r
48a9d5f7
LG
1196\r
1197/**\r
1198 Find the matched FormSet context in the backup maintain list based on HiiHandle.\r
1199 \r
1200 @param Handle The Hii Handle.\r
1201 \r
1202 @return the found FormSet context. If no found, NULL will return.\r
1203\r
1204**/\r
1205FORM_BROWSER_FORMSET * \r
1206GetFormSetFromHiiHandle (\r
1207 EFI_HII_HANDLE Handle\r
1208 );\r
1209\r
1210/**\r
1211 Check whether the input HII handle is the FormSet that is being used.\r
1212 \r
1213 @param Handle The Hii Handle.\r
1214 \r
1215 @retval TRUE HII handle is being used.\r
1216 @retval FALSE HII handle is not being used.\r
1217\r
1218**/\r
1219BOOLEAN\r
1220IsHiiHandleInBrowserContext (\r
1221 EFI_HII_HANDLE Handle\r
1222 );\r
1223\r
1224/**\r
1225 Configure what scope the hot key will impact.\r
1226 All hot keys have the same scope. The mixed hot keys with the different level are not supported.\r
1227 If no scope is set, the default scope will be FormSet level.\r
1228 After all registered hot keys are removed, previous Scope can reset to another level.\r
1229 \r
1230 @param[in] Scope Scope level to be set. \r
1231 \r
1232 @retval EFI_SUCCESS Scope is set correctly.\r
1233 @retval EFI_INVALID_PARAMETER Scope is not the valid value specified in BROWSER_SETTING_SCOPE. \r
1234 @retval EFI_UNSPPORTED Scope level is different from current one that the registered hot keys have.\r
1235\r
1236**/\r
1237EFI_STATUS\r
1238EFIAPI\r
1239SetScope (\r
1240 IN BROWSER_SETTING_SCOPE Scope\r
1241 );\r
1242\r
1243/**\r
1244 Register the hot key with its browser action, or unregistered the hot key.\r
1245 Only support hot key that is not printable character (control key, function key, etc.).\r
1246 If the action value is zero, the hot key will be unregistered if it has been registered.\r
1247 If the same hot key has been registered, the new action and help string will override the previous ones.\r
1248 \r
1249 @param[in] KeyData A pointer to a buffer that describes the keystroke\r
1250 information for the hot key. Its type is EFI_INPUT_KEY to \r
1251 be supported by all ConsoleIn devices.\r
1252 @param[in] Action Action value that describes what action will be trigged when the hot key is pressed. \r
1253 @param[in] DefaultId Specifies the type of defaults to retrieve, which is only for DEFAULT action.\r
1254 @param[in] HelpString Help string that describes the hot key information.\r
1255 Its value may be NULL for the unregistered hot key.\r
1256 \r
1257 @retval EFI_SUCCESS Hot key is registered or unregistered.\r
1258 @retval EFI_INVALID_PARAMETER KeyData is NULL.\r
1259 @retval EFI_NOT_FOUND KeyData is not found to be unregistered.\r
1260 @retval EFI_UNSUPPORTED Key represents a printable character. It is conflicted with Browser.\r
1261**/\r
1262EFI_STATUS\r
1263EFIAPI\r
1264RegisterHotKey (\r
1265 IN EFI_INPUT_KEY *KeyData,\r
1266 IN UINT32 Action,\r
1267 IN UINT16 DefaultId,\r
1268 IN EFI_STRING HelpString OPTIONAL\r
1269 );\r
1270\r
1271/**\r
1272 Register Exit handler function. \r
1273 When more than one handler function is registered, the latter one will override the previous one. \r
1274 When NULL handler is specified, the previous Exit handler will be unregistered. \r
1275 \r
1276 @param[in] Handler Pointer to handler function. \r
1277\r
1278**/\r
1279VOID\r
1280EFIAPI\r
1281RegiserExitHandler (\r
1282 IN EXIT_HANDLER Handler\r
1283 );\r
1284\r
7c6c064c
ED
1285/**\r
1286 \r
1287 Check whether the browser data has been modified. \r
1288\r
1289 @retval TRUE Browser data is changed.\r
1290 @retval FALSE No browser data is changed.\r
1291\r
1292**/\r
1293BOOLEAN \r
1294EFIAPI\r
1295IsBrowserDataModified (\r
1296 VOID\r
1297 );\r
1298\r
1299/**\r
1300 \r
1301 Execute the action requested by the Action parameter. \r
1302\r
1303 @param[in] Action Execute the request action.\r
1304 @param[in] DefaultId The default Id info when need to load default value.\r
1305\r
1306 @retval EFI_SUCCESS Execute the request action succss.\r
1307 @retval EFI_INVALID_PARAMETER The input action value is invalid.\r
1308\r
1309**/\r
1310EFI_STATUS \r
1311EFIAPI\r
1312ExecuteAction (\r
1313 IN UINT32 Action,\r
1314 IN UINT16 DefaultId\r
1315 );\r
1316\r
48a9d5f7
LG
1317/**\r
1318 Create reminder to let user to choose save or discard the changed browser data.\r
1319 Caller can use it to actively check the changed browser data.\r
1320\r
1321 @retval BROWSER_NO_CHANGES No browser data is changed.\r
1322 @retval BROWSER_SAVE_CHANGES The changed browser data is saved.\r
1323 @retval BROWSER_DISCARD_CHANGES The changed browser data is discard.\r
1324\r
1325**/\r
1326UINT32\r
1327EFIAPI\r
1328SaveReminder (\r
1329 VOID\r
1330 );\r
1331\r
1332/**\r
1333 Find the registered HotKey based on KeyData.\r
1334 \r
1335 @param[in] KeyData A pointer to a buffer that describes the keystroke\r
1336 information for the hot key.\r
1337\r
1338 @return The registered HotKey context. If no found, NULL will return.\r
1339**/\r
1340BROWSER_HOT_KEY *\r
1341GetHotKeyFromRegisterList (\r
1342 IN EFI_INPUT_KEY *KeyData\r
1343 );\r
1344\r
7c6c064c
ED
1345/**\r
1346\r
1347 Get FORM_BROWSER_STATEMENT from FORM_DISPLAY_ENGINE_STATEMENT based on the OpCode info.\r
1348\r
1349 @param DisplayStatement The input FORM_DISPLAY_ENGINE_STATEMENT.\r
1350\r
1351 @retval FORM_BROWSER_STATEMENT The return FORM_BROWSER_STATEMENT info.\r
1352\r
1353**/\r
1354FORM_BROWSER_STATEMENT *\r
1355GetBrowserStatement (\r
1356 IN FORM_DISPLAY_ENGINE_STATEMENT *DisplayStatement\r
1357 );\r
1358 \r
1359/**\r
1360 Password may be stored as encrypted by Configuration Driver. When change a\r
1361 password, user will be challenged with old password. To validate user input old\r
1362 password, we will send the clear text to Configuration Driver via Callback().\r
1363 Configuration driver is responsible to check the passed in password and return\r
1364 the validation result. If validation pass, state machine in password Callback()\r
1365 will transit from BROWSER_STATE_VALIDATE_PASSWORD to BROWSER_STATE_SET_PASSWORD.\r
1366 After user type in new password twice, Callback() will be invoked to send the\r
1367 new password to Configuration Driver.\r
1368\r
1369 @param Selection Pointer to UI_MENU_SELECTION.\r
1370 @param MenuOption The MenuOption for this password Question.\r
1371 @param String The clear text of password.\r
1372\r
1373 @retval EFI_NOT_AVAILABLE_YET Callback() request to terminate password input.\r
1374 @return In state of BROWSER_STATE_VALIDATE_PASSWORD:\r
1375 @retval EFI_SUCCESS Password correct, Browser will prompt for new\r
1376 password.\r
1377 @retval EFI_NOT_READY Password incorrect, Browser will show error\r
1378 message.\r
1379 @retval Other Browser will do nothing.\r
1380 @return In state of BROWSER_STATE_SET_PASSWORD:\r
1381 @retval EFI_SUCCESS Set password success.\r
1382 @retval Other Set password failed.\r
1383\r
1384**/\r
1385EFI_STATUS\r
1386PasswordCallback (\r
1387 IN UI_MENU_SELECTION *Selection,\r
1388 IN FORM_BROWSER_STATEMENT *Question,\r
1389 IN CHAR16 *String\r
1390 );\r
1391\r
1392/**\r
1393 Display error message for invalid password.\r
1394\r
1395**/\r
1396VOID\r
1397PasswordInvalid (\r
1398 VOID\r
1399 );\r
1400\r
1401/**\r
1402 The worker function that send the displays to the screen. On output,\r
1403 the selection made by user is returned.\r
1404\r
1405 @param Selection On input, Selection tell setup browser the information\r
1406 about the Selection, form and formset to be displayed.\r
1407 On output, Selection return the screen item that is selected\r
1408 by user.\r
1409\r
1410 @retval EFI_SUCCESS The page is displayed successfully.\r
1411 @return Other value if the page failed to be diplayed.\r
1412\r
1413**/\r
1414EFI_STATUS\r
1415SetupBrowser (\r
1416 IN OUT UI_MENU_SELECTION *Selection\r
1417 );\r
1418 \r
1419/**\r
1420 Free up the resource allocated for all strings required\r
1421 by Setup Browser.\r
1422\r
1423**/\r
1424VOID\r
1425FreeBrowserStrings (\r
1426 VOID\r
1427 );\r
1428\r
1429/**\r
1430 Create a menu with specified formset GUID and form ID, and add it as a child\r
1431 of the given parent menu.\r
1432\r
1433 @param HiiHandle Hii handle related to this formset.\r
1434 @param FormSetGuid The Formset Guid of menu to be added.\r
1435 @param FormId The Form ID of menu to be added.\r
1436 @param QuestionId The question id of this menu to be added.\r
1437\r
1438 @return A pointer to the newly added menu or NULL if memory is insufficient.\r
1439\r
1440**/\r
1441FORM_ENTRY_INFO *\r
1442UiAddMenuList (\r
1443 IN EFI_HII_HANDLE HiiHandle,\r
1444 IN EFI_GUID *FormSetGuid,\r
1445 IN UINT16 FormId,\r
1446 IN UINT16 QuestionId\r
1447 );\r
1448\r
1449/**\r
1450 Search Menu with given FormSetGuid and FormId in all cached menu list.\r
1451\r
1452 @param HiiHandle HiiHandle for FormSet.\r
1453 @param FormSetGuid The Formset GUID of the menu to search.\r
1454 @param FormId The Form ID of menu to search.\r
1455\r
1456 @return A pointer to menu found or NULL if not found.\r
1457\r
1458**/\r
1459FORM_ENTRY_INFO *\r
1460UiFindMenuList (\r
1461 IN EFI_HII_HANDLE HiiHandle, \r
1462 IN EFI_GUID *FormSetGuid,\r
1463 IN UINT16 FormId\r
1464 );\r
1465\r
1466/**\r
1467 Free Menu list linked list.\r
1468\r
1469 @param MenuListHead One Menu list point in the menu list.\r
1470\r
1471**/\r
1472VOID\r
1473UiFreeMenuList (\r
1474 LIST_ENTRY *MenuListHead\r
1475 );\r
1476\r
1477/**\r
1478 Find parent menu for current menu.\r
1479\r
1480 @param CurrentMenu Current Menu\r
1481\r
1482 @retval The parent menu for current menu.\r
1483**/\r
1484FORM_ENTRY_INFO *\r
1485UiFindParentMenu (\r
1486 IN FORM_ENTRY_INFO *CurrentMenu\r
1487 );\r
1488\r
1489/**\r
1490 Search an Option of a Question by its value.\r
1491\r
1492 @param Question The Question\r
1493 @param OptionValue Value for Option to be searched.\r
1494\r
1495 @retval Pointer Pointer to the found Option.\r
1496 @retval NULL Option not found.\r
1497\r
1498**/\r
1499QUESTION_OPTION *\r
1500ValueToOption (\r
1501 IN FORM_BROWSER_STATEMENT *Question,\r
1502 IN EFI_HII_VALUE *OptionValue\r
1503 );\r
1504/**\r
1505 Return data element in an Array by its Index.\r
1506\r
1507 @param Array The data array.\r
1508 @param Type Type of the data in this array.\r
1509 @param Index Zero based index for data in this array.\r
1510\r
1511 @retval Value The data to be returned\r
1512\r
1513**/\r
1514UINT64\r
1515GetArrayData (\r
1516 IN VOID *Array,\r
1517 IN UINT8 Type,\r
1518 IN UINTN Index\r
1519 );\r
1520\r
1521/**\r
1522 Set value of a data element in an Array by its Index.\r
1523\r
1524 @param Array The data array.\r
1525 @param Type Type of the data in this array.\r
1526 @param Index Zero based index for data in this array.\r
1527 @param Value The value to be set.\r
1528\r
1529**/\r
1530VOID\r
1531SetArrayData (\r
1532 IN VOID *Array,\r
1533 IN UINT8 Type,\r
1534 IN UINTN Index,\r
1535 IN UINT64 Value\r
1536 );\r
1537\r
1538/**\r
1539 Compare two Hii value.\r
1540 \r
1541 @param Value1 Expression value to compare on left-hand.\r
1542 @param Value2 Expression value to compare on right-hand.\r
1543 @param Result Return value after compare.\r
1544 retval 0 Two operators equal.\r
1545 return Positive value if Value1 is greater than Value2.\r
1546 retval Negative value if Value1 is less than Value2.\r
1547 @param HiiHandle Only required for string compare.\r
1548 \r
1549 @retval other Could not perform compare on two values.\r
1550 @retval EFI_SUCCESS Compare the value success.\r
1551 \r
1552**/\r
1553EFI_STATUS\r
1554CompareHiiValue (\r
1555 IN EFI_HII_VALUE *Value1,\r
1556 IN EFI_HII_VALUE *Value2,\r
1557 OUT INTN *Result,\r
1558 IN EFI_HII_HANDLE HiiHandle OPTIONAL\r
1559 );\r
1560\r
1561/**\r
1562 Perform Password check. \r
1563 Passwork may be encrypted by driver that requires the specific check.\r
1564 \r
1565 @param Form Form where Password Statement is in.\r
1566 @param Statement Password statement\r
1567 @param PasswordString Password string to be checked. It may be NULL.\r
1568 NULL means to restore password.\r
1569 "" string can be used to checked whether old password does exist.\r
1570 \r
1571 @return Status Status of Password check.\r
1572**/\r
1573EFI_STATUS\r
1574EFIAPI\r
1575PasswordCheck (\r
1576 IN FORM_DISPLAY_ENGINE_FORM *Form,\r
1577 IN FORM_DISPLAY_ENGINE_STATEMENT *Statement,\r
1578 IN EFI_STRING PasswordString OPTIONAL\r
1579 );\r
1580\r
1581/**\r
1582\r
1583 Get FORM_BROWSER_STATEMENT from FORM_DISPLAY_ENGINE_STATEMENT based on the OpCode info.\r
1584\r
1585 @param DisplayStatement The input FORM_DISPLAY_ENGINE_STATEMENT.\r
1586\r
1587 @retval FORM_BROWSER_STATEMENT The return FORM_BROWSER_STATEMENT info.\r
1588\r
1589**/\r
1590FORM_BROWSER_STATEMENT *\r
1591GetBrowserStatement (\r
1592 IN FORM_DISPLAY_ENGINE_STATEMENT *DisplayStatement\r
1593 );\r
1594 \r
1595/**\r
1596\r
1597 Initialize the Display form structure data.\r
1598\r
1599**/\r
1600VOID\r
1601InitializeDisplayFormData (\r
1602 VOID\r
1603 );\r
1604\r
1605\r
0a6f8af5
ED
1606/**\r
1607 Base on the current formset info, clean the ConfigRequest string in browser storage.\r
1608\r
1609 @param FormSet Pointer of the FormSet\r
1610\r
1611**/\r
1612VOID\r
1613CleanBrowserStorage (\r
1614 IN OUT FORM_BROWSER_FORMSET *FormSet\r
1615 );\r
07d7dbae
ED
1616\r
1617/**\r
1618 Find HII Handle in the HII database associated with given Device Path.\r
1619\r
1620 If DevicePath is NULL, then ASSERT.\r
1621\r
1622 @param DevicePath Device Path associated with the HII package list\r
1623 handle.\r
1624 @param FormsetGuid The formset guid for this formset.\r
1625\r
1626 @retval Handle HII package list Handle associated with the Device\r
1627 Path.\r
1628 @retval NULL Hii Package list handle is not found.\r
1629\r
1630**/\r
1631EFI_HII_HANDLE\r
1632DevicePathToHiiHandle (\r
1633 IN EFI_DEVICE_PATH_PROTOCOL *DevicePath,\r
1634 IN EFI_GUID *FormsetGuid\r
1635 );\r
1636\r
7936fb6a 1637#endif\r