2 Private MACRO, structure and function definitions for Setup Browser module.
4 Copyright (c) 2007, Intel Corporation
5 All rights reserved. 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
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.
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/ConsoleControl.h>
33 #include <Guid/MdeModuleHii.h>
35 #include <Library/PrintLib.h>
36 #include <Library/DebugLib.h>
37 #include <Library/BaseMemoryLib.h>
38 #include <Library/UefiRuntimeServicesTableLib.h>
39 #include <Library/UefiDriverEntryPoint.h>
40 #include <Library/UefiBootServicesTableLib.h>
41 #include <Library/BaseLib.h>
42 #include <Library/MemoryAllocationLib.h>
43 #include <Library/IfrSupportLib.h>
44 #include <Library/ExtendedIfrSupportLib.h>
45 #include <Library/HiiLib.h>
46 #include <Library/ExtendedHiiLib.h>
47 #include <Library/PcdLib.h>
52 // This is the generated header file which includes whatever needs to be exported (strings + IFR)
55 extern UINT8 SetupBrowserStrings
[];
60 #define BANNER_HEIGHT 6
61 #define BANNER_COLUMNS 3
63 #define FRONT_PAGE_HEADER_HEIGHT 6
64 #define NONE_FRONT_PAGE_HEADER_HEIGHT 3
65 #define LEFT_SKIPPED_COLUMNS 4
66 #define FOOTER_HEIGHT 4
67 #define STATUS_BAR_HEIGHT 1
68 #define SCROLL_ARROW_HEIGHT 1
69 #define POPUP_PAD_SPACE_COUNT 5
70 #define POPUP_FRAME_WIDTH 2
73 // Definition for function key setting
75 #define NONE_FUNCTION_KEY_SETTING 0
76 #define DEFAULT_FUNCTION_KEY_SETTING (FUNCTION_ONE | FUNCTION_TWO | FUNCTION_NINE | FUNCTION_TEN)
78 #define FUNCTION_ONE (1 << 0)
79 #define FUNCTION_TWO (1 << 1)
80 #define FUNCTION_NINE (1 << 2)
81 #define FUNCTION_TEN (1 << 3)
86 } FUNCTIION_KEY_SETTING
;
89 // Character definitions
91 #define CHAR_SPACE 0x0020
92 #define UPPER_LOWER_CASE_OFFSET 0x20
97 #define ONE_SECOND 10000000
100 // Display definitions
102 #define LEFT_HYPER_DELIMITER L'<'
103 #define RIGHT_HYPER_DELIMITER L'>'
105 #define LEFT_ONEOF_DELIMITER L'<'
106 #define RIGHT_ONEOF_DELIMITER L'>'
108 #define LEFT_NUMERIC_DELIMITER L'['
109 #define RIGHT_NUMERIC_DELIMITER L']'
111 #define LEFT_CHECKBOX_DELIMITER L'['
112 #define RIGHT_CHECKBOX_DELIMITER L']'
114 #define CHECK_ON L'X'
115 #define CHECK_OFF L' '
117 #define TIME_SEPARATOR L':'
118 #define DATE_SEPARATOR L'/'
120 #define YES_ANSWER L'Y'
121 #define NO_ANSWER L'N'
124 // This is the Input Error Message
126 #define INPUT_ERROR 1
129 // This is the NV RAM update required Message
131 #define NV_UPDATE_REQUIRED 2
134 // Refresh the Status Bar with flags
136 #define REFRESH_STATUS_BAR 0xff
139 // Incremental string lenght of ConfigRequest
141 #define CONFIG_REQUEST_STRING_INCREMENTAL 1024
144 // HII value compare result
146 #define HII_VALUE_UNDEFINED 0
147 #define HII_VALUE_EQUAL 1
148 #define HII_VALUE_LESS_THAN 2
149 #define HII_VALUE_GREATER_THAN 3
152 // Incremental size of stack for expression
154 #define EXPRESSION_STACK_SIZE_INCREMENT 0x100
157 #define EFI_SPECIFICATION_ERRATA_VERSION 0
159 #define EFI_IFR_SPECIFICATION_VERSION \
160 ((((EFI_SPECIFICATION_VERSION) >> 8) & 0xff00) | \
161 (((EFI_SPECIFICATION_VERSION) & 0xf) << 4) | \
162 ((EFI_SPECIFICATION_ERRATA_VERSION) & 0xf))
164 #define SETUP_DRIVER_SIGNATURE SIGNATURE_32 ('F', 'B', 'D', 'V')
173 EFI_FORM_BROWSER2_PROTOCOL FormBrowser2
;
175 } SETUP_DRIVER_PRIVATE_DATA
;
178 EFI_STRING_ID Banner
[BANNER_HEIGHT
][BANNER_COLUMNS
];
182 // IFR relative definition
184 #define EFI_HII_EXPRESSION_INCONSISTENT_IF 0
185 #define EFI_HII_EXPRESSION_NO_SUBMIT_IF 1
186 #define EFI_HII_EXPRESSION_GRAY_OUT_IF 2
187 #define EFI_HII_EXPRESSION_SUPPRESS_IF 3
188 #define EFI_HII_EXPRESSION_DISABLE_IF 4
189 #define EFI_HII_EXPRESSION_VALUE 5
190 #define EFI_HII_EXPRESSION_RULE 6
192 #define EFI_HII_VARSTORE_BUFFER 0
193 #define EFI_HII_VARSTORE_NAME_VALUE 1
194 #define EFI_HII_VARSTORE_EFI_VARIABLE 2
196 #define FORM_INCONSISTENT_VALIDATION 0
197 #define FORM_NO_SUBMIT_VALIDATION 1
201 EFI_IFR_TYPE_VALUE Value
;
204 #define NAME_VALUE_NODE_SIGNATURE SIGNATURE_32 ('N', 'V', 'S', 'T')
214 #define NAME_VALUE_NODE_FROM_LINK(a) CR (a, NAME_VALUE_NODE, Link, NAME_VALUE_NODE_SIGNATURE)
216 #define FORMSET_STORAGE_SIGNATURE SIGNATURE_32 ('F', 'S', 'T', 'G')
222 UINT8 Type
; // Storage type
227 CHAR16
*Name
; // For EFI_IFR_VARSTORE
230 UINT8
*EditBuffer
; // Edit copy for Buffer Storage
232 LIST_ENTRY NameValueListHead
; // List of NAME_VALUE_NODE
234 UINT32 Attributes
; // For EFI_IFR_VARSTORE_EFI: EFI Variable attribute
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
242 #define FORMSET_STORAGE_FROM_LINK(a) CR (a, FORMSET_STORAGE, Link, FORMSET_STORAGE_SIGNATURE)
244 #define EXPRESSION_OPCODE_SIGNATURE SIGNATURE_32 ('E', 'X', 'O', 'P')
252 UINT8 Format
; // For EFI_IFR_TO_STRING, EFI_IFR_FIND
253 UINT8 Flags
; // For EFI_IFR_SPAN
254 UINT8 RuleId
; // For EFI_IFR_RULE_REF
256 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
258 EFI_QUESTION_ID QuestionId
; // For EFI_IFR_EQ_ID_ID, EFI_IFR_EQ_ID_LIST, EFI_IFR_QUESTION_REF1
259 EFI_QUESTION_ID QuestionId2
;
261 UINT16 ListLength
; // For EFI_IFR_EQ_ID_LIST
264 EFI_STRING_ID DevicePath
; // For EFI_IFR_QUESTION_REF3_2, EFI_IFR_QUESTION_REF3_3
268 #define EXPRESSION_OPCODE_FROM_LINK(a) CR (a, EXPRESSION_OPCODE, Link, EXPRESSION_OPCODE_SIGNATURE)
270 #define FORM_EXPRESSION_SIGNATURE SIGNATURE_32 ('F', 'E', 'X', 'P')
276 UINT8 Type
; // Type for this expression
278 UINT8 RuleId
; // For EFI_IFR_RULE only
279 EFI_STRING_ID Error
; // For EFI_IFR_NO_SUBMIT_IF, EFI_IFR_INCONSISTENT_IF only
281 EFI_HII_VALUE Result
; // Expression evaluation result
283 LIST_ENTRY OpCodeListHead
; // OpCodes consist of this expression (EXPRESSION_OPCODE)
286 #define FORM_EXPRESSION_FROM_LINK(a) CR (a, FORM_EXPRESSION, Link, FORM_EXPRESSION_SIGNATURE)
288 #define QUESTION_DEFAULT_SIGNATURE SIGNATURE_32 ('Q', 'D', 'F', 'T')
295 EFI_HII_VALUE Value
; // Default value
297 FORM_EXPRESSION
*ValueExpression
; // Not-NULL indicates default value is provided by EFI_IFR_VALUE
300 #define QUESTION_DEFAULT_FROM_LINK(a) CR (a, QUESTION_DEFAULT, Link, QUESTION_DEFAULT_SIGNATURE)
302 #define QUESTION_OPTION_SIGNATURE SIGNATURE_32 ('Q', 'O', 'P', 'T')
311 EFI_IMAGE_ID ImageId
;
313 FORM_EXPRESSION
*SuppressExpression
; // Non-NULL indicates nested inside of SuppressIf
316 #define QUESTION_OPTION_FROM_LINK(a) CR (a, QUESTION_OPTION, Link, QUESTION_OPTION_SIGNATURE)
318 #define FORM_BROWSER_STATEMENT_SIGNATURE SIGNATURE_32 ('F', 'S', 'T', 'A')
323 UINT8 Operand
; // The operand (first byte) of this Statement or Question
328 EFI_STRING_ID Prompt
;
330 EFI_STRING_ID TextTwo
; // For EFI_IFR_TEXT
335 EFI_QUESTION_ID QuestionId
; // The value of zero is reserved
336 EFI_VARSTORE_ID VarStoreId
; // A value of zero indicates no variable storage
337 FORMSET_STORAGE
*Storage
;
339 EFI_STRING_ID VarName
;
344 CHAR16
*VariableName
; // Name/Value or EFI Variable name
345 CHAR16
*BlockName
; // Buffer storage block name: "OFFSET=...WIDTH=..."
347 EFI_HII_VALUE HiiValue
; // Edit copy for checkbox, numberic, oneof
348 UINT8
*BufferValue
; // Edit copy for string, password, orderedlist
351 // OpCode specific members
353 UINT8 Flags
; // for EFI_IFR_CHECKBOX, EFI_IFR_DATE, EFI_IFR_NUMERIC, EFI_IFR_ONE_OF,
354 // EFI_IFR_ORDERED_LIST, EFI_IFR_STRING,EFI_IFR_SUBTITLE,EFI_IFR_TIME, EFI_IFR_BANNER
355 UINT8 MaxContainers
; // for EFI_IFR_ORDERED_LIST
357 UINT16 BannerLineNumber
; // for EFI_IFR_BANNER, 1-based line number
358 EFI_STRING_ID QuestionConfig
; // for EFI_IFR_ACTION, if 0 then no configuration string will be processed
360 UINT64 Minimum
; // for EFI_IFR_ONE_OF/EFI_IFR_NUMERIC, it's Min/Max value
361 UINT64 Maximum
; // for EFI_IFR_STRING/EFI_IFR_PASSWORD, it's Min/Max length
364 EFI_DEFAULT_ID DefaultId
; // for EFI_IFR_RESET_BUTTON
365 EFI_FORM_ID RefFormId
; // for EFI_IFR_REF
366 EFI_QUESTION_ID RefQuestionId
; // for EFI_IFR_REF2
367 EFI_GUID RefFormSetId
; // for EFI_IFR_REF3
368 EFI_STRING_ID RefDevicePath
; // for EFI_IFR_REF4
371 // Get from IFR parsing
373 FORM_EXPRESSION
*ValueExpression
; // nested EFI_IFR_VALUE, provide Question value and indicate Question is ReadOnly
374 LIST_ENTRY DefaultListHead
; // nested EFI_IFR_DEFAULT list (QUESTION_DEFAULT), provide default values
375 LIST_ENTRY OptionListHead
; // nested EFI_IFR_ONE_OF_OPTION list (QUESTION_OPTION)
377 EFI_IMAGE_ID ImageId
; // nested EFI_IFR_IMAGE
378 UINT8 RefreshInterval
; // nested EFI_IFR_REFRESH, refresh interval(in seconds) for Question value, 0 means no refresh
379 BOOLEAN InSubtitle
; // nesting inside of EFI_IFR_SUBTITLE
381 LIST_ENTRY InconsistentListHead
;// nested inconsistent expression list (FORM_EXPRESSION)
382 LIST_ENTRY NoSubmitListHead
; // nested nosubmit expression list (FORM_EXPRESSION)
383 FORM_EXPRESSION
*GrayOutExpression
; // nesting inside of GrayOutIf
384 FORM_EXPRESSION
*SuppressExpression
; // nesting inside of SuppressIf
386 } FORM_BROWSER_STATEMENT
;
388 #define FORM_BROWSER_STATEMENT_FROM_LINK(a) CR (a, FORM_BROWSER_STATEMENT, Link, FORM_BROWSER_STATEMENT_SIGNATURE)
390 #define FORM_BROWSER_FORM_SIGNATURE SIGNATURE_32 ('F', 'F', 'R', 'M')
397 EFI_STRING_ID FormTitle
;
399 EFI_IMAGE_ID ImageId
;
401 LIST_ENTRY ExpressionListHead
; // List of Expressions (FORM_EXPRESSION)
402 LIST_ENTRY StatementListHead
; // List of Statements and Questions (FORM_BROWSER_STATEMENT)
405 #define FORM_BROWSER_FORM_FROM_LINK(a) CR (a, FORM_BROWSER_FORM, Link, FORM_BROWSER_FORM_SIGNATURE)
407 #define FORMSET_DEFAULTSTORE_SIGNATURE SIGNATURE_32 ('F', 'D', 'F', 'S')
414 EFI_STRING_ID DefaultName
;
415 } FORMSET_DEFAULTSTORE
;
417 #define FORMSET_DEFAULTSTORE_FROM_LINK(a) CR (a, FORMSET_DEFAULTSTORE, Link, FORMSET_DEFAULTSTORE_SIGNATURE)
420 EFI_HII_HANDLE HiiHandle
;
421 EFI_HANDLE DriverHandle
;
422 EFI_HII_CONFIG_ACCESS_PROTOCOL
*ConfigAccess
;
423 EFI_DEVICE_PATH_PROTOCOL
*DevicePath
;
425 UINTN IfrBinaryLength
;
426 UINT8
*IfrBinaryData
;
429 EFI_STRING_ID FormSetTitle
;
433 EFI_IMAGE_ID ImageId
;
435 FORM_BROWSER_STATEMENT
*StatementBuffer
; // Buffer for all Statements and Questions
436 EXPRESSION_OPCODE
*ExpressionBuffer
; // Buffer for all Expression OpCode
438 LIST_ENTRY StorageListHead
; // Storage list (FORMSET_STORAGE)
439 LIST_ENTRY DefaultStoreListHead
; // DefaultStore list (FORMSET_DEFAULTSTORE)
440 LIST_ENTRY FormListHead
; // Form list (FORM_BROWSER_FORM)
441 } FORM_BROWSER_FORMSET
;
444 extern EFI_HII_DATABASE_PROTOCOL
*mHiiDatabase
;
445 extern EFI_HII_STRING_PROTOCOL
*mHiiString
;
446 extern EFI_HII_CONFIG_ROUTING_PROTOCOL
*mHiiConfigRouting
;
448 extern BANNER_DATA
*BannerData
;
449 extern EFI_HII_HANDLE FrontPageHandle
;
450 extern UINTN gClassOfVfr
;
451 extern UINTN gFunctionKeySetting
;
452 extern BOOLEAN gResetRequired
;
453 extern BOOLEAN gNvUpdateRequired
;
454 extern EFI_HII_HANDLE gHiiHandle
;
455 extern UINT16 gDirection
;
456 extern EFI_SCREEN_DESCRIPTOR gScreenDimensions
;
457 extern BOOLEAN gUpArrow
;
458 extern BOOLEAN gDownArrow
;
461 // Browser Global Strings
463 extern CHAR16
*gFunctionOneString
;
464 extern CHAR16
*gFunctionTwoString
;
465 extern CHAR16
*gFunctionNineString
;
466 extern CHAR16
*gFunctionTenString
;
467 extern CHAR16
*gEnterString
;
468 extern CHAR16
*gEnterCommitString
;
469 extern CHAR16
*gEnterEscapeString
;
470 extern CHAR16
*gEscapeString
;
471 extern CHAR16
*gSaveFailed
;
472 extern CHAR16
*gMoveHighlight
;
473 extern CHAR16
*gMakeSelection
;
474 extern CHAR16
*gDecNumericInput
;
475 extern CHAR16
*gHexNumericInput
;
476 extern CHAR16
*gToggleCheckBox
;
477 extern CHAR16
*gPromptForData
;
478 extern CHAR16
*gPromptForPassword
;
479 extern CHAR16
*gPromptForNewPassword
;
480 extern CHAR16
*gConfirmPassword
;
481 extern CHAR16
*gConfirmError
;
482 extern CHAR16
*gPassowordInvalid
;
483 extern CHAR16
*gPressEnter
;
484 extern CHAR16
*gEmptyString
;
485 extern CHAR16
*gAreYouSure
;
486 extern CHAR16
*gYesResponse
;
487 extern CHAR16
*gNoResponse
;
488 extern CHAR16
*gMiniString
;
489 extern CHAR16
*gPlusString
;
490 extern CHAR16
*gMinusString
;
491 extern CHAR16
*gAdjustNumber
;
492 extern CHAR16
*gSaveChanges
;
493 extern CHAR16
*gOptionMismatch
;
495 extern CHAR16 gPromptBlockWidth
;
496 extern CHAR16 gOptionBlockWidth
;
497 extern CHAR16 gHelpBlockWidth
;
499 extern EFI_GUID gZeroGuid
;
500 extern EFI_GUID gTianoHiiIfrGuid
;
503 // Global Procedure Defines
507 Initialize the HII String Token to the correct values.
511 InitializeBrowserStrings (
516 Prints a unicode string to the default console,
519 @param String String pointer.
521 @return Length of string printed to the console
530 Prints a chracter to the default console,
533 @param Character Character to print.
535 @return Length of string printed to the console.
544 Prints a formatted unicode string to the default console, at
545 the supplied cursor position.
547 @param Column The cursor position to print the string at.
548 @param Row The cursor position to print the string at
549 @param Fmt Format string
550 @param ... Variable argument list for formating string.
552 @return Length of string printed to the console
564 Prints a unicode string to the default console, at
565 the supplied cursor position, using L"%s" format.
567 @param Column The cursor position to print the string at.
568 @param Row The cursor position to print the string at
569 @param String String pointer.
571 @return Length of string printed to the console
582 Prints a chracter to the default console, at
583 the supplied cursor position, using L"%c" format.
585 @param Column The cursor position to print the string at.
586 @param Row The cursor position to print the string at.
587 @param Character Character to print.
589 @return Length of string printed to the console.
600 Parse opcodes in the formset IFR binary.
602 @param FormSet Pointer of the FormSet data structure.
604 @retval EFI_SUCCESS Opcode parse success.
605 @retval Other Opcode parse fail.
610 IN FORM_BROWSER_FORMSET
*FormSet
614 Free resources allocated for a FormSet.
616 @param FormSet Pointer of the FormSet
621 IN OUT FORM_BROWSER_FORMSET
*FormSet
625 This function displays the page frame.
634 Create a new string in HII Package List.
636 @param String The String to be added
637 @param HiiHandle The package list in the HII database to insert the
640 @return The output string.
646 IN EFI_HII_HANDLE HiiHandle
650 Delete a string from HII Package List.
652 @param StringId Id of the string in HII database.
653 @param HiiHandle The HII package list handle.
655 @retval EFI_SUCCESS The string was deleted successfully.
660 IN EFI_STRING_ID StringId
,
661 IN EFI_HII_HANDLE HiiHandle
665 Get the string based on the StringId and HII Package List Handle.
667 @param Token The String's ID.
668 @param HiiHandle The package list in the HII database to search for
669 the specified string.
671 @return The output string.
676 IN EFI_STRING_ID Token
,
677 IN EFI_HII_HANDLE HiiHandle
681 Draw a pop up windows based on the dimension, number of lines and
684 @param RequestedWidth The width of the pop-up.
685 @param NumberOfLines The number of lines.
686 @param Marker The variable argument list for the list of string to be printed.
691 IN UINTN RequestedWidth
,
692 IN UINTN NumberOfLines
,
697 Routine used to abstract a generic dialog interface and return the selected key or string
699 @param NumberOfLines The number of lines for the dialog box
700 @param HotKey Defines whether a single character is parsed
701 (TRUE) and returned in KeyValue or a string is
702 returned in StringBuffer. Two special characters
703 are considered when entering a string, a SCAN_ESC
704 and an CHAR_CARRIAGE_RETURN. SCAN_ESC terminates
705 string input and returns
706 @param MaximumStringSize The maximum size in bytes of a typed in string
707 (each character is a CHAR16) and the minimum
708 string returned is two bytes
709 @param StringBuffer The passed in pointer to the buffer which will
710 hold the typed in string if HotKey is FALSE
711 @param KeyValue The EFI_KEY value returned if HotKey is TRUE..
712 @param ... A series of (quantity == NumberOfLines) text
713 strings which will be used to construct the dialog
716 @retval EFI_SUCCESS Displayed dialog and received user interaction
717 @retval EFI_INVALID_PARAMETER One of the parameters was invalid (e.g.
718 (StringBuffer == NULL) && (HotKey == FALSE))
719 @retval EFI_DEVICE_ERROR User typed in an ESC character to exit the routine
724 IN UINTN NumberOfLines
,
726 IN UINTN MaximumStringSize
,
727 OUT CHAR16
*StringBuffer
,
728 OUT EFI_INPUT_KEY
*KeyValue
,
733 Get Question's current Value.
735 @param FormSet FormSet data structure.
736 @param Form Form data structure.
737 @param Question Question to be initialized.
738 @param Cached TRUE: get from Edit copy FALSE: get from original
741 @retval EFI_SUCCESS The function completed successfully.
746 IN FORM_BROWSER_FORMSET
*FormSet
,
747 IN FORM_BROWSER_FORM
*Form
,
748 IN OUT FORM_BROWSER_STATEMENT
*Question
,
753 Save Question Value to edit copy(cached) or Storage(uncached).
755 @param FormSet FormSet data structure.
756 @param Form Form data structure.
757 @param Question Pointer to the Question.
758 @param Cached TRUE: set to Edit copy FALSE: set to original
761 @retval EFI_SUCCESS The function completed successfully.
766 IN FORM_BROWSER_FORMSET
*FormSet
,
767 IN FORM_BROWSER_FORM
*Form
,
768 IN OUT FORM_BROWSER_STATEMENT
*Question
,
773 Perform inconsistent check for a Form.
775 @param FormSet FormSet data structure.
776 @param Form Form data structure.
777 @param Question The Question to be validated.
778 @param Type Validation type: InConsistent or NoSubmit
780 @retval EFI_SUCCESS Form validation pass.
781 @retval other Form validation failed.
786 IN FORM_BROWSER_FORMSET
*FormSet
,
787 IN FORM_BROWSER_FORM
*Form
,
788 IN FORM_BROWSER_STATEMENT
*Question
,
795 @param FormSet FormSet data structure.
796 @param Form Form data structure.
798 @retval EFI_SUCCESS The function completed successfully.
803 IN FORM_BROWSER_FORMSET
*FormSet
,
804 IN FORM_BROWSER_FORM
*Form
808 Reset Question to its default value.
810 @param FormSet The form set.
811 @param Form The form.
812 @param Question The question.
813 @param DefaultId The Class of the default.
815 @retval EFI_SUCCESS Question is reset to default value.
820 IN FORM_BROWSER_FORMSET
*FormSet
,
821 IN FORM_BROWSER_FORM
*Form
,
822 IN FORM_BROWSER_STATEMENT
*Question
,
827 Get current setting of Questions.
829 @param FormSet FormSet data structure.
831 @retval EFI_SUCCESS The function completed successfully.
835 InitializeCurrentSetting (
836 IN OUT FORM_BROWSER_FORMSET
*FormSet
840 Initialize the internal data structure of a FormSet.
842 @param Handle PackageList Handle
843 @param FormSetGuid GUID of a formset. If not specified (NULL or zero
844 GUID), take the first FormSet found in package
846 @param FormSet FormSet data structure.
848 @retval EFI_SUCCESS The function completed successfully.
849 @retval EFI_NOT_FOUND The specified FormSet could not be found.
854 IN EFI_HII_HANDLE Handle
,
855 IN OUT EFI_GUID
*FormSetGuid
,
856 OUT FORM_BROWSER_FORMSET
*FormSet
860 Reset Questions in a Form to their default value.
862 @param FormSet FormSet data structure.
863 @param Form The Form which to be reset.
864 @param DefaultId The Class of the default.
866 @retval EFI_SUCCESS The function completed successfully.
871 IN FORM_BROWSER_FORMSET
*FormSet
,
872 IN FORM_BROWSER_FORM
*Form
,
877 Initialize Question's Edit copy from Storage.
879 @param FormSet FormSet data structure.
880 @param Form Form data structure.
882 @retval EFI_SUCCESS The function completed successfully.
887 IN FORM_BROWSER_FORMSET
*FormSet
,
888 IN FORM_BROWSER_FORM
*Form
892 Convert setting of Buffer Storage or NameValue Storage to <ConfigResp>.
894 @param Storage The Storage to be conveted.
895 @param ConfigResp The returned <ConfigResp>.
897 @retval EFI_SUCCESS Convert success.
898 @retval EFI_INVALID_PARAMETER Incorrect storage type.
902 StorageToConfigResp (
903 IN FORMSET_STORAGE
*Storage
,
904 IN CHAR16
**ConfigResp
908 Convert <ConfigResp> to settings in Buffer Storage or NameValue Storage.
910 @param Storage The Storage to receive the settings.
911 @param ConfigResp The <ConfigResp> to be converted.
913 @retval EFI_SUCCESS Convert success.
914 @retval EFI_INVALID_PARAMETER Incorrect storage type.
918 ConfigRespToStorage (
919 IN FORMSET_STORAGE
*Storage
,
920 IN CHAR16
*ConfigResp
924 Fill storage's edit copy with settings requested from Configuration Driver.
926 @param FormSet FormSet data structure.
927 @param Storage Buffer Storage.
929 @retval EFI_SUCCESS The function completed successfully.
934 IN FORM_BROWSER_FORMSET
*FormSet
,
935 IN FORMSET_STORAGE
*Storage
939 Fetch the Ifr binary data of a FormSet.
941 @param Handle PackageList Handle
942 @param FormSetGuid GUID of a formset. If not specified (NULL or zero
943 GUID), take the first FormSet found in package
945 @param BinaryLength The length of the FormSet IFR binary.
946 @param BinaryData The buffer designed to receive the FormSet.
948 @retval EFI_SUCCESS Buffer filled with the requested FormSet.
949 BufferLength was updated.
950 @retval EFI_INVALID_PARAMETER The handle is unknown.
951 @retval EFI_NOT_FOUND A form or FormSet on the requested handle cannot
952 be found with the requested FormId.
957 IN EFI_HII_HANDLE Handle
,
958 IN OUT EFI_GUID
*FormSetGuid
,
959 OUT UINTN
*BinaryLength
,
960 OUT UINT8
**BinaryData
964 This is the routine which an external caller uses to direct the browser
965 where to obtain it's information.
968 @param This The Form Browser protocol instanse.
969 @param Handles A pointer to an array of Handles. If HandleCount > 1 we
970 display a list of the formsets for the handles specified.
971 @param HandleCount The number of Handles specified in Handle.
972 @param FormSetGuid This field points to the EFI_GUID which must match the Guid
973 field in the EFI_IFR_FORM_SET op-code for the specified
974 forms-based package. If FormSetGuid is NULL, then this
975 function will display the first found forms package.
976 @param FormId This field specifies which EFI_IFR_FORM to render as the first
977 displayable page. If this field has a value of 0x0000, then
978 the forms browser will render the specified forms in their encoded order.
979 ScreenDimenions - This allows the browser to be called so that it occupies a
980 portion of the physical screen instead of dynamically determining the screen dimensions.
981 ActionRequest - Points to the action recommended by the form.
982 @param ScreenDimensions Points to recommended form dimensions, including any non-content area, in
984 @param ActionRequest Points to the action recommended by the form.
986 @retval EFI_SUCCESS The function completed successfully.
987 @retval EFI_INVALID_PARAMETER One of the parameters has an invalid value.
988 @retval EFI_NOT_FOUND No valid forms could be found to display.
994 IN CONST EFI_FORM_BROWSER2_PROTOCOL
*This
,
995 IN EFI_HII_HANDLE
*Handles
,
996 IN UINTN HandleCount
,
997 IN EFI_GUID
*FormSetGuid
, OPTIONAL
998 IN UINT16 FormId
, OPTIONAL
999 IN CONST EFI_SCREEN_DESCRIPTOR
*ScreenDimensions
, OPTIONAL
1000 OUT EFI_BROWSER_ACTION_REQUEST
*ActionRequest OPTIONAL
1004 This function is called by a callback handler to retrieve uncommitted state
1005 data from the browser.
1007 @param This A pointer to the EFI_FORM_BROWSER2_PROTOCOL
1009 @param ResultsDataSize A pointer to the size of the buffer associated
1011 @param ResultsData A string returned from an IFR browser or
1012 equivalent. The results string will have no
1013 routing information in them.
1014 @param RetrieveData A BOOLEAN field which allows an agent to retrieve
1015 (if RetrieveData = TRUE) data from the uncommitted
1016 browser state information or set (if RetrieveData
1017 = FALSE) data in the uncommitted browser state
1019 @param VariableGuid An optional field to indicate the target variable
1021 @param VariableName An optional field to indicate the target
1022 human-readable variable name.
1024 @retval EFI_SUCCESS The results have been distributed or are awaiting
1026 @retval EFI_BUFFER_TOO_SMALL The ResultsDataSize specified was too small to
1027 contain the results data.
1033 IN CONST EFI_FORM_BROWSER2_PROTOCOL
*This
,
1034 IN OUT UINTN
*ResultsDataSize
,
1035 IN OUT EFI_STRING ResultsData
,
1036 IN BOOLEAN RetrieveData
,
1037 IN CONST EFI_GUID
*VariableGuid
, OPTIONAL
1038 IN CONST CHAR16
*VariableName OPTIONAL