]> git.proxmox.com Git - mirror_edk2.git/blob - MdeModulePkg/Universal/SetupBrowserDxe/Setup.h
ArmPlatformPkg/Bds: Fix the update of existing boot entries
[mirror_edk2.git] / MdeModulePkg / Universal / SetupBrowserDxe / Setup.h
1 /** @file
2 Private MACRO, structure and function definitions for Setup Browser module.
3
4 Copyright (c) 2007 - 2011, Intel Corporation. All rights reserved.<BR>
5 This program and the accompanying materials
6 are licensed and made available under the terms and conditions of the BSD License
7 which accompanies this distribution. The full text of the license may be found at
8 http://opensource.org/licenses/bsd-license.php
9
10 THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
11 WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
12
13
14 **/
15
16 #ifndef _SETUP_H_
17 #define _SETUP_H_
18
19
20 #include <PiDxe.h>
21
22 #include <Protocol/SimpleTextOut.h>
23 #include <Protocol/SimpleTextIn.h>
24 #include <Protocol/FormBrowser2.h>
25 #include <Protocol/DevicePath.h>
26 #include <Protocol/UnicodeCollation.h>
27 #include <Protocol/HiiConfigAccess.h>
28 #include <Protocol/HiiConfigRouting.h>
29 #include <Protocol/HiiDatabase.h>
30 #include <Protocol/HiiString.h>
31 #include <Protocol/UserManager.h>
32
33 #include <Guid/MdeModuleHii.h>
34 #include <Guid/HiiPlatformSetupFormset.h>
35 #include <Guid/HiiFormMapMethodGuid.h>
36
37 #include <Library/PrintLib.h>
38 #include <Library/DebugLib.h>
39 #include <Library/BaseMemoryLib.h>
40 #include <Library/UefiRuntimeServicesTableLib.h>
41 #include <Library/UefiDriverEntryPoint.h>
42 #include <Library/UefiBootServicesTableLib.h>
43 #include <Library/BaseLib.h>
44 #include <Library/MemoryAllocationLib.h>
45 #include <Library/HiiLib.h>
46 #include <Library/PcdLib.h>
47 #include <Library/DevicePathLib.h>
48
49 #include "Colors.h"
50
51 //
52 // This is the generated header file which includes whatever needs to be exported (strings + IFR)
53 //
54
55 extern UINT8 SetupBrowserStrings[];
56
57 //
58 // Screen definitions
59 //
60 #define BANNER_HEIGHT 6
61 #define BANNER_COLUMNS 3
62 #define BANNER_LEFT_COLUMN_INDENT 1
63
64 #define FRONT_PAGE_HEADER_HEIGHT 6
65 #define NONE_FRONT_PAGE_HEADER_HEIGHT 3
66 #define LEFT_SKIPPED_COLUMNS 3
67 #define FOOTER_HEIGHT 4
68 #define STATUS_BAR_HEIGHT 1
69 #define SCROLL_ARROW_HEIGHT 1
70 #define POPUP_PAD_SPACE_COUNT 5
71 #define POPUP_FRAME_WIDTH 2
72
73 //
74 // Definition for function key setting
75 //
76 #define NONE_FUNCTION_KEY_SETTING 0
77 #define DEFAULT_FUNCTION_KEY_SETTING (FUNCTION_NINE | FUNCTION_TEN)
78
79 #define FUNCTION_NINE (1 << 2)
80 #define FUNCTION_TEN (1 << 3)
81
82 typedef struct {
83 EFI_GUID FormSetGuid;
84 UINTN KeySetting;
85 } FUNCTIION_KEY_SETTING;
86
87 //
88 // Character definitions
89 //
90 #define CHAR_SPACE 0x0020
91 #define UPPER_LOWER_CASE_OFFSET 0x20
92
93 //
94 // Time definitions
95 //
96 #define ONE_SECOND 10000000
97
98 //
99 // Display definitions
100 //
101 #define LEFT_HYPER_DELIMITER L'<'
102 #define RIGHT_HYPER_DELIMITER L'>'
103
104 #define LEFT_ONEOF_DELIMITER L'<'
105 #define RIGHT_ONEOF_DELIMITER L'>'
106
107 #define LEFT_NUMERIC_DELIMITER L'['
108 #define RIGHT_NUMERIC_DELIMITER L']'
109
110 #define LEFT_CHECKBOX_DELIMITER L'['
111 #define RIGHT_CHECKBOX_DELIMITER L']'
112
113 #define CHECK_ON L'X'
114 #define CHECK_OFF L' '
115
116 #define TIME_SEPARATOR L':'
117 #define DATE_SEPARATOR L'/'
118
119 #define YES_ANSWER L'Y'
120 #define NO_ANSWER L'N'
121
122 //
123 // This is the Input Error Message
124 //
125 #define INPUT_ERROR 1
126
127 //
128 // This is the NV RAM update required Message
129 //
130 #define NV_UPDATE_REQUIRED 2
131
132 //
133 // Refresh the Status Bar with flags
134 //
135 #define REFRESH_STATUS_BAR 0xff
136
137 //
138 // Incremental string lenght of ConfigRequest
139 //
140 #define CONFIG_REQUEST_STRING_INCREMENTAL 1024
141
142 //
143 // HII value compare result
144 //
145 #define HII_VALUE_UNDEFINED 0
146 #define HII_VALUE_EQUAL 1
147 #define HII_VALUE_LESS_THAN 2
148 #define HII_VALUE_GREATER_THAN 3
149
150 //
151 // Incremental size of stack for expression
152 //
153 #define EXPRESSION_STACK_SIZE_INCREMENT 0x100
154
155 #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))
156
157
158 #define SETUP_DRIVER_SIGNATURE SIGNATURE_32 ('F', 'B', 'D', 'V')
159 typedef struct {
160 UINT32 Signature;
161
162 EFI_HANDLE Handle;
163
164 //
165 // Produced protocol
166 //
167 EFI_FORM_BROWSER2_PROTOCOL FormBrowser2;
168
169 } SETUP_DRIVER_PRIVATE_DATA;
170
171 typedef struct {
172 EFI_STRING_ID Banner[BANNER_HEIGHT][BANNER_COLUMNS];
173 } BANNER_DATA;
174
175 //
176 // IFR relative definition
177 //
178 #define EFI_HII_EXPRESSION_INCONSISTENT_IF 0
179 #define EFI_HII_EXPRESSION_NO_SUBMIT_IF 1
180 #define EFI_HII_EXPRESSION_GRAY_OUT_IF 2
181 #define EFI_HII_EXPRESSION_SUPPRESS_IF 3
182 #define EFI_HII_EXPRESSION_DISABLE_IF 4
183 #define EFI_HII_EXPRESSION_VALUE 5
184 #define EFI_HII_EXPRESSION_RULE 6
185 #define EFI_HII_EXPRESSION_READ 7
186 #define EFI_HII_EXPRESSION_WRITE 8
187
188 #define EFI_HII_VARSTORE_BUFFER 0
189 #define EFI_HII_VARSTORE_NAME_VALUE 1
190 #define EFI_HII_VARSTORE_EFI_VARIABLE 2
191 #define EFI_HII_VARSTORE_EFI_VARIABLE_BUFFER 3
192
193 #define FORM_INCONSISTENT_VALIDATION 0
194 #define FORM_NO_SUBMIT_VALIDATION 1
195
196 #define FORMSET_CLASS_PLATFORM_SETUP 0x0001
197 #define FORMSET_CLASS_FRONT_PAGE 0x0002
198
199 typedef struct {
200 UINT8 Type;
201 EFI_IFR_TYPE_VALUE Value;
202 } EFI_HII_VALUE;
203
204 #define NAME_VALUE_NODE_SIGNATURE SIGNATURE_32 ('N', 'V', 'S', 'T')
205
206 typedef struct {
207 UINTN Signature;
208 LIST_ENTRY Link;
209 CHAR16 *Name;
210 CHAR16 *Value;
211 CHAR16 *EditValue;
212 } NAME_VALUE_NODE;
213
214 #define NAME_VALUE_NODE_FROM_LINK(a) CR (a, NAME_VALUE_NODE, Link, NAME_VALUE_NODE_SIGNATURE)
215
216 #define FORMSET_STORAGE_SIGNATURE SIGNATURE_32 ('F', 'S', 'T', 'G')
217
218 typedef struct {
219 UINTN Signature;
220 LIST_ENTRY Link;
221
222 UINT8 Type; // Storage type
223
224 UINT16 VarStoreId;
225 EFI_GUID Guid;
226
227 CHAR16 *Name; // For EFI_IFR_VARSTORE
228 UINT16 Size;
229 UINT8 *Buffer;
230 UINT8 *EditBuffer; // Edit copy for Buffer Storage
231
232 LIST_ENTRY NameValueListHead; // List of NAME_VALUE_NODE
233
234 UINT32 Attributes; // For EFI_IFR_VARSTORE_EFI: EFI Variable attribute
235
236 CHAR16 *ConfigHdr; // <ConfigHdr>
237 CHAR16 *ConfigRequest; // <ConfigRequest> = <ConfigHdr> + <RequestElement>
238 UINTN ElementCount; // Number of <RequestElement> in the <ConfigRequest>
239 UINTN SpareStrLen; // Spare length of ConfigRequest string buffer
240 } FORMSET_STORAGE;
241
242 #define FORMSET_STORAGE_FROM_LINK(a) CR (a, FORMSET_STORAGE, Link, FORMSET_STORAGE_SIGNATURE)
243
244 typedef union {
245 EFI_STRING_ID VarName;
246 UINT16 VarOffset;
247 } VAR_STORE_INFO;
248
249 #define EXPRESSION_OPCODE_SIGNATURE SIGNATURE_32 ('E', 'X', 'O', 'P')
250
251 typedef struct {
252 UINTN Signature;
253 LIST_ENTRY Link;
254
255 UINT8 Operand;
256
257 UINT8 Format; // For EFI_IFR_TO_STRING, EFI_IFR_FIND
258 UINT8 Flags; // For EFI_IFR_SPAN
259 UINT8 RuleId; // For EFI_IFR_RULE_REF
260
261 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
262
263 EFI_QUESTION_ID QuestionId; // For EFI_IFR_EQ_ID_ID, EFI_IFR_EQ_ID_VAL_LIST, EFI_IFR_QUESTION_REF1
264 EFI_QUESTION_ID QuestionId2;
265
266 UINT16 ListLength; // For EFI_IFR_EQ_ID_VAL_LIST
267 UINT16 *ValueList;
268
269 EFI_STRING_ID DevicePath; // For EFI_IFR_QUESTION_REF3_2, EFI_IFR_QUESTION_REF3_3
270 EFI_GUID Guid;
271
272 FORMSET_STORAGE *VarStorage; // For EFI_IFR_SET, EFI_IFR_GET
273 VAR_STORE_INFO VarStoreInfo;// For EFI_IFR_SET, EFI_IFR_GET
274 UINT8 ValueType; // For EFI_IFR_SET, EFI_IFR_GET
275 UINT8 ValueWidth; // For EFI_IFR_SET, EFI_IFR_GET
276 CHAR16 *ValueName; // For EFI_IFR_SET, EFI_IFR_GET
277 LIST_ENTRY MapExpressionList; // nested expressions inside of Map opcode.
278 } EXPRESSION_OPCODE;
279
280 #define EXPRESSION_OPCODE_FROM_LINK(a) CR (a, EXPRESSION_OPCODE, Link, EXPRESSION_OPCODE_SIGNATURE)
281
282 #define FORM_EXPRESSION_SIGNATURE SIGNATURE_32 ('F', 'E', 'X', 'P')
283
284 typedef struct {
285 UINTN Signature;
286 LIST_ENTRY Link;
287
288 UINT8 Type; // Type for this expression
289
290 UINT8 RuleId; // For EFI_IFR_RULE only
291 EFI_STRING_ID Error; // For EFI_IFR_NO_SUBMIT_IF, EFI_IFR_INCONSISTENT_IF only
292
293 EFI_HII_VALUE Result; // Expression evaluation result
294
295 LIST_ENTRY OpCodeListHead; // OpCodes consist of this expression (EXPRESSION_OPCODE)
296 } FORM_EXPRESSION;
297
298 #define FORM_EXPRESSION_FROM_LINK(a) CR (a, FORM_EXPRESSION, Link, FORM_EXPRESSION_SIGNATURE)
299
300 #define QUESTION_DEFAULT_SIGNATURE SIGNATURE_32 ('Q', 'D', 'F', 'T')
301
302 typedef struct {
303 UINTN Signature;
304 LIST_ENTRY Link;
305
306 UINT16 DefaultId;
307 EFI_HII_VALUE Value; // Default value
308
309 FORM_EXPRESSION *ValueExpression; // Not-NULL indicates default value is provided by EFI_IFR_VALUE
310 } QUESTION_DEFAULT;
311
312 #define QUESTION_DEFAULT_FROM_LINK(a) CR (a, QUESTION_DEFAULT, Link, QUESTION_DEFAULT_SIGNATURE)
313
314 #define QUESTION_OPTION_SIGNATURE SIGNATURE_32 ('Q', 'O', 'P', 'T')
315
316 typedef struct {
317 UINTN Signature;
318 LIST_ENTRY Link;
319
320 EFI_STRING_ID Text;
321 UINT8 Flags;
322 EFI_HII_VALUE Value;
323 EFI_IMAGE_ID ImageId;
324
325 FORM_EXPRESSION *SuppressExpression; // Non-NULL indicates nested inside of SuppressIf
326 } QUESTION_OPTION;
327
328 #define QUESTION_OPTION_FROM_LINK(a) CR (a, QUESTION_OPTION, Link, QUESTION_OPTION_SIGNATURE)
329
330 #define FORM_BROWSER_STATEMENT_SIGNATURE SIGNATURE_32 ('F', 'S', 'T', 'A')
331
332 typedef struct {
333 UINTN Signature;
334 LIST_ENTRY Link;
335
336 UINT8 Operand; // The operand (first byte) of this Statement or Question
337
338 //
339 // Statement Header
340 //
341 EFI_STRING_ID Prompt;
342 EFI_STRING_ID Help;
343 EFI_STRING_ID TextTwo; // For EFI_IFR_TEXT
344
345 //
346 // Question Header
347 //
348 EFI_QUESTION_ID QuestionId; // The value of zero is reserved
349 EFI_VARSTORE_ID VarStoreId; // A value of zero indicates no variable storage
350 FORMSET_STORAGE *Storage;
351 VAR_STORE_INFO VarStoreInfo;
352 UINT16 StorageWidth;
353 UINT8 QuestionFlags;
354 CHAR16 *VariableName; // Name/Value or EFI Variable name
355 CHAR16 *BlockName; // Buffer storage block name: "OFFSET=...WIDTH=..."
356
357 EFI_HII_VALUE HiiValue; // Edit copy for checkbox, numberic, oneof
358 UINT8 *BufferValue; // Edit copy for string, password, orderedlist
359 UINT8 ValueType; // Data type for orderedlist value array
360
361 //
362 // OpCode specific members
363 //
364 UINT8 Flags; // for EFI_IFR_CHECKBOX, EFI_IFR_DATE, EFI_IFR_NUMERIC, EFI_IFR_ONE_OF,
365 // EFI_IFR_ORDERED_LIST, EFI_IFR_STRING,EFI_IFR_SUBTITLE,EFI_IFR_TIME, EFI_IFR_BANNER
366 UINT8 MaxContainers; // for EFI_IFR_ORDERED_LIST
367
368 UINT16 BannerLineNumber; // for EFI_IFR_BANNER, 1-based line number
369 EFI_STRING_ID QuestionConfig; // for EFI_IFR_ACTION, if 0 then no configuration string will be processed
370
371 UINT64 Minimum; // for EFI_IFR_ONE_OF/EFI_IFR_NUMERIC, it's Min/Max value
372 UINT64 Maximum; // for EFI_IFR_STRING/EFI_IFR_PASSWORD, it's Min/Max length
373 UINT64 Step;
374
375 EFI_DEFAULT_ID DefaultId; // for EFI_IFR_RESET_BUTTON
376 EFI_GUID RefreshGuid; // for EFI_IFR_REFRESH_ID
377
378 //
379 // Get from IFR parsing
380 //
381 FORM_EXPRESSION *ValueExpression; // nested EFI_IFR_VALUE, provide Question value and indicate Question is ReadOnly
382 LIST_ENTRY DefaultListHead; // nested EFI_IFR_DEFAULT list (QUESTION_DEFAULT), provide default values
383 LIST_ENTRY OptionListHead; // nested EFI_IFR_ONE_OF_OPTION list (QUESTION_OPTION)
384
385 EFI_IMAGE_ID ImageId; // nested EFI_IFR_IMAGE
386 UINT8 RefreshInterval; // nested EFI_IFR_REFRESH, refresh interval(in seconds) for Question value, 0 means no refresh
387 BOOLEAN InSubtitle; // nesting inside of EFI_IFR_SUBTITLE
388
389 LIST_ENTRY InconsistentListHead;// nested inconsistent expression list (FORM_EXPRESSION)
390 LIST_ENTRY NoSubmitListHead; // nested nosubmit expression list (FORM_EXPRESSION)
391 FORM_EXPRESSION *GrayOutExpression; // nesting inside of GrayOutIf
392 FORM_EXPRESSION *SuppressExpression; // nesting inside of SuppressIf
393 FORM_EXPRESSION *DisableExpression; // nesting inside of DisableIf
394
395 FORM_EXPRESSION *ReadExpression; // nested EFI_IFR_READ, provide this question value by read expression.
396 FORM_EXPRESSION *WriteExpression; // nested EFI_IFR_WRITE, evaluate write expression after this question value is set.
397 } FORM_BROWSER_STATEMENT;
398
399 #define FORM_BROWSER_STATEMENT_FROM_LINK(a) CR (a, FORM_BROWSER_STATEMENT, Link, FORM_BROWSER_STATEMENT_SIGNATURE)
400
401 #define FORM_BROWSER_CONFIG_REQUEST_SIGNATURE SIGNATURE_32 ('F', 'C', 'R', 'S')
402 typedef struct {
403 UINTN Signature;
404 LIST_ENTRY Link;
405
406 CHAR16 *ConfigRequest; // <ConfigRequest> = <ConfigHdr> + <RequestElement>
407 UINTN ElementCount; // Number of <RequestElement> in the <ConfigRequest>
408 UINTN SpareStrLen;
409
410 FORMSET_STORAGE *Storage;
411 } FORM_BROWSER_CONFIG_REQUEST;
412 #define FORM_BROWSER_CONFIG_REQUEST_FROM_LINK(a) CR (a, FORM_BROWSER_CONFIG_REQUEST, Link, FORM_BROWSER_CONFIG_REQUEST_SIGNATURE)
413
414 #define FORM_BROWSER_FORM_SIGNATURE SIGNATURE_32 ('F', 'F', 'R', 'M')
415 #define STANDARD_MAP_FORM_TYPE 0x01
416
417 typedef struct {
418 UINTN Signature;
419 LIST_ENTRY Link;
420
421 UINT16 FormId; // FormId of normal form or formmap form.
422 EFI_STRING_ID FormTitle; // FormTile of normal form, or FormMapMethod title of formmap form.
423 UINT16 FormType; // Specific form type for the different form.
424
425 EFI_IMAGE_ID ImageId;
426
427 BOOLEAN ModalForm; // Whether this is a modal form.
428
429 BOOLEAN NvUpdateRequired; // Whether this form has NV update request.
430
431 LIST_ENTRY ExpressionListHead; // List of Expressions (FORM_EXPRESSION)
432 LIST_ENTRY StatementListHead; // List of Statements and Questions (FORM_BROWSER_STATEMENT)
433 LIST_ENTRY ConfigRequestHead; // List of configreques for all storage.
434 FORM_EXPRESSION *SuppressExpression; // nesting inside of SuppressIf
435 } FORM_BROWSER_FORM;
436
437 #define FORM_BROWSER_FORM_FROM_LINK(a) CR (a, FORM_BROWSER_FORM, Link, FORM_BROWSER_FORM_SIGNATURE)
438
439 #define FORMSET_DEFAULTSTORE_SIGNATURE SIGNATURE_32 ('F', 'D', 'F', 'S')
440
441 typedef struct {
442 UINTN Signature;
443 LIST_ENTRY Link;
444
445 UINT16 DefaultId;
446 EFI_STRING_ID DefaultName;
447 } FORMSET_DEFAULTSTORE;
448
449 #define FORMSET_DEFAULTSTORE_FROM_LINK(a) CR (a, FORMSET_DEFAULTSTORE, Link, FORMSET_DEFAULTSTORE_SIGNATURE)
450
451 typedef struct {
452 EFI_HII_HANDLE HiiHandle;
453 EFI_HANDLE DriverHandle;
454 EFI_HII_CONFIG_ACCESS_PROTOCOL *ConfigAccess;
455 EFI_DEVICE_PATH_PROTOCOL *DevicePath;
456
457 UINTN IfrBinaryLength;
458 UINT8 *IfrBinaryData;
459
460 EFI_GUID Guid;
461 EFI_STRING_ID FormSetTitle;
462 EFI_STRING_ID Help;
463 UINT8 NumberOfClassGuid;
464 EFI_GUID ClassGuid[3]; // Up to three ClassGuid
465 UINT16 Class; // Tiano extended Class code
466 UINT16 SubClass; // Tiano extended Subclass code
467 EFI_IMAGE_ID ImageId;
468
469 FORM_BROWSER_STATEMENT *StatementBuffer; // Buffer for all Statements and Questions
470 EXPRESSION_OPCODE *ExpressionBuffer; // Buffer for all Expression OpCode
471
472 LIST_ENTRY StorageListHead; // Storage list (FORMSET_STORAGE)
473 LIST_ENTRY DefaultStoreListHead; // DefaultStore list (FORMSET_DEFAULTSTORE)
474 LIST_ENTRY FormListHead; // Form list (FORM_BROWSER_FORM)
475 LIST_ENTRY ExpressionListHead; // List of Expressions (FORM_EXPRESSION)
476 } FORM_BROWSER_FORMSET;
477
478 #define BROWSER_CONTEXT_SIGNATURE SIGNATURE_32 ('B', 'C', 'T', 'X')
479
480 typedef struct {
481 UINTN Signature;
482 LIST_ENTRY Link;
483
484 //
485 // Globals defined in Setup.c
486 //
487 BANNER_DATA *BannerData;
488 UINTN ClassOfVfr;
489 UINTN FunctionKeySetting;
490 BOOLEAN ResetRequired;
491 UINT16 Direction;
492 EFI_SCREEN_DESCRIPTOR ScreenDimensions;
493 CHAR16 *FunctionNineString;
494 CHAR16 *FunctionTenString;
495 CHAR16 *EnterString;
496 CHAR16 *EnterCommitString;
497 CHAR16 *EnterEscapeString;
498 CHAR16 *EscapeString;
499 CHAR16 *SaveFailed;
500 CHAR16 *MoveHighlight;
501 CHAR16 *MakeSelection;
502 CHAR16 *DecNumericInput;
503 CHAR16 *HexNumericInput;
504 CHAR16 *ToggleCheckBox;
505 CHAR16 *PromptForData;
506 CHAR16 *PromptForPassword;
507 CHAR16 *PromptForNewPassword;
508 CHAR16 *ConfirmPassword;
509 CHAR16 *ConfirmError;
510 CHAR16 *PassowordInvalid;
511 CHAR16 *PressEnter;
512 CHAR16 *EmptyString;
513 CHAR16 *AreYouSure;
514 CHAR16 *YesResponse;
515 CHAR16 *NoResponse;
516 CHAR16 *MiniString;
517 CHAR16 *PlusString;
518 CHAR16 *MinusString;
519 CHAR16 *AdjustNumber;
520 CHAR16 *SaveChanges;
521 CHAR16 *OptionMismatch;
522 CHAR16 *FormSuppress;
523 CHAR16 PromptBlockWidth;
524 CHAR16 OptionBlockWidth;
525 CHAR16 HelpBlockWidth;
526 FORM_BROWSER_FORMSET *OldFormSet;
527
528 //
529 // Globals defined in Ui.c
530 //
531 LIST_ENTRY MenuOption;
532 VOID *MenuRefreshHead;
533 } BROWSER_CONTEXT;
534
535 #define BROWSER_CONTEXT_FROM_LINK(a) CR (a, BROWSER_CONTEXT, Link, BROWSER_CONTEXT_SIGNATURE)
536
537 extern EFI_HII_DATABASE_PROTOCOL *mHiiDatabase;
538 extern EFI_HII_STRING_PROTOCOL *mHiiString;
539 extern EFI_HII_CONFIG_ROUTING_PROTOCOL *mHiiConfigRouting;
540
541 extern BANNER_DATA *gBannerData;
542 extern EFI_HII_HANDLE gFrontPageHandle;
543 extern UINTN gClassOfVfr;
544 extern UINTN gFunctionKeySetting;
545 extern BOOLEAN gResetRequired;
546 extern EFI_HII_HANDLE gHiiHandle;
547 extern UINT16 gDirection;
548 extern EFI_SCREEN_DESCRIPTOR gScreenDimensions;
549
550 extern FORM_BROWSER_FORMSET *gOldFormSet;
551
552 //
553 // Browser Global Strings
554 //
555 extern CHAR16 *gFunctionNineString;
556 extern CHAR16 *gFunctionTenString;
557 extern CHAR16 *gEnterString;
558 extern CHAR16 *gEnterCommitString;
559 extern CHAR16 *gEnterEscapeString;
560 extern CHAR16 *gEscapeString;
561 extern CHAR16 *gSaveFailed;
562 extern CHAR16 *gMoveHighlight;
563 extern CHAR16 *gMakeSelection;
564 extern CHAR16 *gDecNumericInput;
565 extern CHAR16 *gHexNumericInput;
566 extern CHAR16 *gToggleCheckBox;
567 extern CHAR16 *gPromptForData;
568 extern CHAR16 *gPromptForPassword;
569 extern CHAR16 *gPromptForNewPassword;
570 extern CHAR16 *gConfirmPassword;
571 extern CHAR16 *gConfirmError;
572 extern CHAR16 *gPassowordInvalid;
573 extern CHAR16 *gPressEnter;
574 extern CHAR16 *gEmptyString;
575 extern CHAR16 *gAreYouSure;
576 extern CHAR16 *gYesResponse;
577 extern CHAR16 *gNoResponse;
578 extern CHAR16 *gMiniString;
579 extern CHAR16 *gPlusString;
580 extern CHAR16 *gMinusString;
581 extern CHAR16 *gAdjustNumber;
582 extern CHAR16 *gSaveChanges;
583 extern CHAR16 *gOptionMismatch;
584 extern CHAR16 *gFormSuppress;
585
586 extern CHAR16 gPromptBlockWidth;
587 extern CHAR16 gOptionBlockWidth;
588 extern CHAR16 gHelpBlockWidth;
589
590 extern EFI_GUID gZeroGuid;
591 extern EFI_GUID gTianoHiiIfrGuid;
592
593 #include "Ui.h"
594 //
595 // Global Procedure Defines
596 //
597
598 /**
599 Initialize the HII String Token to the correct values.
600
601 **/
602 VOID
603 InitializeBrowserStrings (
604 VOID
605 );
606
607 /**
608 Prints a unicode string to the default console,
609 using L"%s" format.
610
611 @param String String pointer.
612
613 @return Length of string printed to the console
614
615 **/
616 UINTN
617 PrintString (
618 IN CHAR16 *String
619 );
620
621 /**
622 Prints a chracter to the default console,
623 using L"%c" format.
624
625 @param Character Character to print.
626
627 @return Length of string printed to the console.
628
629 **/
630 UINTN
631 PrintChar (
632 CHAR16 Character
633 );
634
635 /**
636 Prints a formatted unicode string to the default console, at
637 the supplied cursor position.
638
639 @param Column The cursor position to print the string at.
640 @param Row The cursor position to print the string at
641 @param Fmt Format string
642 @param ... Variable argument list for formating string.
643
644 @return Length of string printed to the console
645
646 **/
647 UINTN
648 EFIAPI
649 PrintAt (
650 IN UINTN Column,
651 IN UINTN Row,
652 IN CHAR16 *Fmt,
653 ...
654 );
655
656 /**
657 Prints a unicode string to the default console, at
658 the supplied cursor position, using L"%s" format.
659
660 @param Column The cursor position to print the string at.
661 @param Row The cursor position to print the string at
662 @param String String pointer.
663
664 @return Length of string printed to the console
665
666 **/
667 UINTN
668 PrintStringAt (
669 IN UINTN Column,
670 IN UINTN Row,
671 IN CHAR16 *String
672 );
673
674 /**
675 Prints a chracter to the default console, at
676 the supplied cursor position, using L"%c" format.
677
678 @param Column The cursor position to print the string at.
679 @param Row The cursor position to print the string at.
680 @param Character Character to print.
681
682 @return Length of string printed to the console.
683
684 **/
685 UINTN
686 PrintCharAt (
687 IN UINTN Column,
688 IN UINTN Row,
689 CHAR16 Character
690 );
691
692 /**
693 Parse opcodes in the formset IFR binary.
694
695 @param FormSet Pointer of the FormSet data structure.
696
697 @retval EFI_SUCCESS Opcode parse success.
698 @retval Other Opcode parse fail.
699
700 **/
701 EFI_STATUS
702 ParseOpCodes (
703 IN FORM_BROWSER_FORMSET *FormSet
704 );
705
706 /**
707 Free resources allocated for a FormSet.
708
709 @param FormSet Pointer of the FormSet
710
711 **/
712 VOID
713 DestroyFormSet (
714 IN OUT FORM_BROWSER_FORMSET *FormSet
715 );
716
717 /**
718 This function displays the page frame.
719
720 @param Selection Selection contains the information about
721 the Selection, form and formset to be displayed.
722 Selection action may be updated in retrieve callback.
723 **/
724 VOID
725 DisplayPageFrame (
726 IN UI_MENU_SELECTION *Selection
727 );
728
729 /**
730 Create a new string in HII Package List.
731
732 @param String The String to be added
733 @param HiiHandle The package list in the HII database to insert the
734 specified string.
735
736 @return The output string.
737
738 **/
739 EFI_STRING_ID
740 NewString (
741 IN CHAR16 *String,
742 IN EFI_HII_HANDLE HiiHandle
743 );
744
745 /**
746 Delete a string from HII Package List.
747
748 @param StringId Id of the string in HII database.
749 @param HiiHandle The HII package list handle.
750
751 @retval EFI_SUCCESS The string was deleted successfully.
752
753 **/
754 EFI_STATUS
755 DeleteString (
756 IN EFI_STRING_ID StringId,
757 IN EFI_HII_HANDLE HiiHandle
758 );
759
760 /**
761 Get the string based on the StringId and HII Package List Handle.
762
763 @param Token The String's ID.
764 @param HiiHandle The package list in the HII database to search for
765 the specified string.
766
767 @return The output string.
768
769 **/
770 CHAR16 *
771 GetToken (
772 IN EFI_STRING_ID Token,
773 IN EFI_HII_HANDLE HiiHandle
774 );
775
776 /**
777 Draw a pop up windows based on the dimension, number of lines and
778 strings specified.
779
780 @param RequestedWidth The width of the pop-up.
781 @param NumberOfLines The number of lines.
782 @param Marker The variable argument list for the list of string to be printed.
783
784 **/
785 VOID
786 CreateSharedPopUp (
787 IN UINTN RequestedWidth,
788 IN UINTN NumberOfLines,
789 IN VA_LIST Marker
790 );
791
792 /**
793 Routine used to abstract a generic dialog interface and return the selected key or string
794
795 @param NumberOfLines The number of lines for the dialog box
796 @param HotKey Defines whether a single character is parsed
797 (TRUE) and returned in KeyValue or a string is
798 returned in StringBuffer. Two special characters
799 are considered when entering a string, a SCAN_ESC
800 and an CHAR_CARRIAGE_RETURN. SCAN_ESC terminates
801 string input and returns
802 @param MaximumStringSize The maximum size in bytes of a typed in string
803 (each character is a CHAR16) and the minimum
804 string returned is two bytes
805 @param StringBuffer The passed in pointer to the buffer which will
806 hold the typed in string if HotKey is FALSE
807 @param KeyValue The EFI_KEY value returned if HotKey is TRUE..
808 @param ... A series of (quantity == NumberOfLines) text
809 strings which will be used to construct the dialog
810 box
811
812 @retval EFI_SUCCESS Displayed dialog and received user interaction
813 @retval EFI_INVALID_PARAMETER One of the parameters was invalid (e.g.
814 (StringBuffer == NULL) && (HotKey == FALSE))
815 @retval EFI_DEVICE_ERROR User typed in an ESC character to exit the routine
816
817 **/
818 EFI_STATUS
819 EFIAPI
820 CreateDialog (
821 IN UINTN NumberOfLines,
822 IN BOOLEAN HotKey,
823 IN UINTN MaximumStringSize,
824 OUT CHAR16 *StringBuffer,
825 OUT EFI_INPUT_KEY *KeyValue,
826 ...
827 );
828
829 /**
830 Get Value for given Name from a NameValue Storage.
831
832 @param Storage The NameValue Storage.
833 @param Name The Name.
834 @param Value The retured Value.
835
836 @retval EFI_SUCCESS Value found for given Name.
837 @retval EFI_NOT_FOUND No such Name found in NameValue storage.
838
839 **/
840 EFI_STATUS
841 GetValueByName (
842 IN FORMSET_STORAGE *Storage,
843 IN CHAR16 *Name,
844 IN OUT CHAR16 **Value
845 );
846
847 /**
848 Set Value of given Name in a NameValue Storage.
849
850 @param Storage The NameValue Storage.
851 @param Name The Name.
852 @param Value The Value to set.
853 @param Edit Whether update editValue or Value.
854
855 @retval EFI_SUCCESS Value found for given Name.
856 @retval EFI_NOT_FOUND No such Name found in NameValue storage.
857
858 **/
859 EFI_STATUS
860 SetValueByName (
861 IN FORMSET_STORAGE *Storage,
862 IN CHAR16 *Name,
863 IN CHAR16 *Value,
864 IN BOOLEAN Edit
865 );
866
867 /**
868 Get Question's current Value.
869
870 @param FormSet FormSet data structure.
871 @param Form Form data structure.
872 @param Question Question to be initialized.
873 @param Cached TRUE: get from Edit copy FALSE: get from original
874 Storage
875
876 @retval EFI_SUCCESS The function completed successfully.
877
878 **/
879 EFI_STATUS
880 GetQuestionValue (
881 IN FORM_BROWSER_FORMSET *FormSet,
882 IN FORM_BROWSER_FORM *Form,
883 IN OUT FORM_BROWSER_STATEMENT *Question,
884 IN BOOLEAN Cached
885 );
886
887 /**
888 Save Question Value to edit copy(cached) or Storage(uncached).
889
890 @param FormSet FormSet data structure.
891 @param Form Form data structure.
892 @param Question Pointer to the Question.
893 @param Cached TRUE: set to Edit copy FALSE: set to original
894 Storage
895
896 @retval EFI_SUCCESS The function completed successfully.
897
898 **/
899 EFI_STATUS
900 SetQuestionValue (
901 IN FORM_BROWSER_FORMSET *FormSet,
902 IN FORM_BROWSER_FORM *Form,
903 IN OUT FORM_BROWSER_STATEMENT *Question,
904 IN BOOLEAN Cached
905 );
906
907 /**
908 Perform inconsistent check for a Form.
909
910 @param FormSet FormSet data structure.
911 @param Form Form data structure.
912 @param Question The Question to be validated.
913 @param Type Validation type: InConsistent or NoSubmit
914
915 @retval EFI_SUCCESS Form validation pass.
916 @retval other Form validation failed.
917
918 **/
919 EFI_STATUS
920 ValidateQuestion (
921 IN FORM_BROWSER_FORMSET *FormSet,
922 IN FORM_BROWSER_FORM *Form,
923 IN FORM_BROWSER_STATEMENT *Question,
924 IN UINTN Type
925 );
926
927 /**
928 Discard data for form level or formset level.
929
930 @param FormSet FormSet data structure.
931 @param Form Form data structure.
932 @param SingleForm whether submit single form or formset.
933
934 @retval EFI_SUCCESS The function completed successfully.
935
936 **/
937 EFI_STATUS
938 DiscardForm (
939 IN FORM_BROWSER_FORMSET *FormSet,
940 IN FORM_BROWSER_FORM *Form,
941 IN BOOLEAN SingleForm
942 );
943
944 /**
945 Submit data for form level or formset level.
946
947 @param FormSet FormSet data structure.
948 @param Form Form data structure.
949 @param SingleForm whether submit single form or formset.
950
951 @retval EFI_SUCCESS The function completed successfully.
952
953 **/
954 EFI_STATUS
955 SubmitForm (
956 IN FORM_BROWSER_FORMSET *FormSet,
957 IN FORM_BROWSER_FORM *Form,
958 IN BOOLEAN SingleForm
959 );
960
961 /**
962 Reset Question to its default value.
963
964 @param FormSet The form set.
965 @param Form The form.
966 @param Question The question.
967 @param DefaultId The Class of the default.
968
969 @retval EFI_SUCCESS Question is reset to default value.
970
971 **/
972 EFI_STATUS
973 GetQuestionDefault (
974 IN FORM_BROWSER_FORMSET *FormSet,
975 IN FORM_BROWSER_FORM *Form,
976 IN FORM_BROWSER_STATEMENT *Question,
977 IN UINT16 DefaultId
978 );
979
980 /**
981 Get current setting of Questions.
982
983 @param FormSet FormSet data structure.
984
985 @retval EFI_SUCCESS The function completed successfully.
986
987 **/
988 EFI_STATUS
989 InitializeCurrentSetting (
990 IN OUT FORM_BROWSER_FORMSET *FormSet
991 );
992
993 /**
994 Initialize the internal data structure of a FormSet.
995
996 @param Handle PackageList Handle
997 @param FormSetGuid GUID of a formset. If not specified (NULL or zero
998 GUID), take the first FormSet found in package
999 list.
1000 @param FormSet FormSet data structure.
1001
1002 @retval EFI_SUCCESS The function completed successfully.
1003 @retval EFI_NOT_FOUND The specified FormSet could not be found.
1004
1005 **/
1006 EFI_STATUS
1007 InitializeFormSet (
1008 IN EFI_HII_HANDLE Handle,
1009 IN OUT EFI_GUID *FormSetGuid,
1010 OUT FORM_BROWSER_FORMSET *FormSet
1011 );
1012
1013 /**
1014 Reset Questions in a Formset to their default value.
1015
1016 @param FormSet FormSet data structure.
1017 @param DefaultId The Class of the default.
1018
1019 @retval EFI_SUCCESS The function completed successfully.
1020
1021 **/
1022 EFI_STATUS
1023 ExtractFormSetDefault (
1024 IN FORM_BROWSER_FORMSET *FormSet,
1025 IN UINT16 DefaultId
1026 );
1027
1028 /**
1029 Initialize Question's Edit copy from Storage.
1030
1031 @param Selection Selection contains the information about
1032 the Selection, form and formset to be displayed.
1033 Selection action may be updated in retrieve callback.
1034 @param FormSet FormSet data structure.
1035 @param Form Form data structure.
1036
1037 @retval EFI_SUCCESS The function completed successfully.
1038
1039 **/
1040 EFI_STATUS
1041 LoadFormConfig (
1042 IN OUT UI_MENU_SELECTION *Selection,
1043 IN FORM_BROWSER_FORMSET *FormSet,
1044 IN FORM_BROWSER_FORM *Form
1045 );
1046
1047 /**
1048 Initialize Question's Edit copy from Storage for the whole Formset.
1049
1050 @param Selection Selection contains the information about
1051 the Selection, form and formset to be displayed.
1052 Selection action may be updated in retrieve callback.
1053 @param FormSet FormSet data structure.
1054
1055 @retval EFI_SUCCESS The function completed successfully.
1056
1057 **/
1058 EFI_STATUS
1059 LoadFormSetConfig (
1060 IN OUT UI_MENU_SELECTION *Selection,
1061 IN FORM_BROWSER_FORMSET *FormSet
1062 );
1063
1064 /**
1065 Convert setting of Buffer Storage or NameValue Storage to <ConfigResp>.
1066
1067 @param Buffer The Storage to be conveted.
1068 @param ConfigResp The returned <ConfigResp>.
1069 @param SingleForm Whether update data for single form or formset level.
1070
1071 @retval EFI_SUCCESS Convert success.
1072 @retval EFI_INVALID_PARAMETER Incorrect storage type.
1073
1074 **/
1075 EFI_STATUS
1076 StorageToConfigResp (
1077 IN VOID *Buffer,
1078 IN CHAR16 **ConfigResp,
1079 IN BOOLEAN SingleForm
1080 );
1081
1082 /**
1083 Convert <ConfigResp> to settings in Buffer Storage or NameValue Storage.
1084
1085 @param Storage The Storage to receive the settings.
1086 @param ConfigResp The <ConfigResp> to be converted.
1087
1088 @retval EFI_SUCCESS Convert success.
1089 @retval EFI_INVALID_PARAMETER Incorrect storage type.
1090
1091 **/
1092 EFI_STATUS
1093 ConfigRespToStorage (
1094 IN FORMSET_STORAGE *Storage,
1095 IN CHAR16 *ConfigResp
1096 );
1097
1098 /**
1099 Fill storage's edit copy with settings requested from Configuration Driver.
1100
1101 @param FormSet FormSet data structure.
1102 @param Storage Buffer Storage.
1103
1104 @retval EFI_SUCCESS The function completed successfully.
1105
1106 **/
1107 EFI_STATUS
1108 LoadStorage (
1109 IN FORM_BROWSER_FORMSET *FormSet,
1110 IN FORMSET_STORAGE *Storage
1111 );
1112
1113 /**
1114 Fetch the Ifr binary data of a FormSet.
1115
1116 @param Handle PackageList Handle
1117 @param FormSetGuid GUID of a formset. If not specified (NULL or zero
1118 GUID), take the first FormSet found in package
1119 list.
1120 @param BinaryLength The length of the FormSet IFR binary.
1121 @param BinaryData The buffer designed to receive the FormSet.
1122
1123 @retval EFI_SUCCESS Buffer filled with the requested FormSet.
1124 BufferLength was updated.
1125 @retval EFI_INVALID_PARAMETER The handle is unknown.
1126 @retval EFI_NOT_FOUND A form or FormSet on the requested handle cannot
1127 be found with the requested FormId.
1128
1129 **/
1130 EFI_STATUS
1131 GetIfrBinaryData (
1132 IN EFI_HII_HANDLE Handle,
1133 IN OUT EFI_GUID *FormSetGuid,
1134 OUT UINTN *BinaryLength,
1135 OUT UINT8 **BinaryData
1136 );
1137
1138 /**
1139 Save globals used by previous call to SendForm(). SendForm() may be called from
1140 HiiConfigAccess.Callback(), this will cause SendForm() be reentried.
1141 So, save globals of previous call to SendForm() and restore them upon exit.
1142
1143 **/
1144 VOID
1145 SaveBrowserContext (
1146 VOID
1147 );
1148
1149 /**
1150 Restore globals used by previous call to SendForm().
1151
1152 **/
1153 VOID
1154 RestoreBrowserContext (
1155 VOID
1156 );
1157
1158 /**
1159 This is the routine which an external caller uses to direct the browser
1160 where to obtain it's information.
1161
1162
1163 @param This The Form Browser protocol instanse.
1164 @param Handles A pointer to an array of Handles. If HandleCount > 1 we
1165 display a list of the formsets for the handles specified.
1166 @param HandleCount The number of Handles specified in Handle.
1167 @param FormSetGuid This field points to the EFI_GUID which must match the Guid
1168 field in the EFI_IFR_FORM_SET op-code for the specified
1169 forms-based package. If FormSetGuid is NULL, then this
1170 function will display the first found forms package.
1171 @param FormId This field specifies which EFI_IFR_FORM to render as the first
1172 displayable page. If this field has a value of 0x0000, then
1173 the forms browser will render the specified forms in their encoded order.
1174 ScreenDimenions - This allows the browser to be called so that it occupies a
1175 portion of the physical screen instead of dynamically determining the screen dimensions.
1176 ActionRequest - Points to the action recommended by the form.
1177 @param ScreenDimensions Points to recommended form dimensions, including any non-content area, in
1178 characters.
1179 @param ActionRequest Points to the action recommended by the form.
1180
1181 @retval EFI_SUCCESS The function completed successfully.
1182 @retval EFI_INVALID_PARAMETER One of the parameters has an invalid value.
1183 @retval EFI_NOT_FOUND No valid forms could be found to display.
1184
1185 **/
1186 EFI_STATUS
1187 EFIAPI
1188 SendForm (
1189 IN CONST EFI_FORM_BROWSER2_PROTOCOL *This,
1190 IN EFI_HII_HANDLE *Handles,
1191 IN UINTN HandleCount,
1192 IN EFI_GUID *FormSetGuid, OPTIONAL
1193 IN UINT16 FormId, OPTIONAL
1194 IN CONST EFI_SCREEN_DESCRIPTOR *ScreenDimensions, OPTIONAL
1195 OUT EFI_BROWSER_ACTION_REQUEST *ActionRequest OPTIONAL
1196 );
1197
1198 /**
1199 This function is called by a callback handler to retrieve uncommitted state
1200 data from the browser.
1201
1202 @param This A pointer to the EFI_FORM_BROWSER2_PROTOCOL
1203 instance.
1204 @param ResultsDataSize A pointer to the size of the buffer associated
1205 with ResultsData.
1206 @param ResultsData A string returned from an IFR browser or
1207 equivalent. The results string will have no
1208 routing information in them.
1209 @param RetrieveData A BOOLEAN field which allows an agent to retrieve
1210 (if RetrieveData = TRUE) data from the uncommitted
1211 browser state information or set (if RetrieveData
1212 = FALSE) data in the uncommitted browser state
1213 information.
1214 @param VariableGuid An optional field to indicate the target variable
1215 GUID name to use.
1216 @param VariableName An optional field to indicate the target
1217 human-readable variable name.
1218
1219 @retval EFI_SUCCESS The results have been distributed or are awaiting
1220 distribution.
1221 @retval EFI_BUFFER_TOO_SMALL The ResultsDataSize specified was too small to
1222 contain the results data.
1223
1224 **/
1225 EFI_STATUS
1226 EFIAPI
1227 BrowserCallback (
1228 IN CONST EFI_FORM_BROWSER2_PROTOCOL *This,
1229 IN OUT UINTN *ResultsDataSize,
1230 IN OUT EFI_STRING ResultsData,
1231 IN BOOLEAN RetrieveData,
1232 IN CONST EFI_GUID *VariableGuid, OPTIONAL
1233 IN CONST CHAR16 *VariableName OPTIONAL
1234 );
1235
1236 /**
1237 Find menu which will show next time.
1238
1239 @param Selection On input, Selection tell setup browser the information
1240 about the Selection, form and formset to be displayed.
1241 On output, Selection return the screen item that is selected
1242 by user.
1243 @param Repaint Whether need to repaint the menu.
1244 @param NewLine Whether need to show at new line.
1245
1246 @retval TRUE Need return.
1247 @retval FALSE No need to return.
1248 **/
1249 BOOLEAN
1250 FindNextMenu (
1251 IN OUT UI_MENU_SELECTION *Selection,
1252 IN BOOLEAN *Repaint,
1253 IN BOOLEAN *NewLine
1254 );
1255
1256 /**
1257 check whether the formset need to update the NV.
1258
1259 @param FormSet FormSet data structure.
1260 @param SetValue Whether set new value or clear old value.
1261
1262 **/
1263 VOID
1264 UpdateNvInfoInForm (
1265 IN FORM_BROWSER_FORMSET *FormSet,
1266 IN BOOLEAN SetValue
1267 );
1268
1269 /**
1270 check whether the formset need to update the NV.
1271
1272 @param FormSet FormSet data structure.
1273
1274 @retval TRUE Need to update the NV.
1275 @retval FALSE No need to update the NV.
1276 **/
1277 BOOLEAN
1278 IsNvUpdateRequired (
1279 IN FORM_BROWSER_FORMSET *FormSet
1280 );
1281
1282 /**
1283 Call the call back function for the question and process the return action.
1284
1285 @param Selection On input, Selection tell setup browser the information
1286 about the Selection, form and formset to be displayed.
1287 On output, Selection return the screen item that is selected
1288 by user.
1289 @param Statement The Question which need to call.
1290 @param Action The action request.
1291 @param SkipSaveOrDiscard Whether skip save or discard action.
1292
1293 @retval EFI_SUCCESS The call back function excutes successfully.
1294 @return Other value if the call back function failed to excute.
1295 **/
1296 EFI_STATUS
1297 ProcessCallBackFunction (
1298 IN OUT UI_MENU_SELECTION *Selection,
1299 IN FORM_BROWSER_STATEMENT *Question,
1300 IN EFI_BROWSER_ACTION Action,
1301 IN BOOLEAN SkipSaveOrDiscard
1302 );
1303 #endif