2 Private structures definitions in HiiDatabase.
4 Copyright (c) 2007 - 2016, 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
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.
15 #ifndef __HII_DATABASE_PRIVATE_H__
16 #define __HII_DATABASE_PRIVATE_H__
20 #include <Protocol/DevicePath.h>
21 #include <Protocol/HiiFont.h>
22 #include <Protocol/HiiImage.h>
23 #include <Protocol/HiiString.h>
24 #include <Protocol/HiiDatabase.h>
25 #include <Protocol/HiiConfigRouting.h>
26 #include <Protocol/HiiConfigAccess.h>
27 #include <Protocol/HiiConfigKeyword.h>
28 #include <Protocol/SimpleTextOut.h>
30 #include <Guid/HiiKeyBoardLayout.h>
31 #include <Guid/GlobalVariable.h>
34 #include <Library/DebugLib.h>
35 #include <Library/BaseMemoryLib.h>
36 #include <Library/UefiDriverEntryPoint.h>
37 #include <Library/UefiBootServicesTableLib.h>
38 #include <Library/BaseLib.h>
39 #include <Library/DevicePathLib.h>
40 #include <Library/MemoryAllocationLib.h>
41 #include <Library/UefiLib.h>
42 #include <Library/PcdLib.h>
43 #include <Library/UefiRuntimeServicesTableLib.h>
44 #include <Library/PrintLib.h>
46 #define MAX_STRING_LENGTH 1024
47 #define MAX_FONT_NAME_LEN 256
48 #define NARROW_BASELINE 15
49 #define WIDE_BASELINE 14
50 #define SYS_FONT_INFO_MASK 0x37
51 #define REPLACE_UNKNOWN_GLYPH 0xFFFD
52 #define PROPORTIONAL_GLYPH 0x80
53 #define NARROW_GLYPH 0x40
55 #define BITMAP_LEN_1_BIT(Width, Height) (((Width) + 7) / 8 * (Height))
56 #define BITMAP_LEN_4_BIT(Width, Height) (((Width) + 1) / 2 * (Height))
57 #define BITMAP_LEN_8_BIT(Width, Height) ((Width) * (Height))
58 #define BITMAP_LEN_24_BIT(Width, Height) ((Width) * (Height) * 3)
63 // BASE_CR (a, IFR_DEFAULT_VALUE_DATA, Entry) to get the whole structure.
66 LIST_ENTRY Entry
; // Link to VarStorage
71 LIST_ENTRY BlockEntry
; // Link to its Block array
72 } IFR_VARSTORAGE_DATA
;
75 LIST_ENTRY Entry
; // Link to Block array
78 EFI_QUESTION_ID QuestionId
;
81 LIST_ENTRY DefaultValueEntry
; // Link to its default value array
86 // Get default value from IFR data.
89 DefaultValueFromDefault
= 0, // Get from the minimum or first one when not set default value.
90 DefaultValueFromOtherDefault
, // Get default vale from other default when no default(When other
91 // defaults are more than one, use the default with smallest default id).
92 DefaultValueFromFlag
, // Get default value from the defalut flag.
93 DefaultValueFromOpcode
// Get default value from default opcode, highest priority.
98 DEFAULT_VALUE_TYPE Type
;
99 BOOLEAN Cleaned
; // Whether this value is cleaned
100 // TRUE Cleaned, the value can't be used
101 // FALSE Not cleaned, the value can be used.
103 EFI_IFR_TYPE_VALUE Value
;
109 #define EFI_HII_VARSTORE_BUFFER 0
110 #define EFI_HII_VARSTORE_NAME_VALUE 1
111 #define EFI_HII_VARSTORE_EFI_VARIABLE 2
112 #define EFI_HII_VARSTORE_EFI_VARIABLE_BUFFER 3
115 // Keyword handler protocol filter type.
117 #define EFI_KEYWORD_FILTER_READONY 0x01
118 #define EFI_KEYWORD_FILTER_REAWRITE 0x02
119 #define EFI_KEYWORD_FILTER_BUFFER 0x10
120 #define EFI_KEYWORD_FILTER_NUMERIC 0x20
121 #define EFI_KEYWORD_FILTER_NUMERIC_1 0x30
122 #define EFI_KEYWORD_FILTER_NUMERIC_2 0x40
123 #define EFI_KEYWORD_FILTER_NUMERIC_4 0x50
124 #define EFI_KEYWORD_FILTER_NUMERIC_8 0x60
127 #define HII_FORMSET_STORAGE_SIGNATURE SIGNATURE_32 ('H', 'S', 'T', 'G')
132 EFI_HII_HANDLE HiiHandle
;
133 EFI_HANDLE DriverHandle
;
135 UINT8 Type
; // EFI_HII_VARSTORE_BUFFER, EFI_HII_VARSTORE_NAME_VALUE, EFI_HII_VARSTORE_EFI_VARIABLE
139 } HII_FORMSET_STORAGE
;
143 // String Package definitions
145 #define HII_STRING_PACKAGE_SIGNATURE SIGNATURE_32 ('h','i','s','p')
146 typedef struct _HII_STRING_PACKAGE_INSTANCE
{
148 EFI_HII_STRING_PACKAGE_HDR
*StringPkgHdr
;
150 LIST_ENTRY StringEntry
;
151 LIST_ENTRY FontInfoList
; // local font info list
153 EFI_STRING_ID MaxStringId
; // record StringId
154 } HII_STRING_PACKAGE_INSTANCE
;
157 // Form Package definitions
159 #define HII_IFR_PACKAGE_SIGNATURE SIGNATURE_32 ('h','f','r','p')
160 typedef struct _HII_IFR_PACKAGE_INSTANCE
{
162 EFI_HII_PACKAGE_HEADER FormPkgHdr
;
165 } HII_IFR_PACKAGE_INSTANCE
;
168 // Simple Font Package definitions
170 #define HII_S_FONT_PACKAGE_SIGNATURE SIGNATURE_32 ('h','s','f','p')
171 typedef struct _HII_SIMPLE_FONT_PACKAGE_INSTANCE
{
173 EFI_HII_SIMPLE_FONT_PACKAGE_HDR
*SimpleFontPkgHdr
;
174 LIST_ENTRY SimpleFontEntry
;
175 } HII_SIMPLE_FONT_PACKAGE_INSTANCE
;
178 // Font Package definitions
180 #define HII_FONT_PACKAGE_SIGNATURE SIGNATURE_32 ('h','i','f','p')
181 typedef struct _HII_FONT_PACKAGE_INSTANCE
{
183 EFI_HII_FONT_PACKAGE_HDR
*FontPkgHdr
;
187 LIST_ENTRY FontEntry
;
188 LIST_ENTRY GlyphInfoList
;
189 } HII_FONT_PACKAGE_INSTANCE
;
191 #define HII_GLYPH_INFO_SIGNATURE SIGNATURE_32 ('h','g','i','s')
192 typedef struct _HII_GLYPH_INFO
{
196 EFI_HII_GLYPH_INFO Cell
;
199 #define HII_FONT_INFO_SIGNATURE SIGNATURE_32 ('h','l','f','i')
200 typedef struct _HII_FONT_INFO
{
203 LIST_ENTRY
*GlobalEntry
;
207 #define HII_GLOBAL_FONT_INFO_SIGNATURE SIGNATURE_32 ('h','g','f','i')
208 typedef struct _HII_GLOBAL_FONT_INFO
{
211 HII_FONT_PACKAGE_INSTANCE
*FontPackage
;
213 EFI_FONT_INFO
*FontInfo
;
214 } HII_GLOBAL_FONT_INFO
;
217 // Image Package definitions
220 #define HII_PIXEL_MASK 0x80
222 typedef struct _HII_IMAGE_PACKAGE_INSTANCE
{
223 EFI_HII_IMAGE_PACKAGE_HDR ImagePkgHdr
;
224 UINT32 ImageBlockSize
;
225 UINT32 PaletteInfoSize
;
226 EFI_HII_IMAGE_BLOCK
*ImageBlock
;
228 } HII_IMAGE_PACKAGE_INSTANCE
;
231 // Keyboard Layout Pacakge definitions
233 #define HII_KB_LAYOUT_PACKAGE_SIGNATURE SIGNATURE_32 ('h','k','l','p')
234 typedef struct _HII_KEYBOARD_LAYOUT_PACKAGE_INSTANCE
{
237 LIST_ENTRY KeyboardEntry
;
238 } HII_KEYBOARD_LAYOUT_PACKAGE_INSTANCE
;
241 // Guid Package definitions
243 #define HII_GUID_PACKAGE_SIGNATURE SIGNATURE_32 ('h','i','g','p')
244 typedef struct _HII_GUID_PACKAGE_INSTANCE
{
247 LIST_ENTRY GuidEntry
;
248 } HII_GUID_PACKAGE_INSTANCE
;
251 // A package list can contain only one or less than one device path package.
252 // This rule also applies to image package since ImageId can not be duplicate.
254 typedef struct _HII_DATABASE_PACKAGE_LIST_INSTANCE
{
255 EFI_HII_PACKAGE_LIST_HEADER PackageListHdr
;
256 LIST_ENTRY GuidPkgHdr
;
257 LIST_ENTRY FormPkgHdr
;
258 LIST_ENTRY KeyboardLayoutHdr
;
259 LIST_ENTRY StringPkgHdr
;
260 LIST_ENTRY FontPkgHdr
;
261 HII_IMAGE_PACKAGE_INSTANCE
*ImagePkg
;
262 LIST_ENTRY SimpleFontPkgHdr
;
263 UINT8
*DevicePathPkg
;
264 } HII_DATABASE_PACKAGE_LIST_INSTANCE
;
266 #define HII_HANDLE_SIGNATURE SIGNATURE_32 ('h','i','h','l')
274 #define HII_DATABASE_RECORD_SIGNATURE SIGNATURE_32 ('h','i','d','r')
276 typedef struct _HII_DATABASE_RECORD
{
278 HII_DATABASE_PACKAGE_LIST_INSTANCE
*PackageList
;
279 EFI_HANDLE DriverHandle
;
280 EFI_HII_HANDLE Handle
;
281 LIST_ENTRY DatabaseEntry
;
282 } HII_DATABASE_RECORD
;
284 #define HII_DATABASE_NOTIFY_SIGNATURE SIGNATURE_32 ('h','i','d','n')
286 typedef struct _HII_DATABASE_NOTIFY
{
288 EFI_HANDLE NotifyHandle
;
290 EFI_GUID
*PackageGuid
;
291 EFI_HII_DATABASE_NOTIFY PackageNotifyFn
;
292 EFI_HII_DATABASE_NOTIFY_TYPE NotifyType
;
293 LIST_ENTRY DatabaseNotifyEntry
;
294 } HII_DATABASE_NOTIFY
;
296 #define HII_DATABASE_PRIVATE_DATA_SIGNATURE SIGNATURE_32 ('H', 'i', 'D', 'p')
298 typedef struct _HII_DATABASE_PRIVATE_DATA
{
300 LIST_ENTRY DatabaseList
;
301 LIST_ENTRY DatabaseNotifyList
;
302 EFI_HII_FONT_PROTOCOL HiiFont
;
303 EFI_HII_IMAGE_PROTOCOL HiiImage
;
304 EFI_HII_STRING_PROTOCOL HiiString
;
305 EFI_HII_DATABASE_PROTOCOL HiiDatabase
;
306 EFI_HII_CONFIG_ROUTING_PROTOCOL ConfigRouting
;
307 EFI_CONFIG_KEYWORD_HANDLER_PROTOCOL ConfigKeywordHandler
;
308 LIST_ENTRY HiiHandleList
;
310 LIST_ENTRY FontInfoList
; // global font info list
311 UINTN Attribute
; // default system color
312 EFI_GUID CurrentLayoutGuid
;
313 EFI_HII_KEYBOARD_LAYOUT
*CurrentLayout
;
314 } HII_DATABASE_PRIVATE_DATA
;
316 #define HII_FONT_DATABASE_PRIVATE_DATA_FROM_THIS(a) \
318 HII_DATABASE_PRIVATE_DATA, \
320 HII_DATABASE_PRIVATE_DATA_SIGNATURE \
323 #define HII_IMAGE_DATABASE_PRIVATE_DATA_FROM_THIS(a) \
325 HII_DATABASE_PRIVATE_DATA, \
327 HII_DATABASE_PRIVATE_DATA_SIGNATURE \
330 #define HII_STRING_DATABASE_PRIVATE_DATA_FROM_THIS(a) \
332 HII_DATABASE_PRIVATE_DATA, \
334 HII_DATABASE_PRIVATE_DATA_SIGNATURE \
337 #define HII_DATABASE_DATABASE_PRIVATE_DATA_FROM_THIS(a) \
339 HII_DATABASE_PRIVATE_DATA, \
341 HII_DATABASE_PRIVATE_DATA_SIGNATURE \
344 #define CONFIG_ROUTING_DATABASE_PRIVATE_DATA_FROM_THIS(a) \
346 HII_DATABASE_PRIVATE_DATA, \
348 HII_DATABASE_PRIVATE_DATA_SIGNATURE \
351 #define CONFIG_KEYWORD_HANDLER_DATABASE_PRIVATE_DATA_FROM_THIS(a) \
353 HII_DATABASE_PRIVATE_DATA, \
354 ConfigKeywordHandler, \
355 HII_DATABASE_PRIVATE_DATA_SIGNATURE \
359 // Internal function prototypes.
363 Generate a sub string then output it.
365 This is a internal function.
367 @param String A constant string which is the prefix of the to be
368 generated string, e.g. GUID=
370 @param BufferLen The length of the Buffer in bytes.
372 @param Buffer Points to a buffer which will be converted to be the
373 content of the generated string.
375 @param Flag If 1, the buffer contains data for the value of GUID or PATH stored in
376 UINT8 *; if 2, the buffer contains unicode string for the value of NAME;
377 if 3, the buffer contains other data.
379 @param SubStr Points to the output string. It's caller's
380 responsibility to free this buffer.
386 IN CONST EFI_STRING String
,
390 OUT EFI_STRING
*SubStr
394 This function checks whether a handle is a valid EFI_HII_HANDLE.
396 @param Handle Pointer to a EFI_HII_HANDLE
399 @retval FALSE Invalid
404 EFI_HII_HANDLE Handle
409 This function checks whether EFI_FONT_INFO exists in current database. If
410 FontInfoMask is specified, check what options can be used to make a match.
411 Note that the masks relate to where the system default should be supplied
412 are ignored by this function.
414 @param Private Hii database private structure.
415 @param FontInfo Points to EFI_FONT_INFO structure.
416 @param FontInfoMask If not NULL, describes what options can be used
417 to make a match between the font requested and
418 the font available. The caller must guarantee
420 @param FontHandle On entry, Points to the font handle returned by a
421 previous call to GetFontInfo() or NULL to start
423 @param GlobalFontInfo If not NULL, output the corresponding globa font
427 @retval FALSE Not existed
432 IN HII_DATABASE_PRIVATE_DATA
*Private
,
433 IN EFI_FONT_INFO
*FontInfo
,
434 IN EFI_FONT_INFO_MASK
*FontInfoMask
, OPTIONAL
435 IN EFI_FONT_HANDLE FontHandle
, OPTIONAL
436 OUT HII_GLOBAL_FONT_INFO
**GlobalFontInfo OPTIONAL
441 This function invokes the matching registered function.
443 @param Private HII Database driver private structure.
444 @param NotifyType The type of change concerning the database.
445 @param PackageInstance Points to the package referred to by the notification.
446 @param PackageType Package type
447 @param Handle The handle of the package list which contains the specified package.
449 @retval EFI_SUCCESS Already checked all registered function and invoked
451 @retval EFI_INVALID_PARAMETER Any input parameter is not valid.
455 InvokeRegisteredFunction (
456 IN HII_DATABASE_PRIVATE_DATA
*Private
,
457 IN EFI_HII_DATABASE_NOTIFY_TYPE NotifyType
,
458 IN VOID
*PackageInstance
,
459 IN UINT8 PackageType
,
460 IN EFI_HII_HANDLE Handle
465 Retrieve system default font and color.
467 @param Private HII database driver private data.
468 @param FontInfo Points to system default font output-related
469 information. It's caller's responsibility to free
471 @param FontInfoSize If not NULL, output the size of buffer FontInfo.
473 @retval EFI_SUCCESS Cell information is added to the GlyphInfoList.
474 @retval EFI_OUT_OF_RESOURCES The system is out of resources to accomplish the
476 @retval EFI_INVALID_PARAMETER Any input parameter is invalid.
481 IN HII_DATABASE_PRIVATE_DATA
*Private
,
482 OUT EFI_FONT_DISPLAY_INFO
**FontInfo
,
483 OUT UINTN
*FontInfoSize OPTIONAL
488 Parse all string blocks to find a String block specified by StringId.
489 If StringId = (EFI_STRING_ID) (-1), find out all EFI_HII_SIBT_FONT blocks
490 within this string package and backup its information. If LastStringId is
491 specified, the string id of last string block will also be output.
492 If StringId = 0, output the string id of last string block (EFI_HII_SIBT_STRING).
494 @param Private Hii database private structure.
495 @param StringPackage Hii string package instance.
496 @param StringId The string's id, which is unique within
498 @param BlockType Output the block type of found string block.
499 @param StringBlockAddr Output the block address of found string block.
500 @param StringTextOffset Offset, relative to the found block address, of
501 the string text information.
502 @param LastStringId Output the last string id when StringId = 0 or StringId = -1.
503 @param StartStringId The first id in the skip block which StringId in the block.
505 @retval EFI_SUCCESS The string text and font is retrieved
507 @retval EFI_NOT_FOUND The specified text or font info can not be found
509 @retval EFI_OUT_OF_RESOURCES The system is out of resources to accomplish the
515 IN HII_DATABASE_PRIVATE_DATA
*Private
,
516 IN HII_STRING_PACKAGE_INSTANCE
*StringPackage
,
517 IN EFI_STRING_ID StringId
,
518 OUT UINT8
*BlockType
, OPTIONAL
519 OUT UINT8
**StringBlockAddr
, OPTIONAL
520 OUT UINTN
*StringTextOffset
, OPTIONAL
521 OUT EFI_STRING_ID
*LastStringId
, OPTIONAL
522 OUT EFI_STRING_ID
*StartStringId OPTIONAL
527 Parse all glyph blocks to find a glyph block specified by CharValue.
528 If CharValue = (CHAR16) (-1), collect all default character cell information
529 within this font package and backup its information.
531 @param FontPackage Hii string package instance.
532 @param CharValue Unicode character value, which identifies a glyph
534 @param GlyphBuffer Output the corresponding bitmap data of the found
535 block. It is the caller's responsiblity to free
537 @param Cell Output cell information of the encoded bitmap.
538 @param GlyphBufferLen If not NULL, output the length of GlyphBuffer.
540 @retval EFI_SUCCESS The bitmap data is retrieved successfully.
541 @retval EFI_NOT_FOUND The specified CharValue does not exist in current
543 @retval EFI_OUT_OF_RESOURCES The system is out of resources to accomplish the
549 IN HII_FONT_PACKAGE_INSTANCE
*FontPackage
,
551 OUT UINT8
**GlyphBuffer
, OPTIONAL
552 OUT EFI_HII_GLYPH_INFO
*Cell
, OPTIONAL
553 OUT UINTN
*GlyphBufferLen OPTIONAL
557 This function exports Form packages to a buffer.
558 This is a internal function.
560 @param Private Hii database private structure.
561 @param Handle Identification of a package list.
562 @param PackageList Pointer to a package list which will be exported.
563 @param UsedSize The length of buffer be used.
564 @param BufferSize Length of the Buffer.
565 @param Buffer Allocated space for storing exported data.
566 @param ResultSize The size of the already exported content of this
569 @retval EFI_SUCCESS Form Packages are exported successfully.
570 @retval EFI_INVALID_PARAMETER Any input parameter is invalid.
575 IN HII_DATABASE_PRIVATE_DATA
*Private
,
576 IN EFI_HII_HANDLE Handle
,
577 IN HII_DATABASE_PACKAGE_LIST_INSTANCE
*PackageList
,
581 IN OUT UINTN
*ResultSize
585 // EFI_HII_FONT_PROTOCOL protocol interfaces
590 Renders a string to a bitmap or to the display.
592 @param This A pointer to the EFI_HII_FONT_PROTOCOL instance.
593 @param Flags Describes how the string is to be drawn.
594 @param String Points to the null-terminated string to be
596 @param StringInfo Points to the string output information,
597 including the color and font. If NULL, then the
598 string will be output in the default system font
600 @param Blt If this points to a non-NULL on entry, this
601 points to the image, which is Width pixels wide
602 and Height pixels high. The string will be drawn
604 EFI_HII_OUT_FLAG_CLIP is implied. If this points
605 to a NULL on entry, then a buffer
606 will be allocated to hold the generated image and
607 the pointer updated on exit. It is the caller's
608 responsibility to free this buffer.
609 @param BltX Together with BltX, Specifies the offset from the left and top edge
610 of the image of the first character cell in the
612 @param BltY Together with BltY, Specifies the offset from the left and top edge
613 of the image of the first character cell in the
615 @param RowInfoArray If this is non-NULL on entry, then on exit, this
616 will point to an allocated buffer containing
617 row information and RowInfoArraySize will be
618 updated to contain the number of elements.
619 This array describes the characters which were at
620 least partially drawn and the heights of the
621 rows. It is the caller's responsibility to free
623 @param RowInfoArraySize If this is non-NULL on entry, then on exit it
624 contains the number of elements in RowInfoArray.
625 @param ColumnInfoArray If this is non-NULL, then on return it will be
626 filled with the horizontal offset for each
627 character in the string on the row where it is
628 displayed. Non-printing characters will have
629 the offset ~0. The caller is responsible to
630 allocate a buffer large enough so that there
631 is one entry for each character in the string,
632 not including the null-terminator. It is possible
633 when character display is normalized that some
634 character cells overlap.
636 @retval EFI_SUCCESS The string was successfully rendered.
637 @retval EFI_OUT_OF_RESOURCES Unable to allocate an output buffer for
639 @retval EFI_INVALID_PARAMETER The String or Blt.
640 @retval EFI_INVALID_PARAMETER Flags were invalid combination..
646 IN CONST EFI_HII_FONT_PROTOCOL
*This
,
647 IN EFI_HII_OUT_FLAGS Flags
,
648 IN CONST EFI_STRING String
,
649 IN CONST EFI_FONT_DISPLAY_INFO
*StringInfo OPTIONAL
,
650 IN OUT EFI_IMAGE_OUTPUT
**Blt
,
653 OUT EFI_HII_ROW_INFO
**RowInfoArray OPTIONAL
,
654 OUT UINTN
*RowInfoArraySize OPTIONAL
,
655 OUT UINTN
*ColumnInfoArray OPTIONAL
660 Render a string to a bitmap or the screen containing the contents of the specified string.
662 @param This A pointer to the EFI_HII_FONT_PROTOCOL instance.
663 @param Flags Describes how the string is to be drawn.
664 @param PackageList The package list in the HII database to search
665 for the specified string.
666 @param StringId The string's id, which is unique within
668 @param Language Points to the language for the retrieved string.
669 If NULL, then the current system language is
671 @param StringInfo Points to the string output information,
672 including the color and font. If NULL, then the
673 string will be output in the default system font
675 @param Blt If this points to a non-NULL on entry, this
676 points to the image, which is Width pixels wide
677 and Height pixels high. The string will be drawn
679 EFI_HII_OUT_FLAG_CLIP is implied. If this points
680 to a NULL on entry, then a buffer
681 will be allocated to hold the generated image and
682 the pointer updated on exit. It is the caller's
683 responsibility to free this buffer.
684 @param BltX Together with BltX, Specifies the offset from the left and top edge
685 of the image of the first character cell in the
687 @param BltY Together with BltY, Specifies the offset from the left and top edge
688 of the image of the first character cell in the
690 @param RowInfoArray If this is non-NULL on entry, then on exit, this
691 will point to an allocated buffer containing
692 row information and RowInfoArraySize will be
693 updated to contain the number of elements.
694 This array describes the characters which were at
695 least partially drawn and the heights of the
696 rows. It is the caller's responsibility to free
698 @param RowInfoArraySize If this is non-NULL on entry, then on exit it
699 contains the number of elements in RowInfoArray.
700 @param ColumnInfoArray If this is non-NULL, then on return it will be
701 filled with the horizontal offset for each
702 character in the string on the row where it is
703 displayed. Non-printing characters will have
704 the offset ~0. The caller is responsible to
705 allocate a buffer large enough so that there
706 is one entry for each character in the string,
707 not including the null-terminator. It is possible
708 when character display is normalized that some
709 character cells overlap.
711 @retval EFI_SUCCESS The string was successfully rendered.
712 @retval EFI_OUT_OF_RESOURCES Unable to allocate an output buffer for
714 @retval EFI_INVALID_PARAMETER The Blt or PackageList was NULL.
715 @retval EFI_INVALID_PARAMETER Flags were invalid combination.
716 @retval EFI_NOT_FOUND The specified PackageList is not in the Database or the stringid is not
717 in the specified PackageList.
723 IN CONST EFI_HII_FONT_PROTOCOL
*This
,
724 IN EFI_HII_OUT_FLAGS Flags
,
725 IN EFI_HII_HANDLE PackageList
,
726 IN EFI_STRING_ID StringId
,
727 IN CONST CHAR8
* Language
,
728 IN CONST EFI_FONT_DISPLAY_INFO
*StringInfo OPTIONAL
,
729 IN OUT EFI_IMAGE_OUTPUT
**Blt
,
732 OUT EFI_HII_ROW_INFO
**RowInfoArray OPTIONAL
,
733 OUT UINTN
*RowInfoArraySize OPTIONAL
,
734 OUT UINTN
*ColumnInfoArray OPTIONAL
739 Convert the glyph for a single character into a bitmap.
741 @param This A pointer to the EFI_HII_FONT_PROTOCOL instance.
742 @param Char Character to retrieve.
743 @param StringInfo Points to the string font and color information
744 or NULL if the string should use the default
745 system font and color.
746 @param Blt Thus must point to a NULL on entry. A buffer will
747 be allocated to hold the output and the pointer
748 updated on exit. It is the caller's
749 responsibility to free this buffer.
750 @param Baseline Number of pixels from the bottom of the bitmap to
753 @retval EFI_SUCCESS Glyph bitmap created.
754 @retval EFI_OUT_OF_RESOURCES Unable to allocate the output buffer Blt.
755 @retval EFI_WARN_UNKNOWN_GLYPH The glyph was unknown and was replaced with the
756 glyph for Unicode character 0xFFFD.
757 @retval EFI_INVALID_PARAMETER Blt is NULL or *Blt is not NULL.
763 IN CONST EFI_HII_FONT_PROTOCOL
*This
,
765 IN CONST EFI_FONT_DISPLAY_INFO
*StringInfo
,
766 OUT EFI_IMAGE_OUTPUT
**Blt
,
767 OUT UINTN
*Baseline OPTIONAL
772 This function iterates through fonts which match the specified font, using
773 the specified criteria. If String is non-NULL, then all of the characters in
774 the string must exist in order for a candidate font to be returned.
776 @param This A pointer to the EFI_HII_FONT_PROTOCOL instance.
777 @param FontHandle On entry, points to the font handle returned by a
778 previous call to GetFontInfo() or NULL to start
779 with the first font. On return, points to the
780 returned font handle or points to NULL if there
781 are no more matching fonts.
782 @param StringInfoIn Upon entry, points to the font to return information
783 about. If NULL, then the information about the system
784 default font will be returned.
785 @param StringInfoOut Upon return, contains the matching font's information.
786 If NULL, then no information is returned. This buffer
787 is allocated with a call to the Boot Service AllocatePool().
788 It is the caller's responsibility to call the Boot
789 Service FreePool() when the caller no longer requires
790 the contents of StringInfoOut.
791 @param String Points to the string which will be tested to
792 determine if all characters are available. If
793 NULL, then any font is acceptable.
795 @retval EFI_SUCCESS Matching font returned successfully.
796 @retval EFI_NOT_FOUND No matching font was found.
797 @retval EFI_INVALID_PARAMETER StringInfoIn is NULL.
798 @retval EFI_INVALID_PARAMETER StringInfoIn->FontInfoMask is an invalid combination.
799 @retval EFI_OUT_OF_RESOURCES There were insufficient resources to complete the
805 IN CONST EFI_HII_FONT_PROTOCOL
*This
,
806 IN OUT EFI_FONT_HANDLE
*FontHandle
,
807 IN CONST EFI_FONT_DISPLAY_INFO
*StringInfoIn
, OPTIONAL
808 OUT EFI_FONT_DISPLAY_INFO
**StringInfoOut
,
809 IN CONST EFI_STRING String OPTIONAL
813 // EFI_HII_IMAGE_PROTOCOL interfaces
818 This function adds the image Image to the group of images owned by PackageList, and returns
819 a new image identifier (ImageId).
821 @param This A pointer to the EFI_HII_IMAGE_PROTOCOL instance.
822 @param PackageList Handle of the package list where this image will
824 @param ImageId On return, contains the new image id, which is
825 unique within PackageList.
826 @param Image Points to the image.
828 @retval EFI_SUCCESS The new image was added successfully.
829 @retval EFI_NOT_FOUND The specified PackageList could not be found in
831 @retval EFI_OUT_OF_RESOURCES Could not add the image due to lack of resources.
832 @retval EFI_INVALID_PARAMETER Image is NULL or ImageId is NULL.
838 IN CONST EFI_HII_IMAGE_PROTOCOL
*This
,
839 IN EFI_HII_HANDLE PackageList
,
840 OUT EFI_IMAGE_ID
*ImageId
,
841 IN CONST EFI_IMAGE_INPUT
*Image
846 This function retrieves the image specified by ImageId which is associated with
847 the specified PackageList and copies it into the buffer specified by Image.
849 @param This A pointer to the EFI_HII_IMAGE_PROTOCOL instance.
850 @param PackageList Handle of the package list where this image will
852 @param ImageId The image's id,, which is unique within
854 @param Image Points to the image.
856 @retval EFI_SUCCESS The new image was returned successfully.
857 @retval EFI_NOT_FOUND The image specified by ImageId is not available.
858 The specified PackageList is not in the database.
859 @retval EFI_BUFFER_TOO_SMALL The buffer specified by ImageSize is too small to
861 @retval EFI_INVALID_PARAMETER The Image or ImageSize was NULL.
862 @retval EFI_OUT_OF_RESOURCES The bitmap could not be retrieved because there was not
869 IN CONST EFI_HII_IMAGE_PROTOCOL
*This
,
870 IN EFI_HII_HANDLE PackageList
,
871 IN EFI_IMAGE_ID ImageId
,
872 OUT EFI_IMAGE_INPUT
*Image
877 This function updates the image specified by ImageId in the specified PackageListHandle to
878 the image specified by Image.
880 @param This A pointer to the EFI_HII_IMAGE_PROTOCOL instance.
881 @param PackageList The package list containing the images.
882 @param ImageId The image's id,, which is unique within
884 @param Image Points to the image.
886 @retval EFI_SUCCESS The new image was updated successfully.
887 @retval EFI_NOT_FOUND The image specified by ImageId is not in the
888 database. The specified PackageList is not in the database.
889 @retval EFI_INVALID_PARAMETER The Image was NULL.
895 IN CONST EFI_HII_IMAGE_PROTOCOL
*This
,
896 IN EFI_HII_HANDLE PackageList
,
897 IN EFI_IMAGE_ID ImageId
,
898 IN CONST EFI_IMAGE_INPUT
*Image
903 This function renders an image to a bitmap or the screen using the specified
904 color and options. It draws the image on an existing bitmap, allocates a new
905 bitmap or uses the screen. The images can be clipped.
907 @param This A pointer to the EFI_HII_IMAGE_PROTOCOL instance.
908 @param Flags Describes how the image is to be drawn.
909 @param Image Points to the image to be displayed.
910 @param Blt If this points to a non-NULL on entry, this
911 points to the image, which is Width pixels wide
912 and Height pixels high. The image will be drawn
913 onto this image and EFI_HII_DRAW_FLAG_CLIP is
914 implied. If this points to a NULL on entry, then
915 a buffer will be allocated to hold the generated
916 image and the pointer updated on exit. It is the
917 caller's responsibility to free this buffer.
918 @param BltX Specifies the offset from the left and top edge
919 of the output image of the first pixel in the
921 @param BltY Specifies the offset from the left and top edge
922 of the output image of the first pixel in the
925 @retval EFI_SUCCESS The image was successfully drawn.
926 @retval EFI_OUT_OF_RESOURCES Unable to allocate an output buffer for Blt.
927 @retval EFI_INVALID_PARAMETER The Image or Blt was NULL.
928 @retval EFI_INVALID_PARAMETER Any combination of Flags is invalid.
934 IN CONST EFI_HII_IMAGE_PROTOCOL
*This
,
935 IN EFI_HII_DRAW_FLAGS Flags
,
936 IN CONST EFI_IMAGE_INPUT
*Image
,
937 IN OUT EFI_IMAGE_OUTPUT
**Blt
,
944 This function renders an image to a bitmap or the screen using the specified
945 color and options. It draws the image on an existing bitmap, allocates a new
946 bitmap or uses the screen. The images can be clipped.
948 @param This A pointer to the EFI_HII_IMAGE_PROTOCOL instance.
949 @param Flags Describes how the image is to be drawn.
950 @param PackageList The package list in the HII database to search
951 for the specified image.
952 @param ImageId The image's id, which is unique within
954 @param Blt If this points to a non-NULL on entry, this
955 points to the image, which is Width pixels wide
956 and Height pixels high. The image will be drawn
958 EFI_HII_DRAW_FLAG_CLIP is implied. If this points
959 to a NULL on entry, then a buffer will be
960 allocated to hold the generated image and the
961 pointer updated on exit. It is the caller's
962 responsibility to free this buffer.
963 @param BltX Specifies the offset from the left and top edge
964 of the output image of the first pixel in the
966 @param BltY Specifies the offset from the left and top edge
967 of the output image of the first pixel in the
970 @retval EFI_SUCCESS The image was successfully drawn.
971 @retval EFI_OUT_OF_RESOURCES Unable to allocate an output buffer for Blt.
972 @retval EFI_INVALID_PARAMETER The Blt was NULL.
973 @retval EFI_NOT_FOUND The image specified by ImageId is not in the database.
974 The specified PackageList is not in the database.
980 IN CONST EFI_HII_IMAGE_PROTOCOL
*This
,
981 IN EFI_HII_DRAW_FLAGS Flags
,
982 IN EFI_HII_HANDLE PackageList
,
983 IN EFI_IMAGE_ID ImageId
,
984 IN OUT EFI_IMAGE_OUTPUT
**Blt
,
992 // EFI_HII_STRING_PROTOCOL
997 This function adds the string String to the group of strings owned by PackageList, with the
998 specified font information StringFontInfo and returns a new string id.
1000 @param This A pointer to the EFI_HII_STRING_PROTOCOL
1002 @param PackageList Handle of the package list where this string will
1004 @param StringId On return, contains the new strings id, which is
1005 unique within PackageList.
1006 @param Language Points to the language for the new string.
1007 @param LanguageName Points to the printable language name to
1008 associate with the passed in Language field.If
1009 LanguageName is not NULL and the string package
1010 header's LanguageName associated with a given
1011 Language is not zero, the LanguageName being
1012 passed in will be ignored.
1013 @param String Points to the new null-terminated string.
1014 @param StringFontInfo Points to the new string's font information or
1015 NULL if the string should have the default system
1016 font, size and style.
1018 @retval EFI_SUCCESS The new string was added successfully.
1019 @retval EFI_NOT_FOUND The specified PackageList could not be found in
1021 @retval EFI_OUT_OF_RESOURCES Could not add the string due to lack of
1023 @retval EFI_INVALID_PARAMETER String is NULL or StringId is NULL or Language is
1030 IN CONST EFI_HII_STRING_PROTOCOL
*This
,
1031 IN EFI_HII_HANDLE PackageList
,
1032 OUT EFI_STRING_ID
*StringId
,
1033 IN CONST CHAR8
*Language
,
1034 IN CONST CHAR16
*LanguageName
, OPTIONAL
1035 IN CONST EFI_STRING String
,
1036 IN CONST EFI_FONT_INFO
*StringFontInfo OPTIONAL
1041 This function retrieves the string specified by StringId which is associated
1042 with the specified PackageList in the language Language and copies it into
1043 the buffer specified by String.
1045 @param This A pointer to the EFI_HII_STRING_PROTOCOL
1047 @param Language Points to the language for the retrieved string.
1048 @param PackageList The package list in the HII database to search
1049 for the specified string.
1050 @param StringId The string's id, which is unique within
1052 @param String Points to the new null-terminated string.
1053 @param StringSize On entry, points to the size of the buffer
1054 pointed to by String, in bytes. On return,
1055 points to the length of the string, in bytes.
1056 @param StringFontInfo If not NULL, points to the string's font
1057 information. It's caller's responsibility to
1060 @retval EFI_SUCCESS The string was returned successfully.
1061 @retval EFI_NOT_FOUND The string specified by StringId is not
1063 The specified PackageList is not in the database.
1064 @retval EFI_INVALID_LANGUAGE The string specified by StringId is available but
1065 not in the specified language.
1066 @retval EFI_BUFFER_TOO_SMALL The buffer specified by StringSize is too small
1068 @retval EFI_INVALID_PARAMETER The Language or StringSize was NULL.
1069 @retval EFI_INVALID_PARAMETER The value referenced by StringSize was not zero
1070 and String was NULL.
1071 @retval EFI_OUT_OF_RESOURCES There were insufficient resources to complete the
1078 IN CONST EFI_HII_STRING_PROTOCOL
*This
,
1079 IN CONST CHAR8
*Language
,
1080 IN EFI_HII_HANDLE PackageList
,
1081 IN EFI_STRING_ID StringId
,
1082 OUT EFI_STRING String
,
1083 IN OUT UINTN
*StringSize
,
1084 OUT EFI_FONT_INFO
**StringFontInfo OPTIONAL
1089 This function updates the string specified by StringId in the specified PackageList to the text
1090 specified by String and, optionally, the font information specified by StringFontInfo.
1092 @param This A pointer to the EFI_HII_STRING_PROTOCOL
1094 @param PackageList The package list containing the strings.
1095 @param StringId The string's id, which is unique within
1097 @param Language Points to the language for the updated string.
1098 @param String Points to the new null-terminated string.
1099 @param StringFontInfo Points to the string's font information or NULL
1100 if the string font information is not changed.
1102 @retval EFI_SUCCESS The string was updated successfully.
1103 @retval EFI_NOT_FOUND The string specified by StringId is not in the
1105 @retval EFI_INVALID_PARAMETER The String or Language was NULL.
1106 @retval EFI_OUT_OF_RESOURCES The system is out of resources to accomplish the
1113 IN CONST EFI_HII_STRING_PROTOCOL
*This
,
1114 IN EFI_HII_HANDLE PackageList
,
1115 IN EFI_STRING_ID StringId
,
1116 IN CONST CHAR8
*Language
,
1117 IN CONST EFI_STRING String
,
1118 IN CONST EFI_FONT_INFO
*StringFontInfo OPTIONAL
1123 This function returns the list of supported languages, in the format specified
1124 in Appendix M of UEFI 2.1 spec.
1126 @param This A pointer to the EFI_HII_STRING_PROTOCOL
1128 @param PackageList The package list to examine.
1129 @param Languages Points to the buffer to hold the returned
1130 null-terminated ASCII string.
1131 @param LanguagesSize On entry, points to the size of the buffer
1132 pointed to by Languages, in bytes. On return,
1133 points to the length of Languages, in bytes.
1135 @retval EFI_SUCCESS The languages were returned successfully.
1136 @retval EFI_INVALID_PARAMETER The LanguagesSize was NULL.
1137 @retval EFI_INVALID_PARAMETER The value referenced by LanguagesSize is not zero and Languages is NULL.
1138 @retval EFI_BUFFER_TOO_SMALL The LanguagesSize is too small to hold the list
1139 of supported languages. LanguageSize is updated
1140 to contain the required size.
1141 @retval EFI_NOT_FOUND Could not find string package in specified
1148 IN CONST EFI_HII_STRING_PROTOCOL
*This
,
1149 IN EFI_HII_HANDLE PackageList
,
1150 IN OUT CHAR8
*Languages
,
1151 IN OUT UINTN
*LanguagesSize
1156 Each string package has associated with it a single primary language and zero
1157 or more secondary languages. This routine returns the secondary languages
1158 associated with a package list.
1160 @param This A pointer to the EFI_HII_STRING_PROTOCOL
1162 @param PackageList The package list to examine.
1163 @param PrimaryLanguage Points to the null-terminated ASCII string that specifies
1164 the primary language. Languages are specified in the
1165 format specified in Appendix M of the UEFI 2.0 specification.
1166 @param SecondaryLanguages Points to the buffer to hold the returned null-terminated
1167 ASCII string that describes the list of
1168 secondary languages for the specified
1169 PrimaryLanguage. If there are no secondary
1170 languages, the function returns successfully,
1171 but this is set to NULL.
1172 @param SecondaryLanguagesSize On entry, points to the size of the buffer
1173 pointed to by SecondaryLanguages, in bytes. On
1174 return, points to the length of SecondaryLanguages
1177 @retval EFI_SUCCESS Secondary languages were correctly returned.
1178 @retval EFI_INVALID_PARAMETER PrimaryLanguage or SecondaryLanguagesSize was NULL.
1179 @retval EFI_INVALID_PARAMETER The value referenced by SecondaryLanguagesSize is not
1180 zero and SecondaryLanguages is NULL.
1181 @retval EFI_BUFFER_TOO_SMALL The buffer specified by SecondaryLanguagesSize is
1182 too small to hold the returned information.
1183 SecondaryLanguageSize is updated to hold the size of
1184 the buffer required.
1185 @retval EFI_INVALID_LANGUAGE The language specified by PrimaryLanguage is not
1186 present in the specified package list.
1187 @retval EFI_NOT_FOUND The specified PackageList is not in the Database.
1192 HiiGetSecondaryLanguages (
1193 IN CONST EFI_HII_STRING_PROTOCOL
*This
,
1194 IN EFI_HII_HANDLE PackageList
,
1195 IN CONST CHAR8
*PrimaryLanguage
,
1196 IN OUT CHAR8
*SecondaryLanguages
,
1197 IN OUT UINTN
*SecondaryLanguagesSize
1201 // EFI_HII_DATABASE_PROTOCOL protocol interfaces
1206 This function adds the packages in the package list to the database and returns a handle. If there is a
1207 EFI_DEVICE_PATH_PROTOCOL associated with the DriverHandle, then this function will
1208 create a package of type EFI_PACKAGE_TYPE_DEVICE_PATH and add it to the package list.
1210 @param This A pointer to the EFI_HII_DATABASE_PROTOCOL
1212 @param PackageList A pointer to an EFI_HII_PACKAGE_LIST_HEADER
1214 @param DriverHandle Associate the package list with this EFI handle.
1215 If a NULL is specified, this data will not be associate
1216 with any drivers and cannot have a callback induced.
1217 @param Handle A pointer to the EFI_HII_HANDLE instance.
1219 @retval EFI_SUCCESS The package list associated with the Handle was
1220 added to the HII database.
1221 @retval EFI_OUT_OF_RESOURCES Unable to allocate necessary resources for the
1222 new database contents.
1223 @retval EFI_INVALID_PARAMETER PackageList is NULL or Handle is NULL.
1229 IN CONST EFI_HII_DATABASE_PROTOCOL
*This
,
1230 IN CONST EFI_HII_PACKAGE_LIST_HEADER
*PackageList
,
1231 IN CONST EFI_HANDLE DriverHandle
, OPTIONAL
1232 OUT EFI_HII_HANDLE
*Handle
1237 This function removes the package list that is associated with a handle Handle
1238 from the HII database. Before removing the package, any registered functions
1239 with the notification type REMOVE_PACK and the same package type will be called.
1241 @param This A pointer to the EFI_HII_DATABASE_PROTOCOL
1243 @param Handle The handle that was registered to the data that
1244 is requested for removal.
1246 @retval EFI_SUCCESS The data associated with the Handle was removed
1247 from the HII database.
1248 @retval EFI_NOT_FOUND The specified Handle is not in database.
1253 HiiRemovePackageList (
1254 IN CONST EFI_HII_DATABASE_PROTOCOL
*This
,
1255 IN EFI_HII_HANDLE Handle
1260 This function updates the existing package list (which has the specified Handle)
1261 in the HII databases, using the new package list specified by PackageList.
1263 @param This A pointer to the EFI_HII_DATABASE_PROTOCOL
1265 @param Handle The handle that was registered to the data that
1266 is requested to be updated.
1267 @param PackageList A pointer to an EFI_HII_PACKAGE_LIST_HEADER
1270 @retval EFI_SUCCESS The HII database was successfully updated.
1271 @retval EFI_OUT_OF_RESOURCES Unable to allocate enough memory for the updated
1273 @retval EFI_INVALID_PARAMETER PackageList was NULL.
1274 @retval EFI_NOT_FOUND The specified Handle is not in database.
1279 HiiUpdatePackageList (
1280 IN CONST EFI_HII_DATABASE_PROTOCOL
*This
,
1281 IN EFI_HII_HANDLE Handle
,
1282 IN CONST EFI_HII_PACKAGE_LIST_HEADER
*PackageList
1287 This function returns a list of the package handles of the specified type
1288 that are currently active in the database. The pseudo-type
1289 EFI_HII_PACKAGE_TYPE_ALL will cause all package handles to be listed.
1291 @param This A pointer to the EFI_HII_DATABASE_PROTOCOL
1293 @param PackageType Specifies the package type of the packages to
1294 list or EFI_HII_PACKAGE_TYPE_ALL for all packages
1296 @param PackageGuid If PackageType is EFI_HII_PACKAGE_TYPE_GUID, then
1297 this is the pointer to the GUID which must match
1298 the Guid field of EFI_HII_GUID_PACKAGE_GUID_HDR.
1299 Otherwise, it must be NULL.
1300 @param HandleBufferLength On input, a pointer to the length of the handle
1301 buffer. On output, the length of the handle
1302 buffer that is required for the handles found.
1303 @param Handle An array of EFI_HII_HANDLE instances returned.
1305 @retval EFI_SUCCESS The matching handles are outputed successfully.
1306 HandleBufferLength is updated with the actual length.
1307 @retval EFI_BUFFER_TO_SMALL The HandleBufferLength parameter indicates that
1308 Handle is too small to support the number of
1309 handles. HandleBufferLength is updated with a
1310 value that will enable the data to fit.
1311 @retval EFI_NOT_FOUND No matching handle could not be found in
1313 @retval EFI_INVALID_PARAMETER HandleBufferLength was NULL.
1314 @retval EFI_INVALID_PARAMETER The value referenced by HandleBufferLength was not
1315 zero and Handle was NULL.
1316 @retval EFI_INVALID_PARAMETER PackageType is not a EFI_HII_PACKAGE_TYPE_GUID but
1317 PackageGuid is not NULL, PackageType is a EFI_HII_
1318 PACKAGE_TYPE_GUID but PackageGuid is NULL.
1323 HiiListPackageLists (
1324 IN CONST EFI_HII_DATABASE_PROTOCOL
*This
,
1325 IN UINT8 PackageType
,
1326 IN CONST EFI_GUID
*PackageGuid
,
1327 IN OUT UINTN
*HandleBufferLength
,
1328 OUT EFI_HII_HANDLE
*Handle
1333 This function will export one or all package lists in the database to a buffer.
1334 For each package list exported, this function will call functions registered
1335 with EXPORT_PACK and then copy the package list to the buffer.
1337 @param This A pointer to the EFI_HII_DATABASE_PROTOCOL
1339 @param Handle An EFI_HII_HANDLE that corresponds to the desired
1340 package list in the HII database to export or
1341 NULL to indicate all package lists should be
1343 @param BufferSize On input, a pointer to the length of the buffer.
1344 On output, the length of the buffer that is
1345 required for the exported data.
1346 @param Buffer A pointer to a buffer that will contain the
1347 results of the export function.
1349 @retval EFI_SUCCESS Package exported.
1350 @retval EFI_BUFFER_TO_SMALL The HandleBufferLength parameter indicates that
1351 Handle is too small to support the number of
1352 handles. HandleBufferLength is updated with
1353 a value that will enable the data to fit.
1354 @retval EFI_NOT_FOUND The specifiecd Handle could not be found in the
1356 @retval EFI_INVALID_PARAMETER BufferSize was NULL.
1357 @retval EFI_INVALID_PARAMETER The value referenced by BufferSize was not zero
1358 and Buffer was NULL.
1363 HiiExportPackageLists (
1364 IN CONST EFI_HII_DATABASE_PROTOCOL
*This
,
1365 IN EFI_HII_HANDLE Handle
,
1366 IN OUT UINTN
*BufferSize
,
1367 OUT EFI_HII_PACKAGE_LIST_HEADER
*Buffer
1372 This function registers a function which will be called when specified actions related to packages of
1373 the specified type occur in the HII database. By registering a function, other HII-related drivers are
1374 notified when specific package types are added, removed or updated in the HII database.
1375 Each driver or application which registers a notification should use
1376 EFI_HII_DATABASE_PROTOCOL.UnregisterPackageNotify() before exiting.
1378 @param This A pointer to the EFI_HII_DATABASE_PROTOCOL
1380 @param PackageType Specifies the package type of the packages to
1381 list or EFI_HII_PACKAGE_TYPE_ALL for all packages
1383 @param PackageGuid If PackageType is EFI_HII_PACKAGE_TYPE_GUID, then
1384 this is the pointer to the GUID which must match
1386 EFI_HII_GUID_PACKAGE_GUID_HDR. Otherwise, it must
1388 @param PackageNotifyFn Points to the function to be called when the
1390 NotificationType occurs.
1391 @param NotifyType Describes the types of notification which this
1392 function will be receiving.
1393 @param NotifyHandle Points to the unique handle assigned to the
1394 registered notification. Can be used in
1395 EFI_HII_DATABASE_PROTOCOL.UnregisterPackageNotify()
1396 to stop notifications.
1398 @retval EFI_SUCCESS Notification registered successfully.
1399 @retval EFI_OUT_OF_RESOURCES Unable to allocate necessary data structures
1400 @retval EFI_INVALID_PARAMETER NotifyHandle is NULL.
1401 @retval EFI_INVALID_PARAMETER PackageGuid is not NULL when PackageType is not
1402 EFI_HII_PACKAGE_TYPE_GUID.
1403 @retval EFI_INVALID_PARAMETER PackageGuid is NULL when PackageType is
1404 EFI_HII_PACKAGE_TYPE_GUID.
1409 HiiRegisterPackageNotify (
1410 IN CONST EFI_HII_DATABASE_PROTOCOL
*This
,
1411 IN UINT8 PackageType
,
1412 IN CONST EFI_GUID
*PackageGuid
,
1413 IN CONST EFI_HII_DATABASE_NOTIFY PackageNotifyFn
,
1414 IN EFI_HII_DATABASE_NOTIFY_TYPE NotifyType
,
1415 OUT EFI_HANDLE
*NotifyHandle
1420 Removes the specified HII database package-related notification.
1422 @param This A pointer to the EFI_HII_DATABASE_PROTOCOL
1424 @param NotificationHandle The handle of the notification function being
1427 @retval EFI_SUCCESS Notification is unregistered successfully.
1428 @retval EFI_NOT_FOUND The incoming notification handle does not exist
1429 in current hii database.
1434 HiiUnregisterPackageNotify (
1435 IN CONST EFI_HII_DATABASE_PROTOCOL
*This
,
1436 IN EFI_HANDLE NotificationHandle
1441 This routine retrieves an array of GUID values for each keyboard layout that
1442 was previously registered in the system.
1444 @param This A pointer to the EFI_HII_DATABASE_PROTOCOL
1446 @param KeyGuidBufferLength On input, a pointer to the length of the keyboard
1447 GUID buffer. On output, the length of the handle
1448 buffer that is required for the handles found.
1449 @param KeyGuidBuffer An array of keyboard layout GUID instances
1452 @retval EFI_SUCCESS KeyGuidBuffer was updated successfully.
1453 @retval EFI_BUFFER_TOO_SMALL The KeyGuidBufferLength parameter indicates
1454 that KeyGuidBuffer is too small to support the
1455 number of GUIDs. KeyGuidBufferLength is
1456 updated with a value that will enable the data to
1458 @retval EFI_INVALID_PARAMETER The KeyGuidBufferLength is NULL.
1459 @retval EFI_INVALID_PARAMETER The value referenced by KeyGuidBufferLength is not
1460 zero and KeyGuidBuffer is NULL.
1461 @retval EFI_NOT_FOUND There was no keyboard layout.
1466 HiiFindKeyboardLayouts (
1467 IN CONST EFI_HII_DATABASE_PROTOCOL
*This
,
1468 IN OUT UINT16
*KeyGuidBufferLength
,
1469 OUT EFI_GUID
*KeyGuidBuffer
1474 This routine retrieves the requested keyboard layout. The layout is a physical description of the keys
1475 on a keyboard and the character(s) that are associated with a particular set of key strokes.
1477 @param This A pointer to the EFI_HII_DATABASE_PROTOCOL
1479 @param KeyGuid A pointer to the unique ID associated with a
1480 given keyboard layout. If KeyGuid is NULL then
1481 the current layout will be retrieved.
1482 @param KeyboardLayoutLength On input, a pointer to the length of the
1483 KeyboardLayout buffer. On output, the length of
1484 the data placed into KeyboardLayout.
1485 @param KeyboardLayout A pointer to a buffer containing the retrieved
1488 @retval EFI_SUCCESS The keyboard layout was retrieved successfully.
1489 @retval EFI_NOT_FOUND The requested keyboard layout was not found.
1490 @retval EFI_INVALID_PARAMETER The KeyboardLayout or KeyboardLayoutLength was
1496 HiiGetKeyboardLayout (
1497 IN CONST EFI_HII_DATABASE_PROTOCOL
*This
,
1498 IN CONST EFI_GUID
*KeyGuid
,
1499 IN OUT UINT16
*KeyboardLayoutLength
,
1500 OUT EFI_HII_KEYBOARD_LAYOUT
*KeyboardLayout
1505 This routine sets the default keyboard layout to the one referenced by KeyGuid. When this routine
1506 is called, an event will be signaled of the EFI_HII_SET_KEYBOARD_LAYOUT_EVENT_GUID
1507 group type. This is so that agents which are sensitive to the current keyboard layout being changed
1508 can be notified of this change.
1510 @param This A pointer to the EFI_HII_DATABASE_PROTOCOL
1512 @param KeyGuid A pointer to the unique ID associated with a
1513 given keyboard layout.
1515 @retval EFI_SUCCESS The current keyboard layout was successfully set.
1516 @retval EFI_NOT_FOUND The referenced keyboard layout was not found, so
1518 @retval EFI_INVALID_PARAMETER The KeyGuid was NULL.
1523 HiiSetKeyboardLayout (
1524 IN CONST EFI_HII_DATABASE_PROTOCOL
*This
,
1525 IN CONST EFI_GUID
*KeyGuid
1530 Return the EFI handle associated with a package list.
1532 @param This A pointer to the EFI_HII_DATABASE_PROTOCOL
1534 @param PackageListHandle An EFI_HII_HANDLE that corresponds to the desired
1535 package list in the HIIdatabase.
1536 @param DriverHandle On return, contains the EFI_HANDLE which was
1537 registered with the package list in
1540 @retval EFI_SUCCESS The DriverHandle was returned successfully.
1541 @retval EFI_INVALID_PARAMETER The PackageListHandle was not valid or
1542 DriverHandle was NULL.
1547 HiiGetPackageListHandle (
1548 IN CONST EFI_HII_DATABASE_PROTOCOL
*This
,
1549 IN EFI_HII_HANDLE PackageListHandle
,
1550 OUT EFI_HANDLE
*DriverHandle
1554 // EFI_HII_CONFIG_ROUTING_PROTOCOL interfaces
1559 This function allows a caller to extract the current configuration
1560 for one or more named elements from one or more drivers.
1562 @param This A pointer to the EFI_HII_CONFIG_ROUTING_PROTOCOL
1564 @param Request A null-terminated Unicode string in
1565 <MultiConfigRequest> format.
1566 @param Progress On return, points to a character in the Request
1567 string. Points to the string's null terminator if
1568 request was successful. Points to the most recent
1569 & before the first failing name / value pair (or
1570 the beginning of the string if the failure is in
1571 the first name / value pair) if the request was
1573 @param Results Null-terminated Unicode string in
1574 <MultiConfigAltResp> format which has all values
1575 filled in for the names in the Request string.
1576 String to be allocated by the called function.
1578 @retval EFI_SUCCESS The Results string is filled with the values
1579 corresponding to all requested names.
1580 @retval EFI_OUT_OF_RESOURCES Not enough memory to store the parts of the
1581 results that must be stored awaiting possible
1583 @retval EFI_NOT_FOUND Routing data doesn't match any known driver.
1584 Progress set to the "G" in "GUID" of the
1585 routing header that doesn't match. Note: There
1586 is no requirement that all routing data
1587 be validated before any configuration extraction.
1588 @retval EFI_INVALID_PARAMETER For example, passing in a NULL for the Request
1589 parameter would result in this type of error. The
1590 Progress parameter is set to NULL.
1591 @retval EFI_INVALID_PARAMETER Illegal syntax. Progress set to most recent &
1592 before the error or the beginning of the string.
1593 @retval EFI_INVALID_PARAMETER Unknown name. Progress points to the & before the
1599 HiiConfigRoutingExtractConfig (
1600 IN CONST EFI_HII_CONFIG_ROUTING_PROTOCOL
*This
,
1601 IN CONST EFI_STRING Request
,
1602 OUT EFI_STRING
*Progress
,
1603 OUT EFI_STRING
*Results
1608 This function allows the caller to request the current configuration for the
1609 entirety of the current HII database and returns the data in a null-terminated Unicode string.
1611 @param This A pointer to the EFI_HII_CONFIG_ROUTING_PROTOCOL
1613 @param Results Null-terminated Unicode string in
1614 <MultiConfigAltResp> format which has all values
1615 filled in for the entirety of the current HII
1616 database. String to be allocated by the called
1617 function. De-allocation is up to the caller.
1619 @retval EFI_SUCCESS The Results string is filled with the values
1620 corresponding to all requested names.
1621 @retval EFI_OUT_OF_RESOURCES Not enough memory to store the parts of the
1622 results that must be stored awaiting possible
1624 @retval EFI_INVALID_PARAMETER For example, passing in a NULL for the Results
1625 parameter would result in this type of error.
1630 HiiConfigRoutingExportConfig (
1631 IN CONST EFI_HII_CONFIG_ROUTING_PROTOCOL
*This
,
1632 OUT EFI_STRING
*Results
1637 This function processes the results of processing forms and routes it to the
1638 appropriate handlers or storage.
1640 @param This A pointer to the EFI_HII_CONFIG_ROUTING_PROTOCOL
1642 @param Configuration A null-terminated Unicode string in
1643 <MulltiConfigResp> format.
1644 @param Progress A pointer to a string filled in with the offset
1645 of the most recent & before the first failing
1646 name / value pair (or the beginning of the string
1647 if the failure is in the first name / value pair)
1648 or the terminating NULL if all was successful.
1650 @retval EFI_SUCCESS The results have been distributed or are awaiting
1652 @retval EFI_OUT_OF_RESOURCES Not enough memory to store the parts of the
1653 results that must be stored awaiting possible
1655 @retval EFI_INVALID_PARAMETER Passing in a NULL for the Configuration parameter
1656 would result in this type of error.
1657 @retval EFI_NOT_FOUND Target for the specified routing data was not
1663 HiiConfigRoutingRouteConfig (
1664 IN CONST EFI_HII_CONFIG_ROUTING_PROTOCOL
*This
,
1665 IN CONST EFI_STRING Configuration
,
1666 OUT EFI_STRING
*Progress
1672 This helper function is to be called by drivers to map configuration data stored
1673 in byte array ("block") formats such as UEFI Variables into current configuration strings.
1675 @param This A pointer to the EFI_HII_CONFIG_ROUTING_PROTOCOL
1677 @param ConfigRequest A null-terminated Unicode string in
1678 <ConfigRequest> format.
1679 @param Block Array of bytes defining the block's
1681 @param BlockSize Length in bytes of Block.
1682 @param Config Filled-in configuration string. String allocated
1683 by the function. Returned only if call is
1685 @param Progress A pointer to a string filled in with the offset
1686 of the most recent & before the first failing
1687 name/value pair (or the beginning of the string
1688 if the failure is in the first name / value pair)
1689 or the terminating NULL if all was successful.
1691 @retval EFI_SUCCESS The request succeeded. Progress points to the
1692 null terminator at the end of the ConfigRequest
1694 @retval EFI_OUT_OF_RESOURCES Not enough memory to allocate Config.
1695 Progress points to the first character of
1697 @retval EFI_INVALID_PARAMETER Passing in a NULL for the ConfigRequest or
1698 Block parameter would result in this type of
1699 error. Progress points to the first character of
1701 @retval EFI_NOT_FOUND Target for the specified routing data was not
1702 found. Progress points to the "G" in "GUID" of
1703 the errant routing data.
1704 @retval EFI_DEVICE_ERROR Block not large enough. Progress undefined.
1705 @retval EFI_INVALID_PARAMETER Encountered non <BlockName> formatted string.
1706 Block is left updated and Progress points at
1707 the '&' preceding the first non-<BlockName>.
1713 IN CONST EFI_HII_CONFIG_ROUTING_PROTOCOL
*This
,
1714 IN CONST EFI_STRING ConfigRequest
,
1715 IN CONST UINT8
*Block
,
1716 IN CONST UINTN BlockSize
,
1717 OUT EFI_STRING
*Config
,
1718 OUT EFI_STRING
*Progress
1723 This helper function is to be called by drivers to map configuration strings
1724 to configurations stored in byte array ("block") formats such as UEFI Variables.
1726 @param This A pointer to the EFI_HII_CONFIG_ROUTING_PROTOCOL
1728 @param ConfigResp A null-terminated Unicode string in <ConfigResp>
1730 @param Block A possibly null array of bytes representing the
1731 current block. Only bytes referenced in the
1732 ConfigResp string in the block are modified. If
1733 this parameter is null or if the *BlockSize
1734 parameter is (on input) shorter than required by
1735 the Configuration string, only the BlockSize
1736 parameter is updated and an appropriate status
1737 (see below) is returned.
1738 @param BlockSize The length of the Block in units of UINT8. On
1739 input, this is the size of the Block. On output,
1740 if successful, contains the largest index of the
1741 modified byte in the Block, or the required buffer
1742 size if the Block is not large enough.
1743 @param Progress On return, points to an element of the ConfigResp
1744 string filled in with the offset of the most
1745 recent '&' before the first failing name / value
1746 pair (or the beginning of the string if the
1747 failure is in the first name / value pair) or
1748 the terminating NULL if all was successful.
1750 @retval EFI_SUCCESS The request succeeded. Progress points to the
1751 null terminator at the end of the ConfigResp
1753 @retval EFI_OUT_OF_RESOURCES Not enough memory to allocate Config.
1754 Progress points to the first character of
1756 @retval EFI_INVALID_PARAMETER Passing in a NULL for the ConfigResp or
1757 Block parameter would result in this type of
1758 error. Progress points to the first character of
1760 @retval EFI_NOT_FOUND Target for the specified routing data was not
1761 found. Progress points to the "G" in "GUID" of
1762 the errant routing data.
1763 @retval EFI_INVALID_PARAMETER Encountered non <BlockName> formatted name /
1764 value pair. Block is left updated and
1765 Progress points at the '&' preceding the first
1767 @retval EFI_BUFFER_TOO_SMALL Block not large enough. Progress undefined.
1768 BlockSize is updated with the required buffer size.
1774 IN CONST EFI_HII_CONFIG_ROUTING_PROTOCOL
*This
,
1775 IN CONST EFI_STRING ConfigResp
,
1776 IN OUT UINT8
*Block
,
1777 IN OUT UINTN
*BlockSize
,
1778 OUT EFI_STRING
*Progress
1783 This helper function is to be called by drivers to extract portions of
1784 a larger configuration string.
1786 @param This A pointer to the EFI_HII_CONFIG_ROUTING_PROTOCOL
1788 @param Configuration A null-terminated Unicode string in
1789 <MultiConfigAltResp> format.
1790 @param Guid A pointer to the GUID value to search for in the
1791 routing portion of the ConfigResp string when
1792 retrieving the requested data. If Guid is NULL,
1793 then all GUID values will be searched for.
1794 @param Name A pointer to the NAME value to search for in the
1795 routing portion of the ConfigResp string when
1796 retrieving the requested data. If Name is NULL,
1797 then all Name values will be searched for.
1798 @param DevicePath A pointer to the PATH value to search for in the
1799 routing portion of the ConfigResp string when
1800 retrieving the requested data. If DevicePath is
1801 NULL, then all DevicePath values will be
1803 @param AltCfgId A pointer to the ALTCFG value to search for in
1804 the routing portion of the ConfigResp string
1805 when retrieving the requested data. If this
1806 parameter is NULL, then the current setting will
1808 @param AltCfgResp A pointer to a buffer which will be allocated by
1809 the function which contains the retrieved string
1810 as requested. This buffer is only allocated if
1811 the call was successful.
1813 @retval EFI_SUCCESS The request succeeded. The requested data was
1814 extracted and placed in the newly allocated
1816 @retval EFI_OUT_OF_RESOURCES Not enough memory to allocate AltCfgResp.
1817 @retval EFI_INVALID_PARAMETER Any parameter is invalid.
1818 @retval EFI_NOT_FOUND Target for the specified routing data was not
1825 IN CONST EFI_HII_CONFIG_ROUTING_PROTOCOL
*This
,
1826 IN CONST EFI_STRING Configuration
,
1827 IN CONST EFI_GUID
*Guid
,
1828 IN CONST EFI_STRING Name
,
1829 IN CONST EFI_DEVICE_PATH_PROTOCOL
*DevicePath
,
1830 IN CONST UINT16
*AltCfgId
,
1831 OUT EFI_STRING
*AltCfgResp
1836 This function accepts a <MultiKeywordResp> formatted string, finds the associated
1837 keyword owners, creates a <MultiConfigResp> string from it and forwards it to the
1838 EFI_HII_ROUTING_PROTOCOL.RouteConfig function.
1840 If there is an issue in resolving the contents of the KeywordString, then the
1841 function returns an error and also sets the Progress and ProgressErr with the
1842 appropriate information about where the issue occurred and additional data about
1843 the nature of the issue.
1845 In the case when KeywordString containing multiple keywords, when an EFI_NOT_FOUND
1846 error is generated during processing the second or later keyword element, the system
1847 storage associated with earlier keywords is not modified. All elements of the
1848 KeywordString must successfully pass all tests for format and access prior to making
1849 any modifications to storage.
1851 In the case when EFI_DEVICE_ERROR is returned from the processing of a KeywordString
1852 containing multiple keywords, the state of storage associated with earlier keywords
1856 @param This Pointer to the EFI_KEYWORD_HANDLER _PROTOCOL instance.
1858 @param KeywordString A null-terminated string in <MultiKeywordResp> format.
1860 @param Progress On return, points to a character in the KeywordString.
1861 Points to the string's NULL terminator if the request
1862 was successful. Points to the most recent '&' before
1863 the first failing name / value pair (or the beginning
1864 of the string if the failure is in the first name / value
1865 pair) if the request was not successful.
1867 @param ProgressErr If during the processing of the KeywordString there was
1868 a failure, this parameter gives additional information
1869 about the possible source of the problem. The various
1870 errors are defined in "Related Definitions" below.
1873 @retval EFI_SUCCESS The specified action was completed successfully.
1875 @retval EFI_INVALID_PARAMETER One or more of the following are TRUE:
1876 1. KeywordString is NULL.
1877 2. Parsing of the KeywordString resulted in an
1878 error. See Progress and ProgressErr for more data.
1880 @retval EFI_NOT_FOUND An element of the KeywordString was not found.
1881 See ProgressErr for more data.
1883 @retval EFI_OUT_OF_RESOURCES Required system resources could not be allocated.
1884 See ProgressErr for more data.
1886 @retval EFI_ACCESS_DENIED The action violated system policy. See ProgressErr
1889 @retval EFI_DEVICE_ERROR An unexpected system error occurred. See ProgressErr
1895 EfiConfigKeywordHandlerSetData (
1896 IN EFI_CONFIG_KEYWORD_HANDLER_PROTOCOL
*This
,
1897 IN CONST EFI_STRING KeywordString
,
1898 OUT EFI_STRING
*Progress
,
1899 OUT UINT32
*ProgressErr
1904 This function accepts a <MultiKeywordRequest> formatted string, finds the underlying
1905 keyword owners, creates a <MultiConfigRequest> string from it and forwards it to the
1906 EFI_HII_ROUTING_PROTOCOL.ExtractConfig function.
1908 If there is an issue in resolving the contents of the KeywordString, then the function
1909 returns an EFI_INVALID_PARAMETER and also set the Progress and ProgressErr with the
1910 appropriate information about where the issue occurred and additional data about the
1911 nature of the issue.
1913 In the case when KeywordString is NULL, or contains multiple keywords, or when
1914 EFI_NOT_FOUND is generated while processing the keyword elements, the Results string
1915 contains values returned for all keywords processed prior to the keyword generating the
1916 error but no values for the keyword with error or any following keywords.
1919 @param This Pointer to the EFI_KEYWORD_HANDLER _PROTOCOL instance.
1921 @param NameSpaceId A null-terminated string containing the platform configuration
1922 language to search through in the system. If a NULL is passed
1923 in, then it is assumed that any platform configuration language
1924 with the prefix of "x-UEFI-" are searched.
1926 @param KeywordString A null-terminated string in <MultiKeywordRequest> format. If a
1927 NULL is passed in the KeywordString field, all of the known
1928 keywords in the system for the NameSpaceId specified are
1929 returned in the Results field.
1931 @param Progress On return, points to a character in the KeywordString. Points
1932 to the string's NULL terminator if the request was successful.
1933 Points to the most recent '&' before the first failing name / value
1934 pair (or the beginning of the string if the failure is in the first
1935 name / value pair) if the request was not successful.
1937 @param ProgressErr If during the processing of the KeywordString there was a
1938 failure, this parameter gives additional information about the
1939 possible source of the problem. See the definitions in SetData()
1940 for valid value definitions.
1942 @param Results A null-terminated string in <MultiKeywordResp> format is returned
1943 which has all the values filled in for the keywords in the
1944 KeywordString. This is a callee-allocated field, and must be freed
1945 by the caller after being used.
1947 @retval EFI_SUCCESS The specified action was completed successfully.
1949 @retval EFI_INVALID_PARAMETER One or more of the following are TRUE:
1950 1.Progress, ProgressErr, or Resuts is NULL.
1951 2.Parsing of the KeywordString resulted in an error. See
1952 Progress and ProgressErr for more data.
1955 @retval EFI_NOT_FOUND An element of the KeywordString was not found. See
1956 ProgressErr for more data.
1958 @retval EFI_NOT_FOUND The NamespaceId specified was not found. See ProgressErr
1961 @retval EFI_OUT_OF_RESOURCES Required system resources could not be allocated. See
1962 ProgressErr for more data.
1964 @retval EFI_ACCESS_DENIED The action violated system policy. See ProgressErr for
1967 @retval EFI_DEVICE_ERROR An unexpected system error occurred. See ProgressErr
1973 EfiConfigKeywordHandlerGetData (
1974 IN EFI_CONFIG_KEYWORD_HANDLER_PROTOCOL
*This
,
1975 IN CONST EFI_STRING NameSpaceId
, OPTIONAL
1976 IN CONST EFI_STRING KeywordString
, OPTIONAL
1977 OUT EFI_STRING
*Progress
,
1978 OUT UINT32
*ProgressErr
,
1979 OUT EFI_STRING
*Results
1983 Compare whether two names of languages are identical.
1985 @param Language1 Name of language 1 from StringPackage
1986 @param Language2 Name of language 2 to be compared with language 1.
1989 @retval FALSE not same
1993 HiiCompareLanguage (
1994 IN CHAR8
*Language1
,
2000 Retrieves a pointer to the a Null-terminated ASCII string containing the list
2001 of languages that an HII handle in the HII Database supports. The returned
2002 string is allocated using AllocatePool(). The caller is responsible for freeing
2003 the returned string using FreePool(). The format of the returned string follows
2004 the language format assumed the HII Database.
2006 If HiiHandle is NULL, then ASSERT().
2008 @param[in] HiiHandle A handle that was previously registered in the HII Database.
2010 @retval NULL HiiHandle is not registered in the HII database
2011 @retval NULL There are not enough resources available to retrieve the suported
2013 @retval NULL The list of suported languages could not be retrieved.
2014 @retval Other A pointer to the Null-terminated ASCII string of supported languages.
2018 GetSupportedLanguages (
2019 IN EFI_HII_HANDLE HiiHandle
2023 This function mainly use to get HiiDatabase information.
2025 @param This A pointer to the EFI_HII_DATABASE_PROTOCOL instance.
2027 @retval EFI_SUCCESS Get the information successfully.
2028 @retval EFI_OUT_OF_RESOURCES Not enough memory to store the Hiidatabase data.
2033 IN CONST EFI_HII_DATABASE_PROTOCOL
*This
2037 This is an internal function,mainly use to get and update configuration settings information.
2039 @param This A pointer to the EFI_HII_DATABASE_PROTOCOL instance.
2041 @retval EFI_SUCCESS Get the information successfully.
2042 @retval EFI_OUT_OF_RESOURCES Not enough memory to store the Configuration Setting data.
2046 HiiGetConfigurationSetting(
2047 IN CONST EFI_HII_DATABASE_PROTOCOL
*This
2053 extern EFI_EVENT gHiiKeyboardLayoutChanged
;
2054 extern BOOLEAN gExportAfterReadyToBoot
;