3 This file contains global defines and prototype definitions
4 for the Framework HII to Uefi HII Thunk Module.
6 Copyright (c) 2006 - 2010, Intel Corporation
7 All rights reserved. This program and the accompanying materials
8 are licensed and made available under the terms and conditions of the BSD License
9 which accompanies this distribution. The full text of the license may be found at
10 http://opensource.org/licenses/bsd-license.php
12 THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
13 WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
17 #ifndef _HIIDATABASE_H_
18 #define _HIIDATABASE_H_
21 #include <FrameworkDxe.h>
23 #include <Guid/GlobalVariable.h>
24 #include <Protocol/FrameworkFormCallback.h>
25 #include <Protocol/FrameworkHii.h>
26 #include <Protocol/FrameworkFormBrowser.h>
31 #include <Protocol/HiiFont.h>
32 #include <Protocol/HiiImage.h>
33 #include <Protocol/HiiString.h>
34 #include <Protocol/HiiDatabase.h>
35 #include <Protocol/HiiConfigRouting.h>
36 #include <Protocol/HiiConfigAccess.h>
37 #include <Protocol/UgaDraw.h>
38 #include <Guid/HiiFormMapMethodGuid.h>
40 #include <Library/BaseLib.h>
41 #include <Library/DebugLib.h>
42 #include <Library/UefiDriverEntryPoint.h>
43 #include <Library/MemoryAllocationLib.h>
44 #include <Library/BaseMemoryLib.h>
45 #include <Library/UefiBootServicesTableLib.h>
46 #include <Library/UefiRuntimeServicesTableLib.h>
47 #include <Library/HiiLib.h>
48 #include <Library/UefiLib.h>
49 #include <Library/PcdLib.h>
50 #include <Library/LanguageLib.h>
52 #include <Guid/MdeModuleHii.h>
54 #include "UefiIfrParser.h"
58 // VARSTORE ID of 0 for Buffer Storage Type Storage is defined as invalid in UEFI 2.1 HII. VARSTORE ID
59 // 0 is the default VarStore ID for storage without explicit declaration in Framework HII 0.92. EDK II UEFI VFR compiler
60 // in compatible mode will assign 0x0001 as UEFI VARSTORE ID to this default storage id in Framework VFR without
61 // VARSTORE declaration.
63 // In addition, the Name of Default VarStore is assumed to be L"Setup" for those storage without explicit VARSTORE declaration in the formset
64 // by Framework HII. EDK II UEFI VFR compiler in compatible mode hard-coded L"Setup" as VARSTORE name.
66 #define FRAMEWORK_RESERVED_VARSTORE_ID 0x0001
67 #define FRAMEWORK_RESERVED_VARSTORE_NAME L"Setup"
70 /// The size of a 3 character ISO639 language code.
72 #define ISO_639_2_ENTRY_SIZE 3
76 EFI_HII_PACK_HEADER FrameworkPackageHeader
;
77 EFI_HII_PACKAGE_HEADER PackageHeader
;
78 } TIANO_AUTOGEN_PACKAGES_HEADER
;
81 #define HII_THUNK_PRIVATE_DATA_FROM_THIS(Record) CR(Record, HII_THUNK_PRIVATE_DATA, Hii, HII_THUNK_PRIVATE_DATA_SIGNATURE)
82 #define HII_THUNK_PRIVATE_DATA_SIGNATURE SIGNATURE_32 ('H', 'i', 'I', 'T')
89 // The head of link list for all HII_THUNK_CONTEXT.
91 LIST_ENTRY ThunkContextListHead
;
93 EFI_HANDLE RemovePackNotifyHandle
;
94 EFI_HANDLE AddPackNotifyHandle
;
95 } HII_THUNK_PRIVATE_DATA
;
101 #define QUESTION_ID_MAP_ENTRY_FROM_LINK(Record) CR(Record, QUESTION_ID_MAP_ENTRY, Link, QUESTION_ID_MAP_ENTRY_SIGNATURE)
102 #define QUESTION_ID_MAP_ENTRY_SIGNATURE SIGNATURE_32 ('Q', 'I', 'M', 'E')
107 EFI_QUESTION_ID UefiQid
;
108 } QUESTION_ID_MAP_ENTRY
;
112 #define QUESTION_ID_MAP_FROM_LINK(Record) CR(Record, QUESTION_ID_MAP, Link, QUESTION_ID_MAP_SIGNATURE)
113 #define QUESTION_ID_MAP_SIGNATURE SIGNATURE_32 ('Q', 'I', 'M', 'P')
119 LIST_ENTRY MapEntryListHead
;
124 #define HII_THUNK_CONTEXT_FROM_LINK(Record) CR(Record, HII_THUNK_CONTEXT, Link, HII_THUNK_CONTEXT_SIGNATURE)
125 #define HII_THUNK_CONTEXT_SIGNATURE SIGNATURE_32 ('H', 'T', 'H', 'M')
129 FRAMEWORK_EFI_HII_HANDLE FwHiiHandle
;
130 EFI_HII_HANDLE UefiHiiHandle
;
131 EFI_HANDLE UefiHiiDriverHandle
;
133 UINTN IfrPackageCount
;
134 UINTN StringPackageCount
;
136 BOOLEAN ByFrameworkHiiNewPack
;
139 // HII Thunk will use TagGuid to associate the String Package and Form Package togehter.
140 // See description for TagGuid. This field is to record if either one of the following condition
142 // 1) if ((SharingStringPack == TRUE) && (StringPackageCount != 0 && IfrPackageCount == 0)), then this Package List only
143 /// has String Packages and provides Strings to other IFR package.
144 // 2) if ((SharingStringPack == TRUE) && (StringPackageCount == 0 && IfrPackageCount != 1)), then this Form Package
145 // copied String Packages from other Package List.
146 // 3) if ((SharingStringPack == FALSE)), this Package does not provide String Package or copy String Packages from other
150 // When a Hii->NewString() is called for this FwHiiHandle and SharingStringPack is TRUE, then all Package List that sharing
151 // the same TagGuid will update or create String in there respective String Packages. If SharingStringPack is FALSE, then
152 // only the String from String Packages in this Package List will be updated or created.
154 BOOLEAN SharingStringPack
;
157 // The HII 0.92 version of HII data implementation in EDK 1.03 and 1.04 make an the following assumption
158 // in both HII Database implementation and all modules that registering packages:
159 // If a Package List has only IFR package and no String Package, the IFR package will reference
160 // String in another Package List registered with the HII database with the same EFI_HII_PACKAGES.GuidId.
161 // TagGuid is the used to record this GuidId.
164 UINT8
*NvMapOverride
;
166 FORM_BROWSER_FORMSET
*FormSet
;
172 #define BUFFER_STORAGE_ENTRY_SIGNATURE SIGNATURE_32 ('H', 'T', 's', 'k')
173 #define BUFFER_STORAGE_ENTRY_FROM_LINK(Record) CR(Record, BUFFER_STORAGE_ENTRY, Link, BUFFER_STORAGE_ENTRY_SIGNATURE)
181 } BUFFER_STORAGE_ENTRY
;
185 /// HII specific Vendor Device Path Node definition.
188 VENDOR_DEVICE_PATH VendorDevicePath
;
191 } HII_VENDOR_DEVICE_PATH_NODE
;
194 /// HII specific Vendor Device Path definition.
197 HII_VENDOR_DEVICE_PATH_NODE Node
;
198 EFI_DEVICE_PATH_PROTOCOL End
;
199 } HII_VENDOR_DEVICE_PATH
;
202 #define CONFIG_ACCESS_PRIVATE_SIGNATURE SIGNATURE_32 ('H', 'T', 'c', 'a')
203 #define CONFIG_ACCESS_PRIVATE_FROM_PROTOCOL(Record) CR(Record, CONFIG_ACCESS_PRIVATE, ConfigAccessProtocol, CONFIG_ACCESS_PRIVATE_SIGNATURE)
206 EFI_HII_CONFIG_ACCESS_PROTOCOL ConfigAccessProtocol
;
208 // Framework's callback
210 EFI_FORM_CALLBACK_PROTOCOL
*FormCallbackProtocol
;
212 HII_THUNK_CONTEXT
*ThunkContext
;
213 } CONFIG_ACCESS_PRIVATE
;
217 #define EFI_FORMBROWSER_THUNK_PRIVATE_DATA_SIGNATURE SIGNATURE_32 ('F', 'B', 'T', 'd')
218 #define EFI_FORMBROWSER_THUNK_PRIVATE_DATA_FROM_THIS(Record) CR(Record, EFI_FORMBROWSER_THUNK_PRIVATE_DATA, FormBrowser, EFI_FORMBROWSER_THUNK_PRIVATE_DATA_SIGNATURE)
222 HII_THUNK_PRIVATE_DATA
*ThunkPrivate
;
223 EFI_FORM_BROWSER_PROTOCOL FormBrowser
;
224 } EFI_FORMBROWSER_THUNK_PRIVATE_DATA
;
230 extern CONST EFI_HII_DATABASE_PROTOCOL
*mHiiDatabase
;
231 extern CONST EFI_HII_IMAGE_PROTOCOL
*mHiiImageProtocol
;
232 extern CONST EFI_HII_STRING_PROTOCOL
*mHiiStringProtocol
;
233 extern CONST EFI_HII_FONT_PROTOCOL
*mHiiFontProtocol
;
234 extern CONST EFI_HII_CONFIG_ROUTING_PROTOCOL
*mHiiConfigRoutingProtocol
;
235 extern CONST EFI_FORM_BROWSER2_PROTOCOL
*mFormBrowser2Protocol
;
237 extern HII_THUNK_PRIVATE_DATA
*mHiiThunkPrivateData
;
239 extern BOOLEAN mInFrameworkUpdatePakcage
;
244 Registers the various packages that are passed in a Package List.
246 @param This Pointer of Frameowk HII protocol instance.
247 @param Packages Pointer of HII packages.
248 @param Handle Handle value to be returned.
250 @retval EFI_SUCCESS Pacakges has added to HII database successfully.
251 @retval EFI_INVALID_PARAMETER If Handle or Packages is NULL.
257 IN EFI_HII_PROTOCOL
*This
,
258 IN EFI_HII_PACKAGES
*Packages
,
259 OUT FRAMEWORK_EFI_HII_HANDLE
*Handle
264 Remove a package from the HII database.
266 @param This Pointer of Frameowk HII protocol instance.
267 @param Handle Handle value to be removed.
269 @retval EFI_SUCCESS Pacakges has added to HII database successfully.
270 @retval EFI_INVALID_PARAMETER If Handle or Packages is NULL.
276 IN EFI_HII_PROTOCOL
*This
,
277 IN FRAMEWORK_EFI_HII_HANDLE Handle
281 Determines the handles that are currently active in the database.
283 This function determines the handles that are currently active in the database.
284 For example, a program wishing to create a Setup-like configuration utility would use this call
285 to determine the handles that are available. It would then use calls defined in the forms section
286 below to extract forms and then interpret them.
288 @param This A pointer to the EFI_HII_PROTOCOL instance.
289 @param HandleBufferLength On input, a pointer to the length of the handle buffer.
290 On output, the length of the handle buffer that is required for the handles found.
291 @param Handle Pointer to an array of EFI_HII_HANDLE instances returned.
292 Type EFI_HII_HANDLE is defined in EFI_HII_PROTOCOL.NewPack() in the Packages section.
294 @retval EFI_SUCCESS Handle was updated successfully.
296 @retval EFI_BUFFER_TOO_SMALL The HandleBufferLength parameter indicates that Handle is too small
297 to support the number of handles. HandleBufferLength is updated with a value that
298 will enable the data to fit.
303 IN EFI_HII_PROTOCOL
*This
,
304 IN OUT UINT16
*HandleBufferLength
,
305 OUT FRAMEWORK_EFI_HII_HANDLE
*Handle
310 This thunk module only handles UEFI HII packages. The caller of this function
311 won't be able to parse the content. Therefore, it is not supported.
313 This function will ASSERT and return EFI_UNSUPPORTED.
317 @param BufferSize N.A.
320 @retval EFI_UNSUPPORTED
326 IN EFI_HII_PROTOCOL
*This
,
327 IN FRAMEWORK_EFI_HII_HANDLE Handle
,
328 IN OUT UINTN
*BufferSize
,
333 Translates a Unicode character into the corresponding font glyph.
336 This function is only called by Graphics Console module and GraphicsLib.
337 Wrap the Framework HII GetGlyph function to UEFI Font Protocol.
339 EDK II provides a UEFI Graphics Console module. ECP provides a GraphicsLib
340 complying to UEFI HII.
342 @param This A pointer to the EFI_HII_PROTOCOL instance.
343 @param Source A pointer to a Unicode string.
344 @param Index On input, the offset into the string from which to fetch the character. On successful completion, the
345 index is updated to the first character past the character(s) making up the just extracted glyph.
346 @param GlyphBuffer Pointer to an array where the glyphs corresponding to the characters in the source may be stored.
347 GlyphBuffer is assumed to be wide enough to accept a wide glyph character.
348 @param BitWidth If EFI_SUCCESS was returned, the UINT16 pointed to by this value is filled with the length of the glyph in pixels.
349 It is unchanged if the call was unsuccessful.
350 @param InternalStatus To save the time required to read the string from the beginning on each glyph extraction
351 (for example, to ensure that the narrow versus wide glyph mode is correct), this value is
352 updated each time the function is called with the status that is local to the call. The cell pointed
353 to by this parameter must be initialized to zero prior to invoking the call the first time for any string.
355 @retval EFI_SUCCESS It worked.
356 @retval EFI_NOT_FOUND A glyph for a character was not found.
363 IN EFI_HII_PROTOCOL
*This
,
365 IN OUT UINT16
*Index
,
366 OUT UINT8
**GlyphBuffer
,
367 OUT UINT16
*BitWidth
,
368 IN OUT UINT32
*InternalStatus
372 Translates a glyph into the format required for input to the Universal Graphics Adapter (UGA) Block Transfer (BLT) routines.
375 This function is only called by Graphics Console module and GraphicsLib.
376 EDK II provides a UEFI Graphics Console module. ECP provides a GraphicsLib
377 complying to UEFI HII.
379 @param This A pointer to the EFI_HII_PROTOCOL instance.
380 @param GlyphBuffer A pointer to the buffer that contains glyph data.
381 @param Foreground The foreground setting requested to be used for the generated BltBuffer data. Type EFI_UGA_PIXEL is defined in "Related Definitions" below.
382 @param Background The background setting requested to be used for the generated BltBuffer data.
383 @param Count The entry in the BltBuffer upon which to act.
384 @param Width The width in bits of the glyph being converted.
385 @param Height The height in bits of the glyph being converted
386 @param BltBuffer A pointer to the buffer that contains the data that is ready to be used by the UGA BLT routines.
388 @retval EFI_SUCCESS It worked.
389 @retval EFI_NOT_FOUND A glyph for a character was not found.
396 IN EFI_HII_PROTOCOL
*This
,
397 IN UINT8
*GlyphBuffer
,
398 IN EFI_GRAPHICS_OUTPUT_BLT_PIXEL Foreground
,
399 IN EFI_GRAPHICS_OUTPUT_BLT_PIXEL Background
,
403 IN OUT EFI_GRAPHICS_OUTPUT_BLT_PIXEL
*BltBuffer
407 Create or update a String Token in a String Package.
409 If *Reference == 0, a new String Token is created.
411 @param This A pointer to the EFI_HII_PROTOCOL instance.
412 @param Language Pointer to a NULL-terminated string containing a single ISO 639-2 language
413 identifier, indicating the language to print. A string consisting of
414 all spaces indicates that the string is applicable to all languages.
415 @param Handle The handle of the language pack to which the string is to be added.
416 @param Reference The string token assigned to the string.
417 @param NewString The string to be added.
420 @retval EFI_SUCCESS The string was effectively registered.
421 @retval EFI_INVALID_PARAMETER The Handle was unknown. The string is not created or updated in the
427 IN EFI_HII_PROTOCOL
*This
,
429 IN FRAMEWORK_EFI_HII_HANDLE Handle
,
430 IN OUT STRING_REF
*Reference
,
435 This function extracts a string from a package already registered with the EFI HII database.
437 @param This A pointer to the EFI_HII_PROTOCOL instance.
438 @param Handle The HII handle on which the string resides.
439 @param Token The string token assigned to the string.
440 @param Raw If TRUE, the string is returned unedited in the internal storage format described
441 above. If false, the string returned is edited by replacing <cr> with <space>
442 and by removing special characters such as the <wide> prefix.
443 @param LanguageString Pointer to a NULL-terminated string containing a single ISO 639-2 language
444 identifier, indicating the language to print. If the LanguageString is empty (starts
445 with a NULL), the default system language will be used to determine the language.
446 @param BufferLength Length of the StringBuffer. If the status reports that the buffer width is too
447 small, this parameter is filled with the length of the buffer needed.
448 @param StringBuffer The buffer designed to receive the characters in the string. Type EFI_STRING is
451 @retval EFI_INVALID_PARAMETER If input parameter is invalid.
452 @retval EFI_BUFFER_TOO_SMALL If the *BufferLength is too small.
453 @retval EFI_SUCCESS Operation is successful.
459 IN EFI_HII_PROTOCOL
*This
,
460 IN FRAMEWORK_EFI_HII_HANDLE Handle
,
463 IN CHAR16
*LanguageString
,
464 IN OUT UINTN
*BufferLength
,
465 OUT EFI_STRING StringBuffer
469 This function removes any new strings that were added after the initial string export for this handle.
470 UEFI HII String Protocol does not have Reset String function. This function perform nothing.
472 @param This A pointer to the EFI_HII_PROTOCOL instance.
473 @param Handle The HII handle on which the string resides.
475 @retval EFI_SUCCESS This function is a NOP and always return EFI_SUCCESS.
481 IN EFI_HII_PROTOCOL
*This
,
482 IN FRAMEWORK_EFI_HII_HANDLE Handle
486 Test if all of the characters in a string have corresponding font characters.
488 This is a deprecated API. No Framework HII module is calling it. This function will ASSERT and
489 return EFI_UNSUPPORTED.
491 @param This A pointer to the EFI_HII_PROTOCOL instance.
492 @param StringToTest A pointer to a Unicode string.
493 @param FirstMissing A pointer to an index into the string. On input, the index of
494 the first character in the StringToTest to examine. On exit, the index
495 of the first character encountered for which a glyph is unavailable.
496 If all glyphs in the string are available, the index is the index of the terminator
498 @param GlyphBufferSize A pointer to a value. On output, if the function returns EFI_SUCCESS,
499 it contains the amount of memory that is required to store the string? glyph equivalent.
501 @retval EFI_UNSUPPORTED The function performs nothing and return EFI_UNSUPPORTED.
506 IN EFI_HII_PROTOCOL
*This
,
507 IN CHAR16
*StringToTest
,
508 IN OUT UINT32
*FirstMissing
,
509 OUT UINT32
*GlyphBufferSize
513 Allows a program to determine the primary languages that are supported on a given handle.
515 This routine is intended to be used by drivers to query the interface database for supported languages.
516 This routine returns a string of concatenated 3-byte language identifiers, one per string package associated with the handle.
518 @param This A pointer to the EFI_HII_PROTOCOL instance.
519 @param Handle The handle on which the strings reside. Type EFI_HII_HANDLE is defined in EFI_HII_PROTOCOL.NewPack()
520 in the Packages section.
521 @param LanguageString A string allocated by GetPrimaryLanguages() that contains a list of all primary languages
522 registered on the handle. The routine will not return the three-spaces language identifier used in
523 other functions to indicate non-language-specific strings.
525 @retval EFI_SUCCESS LanguageString was correctly returned.
527 @retval EFI_INVALID_PARAMETER The Handle was unknown.
531 HiiGetPrimaryLanguages (
532 IN EFI_HII_PROTOCOL
*This
,
533 IN FRAMEWORK_EFI_HII_HANDLE Handle
,
534 OUT EFI_STRING
*LanguageString
538 Allows a program to determine which secondary languages are supported on a given handle for a given primary language
540 This routine is intended to be used by drivers to query the interface database for supported languages.
541 This routine returns a string of concatenated 3-byte language identifiers, one per string package associated with the handle.
543 @param This A pointer to the EFI_HII_PROTOCOL instance.
544 @param Handle The handle on which the strings reside. Type EFI_HII_HANDLE is defined in EFI_HII_PROTOCOL.NewPack()
545 in the Packages section.
546 @param PrimaryLanguage Pointer to a NULL-terminated string containing a single ISO 639-2 language identifier, indicating
547 the primary language.
548 @param LanguageString A string allocated by GetSecondaryLanguages() containing a list of all secondary languages registered
549 on the handle. The routine will not return the three-spaces language identifier used in other functions
550 to indicate non-language-specific strings, nor will it return the primary language. This function succeeds
551 but returns a NULL LanguageString if there are no secondary languages associated with the input Handle and
552 PrimaryLanguage pair. Type EFI_STRING is defined in String.
554 @retval EFI_SUCCESS LanguageString was correctly returned.
555 @retval EFI_INVALID_PARAMETER The Handle was unknown.
559 HiiGetSecondaryLanguages (
560 IN EFI_HII_PROTOCOL
*This
,
561 IN FRAMEWORK_EFI_HII_HANDLE Handle
,
562 IN CHAR16
*PrimaryLanguage
,
563 OUT EFI_STRING
*LanguageString
568 This function allows a program to extract a part of a string of not more than a given width.
569 With repeated calls, this allows a calling program to extract "lines" of text that fit inside
570 columns. The effort of measuring the fit of strings inside columns is localized to this call.
572 This is a deprecated API. No Framework HII module is calling it. This function will ASSERT and
573 return EFI_UNSUPPORTED.
575 @param This A pointer to the EFI_HII_PROTOCOL instance.
576 @param Handle The HII handle on which the string resides.
577 @param Token The string token assigned to the string.
578 @param Index On input, the offset into the string where the line is to start.
579 On output, the index is updated to point to beyond the last character returned
581 @param LineWidth The maximum width of the line in units of narrow glyphs.
582 @param LanguageString Pointer to a NULL-terminated string containing a single ISO 639-2 language
583 identifier, indicating the language to print. If the LanguageString is empty (starts
584 with a NULL), the default system language will be used to determine the language.
585 @param BufferLength Length of the StringBuffer. If the status reports that the buffer width is too
586 small, this parameter is filled with the length of the buffer needed.
587 @param StringBuffer The buffer designed to receive the characters in the string. Type EFI_STRING is
590 @retval EFI_UNSUPPORTED.
595 IN EFI_HII_PROTOCOL
*This
,
596 IN FRAMEWORK_EFI_HII_HANDLE Handle
,
598 IN OUT UINT16
*Index
,
600 IN CHAR16
*LanguageString
,
601 IN OUT UINT16
*BufferLength
,
602 OUT EFI_STRING StringBuffer
606 This function allows a program to extract a form or form package that has
607 previously been registered with the EFI HII database.
609 In this thunk module, this function will create a IFR Package with only
610 one Formset. Effectively, only the GUID of the Formset is updated and return
611 in this IFR package to caller. This is enable the Framework modules which call
612 a API named GetStringFromToken. GetStringFromToken retieves a String based on
613 a String Token from a Package List known only by the Formset GUID.
617 @param This A pointer to the EFI_HII_PROTOCOL instance.
618 @param Handle Handle on which the form resides. Type FRAMEWORK_EFI_HII_HANDLE is defined in
619 EFI_HII_PROTOCOL.NewPack() in the Packages section.
620 @param FormId Ignored by this implementation.
621 @param BufferLengthTemp On input, the size of input buffer. On output, it
622 is the size of FW_HII_FORMSET_TEMPLATE.
623 @param Buffer The buffer designed to receive the form(s).
625 @retval EFI_SUCCESS Buffer filled with the requested forms. BufferLength
627 @retval EFI_INVALID_PARAMETER The handle is unknown.
628 @retval EFI_NOT_FOUND A form on the requested handle cannot be found with the
630 @retval EFI_BUFFER_TOO_SMALL The buffer provided was not large enough to allow the form to be stored.
636 IN EFI_HII_PROTOCOL
*This
,
637 IN FRAMEWORK_EFI_HII_HANDLE Handle
,
638 IN EFI_FORM_ID FormId
,
639 IN OUT UINTN
*BufferLengthTemp
,
645 This function allows a program to extract the NV Image
646 that represents the default storage image
649 @param This A pointer to the EFI_HII_PROTOCOL instance.
650 @param Handle The HII handle from which will have default data retrieved.
651 UINTN - Mask used to retrieve the default image.
652 @param DefaultMask EDES_TODO: Add parameter description
653 @param VariablePackList Callee allocated, tightly-packed, link list data
654 structure that contain all default varaible packs
655 from the Hii Database.
657 @retval EFI_NOT_FOUND If Hii database does not contain any default images.
658 @retval EFI_INVALID_PARAMETER Invalid input parameter.
659 @retval EFI_SUCCESS Operation successful.
665 IN EFI_HII_PROTOCOL
*This
,
666 IN FRAMEWORK_EFI_HII_HANDLE Handle
,
667 IN UINTN DefaultMask
,
668 OUT EFI_HII_VARIABLE_PACK_LIST
**VariablePackList
672 This function allows the caller to update a form that has
673 previously been registered with the EFI HII database.
676 @param This EDES_TODO: Add parameter description
677 @param Handle Hii Handle associated with the Formset to modify
678 @param Label Update information starting immediately after this label in the IFR
679 @param AddData If TRUE, add data. If FALSE, remove data
680 @param Data If adding data, this is the pointer to the data to add
682 @retval EFI_SUCCESS Update success.
683 @retval Other Update fail.
689 IN EFI_HII_PROTOCOL
*This
,
690 IN FRAMEWORK_EFI_HII_HANDLE Handle
,
691 IN EFI_FORM_LABEL Label
,
693 IN EFI_HII_UPDATE_DATA
*Data
697 Retrieves the current keyboard layout.
698 This function is not implemented by HII Thunk Module.
700 @param This A pointer to the EFI_HII_PROTOCOL instance.
701 @param DescriptorCount A pointer to the number of Descriptor entries being described in the keyboard layout being retrieved.
702 @param Descriptor A pointer to a buffer containing an array of EFI_KEY_DESCRIPTOR entries. Each entry will reflect the
703 definition of a specific physical key. Type EFI_KEY_DESCRIPTOR is defined in "Related Definitions" below.
705 @retval EFI_SUCCESS The keyboard layout was retrieved successfully.
710 HiiGetKeyboardLayout (
711 IN EFI_HII_PROTOCOL
*This
,
712 OUT UINT16
*DescriptorCount
,
713 OUT FRAMEWORK_EFI_KEY_DESCRIPTOR
*Descriptor
717 This is the Framework Setup Browser interface which displays a FormSet.
719 @param This The EFI_FORM_BROWSER_PROTOCOL context.
720 @param UseDatabase TRUE if the FormSet is from HII database. The Thunk implementation
721 only support UseDatabase is TRUE.
722 @param Handle The Handle buffer.
723 @param HandleCount The number of Handle in the Handle Buffer. It must be 1 for this implementation.
724 @param Packet The pointer to data buffer containing IFR and String package. Not supported.
725 @param CallbackHandle Not supported.
726 @param NvMapOverride The buffer is used only when there is no NV variable to define the
727 current settings and the caller needs to provide to the browser the
728 current settings for the the "fake" NV variable. If used, no saving of
729 an NV variable is possbile. This parameter is also ignored if Handle is NULL.
730 @param ScreenDimensions
731 Allows the browser to be called so that it occupies a portion of the physical
732 screen instead of dynamically determining the screen dimensions.
733 @param ResetRequired This BOOLEAN value denotes whether a reset is required based on the data that
734 might have been changed. The ResetRequired parameter is primarily applicable
735 for configuration applications, and is an optional parameter.
737 @retval EFI_SUCCESS If the Formset is displayed correctly.
738 @retval EFI_UNSUPPORTED If UseDatabase is FALSE or HandleCount is not 1.
739 @retval EFI_INVALID_PARAMETER If the *Handle passed in is not found in the database.
744 IN EFI_FORM_BROWSER_PROTOCOL
*This
,
745 IN BOOLEAN UseDatabase
,
746 IN FRAMEWORK_EFI_HII_HANDLE
*Handle
,
747 IN UINTN HandleCount
,
748 IN EFI_IFR_PACKET
*Packet
, OPTIONAL
749 IN EFI_HANDLE CallbackHandle
, OPTIONAL
750 IN UINT8
*NvMapOverride
, OPTIONAL
751 IN FRAMEWORK_EFI_SCREEN_DESCRIPTOR
*ScreenDimensions
, OPTIONAL
752 OUT BOOLEAN
*ResetRequired OPTIONAL
757 Rountine used to display a generic dialog interface and return
758 the Key or Input from user input.
760 @param LinesNumber The number of lines for the dialog box.
761 @param HotKey Defines if a single character is parsed (TRUE) and returned in KeyValue
762 or if a string is returned in StringBuffer.
763 @param MaximumStringSize The maximum size in bytes of a typed-in string.
764 @param StringBuffer On return contains the typed-in string if HotKey is FALSE.
765 @param Key The EFI_INPUT_KEY value returned if HotKey is TRUE.
766 @param FirstString The pointer to the first string in the list of strings
767 that comprise the dialog box.
768 @param ... A series of NumberOfLines text strings that will be used
769 to construct the dialog box.
770 @retval EFI_SUCCESS The dialog is created successfully and user interaction was received.
771 @retval EFI_DEVICE_ERROR The user typed in an ESC.
772 @retval EFI_INVALID_PARAMETER One of the parameters was invalid.(StringBuffer == NULL && HotKey == FALSE).
777 IN UINTN LinesNumber
,
779 IN UINTN MaximumStringSize
,
780 OUT CHAR16
*StringBuffer
,
781 OUT EFI_INPUT_KEY
*Key
,
782 IN CHAR16
*FirstString
,
787 This notification function will be called when a Package List is removed
788 using UEFI HII interface. The Package List removed need to be removed from
789 Framework Thunk module too.
791 If the Package List registered is not Sting Package,
792 then ASSERT. If the NotifyType is not REMOVE_PACK, then ASSERT.
793 Both cases means UEFI HII Database itself is buggy.
795 @param PackageType The Package Type.
796 @param PackageGuid The Package GUID.
797 @param Package The Package Header.
798 @param Handle The HII Handle of this Package List.
799 @param NotifyType The reason of the notification.
801 @retval EFI_SUCCESS The notification function is successful.
807 IN UINT8 PackageType
,
808 IN CONST EFI_GUID
*PackageGuid
,
809 IN CONST EFI_HII_PACKAGE_HEADER
*Package
,
810 IN EFI_HII_HANDLE Handle
,
811 IN EFI_HII_DATABASE_NOTIFY_TYPE NotifyType
815 This notification function will be called when a Package List is registered
816 using UEFI HII interface. The Package List registered need to be recorded in
817 Framework Thunk module as Thunk Module may need to look for String Package in
818 the package registered.
820 If the Package List registered is not either Sting Package or IFR package,
821 then ASSERT. If the NotifyType is not ADD_PACK or NEW_PACK, then ASSERT.
822 Both cases means UEFI HII Database itself is buggy.
824 @param PackageType The Package Type.
825 @param PackageGuid The Package GUID.
826 @param Package The Package Header.
827 @param Handle The HII Handle of this Package List.
828 @param NotifyType The reason of the notification.
830 @retval EFI_SUCCESS The notification function is successful.
836 IN UINT8 PackageType
,
837 IN CONST EFI_GUID
*PackageGuid
,
838 IN CONST EFI_HII_PACKAGE_HEADER
*Package
,
839 IN EFI_HII_HANDLE Handle
,
840 IN EFI_HII_DATABASE_NOTIFY_TYPE NotifyType
844 Create a Hii Update data Handle used to call IfrLibUpdateForm.
846 @param ThunkContext The HII Thunk Context.
847 @param FwUpdateData The Framework Update Data.
848 @param UefiOpCodeHandle The UEFI Update Data.
850 @retval EFI_SUCCESS The UEFI Update Data is created successfully.
851 @retval EFI_UNSUPPORTED There is unsupported opcode in FwUpdateData.
852 @retval EFI_OUT_OF_RESOURCES There is not enough resource.
855 FwUpdateDataToUefiUpdateData (
856 IN HII_THUNK_CONTEXT
*ThunkContext
,
857 IN CONST EFI_HII_UPDATE_DATA
*FwUpdateData
,
858 IN VOID
*UefiOpCodeHandle
864 Initialize string packages in HII database.
868 InitSetBrowserStrings (
874 Convert language code from RFC4646 to ISO639-2.
876 LanguageRfc4646 contain a single RFC 4646 code such as
879 The LanguageRfc4646 must be a buffer large enough
880 for ISO_639_2_ENTRY_SIZE characters.
882 If LanguageRfc4646 is NULL, then ASSERT.
883 If LanguageIso639 is NULL, then ASSERT.
885 @param LanguageRfc4646 RFC4646 language code.
886 @param LanguageIso639 ISO639-2 language code.
888 @retval EFI_SUCCESS Language code converted.
889 @retval EFI_NOT_FOUND Language code not found.
894 ConvertRfc4646LanguageToIso639Language (
895 IN CHAR8
*LanguageRfc4646
,
896 OUT CHAR8
*LanguageIso639
901 Convert language code from ISO639-2 to RFC4646 and return the converted language.
902 Caller is responsible for freeing the allocated buffer.
904 LanguageIso639 contain a single ISO639-2 code such as
907 If LanguageIso639 is NULL, then ASSERT.
908 If LanguageRfc4646 is NULL, then ASSERT.
910 @param LanguageIso639 ISO639-2 language code.
912 @return the allocated buffer or NULL, if the language is not found.
917 ConvertIso639LanguageToRfc4646Language (
918 IN CONST CHAR8
*LanguageIso639
923 Get next language from language code list (with separator ';').
925 If LangCode is NULL, then ASSERT.
926 If Lang is NULL, then ASSERT.
928 @param LangCode On input: point to first language in the list. On
929 output: point to next language in the list, or
930 NULL if no more language in the list.
931 @param Lang The first language in the list.
937 IN OUT CHAR8
**LangCode
,
943 #include "ConfigAccess.h"