3 Copyright (c) 2007, Intel Corporation
4 All rights reserved. This program and the accompanying materials
5 are licensed and made available under the terms and conditions of the BSD License
6 which accompanies this distribution. The full text of the license may be found at
7 http://opensource.org/licenses/bsd-license.php
9 THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
10 WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
18 The file contain all library function for Ifr Operations.
26 #include "EfiDriverLib.h"
29 #include EFI_PROTOCOL_DEFINITION (HiiFont)
30 #include EFI_PROTOCOL_DEFINITION (HiiImage)
31 #include EFI_PROTOCOL_DEFINITION (HiiString)
32 #include EFI_PROTOCOL_DEFINITION (HiiDatabase)
33 #include EFI_PROTOCOL_DEFINITION (HiiConfigRouting)
34 #include EFI_PROTOCOL_DEFINITION (HiiConfigAccess)
35 #include EFI_PROTOCOL_DEFINITION (FormBrowser2)
36 #include EFI_PROTOCOL_DEFINITION (SimpleTextOut)
38 #include EFI_GUID_DEFINITION (GlobalVariable)
40 #define IFR_LIB_DEFAULT_STRING_SIZE 0x200
43 // The architectural variable "Lang" and "LangCodes" are deprecated in UEFI
44 // specification. While, UEFI specification also states that these deprecated
45 // variables may be provided for backwards compatibility.
46 // If "LANG_SUPPORT" is defined, "Lang" and "LangCodes" will be produced;
47 // If "LANG_SUPPORT" is undefined, "Lang" and "LangCodes" will not be produced.
51 #define EFI_LANGUAGE_VARIABLE L"Lang"
52 #define EFI_LANGUAGE_CODES_VARIABLE L"LangCodes"
54 #define UEFI_LANGUAGE_VARIABLE L"PlatformLang"
55 #define UEFI_LANGUAGE_CODES_VARIABLE L"PlatformLangCodes"
58 // Limited buffer size recommended by RFC4646 (4.3. Length Considerations)
59 // (42 characters plus a NULL terminator)
61 #define RFC_3066_ENTRY_SIZE (42 + 1)
62 #define ISO_639_2_ENTRY_SIZE 3
64 #define INVALID_VARSTORE_ID 0
66 #define QUESTION_FLAGS (EFI_IFR_FLAG_READ_ONLY | EFI_IFR_FLAG_CALLBACK | EFI_IFR_FLAG_RESET_REQUIRED | EFI_IFR_FLAG_OPTIONS_ONLY)
67 #define QUESTION_FLAGS_MASK (~QUESTION_FLAGS)
69 extern EFI_GUID mIfrVendorGuid
;
70 extern EFI_HII_DATABASE_PROTOCOL
*gIfrLibHiiDatabase
;
71 extern EFI_HII_STRING_PROTOCOL
*gIfrLibHiiString
;
75 EFI_STRING_ID StringToken
;
76 EFI_IFR_TYPE_VALUE Value
;
82 VENDOR_DEVICE_PATH VendorDevicePath
;
83 UINT32 MonotonicCount
;
84 } HII_VENDOR_DEVICE_PATH_NODE
;
87 HII_VENDOR_DEVICE_PATH_NODE Node
;
88 EFI_DEVICE_PATH_PROTOCOL End
;
89 } HII_VENDOR_DEVICE_PATH
;
93 // Buffer size allocated for Data.
98 // Offset in Data to append the newly created opcode binary.
99 // It will be adjusted automatically in Create***OpCode(), and should be
100 // initialized to 0 before invocation of a serial of Create***OpCode()
105 // The destination buffer for created op-codes
108 } EFI_HII_UPDATE_DATA
;
117 This function locate Hii relative protocols for later usage.
129 // Exported Library functions
133 IN OUT EFI_HII_UPDATE_DATA
*Data
138 Create EFI_IFR_END_OP opcode.
141 Data - Destination for the created opcode binary
144 EFI_SUCCESS - Opcode create success
150 CreateDefaultOpCode (
151 IN EFI_IFR_TYPE_VALUE
*Value
,
153 IN OUT EFI_HII_UPDATE_DATA
*Data
158 Create EFI_IFR_DEFAULT_OP opcode.
161 Value - Value for the default
162 Type - Type for the default
163 Data - Destination for the created opcode binary
166 EFI_SUCCESS - Opcode create success
173 IN EFI_QUESTION_ID QuestionId
,
174 IN EFI_STRING_ID Prompt
,
175 IN EFI_STRING_ID Help
,
176 IN UINT8 QuestionFlags
,
177 IN EFI_STRING_ID QuestionConfig
,
178 IN OUT EFI_HII_UPDATE_DATA
*Data
183 Create EFI_IFR_ACTION_OP opcode.
186 QuestionId - Question ID
187 Prompt - String ID for Prompt
188 Help - String ID for Help
189 QuestionFlags - Flags in Question Header
190 QuestionConfig - String ID for configuration
191 Data - Destination for the created opcode binary
194 EFI_SUCCESS - Opcode create success
200 CreateSubTitleOpCode (
201 IN EFI_STRING_ID Prompt
,
202 IN EFI_STRING_ID Help
,
205 IN OUT EFI_HII_UPDATE_DATA
*Data
210 Create EFI_IFR_SUBTITLE_OP opcode.
213 Prompt - String ID for Prompt
214 Help - String ID for Help
215 Flags - Subtitle opcode flags
216 Scope - Subtitle Scope bit
217 Data - Destination for the created opcode binary
220 EFI_SUCCESS - Opcode create success
227 IN EFI_STRING_ID Prompt
,
228 IN EFI_STRING_ID Help
,
229 IN EFI_STRING_ID TextTwo
,
230 IN OUT EFI_HII_UPDATE_DATA
*Data
235 Create EFI_IFR_TEXT_OP opcode.
238 Prompt - String ID for Prompt
239 Help - String ID for Help
240 TextTwo - String ID for text two
241 Data - Destination for the created opcode binary
244 EFI_SUCCESS - Opcode create success
251 IN EFI_FORM_ID FormId
,
252 IN EFI_STRING_ID Prompt
,
253 IN EFI_STRING_ID Help
,
254 IN UINT8 QuestionFlags
,
255 IN EFI_QUESTION_ID QuestionId
,
256 IN OUT EFI_HII_UPDATE_DATA
*Data
261 Create EFI_IFR_REF_OP opcode.
264 FormId - Destination Form ID
265 Prompt - String ID for Prompt
266 Help - String ID for Help
267 QuestionFlags - Flags in Question Header
268 QuestionId - Question ID
269 Data - Destination for the created opcode binary
272 EFI_SUCCESS - Opcode create success
278 CreateOneOfOptionOpCode (
279 IN UINTN OptionCount
,
280 IN IFR_OPTION
*OptionsList
,
282 IN OUT EFI_HII_UPDATE_DATA
*Data
288 IN EFI_QUESTION_ID QuestionId
,
289 IN EFI_VARSTORE_ID VarStoreId
,
291 IN EFI_STRING_ID Prompt
,
292 IN EFI_STRING_ID Help
,
293 IN UINT8 QuestionFlags
,
295 IN IFR_OPTION
*OptionsList
,
296 IN UINTN OptionCount
,
297 IN OUT EFI_HII_UPDATE_DATA
*Data
302 Create EFI_IFR_ONE_OF_OP opcode.
305 QuestionId - Question ID
306 VarStoreId - Storage ID
307 VarOffset - Offset in Storage
308 Prompt - String ID for Prompt
309 Help - String ID for Help
310 QuestionFlags - Flags in Question Header
311 OneOfFlags - Flags for oneof opcode
312 OptionsList - List of options
313 OptionCount - Number of options in option list
314 Data - Destination for the created opcode binary
317 EFI_SUCCESS - Opcode create success
323 CreateOrderedListOpCode (
324 IN EFI_QUESTION_ID QuestionId
,
325 IN EFI_VARSTORE_ID VarStoreId
,
327 IN EFI_STRING_ID Prompt
,
328 IN EFI_STRING_ID Help
,
329 IN UINT8 QuestionFlags
,
332 IN UINT8 MaxContainers
,
333 IN IFR_OPTION
*OptionsList
,
334 IN UINTN OptionCount
,
335 IN OUT EFI_HII_UPDATE_DATA
*Data
340 Create EFI_IFR_ORDERED_LIST_OP opcode.
343 QuestionId - Question ID
344 VarStoreId - Storage ID
345 VarOffset - Offset in Storage
346 Prompt - String ID for Prompt
347 Help - String ID for Help
348 QuestionFlags - Flags in Question Header
349 Flags - Flags for ordered list opcode
350 DataType - Type for option value
351 MaxContainers - Maximum count for options in this ordered list
352 OptionsList - List of options
353 OptionCount - Number of options in option list
354 Data - Destination for the created opcode binary
357 EFI_SUCCESS - Opcode create success
363 CreateCheckBoxOpCode (
364 IN EFI_QUESTION_ID QuestionId
,
365 IN EFI_VARSTORE_ID VarStoreId
,
367 IN EFI_STRING_ID Prompt
,
368 IN EFI_STRING_ID Help
,
369 IN UINT8 QuestionFlags
,
370 IN UINT8 CheckBoxFlags
,
371 IN OUT EFI_HII_UPDATE_DATA
*Data
376 Create EFI_IFR_CHECKBOX_OP opcode.
379 QuestionId - Question ID
380 VarStoreId - Storage ID
381 VarOffset - Offset in Storage
382 Prompt - String ID for Prompt
383 Help - String ID for Help
384 QuestionFlags - Flags in Question Header
385 CheckBoxFlags - Flags for checkbox opcode
386 Data - Destination for the created opcode binary
389 EFI_SUCCESS - Opcode create success
395 CreateNumericOpCode (
396 IN EFI_QUESTION_ID QuestionId
,
397 IN EFI_VARSTORE_ID VarStoreId
,
399 IN EFI_STRING_ID Prompt
,
400 IN EFI_STRING_ID Help
,
401 IN UINT8 QuestionFlags
,
402 IN UINT8 NumericFlags
,
407 IN OUT EFI_HII_UPDATE_DATA
*Data
412 Create EFI_IFR_NUMERIC_OP opcode.
415 QuestionId - Question ID
416 VarStoreId - Storage ID
417 VarOffset - Offset in Storage
418 Prompt - String ID for Prompt
419 Help - String ID for Help
420 QuestionFlags - Flags in Question Header
421 NumericFlags - Flags for numeric opcode
422 Minimum - Numeric minimum value
423 Maximum - Numeric maximum value
424 Step - Numeric step for edit
425 Default - Numeric default value
426 Data - Destination for the created opcode binary
429 EFI_SUCCESS - Opcode create success
436 IN EFI_QUESTION_ID QuestionId
,
437 IN EFI_VARSTORE_ID VarStoreId
,
439 IN EFI_STRING_ID Prompt
,
440 IN EFI_STRING_ID Help
,
441 IN UINT8 QuestionFlags
,
442 IN UINT8 StringFlags
,
445 IN OUT EFI_HII_UPDATE_DATA
*Data
450 Create EFI_IFR_STRING_OP opcode.
453 QuestionId - Question ID
454 VarStoreId - Storage ID
455 VarOffset - Offset in Storage
456 Prompt - String ID for Prompt
457 Help - String ID for Help
458 QuestionFlags - Flags in Question Header
459 StringFlags - Flags for string opcode
460 MinSize - String minimum length
461 MaxSize - String maximum length
462 Data - Destination for the created opcode binary
465 EFI_SUCCESS - Opcode create success
472 IN EFI_STRING_ID Title
,
473 IN UINT16 LineNumber
,
475 IN OUT EFI_HII_UPDATE_DATA
*Data
480 Create GUIDed opcode for banner.
483 Title - String ID for title
484 LineNumber - Line number for this banner
485 Alignment - Alignment for this banner, left, center or right
486 Data - Destination for the created opcode binary
489 EFI_SUCCESS - Opcode create success
494 EFI_HII_PACKAGE_LIST_HEADER
*
496 IN UINTN NumberOfPackages
,
503 Assemble EFI_HII_PACKAGE_LIST according to the passed in packages.
506 NumberOfPackages - Number of packages.
507 GuidId - Package GUID.
510 Pointer of EFI_HII_PACKAGE_LIST_HEADER.
516 CreateHiiDriverHandle (
517 OUT EFI_HANDLE
*DriverHandle
522 The HII driver handle passed in for HiiDatabase.NewPackageList() requires
523 that there should be DevicePath Protocol installed on it.
524 This routine create a virtual Driver Handle by installing a vendor device
525 path on it, so as to use it to invoke HiiDatabase.NewPackageList().
528 DriverHandle - Handle to be returned
531 EFI_SUCCESS - Handle destroy success.
532 EFI_OUT_OF_RESOURCES - Not enough memory.
538 DestroyHiiDriverHandle (
539 IN EFI_HANDLE DriverHandle
544 Destroy the Driver Handle created by CreateHiiDriverHandle().
547 DriverHandle - Handle returned by CreateHiiDriverHandle()
550 EFI_SUCCESS - Handle destroy success.
551 other - Handle destroy fail.
557 DevicePathToHiiHandle (
558 IN EFI_HII_DATABASE_PROTOCOL
*HiiDatabase
,
559 IN EFI_DEVICE_PATH_PROTOCOL
*DevicePath
564 Find HII Handle associated with given Device Path.
567 HiiDatabase - Point to EFI_HII_DATABASE_PROTOCOL instance.
568 DevicePath - Device Path associated with the HII package list handle.
571 Handle - HII package list Handle associated with the Device Path.
572 NULL - Hii Package list handle is not found.
580 IN UINTN
*BufferSize
,
587 Configure the buffer accrording to ConfigBody strings.
590 DefaultId - the ID of default.
591 Buffer - the start address of buffer.
592 BufferSize - the size of buffer.
593 Number - the number of the strings.
596 EFI_BUFFER_TOO_SMALL - the BufferSize is too small to operate.
597 EFI_INVALID_PARAMETER - Buffer is NULL or BufferSize is 0.
598 EFI_SUCCESS - Operation successful.
604 ExtractGuidFromHiiHandle (
605 IN EFI_HII_HANDLE Handle
,
611 Extract Hii package list GUID for given HII handle.
614 HiiHandle - Hii handle
615 Guid - Package list GUID
618 EFI_SUCCESS - Successfully extract GUID from Hii database.
624 ExtractClassFromHiiHandle (
625 IN EFI_HII_HANDLE Handle
,
627 OUT EFI_STRING_ID
*FormSetTitle
,
628 OUT EFI_STRING_ID
*FormSetHelp
633 Extract formset class for given HII handle.
636 HiiHandle - Hii handle
637 Class - Class of the formset
638 FormSetTitle - Formset title string
639 FormSetHelp - Formset help string
642 EFI_SUCCESS - Successfully extract Class for specified Hii handle.
656 Converts binary buffer to Unicode string in reversed byte order to BufToHexString().
659 Str - String for output
660 Buffer - Binary buffer.
661 BufferSize - Size of the buffer in bytes.
664 EFI_SUCCESS - The function completed successfully.
671 IN OUT UINT8
*Buffer
,
672 IN OUT UINTN
*BufferSize
,
678 Converts Hex String to binary buffer in reversed byte order to HexStringToBuf().
681 Buffer - Pointer to buffer that receives the data.
682 BufferSize - Length in bytes of the buffer to hold converted data.
683 If routine return with EFI_SUCCESS, containing length of converted data.
684 If routine return with EFI_BUFFER_TOO_SMALL, containg length of buffer desired.
685 Str - String to be converted from.
688 EFI_SUCCESS - The function completed successfully.
695 IN OUT CHAR16
*ConfigHdr
,
696 IN OUT UINTN
*StrBufferLen
,
698 IN CHAR16
*Name
, OPTIONAL
699 IN EFI_HANDLE
*DriverHandle
704 Construct <ConfigHdr> using routing information GUID/NAME/PATH.
707 ConfigHdr - Pointer to the ConfigHdr string.
708 StrBufferLen - On input: Length in bytes of buffer to hold the ConfigHdr string. Includes tailing '\0' character.
710 If return EFI_SUCCESS, containing length of ConfigHdr string buffer.
711 If return EFI_BUFFER_TOO_SMALL, containg length of string buffer desired.
712 Guid - Routing information: GUID.
713 Name - Routing information: NAME.
714 DriverHandle - Driver handle which contains the routing information: PATH.
717 EFI_SUCCESS - Routine success.
718 EFI_BUFFER_TOO_SMALL - The ConfigHdr string buffer is too small.
725 IN OUT CHAR16
*String
,
732 Search BlockName "&OFFSET=Offset&WIDTH=Width" in a string.
735 String - The string to be searched in.
736 Offset - Offset in BlockName.
737 Width - Width in BlockName.
740 TRUE - Block name found.
741 FALSE - Block name not found.
748 EFI_GUID
*VariableGuid
, OPTIONAL
749 CHAR16
*VariableName
, OPTIONAL
756 This routine is invoked by ConfigAccess.Callback() to retrived uncommitted data from Form Browser.
759 VariableGuid - An optional field to indicate the target variable GUID name to use.
760 VariableName - An optional field to indicate the target human-readable variable name.
761 BufferSize - On input: Length in bytes of buffer to hold retrived data.
763 If return EFI_BUFFER_TOO_SMALL, containg length of buffer desired.
764 Buffer - Buffer to hold retrived data.
767 EFI_SUCCESS - Routine success.
768 EFI_BUFFER_TOO_SMALL - The intput buffer is too small.
775 IN OUT UINTN
*HandleBufferLength
,
776 OUT EFI_HII_HANDLE
**HiiHandleBuffer
781 Determines the handles that are currently active in the database.
782 It's the caller's responsibility to free handle buffer.
785 HiiDatabase - A pointer to the EFI_HII_DATABASE_PROTOCOL instance.
786 HandleBufferLength - On input, a pointer to the length of the handle buffer. On output,
787 the length of the handle buffer that is required for the handles found.
788 HiiHandleBuffer - Pointer to an array of Hii Handles returned.
791 EFI_SUCCESS - Get an array of Hii Handles successfully.
792 EFI_INVALID_PARAMETER - Hii is NULL.
793 EFI_NOT_FOUND - Database not found.
800 EFI_GUID
*VariableGuid
, OPTIONAL
801 CHAR16
*VariableName
, OPTIONAL
804 CHAR16
*RequestElement OPTIONAL
809 This routine is invoked by ConfigAccess.Callback() to update uncommitted data of Form Browser.
812 VariableGuid - An optional field to indicate the target variable GUID name to use.
813 VariableName - An optional field to indicate the target human-readable variable name.
814 BufferSize - Length in bytes of buffer to hold retrived data.
815 Buffer - Buffer to hold retrived data.
816 RequestElement - An optional field to specify which part of the buffer data
817 will be send back to Browser. If NULL, the whole buffer of
818 data will be committed to Browser.
819 <RequestElement> ::= &OFFSET=<Number>&WIDTH=<Number>*
822 EFI_SUCCESS - Routine success.
823 Other - Updating Browser uncommitted data failed.
829 ConvertRfc3066LanguageToIso639Language (
830 CHAR8
*LanguageRfc3066
,
831 CHAR8
*LanguageIso639
836 Convert language code from RFC3066 to ISO639-2.
839 LanguageRfc3066 - RFC3066 language code.
840 LanguageIso639 - ISO639-2 language code.
843 EFI_SUCCESS - Language code converted.
844 EFI_NOT_FOUND - Language code not found.
851 CHAR8
*SupportedLanguages
856 Convert language code list from RFC3066 to ISO639-2, e.g. "en-US;fr-FR" will
857 be converted to "engfra".
860 SupportedLanguages - The RFC3066 language list.
863 The ISO639-2 language list.
875 Determine what is the current language setting
878 Lang - Pointer of system language
888 IN OUT CHAR8
**LangCode
,
894 Get next language from language code list.
897 LangCode - The language code.
898 Lang - Returned language.
907 GetSupportedLanguages (
908 IN EFI_HII_HANDLE HiiHandle
913 This function returns the list of supported languages, in the format specified
914 in UEFI specification Appendix M.
917 HiiHandle - The HII package list handle.
920 The supported languages.
926 GetSupportedLanguageNumber (
927 IN EFI_HII_HANDLE HiiHandle
932 This function returns the number of supported languages
935 HiiHandle - The HII package list handle.
938 The number of supported languages.
944 GetStringFromHandle (
945 IN EFI_HII_HANDLE HiiHandle
,
946 IN EFI_STRING_ID StringId
,
947 OUT EFI_STRING
*String
952 Get string specified by StringId form the HiiHandle.
955 HiiHandle - The HII handle of package list.
956 StringId - The String ID.
957 String - The output string.
960 EFI_NOT_FOUND - String is not found.
961 EFI_SUCCESS - Operation is successful.
962 EFI_OUT_OF_RESOURCES - There is not enought memory in the system.
963 EFI_INVALID_PARAMETER - The String is NULL.
970 IN EFI_GUID
*ProducerGuid
,
971 IN EFI_STRING_ID StringId
,
972 OUT EFI_STRING
*String
977 Get the string given the StringId and String package Producer's Guid.
980 ProducerGuid - The Guid of String package list.
981 StringId - The String ID.
982 String - The output string.
985 EFI_NOT_FOUND - String is not found.
986 EFI_SUCCESS - Operation is successful.
987 EFI_OUT_OF_RESOURCES - There is not enought memory in the system.
994 IN EFI_HII_HANDLE PackageList
,
995 OUT EFI_STRING_ID
*StringId
,
996 IN CONST EFI_STRING String
1000 Routine Description:
1001 This function adds the string into String Package of each language.
1004 PackageList - Handle of the package list where this string will be added.
1005 StringId - On return, contains the new strings id, which is unique within PackageList.
1006 String - Points to the new null-terminated string.
1009 EFI_SUCCESS - The new string was added successfully.
1010 EFI_NOT_FOUND - The specified PackageList could not be found in database.
1011 EFI_OUT_OF_RESOURCES - Could not add the string due to lack of resources.
1012 EFI_INVALID_PARAMETER - String is NULL or StringId is NULL is NULL.
1019 IN EFI_HII_HANDLE PackageList
,
1020 IN EFI_STRING_ID StringId
,
1021 OUT EFI_STRING String
,
1022 IN OUT UINTN
*StringSize
1026 Routine Description:
1027 This function try to retrieve string from String package of current language.
1028 If fail, it try to retrieve string from String package of first language it support.
1031 PackageList - The package list in the HII database to search for the specified string.
1032 StringId - The string's id, which is unique within PackageList.
1033 String - Points to the new null-terminated string.
1034 StringSize - On entry, points to the size of the buffer pointed to by String, in bytes. On return,
1035 points to the length of the string, in bytes.
1038 EFI_SUCCESS - The string was returned successfully.
1039 EFI_NOT_FOUND - The string specified by StringId is not available.
1040 EFI_BUFFER_TOO_SMALL - The buffer specified by StringLength is too small to hold the string.
1041 EFI_INVALID_PARAMETER - The String or StringSize was NULL.
1048 IN EFI_HII_HANDLE PackageList
,
1049 IN EFI_STRING_ID StringId
,
1050 IN CONST EFI_STRING String
1054 Routine Description:
1055 This function updates the string in String package of current language.
1058 PackageList - The package list containing the strings.
1059 StringId - The string's id, which is unique within PackageList.
1060 String - Points to the new null-terminated string.
1063 EFI_SUCCESS - The string was updated successfully.
1064 EFI_NOT_FOUND - The string specified by StringId is not in the database.
1065 EFI_INVALID_PARAMETER - The String was NULL.
1066 EFI_OUT_OF_RESOURCES - The system is out of resources to accomplish the task.
1073 IN UINTN NumberOfLines
,
1074 OUT EFI_INPUT_KEY
*KeyValue
,
1080 Routine Description:
1081 Draw a dialog and return the selected key.
1084 NumberOfLines - The number of lines for the dialog box
1085 KeyValue - The EFI_KEY value returned if HotKey is TRUE..
1086 String - Pointer to the first string in the list
1087 ... - A series of (quantity == NumberOfLines) text strings which
1088 will be used to construct the dialog box
1091 EFI_SUCCESS - Displayed dialog and received user interaction
1092 EFI_INVALID_PARAMETER - One of the parameters was invalid.
1099 IN EFI_HII_HANDLE Handle
,
1100 IN EFI_GUID
*FormSetGuid
, OPTIONAL
1101 IN EFI_FORM_ID FormId
,
1104 IN EFI_HII_UPDATE_DATA
*Data
1108 Routine Description:
1109 This function allows the caller to update a form that has
1110 previously been registered with the EFI HII database.
1114 FormSetGuid - The formset should be updated.
1115 FormId - The form should be updated.
1116 Label - Update information starting immediately after this label in the IFR
1117 Insert - If TRUE and Data is not NULL, insert data after Label.
1118 If FALSE, replace opcodes between two labels with Data.
1119 Data - The adding data; If NULL, remove opcodes between two Label.
1122 EFI_SUCCESS - Update success.
1123 Other - Update fail.