2 Private structures definitions in HiiDatabase.
4 Copyright (c) 2007 - 2018, 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/HiiImageEx.h>
24 #include <Protocol/HiiImageDecoder.h>
25 #include <Protocol/HiiString.h>
26 #include <Protocol/HiiDatabase.h>
27 #include <Protocol/HiiConfigRouting.h>
28 #include <Protocol/HiiConfigAccess.h>
29 #include <Protocol/HiiConfigKeyword.h>
30 #include <Protocol/SimpleTextOut.h>
32 #include <Guid/HiiKeyBoardLayout.h>
33 #include <Guid/GlobalVariable.h>
34 #include <Guid/MdeModuleHii.h>
35 #include <Guid/VariableFormat.h>
36 #include <Guid/PcdDataBaseSignatureGuid.h>
38 #include <Library/DebugLib.h>
39 #include <Library/BaseMemoryLib.h>
40 #include <Library/UefiDriverEntryPoint.h>
41 #include <Library/UefiBootServicesTableLib.h>
42 #include <Library/BaseLib.h>
43 #include <Library/DevicePathLib.h>
44 #include <Library/MemoryAllocationLib.h>
45 #include <Library/UefiLib.h>
46 #include <Library/PcdLib.h>
47 #include <Library/UefiRuntimeServicesTableLib.h>
48 #include <Library/PrintLib.h>
50 #define MAX_STRING_LENGTH 1024
51 #define MAX_FONT_NAME_LEN 256
52 #define NARROW_BASELINE 15
53 #define WIDE_BASELINE 14
54 #define SYS_FONT_INFO_MASK 0x37
55 #define REPLACE_UNKNOWN_GLYPH 0xFFFD
56 #define PROPORTIONAL_GLYPH 0x80
57 #define NARROW_GLYPH 0x40
59 #define BITMAP_LEN_1_BIT(Width, Height) (((Width) + 7) / 8 * (Height))
60 #define BITMAP_LEN_4_BIT(Width, Height) (((Width) + 1) / 2 * (Height))
61 #define BITMAP_LEN_8_BIT(Width, Height) ((Width) * (Height))
62 #define BITMAP_LEN_24_BIT(Width, Height) ((Width) * (Height) * 3)
64 extern EFI_LOCK mHiiDatabaseLock
;
69 // BASE_CR (a, IFR_DEFAULT_VALUE_DATA, Entry) to get the whole structure.
72 LIST_ENTRY Entry
; // Link to VarStorage Default Data
74 VARIABLE_STORE_HEADER
*VariableStorage
;
75 } VARSTORAGE_DEFAULT_DATA
;
78 LIST_ENTRY Entry
; // Link to VarStorage
83 LIST_ENTRY BlockEntry
; // Link to its Block array
84 } IFR_VARSTORAGE_DATA
;
87 LIST_ENTRY Entry
; // Link to Block array
92 EFI_QUESTION_ID QuestionId
;
95 LIST_ENTRY DefaultValueEntry
; // Link to its default value array
101 // Get default value from IFR data.
104 DefaultValueFromDefault
= 0, // Get from the minimum or first one when not set default value.
105 DefaultValueFromOtherDefault
, // Get default vale from other default when no default(When other
106 // defaults are more than one, use the default with smallest default id).
107 DefaultValueFromFlag
, // Get default value from the default flag.
108 DefaultValueFromOpcode
// Get default value from default opcode, highest priority.
109 } DEFAULT_VALUE_TYPE
;
113 DEFAULT_VALUE_TYPE Type
;
114 BOOLEAN Cleaned
; // Whether this value is cleaned
115 // TRUE Cleaned, the value can't be used
116 // FALSE Not cleaned, the value can be used.
118 EFI_IFR_TYPE_VALUE Value
;
124 #define EFI_HII_VARSTORE_BUFFER 0
125 #define EFI_HII_VARSTORE_NAME_VALUE 1
126 #define EFI_HII_VARSTORE_EFI_VARIABLE 2
127 #define EFI_HII_VARSTORE_EFI_VARIABLE_BUFFER 3
130 // Keyword handler protocol filter type.
132 #define EFI_KEYWORD_FILTER_READONY 0x01
133 #define EFI_KEYWORD_FILTER_REAWRITE 0x02
134 #define EFI_KEYWORD_FILTER_BUFFER 0x10
135 #define EFI_KEYWORD_FILTER_NUMERIC 0x20
136 #define EFI_KEYWORD_FILTER_NUMERIC_1 0x30
137 #define EFI_KEYWORD_FILTER_NUMERIC_2 0x40
138 #define EFI_KEYWORD_FILTER_NUMERIC_4 0x50
139 #define EFI_KEYWORD_FILTER_NUMERIC_8 0x60
142 #define HII_FORMSET_STORAGE_SIGNATURE SIGNATURE_32 ('H', 'S', 'T', 'G')
147 EFI_HII_HANDLE HiiHandle
;
148 EFI_HANDLE DriverHandle
;
150 UINT8 Type
; // EFI_HII_VARSTORE_BUFFER, EFI_HII_VARSTORE_NAME_VALUE, EFI_HII_VARSTORE_EFI_VARIABLE
154 } HII_FORMSET_STORAGE
;
158 // String Package definitions
160 #define HII_STRING_PACKAGE_SIGNATURE SIGNATURE_32 ('h','i','s','p')
161 typedef struct _HII_STRING_PACKAGE_INSTANCE
{
163 EFI_HII_STRING_PACKAGE_HDR
*StringPkgHdr
;
165 LIST_ENTRY StringEntry
;
166 LIST_ENTRY FontInfoList
; // local font info list
168 EFI_STRING_ID MaxStringId
; // record StringId
169 } HII_STRING_PACKAGE_INSTANCE
;
172 // Form Package definitions
174 #define HII_IFR_PACKAGE_SIGNATURE SIGNATURE_32 ('h','f','r','p')
175 typedef struct _HII_IFR_PACKAGE_INSTANCE
{
177 EFI_HII_PACKAGE_HEADER FormPkgHdr
;
180 } HII_IFR_PACKAGE_INSTANCE
;
183 // Simple Font Package definitions
185 #define HII_S_FONT_PACKAGE_SIGNATURE SIGNATURE_32 ('h','s','f','p')
186 typedef struct _HII_SIMPLE_FONT_PACKAGE_INSTANCE
{
188 EFI_HII_SIMPLE_FONT_PACKAGE_HDR
*SimpleFontPkgHdr
;
189 LIST_ENTRY SimpleFontEntry
;
190 } HII_SIMPLE_FONT_PACKAGE_INSTANCE
;
193 // Font Package definitions
195 #define HII_FONT_PACKAGE_SIGNATURE SIGNATURE_32 ('h','i','f','p')
196 typedef struct _HII_FONT_PACKAGE_INSTANCE
{
198 EFI_HII_FONT_PACKAGE_HDR
*FontPkgHdr
;
202 LIST_ENTRY FontEntry
;
203 LIST_ENTRY GlyphInfoList
;
204 } HII_FONT_PACKAGE_INSTANCE
;
206 #define HII_GLYPH_INFO_SIGNATURE SIGNATURE_32 ('h','g','i','s')
207 typedef struct _HII_GLYPH_INFO
{
211 EFI_HII_GLYPH_INFO Cell
;
214 #define HII_FONT_INFO_SIGNATURE SIGNATURE_32 ('h','l','f','i')
215 typedef struct _HII_FONT_INFO
{
218 LIST_ENTRY
*GlobalEntry
;
222 #define HII_GLOBAL_FONT_INFO_SIGNATURE SIGNATURE_32 ('h','g','f','i')
223 typedef struct _HII_GLOBAL_FONT_INFO
{
226 HII_FONT_PACKAGE_INSTANCE
*FontPackage
;
228 EFI_FONT_INFO
*FontInfo
;
229 } HII_GLOBAL_FONT_INFO
;
232 // Image Package definitions
235 #define HII_PIXEL_MASK 0x80
237 typedef struct _HII_IMAGE_PACKAGE_INSTANCE
{
238 EFI_HII_IMAGE_PACKAGE_HDR ImagePkgHdr
;
239 UINT32 ImageBlockSize
;
240 UINT32 PaletteInfoSize
;
241 EFI_HII_IMAGE_BLOCK
*ImageBlock
;
243 } HII_IMAGE_PACKAGE_INSTANCE
;
246 // Keyboard Layout Package definitions
248 #define HII_KB_LAYOUT_PACKAGE_SIGNATURE SIGNATURE_32 ('h','k','l','p')
249 typedef struct _HII_KEYBOARD_LAYOUT_PACKAGE_INSTANCE
{
252 LIST_ENTRY KeyboardEntry
;
253 } HII_KEYBOARD_LAYOUT_PACKAGE_INSTANCE
;
256 // Guid Package definitions
258 #define HII_GUID_PACKAGE_SIGNATURE SIGNATURE_32 ('h','i','g','p')
259 typedef struct _HII_GUID_PACKAGE_INSTANCE
{
262 LIST_ENTRY GuidEntry
;
263 } HII_GUID_PACKAGE_INSTANCE
;
266 // A package list can contain only one or less than one device path package.
267 // This rule also applies to image package since ImageId can not be duplicate.
269 typedef struct _HII_DATABASE_PACKAGE_LIST_INSTANCE
{
270 EFI_HII_PACKAGE_LIST_HEADER PackageListHdr
;
271 LIST_ENTRY GuidPkgHdr
;
272 LIST_ENTRY FormPkgHdr
;
273 LIST_ENTRY KeyboardLayoutHdr
;
274 LIST_ENTRY StringPkgHdr
;
275 LIST_ENTRY FontPkgHdr
;
276 HII_IMAGE_PACKAGE_INSTANCE
*ImagePkg
;
277 LIST_ENTRY SimpleFontPkgHdr
;
278 UINT8
*DevicePathPkg
;
279 } HII_DATABASE_PACKAGE_LIST_INSTANCE
;
281 #define HII_HANDLE_SIGNATURE SIGNATURE_32 ('h','i','h','l')
289 #define HII_DATABASE_RECORD_SIGNATURE SIGNATURE_32 ('h','i','d','r')
291 typedef struct _HII_DATABASE_RECORD
{
293 HII_DATABASE_PACKAGE_LIST_INSTANCE
*PackageList
;
294 EFI_HANDLE DriverHandle
;
295 EFI_HII_HANDLE Handle
;
296 LIST_ENTRY DatabaseEntry
;
297 } HII_DATABASE_RECORD
;
299 #define HII_DATABASE_NOTIFY_SIGNATURE SIGNATURE_32 ('h','i','d','n')
301 typedef struct _HII_DATABASE_NOTIFY
{
303 EFI_HANDLE NotifyHandle
;
305 EFI_GUID
*PackageGuid
;
306 EFI_HII_DATABASE_NOTIFY PackageNotifyFn
;
307 EFI_HII_DATABASE_NOTIFY_TYPE NotifyType
;
308 LIST_ENTRY DatabaseNotifyEntry
;
309 } HII_DATABASE_NOTIFY
;
311 #define HII_DATABASE_PRIVATE_DATA_SIGNATURE SIGNATURE_32 ('H', 'i', 'D', 'p')
313 typedef struct _HII_DATABASE_PRIVATE_DATA
{
315 LIST_ENTRY DatabaseList
;
316 LIST_ENTRY DatabaseNotifyList
;
317 EFI_HII_FONT_PROTOCOL HiiFont
;
318 EFI_HII_IMAGE_PROTOCOL HiiImage
;
319 EFI_HII_IMAGE_EX_PROTOCOL HiiImageEx
;
320 EFI_HII_STRING_PROTOCOL HiiString
;
321 EFI_HII_DATABASE_PROTOCOL HiiDatabase
;
322 EFI_HII_CONFIG_ROUTING_PROTOCOL ConfigRouting
;
323 EFI_CONFIG_KEYWORD_HANDLER_PROTOCOL ConfigKeywordHandler
;
324 LIST_ENTRY HiiHandleList
;
326 LIST_ENTRY FontInfoList
; // global font info list
327 UINTN Attribute
; // default system color
328 EFI_GUID CurrentLayoutGuid
;
329 EFI_HII_KEYBOARD_LAYOUT
*CurrentLayout
;
330 } HII_DATABASE_PRIVATE_DATA
;
332 #define HII_FONT_DATABASE_PRIVATE_DATA_FROM_THIS(a) \
334 HII_DATABASE_PRIVATE_DATA, \
336 HII_DATABASE_PRIVATE_DATA_SIGNATURE \
339 #define HII_IMAGE_DATABASE_PRIVATE_DATA_FROM_THIS(a) \
341 HII_DATABASE_PRIVATE_DATA, \
343 HII_DATABASE_PRIVATE_DATA_SIGNATURE \
346 #define HII_IMAGE_EX_DATABASE_PRIVATE_DATA_FROM_THIS(a) \
348 HII_DATABASE_PRIVATE_DATA, \
350 HII_DATABASE_PRIVATE_DATA_SIGNATURE \
353 #define HII_STRING_DATABASE_PRIVATE_DATA_FROM_THIS(a) \
355 HII_DATABASE_PRIVATE_DATA, \
357 HII_DATABASE_PRIVATE_DATA_SIGNATURE \
360 #define HII_DATABASE_DATABASE_PRIVATE_DATA_FROM_THIS(a) \
362 HII_DATABASE_PRIVATE_DATA, \
364 HII_DATABASE_PRIVATE_DATA_SIGNATURE \
367 #define CONFIG_ROUTING_DATABASE_PRIVATE_DATA_FROM_THIS(a) \
369 HII_DATABASE_PRIVATE_DATA, \
371 HII_DATABASE_PRIVATE_DATA_SIGNATURE \
374 #define CONFIG_KEYWORD_HANDLER_DATABASE_PRIVATE_DATA_FROM_THIS(a) \
376 HII_DATABASE_PRIVATE_DATA, \
377 ConfigKeywordHandler, \
378 HII_DATABASE_PRIVATE_DATA_SIGNATURE \
382 // Internal function prototypes.
386 Generate a sub string then output it.
388 This is a internal function.
390 @param String A constant string which is the prefix of the to be
391 generated string, e.g. GUID=
393 @param BufferLen The length of the Buffer in bytes.
395 @param Buffer Points to a buffer which will be converted to be the
396 content of the generated string.
398 @param Flag If 1, the buffer contains data for the value of GUID or PATH stored in
399 UINT8 *; if 2, the buffer contains unicode string for the value of NAME;
400 if 3, the buffer contains other data.
402 @param SubStr Points to the output string. It's caller's
403 responsibility to free this buffer.
409 IN CONST EFI_STRING String
,
413 OUT EFI_STRING
*SubStr
417 This function checks whether a handle is a valid EFI_HII_HANDLE.
419 @param Handle Pointer to a EFI_HII_HANDLE
422 @retval FALSE Invalid
427 EFI_HII_HANDLE Handle
432 This function checks whether EFI_FONT_INFO exists in current database. If
433 FontInfoMask is specified, check what options can be used to make a match.
434 Note that the masks relate to where the system default should be supplied
435 are ignored by this function.
437 @param Private Hii database private structure.
438 @param FontInfo Points to EFI_FONT_INFO structure.
439 @param FontInfoMask If not NULL, describes what options can be used
440 to make a match between the font requested and
441 the font available. The caller must guarantee
443 @param FontHandle On entry, Points to the font handle returned by a
444 previous call to GetFontInfo() or NULL to start
446 @param GlobalFontInfo If not NULL, output the corresponding global font
450 @retval FALSE Not existed
455 IN HII_DATABASE_PRIVATE_DATA
*Private
,
456 IN EFI_FONT_INFO
*FontInfo
,
457 IN EFI_FONT_INFO_MASK
*FontInfoMask
, OPTIONAL
458 IN EFI_FONT_HANDLE FontHandle
, OPTIONAL
459 OUT HII_GLOBAL_FONT_INFO
**GlobalFontInfo OPTIONAL
464 This function invokes the matching registered function.
466 @param Private HII Database driver private structure.
467 @param NotifyType The type of change concerning the database.
468 @param PackageInstance Points to the package referred to by the notification.
469 @param PackageType Package type
470 @param Handle The handle of the package list which contains the specified package.
472 @retval EFI_SUCCESS Already checked all registered function and invoked
474 @retval EFI_INVALID_PARAMETER Any input parameter is not valid.
478 InvokeRegisteredFunction (
479 IN HII_DATABASE_PRIVATE_DATA
*Private
,
480 IN EFI_HII_DATABASE_NOTIFY_TYPE NotifyType
,
481 IN VOID
*PackageInstance
,
482 IN UINT8 PackageType
,
483 IN EFI_HII_HANDLE Handle
488 Retrieve system default font and color.
490 @param Private HII database driver private data.
491 @param FontInfo Points to system default font output-related
492 information. It's caller's responsibility to free
494 @param FontInfoSize If not NULL, output the size of buffer FontInfo.
496 @retval EFI_SUCCESS Cell information is added to the GlyphInfoList.
497 @retval EFI_OUT_OF_RESOURCES The system is out of resources to accomplish the
499 @retval EFI_INVALID_PARAMETER Any input parameter is invalid.
504 IN HII_DATABASE_PRIVATE_DATA
*Private
,
505 OUT EFI_FONT_DISPLAY_INFO
**FontInfo
,
506 OUT UINTN
*FontInfoSize OPTIONAL
511 Parse all string blocks to find a String block specified by StringId.
512 If StringId = (EFI_STRING_ID) (-1), find out all EFI_HII_SIBT_FONT blocks
513 within this string package and backup its information. If LastStringId is
514 specified, the string id of last string block will also be output.
515 If StringId = 0, output the string id of last string block (EFI_HII_SIBT_STRING).
517 @param Private Hii database private structure.
518 @param StringPackage Hii string package instance.
519 @param StringId The string's id, which is unique within
521 @param BlockType Output the block type of found string block.
522 @param StringBlockAddr Output the block address of found string block.
523 @param StringTextOffset Offset, relative to the found block address, of
524 the string text information.
525 @param LastStringId Output the last string id when StringId = 0 or StringId = -1.
526 @param StartStringId The first id in the skip block which StringId in the block.
528 @retval EFI_SUCCESS The string text and font is retrieved
530 @retval EFI_NOT_FOUND The specified text or font info can not be found
532 @retval EFI_OUT_OF_RESOURCES The system is out of resources to accomplish the
538 IN HII_DATABASE_PRIVATE_DATA
*Private
,
539 IN HII_STRING_PACKAGE_INSTANCE
*StringPackage
,
540 IN EFI_STRING_ID StringId
,
541 OUT UINT8
*BlockType
, OPTIONAL
542 OUT UINT8
**StringBlockAddr
, OPTIONAL
543 OUT UINTN
*StringTextOffset
, OPTIONAL
544 OUT EFI_STRING_ID
*LastStringId
, OPTIONAL
545 OUT EFI_STRING_ID
*StartStringId OPTIONAL
550 Parse all glyph blocks to find a glyph block specified by CharValue.
551 If CharValue = (CHAR16) (-1), collect all default character cell information
552 within this font package and backup its information.
554 @param FontPackage Hii string package instance.
555 @param CharValue Unicode character value, which identifies a glyph
557 @param GlyphBuffer Output the corresponding bitmap data of the found
558 block. It is the caller's responsibility to free
560 @param Cell Output cell information of the encoded bitmap.
561 @param GlyphBufferLen If not NULL, output the length of GlyphBuffer.
563 @retval EFI_SUCCESS The bitmap data is retrieved successfully.
564 @retval EFI_NOT_FOUND The specified CharValue does not exist in current
566 @retval EFI_OUT_OF_RESOURCES The system is out of resources to accomplish the
572 IN HII_FONT_PACKAGE_INSTANCE
*FontPackage
,
574 OUT UINT8
**GlyphBuffer
, OPTIONAL
575 OUT EFI_HII_GLYPH_INFO
*Cell
, OPTIONAL
576 OUT UINTN
*GlyphBufferLen OPTIONAL
580 This function exports Form packages to a buffer.
581 This is a internal function.
583 @param Private Hii database private structure.
584 @param Handle Identification of a package list.
585 @param PackageList Pointer to a package list which will be exported.
586 @param UsedSize The length of buffer be used.
587 @param BufferSize Length of the Buffer.
588 @param Buffer Allocated space for storing exported data.
589 @param ResultSize The size of the already exported content of this
592 @retval EFI_SUCCESS Form Packages are exported successfully.
593 @retval EFI_INVALID_PARAMETER Any input parameter is invalid.
598 IN HII_DATABASE_PRIVATE_DATA
*Private
,
599 IN EFI_HII_HANDLE Handle
,
600 IN HII_DATABASE_PACKAGE_LIST_INSTANCE
*PackageList
,
604 IN OUT UINTN
*ResultSize
608 // EFI_HII_FONT_PROTOCOL protocol interfaces
613 Renders a string to a bitmap or to the display.
615 @param This A pointer to the EFI_HII_FONT_PROTOCOL instance.
616 @param Flags Describes how the string is to be drawn.
617 @param String Points to the null-terminated string to be
619 @param StringInfo Points to the string output information,
620 including the color and font. If NULL, then the
621 string will be output in the default system font
623 @param Blt If this points to a non-NULL on entry, this
624 points to the image, which is Width pixels wide
625 and Height pixels high. The string will be drawn
627 EFI_HII_OUT_FLAG_CLIP is implied. If this points
628 to a NULL on entry, then a buffer
629 will be allocated to hold the generated image and
630 the pointer updated on exit. It is the caller's
631 responsibility to free this buffer.
632 @param BltX Together with BltX, Specifies the offset from the left and top edge
633 of the image of the first character cell in the
635 @param BltY Together with BltY, Specifies the offset from the left and top edge
636 of the image of the first character cell in the
638 @param RowInfoArray If this is non-NULL on entry, then on exit, this
639 will point to an allocated buffer containing
640 row information and RowInfoArraySize will be
641 updated to contain the number of elements.
642 This array describes the characters which were at
643 least partially drawn and the heights of the
644 rows. It is the caller's responsibility to free
646 @param RowInfoArraySize If this is non-NULL on entry, then on exit it
647 contains the number of elements in RowInfoArray.
648 @param ColumnInfoArray If this is non-NULL, then on return it will be
649 filled with the horizontal offset for each
650 character in the string on the row where it is
651 displayed. Non-printing characters will have
652 the offset ~0. The caller is responsible to
653 allocate a buffer large enough so that there
654 is one entry for each character in the string,
655 not including the null-terminator. It is possible
656 when character display is normalized that some
657 character cells overlap.
659 @retval EFI_SUCCESS The string was successfully rendered.
660 @retval EFI_OUT_OF_RESOURCES Unable to allocate an output buffer for
662 @retval EFI_INVALID_PARAMETER The String or Blt.
663 @retval EFI_INVALID_PARAMETER Flags were invalid combination..
669 IN CONST EFI_HII_FONT_PROTOCOL
*This
,
670 IN EFI_HII_OUT_FLAGS Flags
,
671 IN CONST EFI_STRING String
,
672 IN CONST EFI_FONT_DISPLAY_INFO
*StringInfo OPTIONAL
,
673 IN OUT EFI_IMAGE_OUTPUT
**Blt
,
676 OUT EFI_HII_ROW_INFO
**RowInfoArray OPTIONAL
,
677 OUT UINTN
*RowInfoArraySize OPTIONAL
,
678 OUT UINTN
*ColumnInfoArray OPTIONAL
683 Render a string to a bitmap or the screen containing the contents of the specified string.
685 @param This A pointer to the EFI_HII_FONT_PROTOCOL instance.
686 @param Flags Describes how the string is to be drawn.
687 @param PackageList The package list in the HII database to search
688 for the specified string.
689 @param StringId The string's id, which is unique within
691 @param Language Points to the language for the retrieved string.
692 If NULL, then the current system language is
694 @param StringInfo Points to the string output information,
695 including the color and font. If NULL, then the
696 string will be output in the default system font
698 @param Blt If this points to a non-NULL on entry, this
699 points to the image, which is Width pixels wide
700 and Height pixels high. The string will be drawn
702 EFI_HII_OUT_FLAG_CLIP is implied. If this points
703 to a NULL on entry, then a buffer
704 will be allocated to hold the generated image and
705 the pointer updated on exit. It is the caller's
706 responsibility to free this buffer.
707 @param BltX Together with BltX, Specifies the offset from the left and top edge
708 of the image of the first character cell in the
710 @param BltY Together with BltY, Specifies the offset from the left and top edge
711 of the image of the first character cell in the
713 @param RowInfoArray If this is non-NULL on entry, then on exit, this
714 will point to an allocated buffer containing
715 row information and RowInfoArraySize will be
716 updated to contain the number of elements.
717 This array describes the characters which were at
718 least partially drawn and the heights of the
719 rows. It is the caller's responsibility to free
721 @param RowInfoArraySize If this is non-NULL on entry, then on exit it
722 contains the number of elements in RowInfoArray.
723 @param ColumnInfoArray If this is non-NULL, then on return it will be
724 filled with the horizontal offset for each
725 character in the string on the row where it is
726 displayed. Non-printing characters will have
727 the offset ~0. The caller is responsible to
728 allocate a buffer large enough so that there
729 is one entry for each character in the string,
730 not including the null-terminator. It is possible
731 when character display is normalized that some
732 character cells overlap.
734 @retval EFI_SUCCESS The string was successfully rendered.
735 @retval EFI_OUT_OF_RESOURCES Unable to allocate an output buffer for
737 @retval EFI_INVALID_PARAMETER The Blt or PackageList was NULL.
738 @retval EFI_INVALID_PARAMETER Flags were invalid combination.
739 @retval EFI_NOT_FOUND The specified PackageList is not in the Database or the stringid is not
740 in the specified PackageList.
746 IN CONST EFI_HII_FONT_PROTOCOL
*This
,
747 IN EFI_HII_OUT_FLAGS Flags
,
748 IN EFI_HII_HANDLE PackageList
,
749 IN EFI_STRING_ID StringId
,
750 IN CONST CHAR8
* Language
,
751 IN CONST EFI_FONT_DISPLAY_INFO
*StringInfo OPTIONAL
,
752 IN OUT EFI_IMAGE_OUTPUT
**Blt
,
755 OUT EFI_HII_ROW_INFO
**RowInfoArray OPTIONAL
,
756 OUT UINTN
*RowInfoArraySize OPTIONAL
,
757 OUT UINTN
*ColumnInfoArray OPTIONAL
762 Convert the glyph for a single character into a bitmap.
764 @param This A pointer to the EFI_HII_FONT_PROTOCOL instance.
765 @param Char Character to retrieve.
766 @param StringInfo Points to the string font and color information
767 or NULL if the string should use the default
768 system font and color.
769 @param Blt Thus must point to a NULL on entry. A buffer will
770 be allocated to hold the output and the pointer
771 updated on exit. It is the caller's
772 responsibility to free this buffer.
773 @param Baseline Number of pixels from the bottom of the bitmap to
776 @retval EFI_SUCCESS Glyph bitmap created.
777 @retval EFI_OUT_OF_RESOURCES Unable to allocate the output buffer Blt.
778 @retval EFI_WARN_UNKNOWN_GLYPH The glyph was unknown and was replaced with the
779 glyph for Unicode character 0xFFFD.
780 @retval EFI_INVALID_PARAMETER Blt is NULL or *Blt is not NULL.
786 IN CONST EFI_HII_FONT_PROTOCOL
*This
,
788 IN CONST EFI_FONT_DISPLAY_INFO
*StringInfo
,
789 OUT EFI_IMAGE_OUTPUT
**Blt
,
790 OUT UINTN
*Baseline OPTIONAL
795 This function iterates through fonts which match the specified font, using
796 the specified criteria. If String is non-NULL, then all of the characters in
797 the string must exist in order for a candidate font to be returned.
799 @param This A pointer to the EFI_HII_FONT_PROTOCOL instance.
800 @param FontHandle On entry, points to the font handle returned by a
801 previous call to GetFontInfo() or NULL to start
802 with the first font. On return, points to the
803 returned font handle or points to NULL if there
804 are no more matching fonts.
805 @param StringInfoIn Upon entry, points to the font to return information
806 about. If NULL, then the information about the system
807 default font will be returned.
808 @param StringInfoOut Upon return, contains the matching font's information.
809 If NULL, then no information is returned. This buffer
810 is allocated with a call to the Boot Service AllocatePool().
811 It is the caller's responsibility to call the Boot
812 Service FreePool() when the caller no longer requires
813 the contents of StringInfoOut.
814 @param String Points to the string which will be tested to
815 determine if all characters are available. If
816 NULL, then any font is acceptable.
818 @retval EFI_SUCCESS Matching font returned successfully.
819 @retval EFI_NOT_FOUND No matching font was found.
820 @retval EFI_INVALID_PARAMETER StringInfoIn is NULL.
821 @retval EFI_INVALID_PARAMETER StringInfoIn->FontInfoMask is an invalid combination.
822 @retval EFI_OUT_OF_RESOURCES There were insufficient resources to complete the
828 IN CONST EFI_HII_FONT_PROTOCOL
*This
,
829 IN OUT EFI_FONT_HANDLE
*FontHandle
,
830 IN CONST EFI_FONT_DISPLAY_INFO
*StringInfoIn
, OPTIONAL
831 OUT EFI_FONT_DISPLAY_INFO
**StringInfoOut
,
832 IN CONST EFI_STRING String OPTIONAL
836 // EFI_HII_IMAGE_PROTOCOL interfaces
840 Get the image id of last image block: EFI_HII_IIBT_END_BLOCK when input
841 ImageId is zero, otherwise return the address of the
842 corresponding image block with identifier specified by ImageId.
844 This is a internal function.
846 @param ImageBlocks Points to the beginning of a series of image blocks stored in order.
847 @param ImageId If input ImageId is 0, output the image id of the EFI_HII_IIBT_END_BLOCK;
848 else use this id to find its corresponding image block address.
850 @return The image block address when input ImageId is not zero; otherwise return NULL.
853 EFI_HII_IMAGE_BLOCK
*
854 GetImageIdOrAddress (
855 IN EFI_HII_IMAGE_BLOCK
*ImageBlocks
,
856 IN OUT EFI_IMAGE_ID
*ImageId
860 Return the HII package list identified by PackageList HII handle.
862 @param Database Pointer to HII database list header.
863 @param PackageList HII handle of the package list to locate.
865 @retval The HII package list instance.
867 HII_DATABASE_PACKAGE_LIST_INSTANCE
*
869 IN LIST_ENTRY
*Database
,
870 IN EFI_HII_HANDLE PackageList
874 This function retrieves the image specified by ImageId which is associated with
875 the specified PackageList and copies it into the buffer specified by Image.
877 @param Database A pointer to the database list header.
878 @param PackageList Handle of the package list where this image will
880 @param ImageId The image's id,, which is unique within
882 @param Image Points to the image.
883 @param BitmapOnly TRUE to only return the bitmap type image.
884 FALSE to locate image decoder instance to decode image.
886 @retval EFI_SUCCESS The new image was returned 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_BUFFER_TOO_SMALL The buffer specified by ImageSize is too small to
891 @retval EFI_INVALID_PARAMETER The Image or ImageSize was NULL.
892 @retval EFI_OUT_OF_RESOURCES The bitmap could not be retrieved because there was not
897 IN LIST_ENTRY
*Database
,
898 IN EFI_HII_HANDLE PackageList
,
899 IN EFI_IMAGE_ID ImageId
,
900 OUT EFI_IMAGE_INPUT
*Image
,
901 IN BOOLEAN BitmapOnly
905 Return the first HII image decoder instance which supports the DecoderName.
907 @param BlockType The image block type.
909 @retval Pointer to the HII image decoder instance.
911 EFI_HII_IMAGE_DECODER_PROTOCOL
*
912 LocateHiiImageDecoder (
917 This function adds the image Image to the group of images owned by PackageList, and returns
918 a new image identifier (ImageId).
920 @param This A pointer to the EFI_HII_IMAGE_PROTOCOL instance.
921 @param PackageList Handle of the package list where this image will
923 @param ImageId On return, contains the new image id, which is
924 unique within PackageList.
925 @param Image Points to the image.
927 @retval EFI_SUCCESS The new image was added successfully.
928 @retval EFI_NOT_FOUND The specified PackageList could not be found in
930 @retval EFI_OUT_OF_RESOURCES Could not add the image due to lack of resources.
931 @retval EFI_INVALID_PARAMETER Image is NULL or ImageId is NULL.
937 IN CONST EFI_HII_IMAGE_PROTOCOL
*This
,
938 IN EFI_HII_HANDLE PackageList
,
939 OUT EFI_IMAGE_ID
*ImageId
,
940 IN CONST EFI_IMAGE_INPUT
*Image
945 This function retrieves the image specified by ImageId which is associated with
946 the specified PackageList and copies it into the buffer specified by Image.
948 @param This A pointer to the EFI_HII_IMAGE_PROTOCOL instance.
949 @param PackageList Handle of the package list where this image will
951 @param ImageId The image's id,, which is unique within
953 @param Image Points to the image.
955 @retval EFI_SUCCESS The new image was returned successfully.
956 @retval EFI_NOT_FOUND The image specified by ImageId is not available.
957 The specified PackageList is not in the database.
958 @retval EFI_BUFFER_TOO_SMALL The buffer specified by ImageSize is too small to
960 @retval EFI_INVALID_PARAMETER The Image or ImageSize was NULL.
961 @retval EFI_OUT_OF_RESOURCES The bitmap could not be retrieved because there was not
968 IN CONST EFI_HII_IMAGE_PROTOCOL
*This
,
969 IN EFI_HII_HANDLE PackageList
,
970 IN EFI_IMAGE_ID ImageId
,
971 OUT EFI_IMAGE_INPUT
*Image
976 This function updates the image specified by ImageId in the specified PackageListHandle to
977 the image specified by Image.
979 @param This A pointer to the EFI_HII_IMAGE_PROTOCOL instance.
980 @param PackageList The package list containing the images.
981 @param ImageId The image's id,, which is unique within
983 @param Image Points to the image.
985 @retval EFI_SUCCESS The new image was updated successfully.
986 @retval EFI_NOT_FOUND The image specified by ImageId is not in the
987 database. The specified PackageList is not in the database.
988 @retval EFI_INVALID_PARAMETER The Image was NULL.
994 IN CONST EFI_HII_IMAGE_PROTOCOL
*This
,
995 IN EFI_HII_HANDLE PackageList
,
996 IN EFI_IMAGE_ID ImageId
,
997 IN CONST EFI_IMAGE_INPUT
*Image
1002 This function renders an image to a bitmap or the screen using the specified
1003 color and options. It draws the image on an existing bitmap, allocates a new
1004 bitmap or uses the screen. The images can be clipped.
1006 @param This A pointer to the EFI_HII_IMAGE_PROTOCOL instance.
1007 @param Flags Describes how the image is to be drawn.
1008 @param Image Points to the image to be displayed.
1009 @param Blt If this points to a non-NULL on entry, this
1010 points to the image, which is Width pixels wide
1011 and Height pixels high. The image will be drawn
1012 onto this image and EFI_HII_DRAW_FLAG_CLIP is
1013 implied. If this points to a NULL on entry, then
1014 a buffer will be allocated to hold the generated
1015 image and the pointer updated on exit. It is the
1016 caller's responsibility to free this buffer.
1017 @param BltX Specifies the offset from the left and top edge
1018 of the output image of the first pixel in the
1020 @param BltY Specifies the offset from the left and top edge
1021 of the output image of the first pixel in the
1024 @retval EFI_SUCCESS The image was successfully drawn.
1025 @retval EFI_OUT_OF_RESOURCES Unable to allocate an output buffer for Blt.
1026 @retval EFI_INVALID_PARAMETER The Image or Blt was NULL.
1027 @retval EFI_INVALID_PARAMETER Any combination of Flags is invalid.
1033 IN CONST EFI_HII_IMAGE_PROTOCOL
*This
,
1034 IN EFI_HII_DRAW_FLAGS Flags
,
1035 IN CONST EFI_IMAGE_INPUT
*Image
,
1036 IN OUT EFI_IMAGE_OUTPUT
**Blt
,
1043 This function renders an image to a bitmap or the screen using the specified
1044 color and options. It draws the image on an existing bitmap, allocates a new
1045 bitmap or uses the screen. The images can be clipped.
1047 @param This A pointer to the EFI_HII_IMAGE_PROTOCOL instance.
1048 @param Flags Describes how the image is to be drawn.
1049 @param PackageList The package list in the HII database to search
1050 for the specified image.
1051 @param ImageId The image's id, which is unique within
1053 @param Blt If this points to a non-NULL on entry, this
1054 points to the image, which is Width pixels wide
1055 and Height pixels high. The image will be drawn
1057 EFI_HII_DRAW_FLAG_CLIP is implied. If this points
1058 to a NULL on entry, then a buffer will be
1059 allocated to hold the generated image and the
1060 pointer updated on exit. It is the caller's
1061 responsibility to free this buffer.
1062 @param BltX Specifies the offset from the left and top edge
1063 of the output image of the first pixel in the
1065 @param BltY Specifies the offset from the left and top edge
1066 of the output image of the first pixel in the
1069 @retval EFI_SUCCESS The image was successfully drawn.
1070 @retval EFI_OUT_OF_RESOURCES Unable to allocate an output buffer for Blt.
1071 @retval EFI_INVALID_PARAMETER The Blt was NULL.
1072 @retval EFI_NOT_FOUND The image specified by ImageId is not in the database.
1073 The specified PackageList is not in the database.
1079 IN CONST EFI_HII_IMAGE_PROTOCOL
*This
,
1080 IN EFI_HII_DRAW_FLAGS Flags
,
1081 IN EFI_HII_HANDLE PackageList
,
1082 IN EFI_IMAGE_ID ImageId
,
1083 IN OUT EFI_IMAGE_OUTPUT
**Blt
,
1089 The prototype of this extension function is the same with EFI_HII_IMAGE_PROTOCOL.NewImage().
1090 This protocol invokes EFI_HII_IMAGE_PROTOCOL.NewImage() implicitly.
1092 @param This A pointer to the EFI_HII_IMAGE_EX_PROTOCOL instance.
1093 @param PackageList Handle of the package list where this image will
1095 @param ImageId On return, contains the new image id, which is
1096 unique within PackageList.
1097 @param Image Points to the image.
1099 @retval EFI_SUCCESS The new image was added successfully.
1100 @retval EFI_NOT_FOUND The PackageList could not be found.
1101 @retval EFI_OUT_OF_RESOURCES Could not add the image due to lack of resources.
1102 @retval EFI_INVALID_PARAMETER Image is NULL or ImageId is NULL.
1107 IN CONST EFI_HII_IMAGE_EX_PROTOCOL
*This
,
1108 IN EFI_HII_HANDLE PackageList
,
1109 OUT EFI_IMAGE_ID
*ImageId
,
1110 IN CONST EFI_IMAGE_INPUT
*Image
1114 Return the information about the image, associated with the package list.
1115 The prototype of this extension function is the same with EFI_HII_IMAGE_PROTOCOL.GetImage().
1117 This function is similar to EFI_HII_IMAGE_PROTOCOL.GetImage(). The difference is that
1118 this function will locate all EFI_HII_IMAGE_DECODER_PROTOCOL instances installed in the
1119 system if the decoder of the certain image type is not supported by the
1120 EFI_HII_IMAGE_EX_PROTOCOL. The function will attempt to decode the image to the
1121 EFI_IMAGE_INPUT using the first EFI_HII_IMAGE_DECODER_PROTOCOL instance that
1122 supports the requested image type.
1124 @param This A pointer to the EFI_HII_IMAGE_EX_PROTOCOL instance.
1125 @param PackageList The package list in the HII database to search for the
1127 @param ImageId The image's id, which is unique within PackageList.
1128 @param Image Points to the image.
1130 @retval EFI_SUCCESS The new image was returned successfully.
1131 @retval EFI_NOT_FOUND The image specified by ImageId is not available. The specified
1132 PackageList is not in the Database.
1133 @retval EFI_INVALID_PARAMETER Image was NULL or ImageId was 0.
1134 @retval EFI_OUT_OF_RESOURCES The bitmap could not be retrieved because there
1135 was not enough memory.
1141 IN CONST EFI_HII_IMAGE_EX_PROTOCOL
*This
,
1142 IN EFI_HII_HANDLE PackageList
,
1143 IN EFI_IMAGE_ID ImageId
,
1144 OUT EFI_IMAGE_INPUT
*Image
1148 Change the information about the image.
1150 Same with EFI_HII_IMAGE_PROTOCOL.SetImage(), this protocol invokes
1151 EFI_HII_IMAGE_PROTOCOL.SetImage()implicitly.
1153 @param This A pointer to the EFI_HII_IMAGE_EX_PROTOCOL instance.
1154 @param PackageList The package list containing the images.
1155 @param ImageId The image's id, which is unique within PackageList.
1156 @param Image Points to the image.
1158 @retval EFI_SUCCESS The new image was successfully updated.
1159 @retval EFI_NOT_FOUND The image specified by ImageId is not in the
1160 database. The specified PackageList is not in
1162 @retval EFI_INVALID_PARAMETER The Image was NULL, the ImageId was 0 or
1163 the Image->Bitmap was NULL.
1169 IN CONST EFI_HII_IMAGE_EX_PROTOCOL
*This
,
1170 IN EFI_HII_HANDLE PackageList
,
1171 IN EFI_IMAGE_ID ImageId
,
1172 IN CONST EFI_IMAGE_INPUT
*Image
1176 Renders an image to a bitmap or to the display.
1178 The prototype of this extension function is the same with
1179 EFI_HII_IMAGE_PROTOCOL.DrawImage(). This protocol invokes
1180 EFI_HII_IMAGE_PROTOCOL.DrawImage() implicitly.
1182 @param This A pointer to the EFI_HII_IMAGE_EX_PROTOCOL instance.
1183 @param Flags Describes how the image is to be drawn.
1184 @param Image Points to the image to be displayed.
1185 @param Blt If this points to a non-NULL on entry, this points
1186 to the image, which is Width pixels wide and
1187 Height pixels high. The image will be drawn onto
1188 this image and EFI_HII_DRAW_FLAG_CLIP is implied.
1189 If this points to a NULL on entry, then a buffer
1190 will be allocated to hold the generated image and
1191 the pointer updated on exit. It is the caller's
1192 responsibility to free this buffer.
1193 @param BltX Specifies the offset from the left and top edge of
1194 the output image of the first pixel in the image.
1195 @param BltY Specifies the offset from the left and top edge of
1196 the output image of the first pixel in the image.
1198 @retval EFI_SUCCESS The image was successfully drawn.
1199 @retval EFI_OUT_OF_RESOURCES Unable to allocate an output buffer for Blt.
1200 @retval EFI_INVALID_PARAMETER The Image or Blt was NULL.
1206 IN CONST EFI_HII_IMAGE_EX_PROTOCOL
*This
,
1207 IN EFI_HII_DRAW_FLAGS Flags
,
1208 IN CONST EFI_IMAGE_INPUT
*Image
,
1209 IN OUT EFI_IMAGE_OUTPUT
**Blt
,
1215 Renders an image to a bitmap or the screen containing the contents of the specified
1218 This function is similar to EFI_HII_IMAGE_PROTOCOL.DrawImageId(). The difference is that
1219 this function will locate all EFI_HII_IMAGE_DECODER_PROTOCOL instances installed in the
1220 system if the decoder of the certain image type is not supported by the
1221 EFI_HII_IMAGE_EX_PROTOCOL. The function will attempt to decode the image to the
1222 EFI_IMAGE_INPUT using the first EFI_HII_IMAGE_DECODER_PROTOCOL instance that
1223 supports the requested image type.
1225 @param This A pointer to the EFI_HII_IMAGE_EX_PROTOCOL instance.
1226 @param Flags Describes how the image is to be drawn.
1227 @param PackageList The package list in the HII database to search for
1228 the specified image.
1229 @param ImageId The image's id, which is unique within PackageList.
1230 @param Blt If this points to a non-NULL on entry, this points
1231 to the image, which is Width pixels wide and
1232 Height pixels high. The image will be drawn onto
1233 this image and EFI_HII_DRAW_FLAG_CLIP is implied.
1234 If this points to a NULL on entry, then a buffer
1235 will be allocated to hold the generated image
1236 and the pointer updated on exit. It is the caller's
1237 responsibility to free this buffer.
1238 @param BltX Specifies the offset from the left and top edge of
1239 the output image of the first pixel in the image.
1240 @param BltY Specifies the offset from the left and top edge of
1241 the output image of the first pixel in the image.
1243 @retval EFI_SUCCESS The image was successfully drawn.
1244 @retval EFI_OUT_OF_RESOURCES Unable to allocate an output buffer for Blt.
1245 @retval EFI_INVALID_PARAMETER The Blt was NULL or ImageId was 0.
1246 @retval EFI_NOT_FOUND The image specified by ImageId is not in the database.
1247 The specified PackageList is not in the database.
1253 IN CONST EFI_HII_IMAGE_EX_PROTOCOL
*This
,
1254 IN EFI_HII_DRAW_FLAGS Flags
,
1255 IN EFI_HII_HANDLE PackageList
,
1256 IN EFI_IMAGE_ID ImageId
,
1257 IN OUT EFI_IMAGE_OUTPUT
**Blt
,
1263 This function returns the image information to EFI_IMAGE_OUTPUT. Only the width
1264 and height are returned to the EFI_IMAGE_OUTPUT instead of decoding the image
1265 to the buffer. This function is used to get the geometry of the image. This function
1266 will try to locate all of the EFI_HII_IMAGE_DECODER_PROTOCOL installed on the
1267 system if the decoder of image type is not supported by the EFI_HII_IMAGE_EX_PROTOCOL.
1269 @param This A pointer to the EFI_HII_IMAGE_EX_PROTOCOL instance.
1270 @param PackageList Handle of the package list where this image will
1272 @param ImageId The image's id, which is unique within PackageList.
1273 @param Image Points to the image.
1275 @retval EFI_SUCCESS The new image was returned successfully.
1276 @retval EFI_NOT_FOUND The image specified by ImageId is not in the
1277 database. The specified PackageList is not in the database.
1278 @retval EFI_BUFFER_TOO_SMALL The buffer specified by ImageSize is too small to
1280 @retval EFI_INVALID_PARAMETER The Image was NULL or the ImageId was 0.
1281 @retval EFI_OUT_OF_RESOURCES The bitmap could not be retrieved because there
1282 was not enough memory.
1288 IN CONST EFI_HII_IMAGE_EX_PROTOCOL
*This
,
1289 IN EFI_HII_HANDLE PackageList
,
1290 IN EFI_IMAGE_ID ImageId
,
1291 OUT EFI_IMAGE_OUTPUT
*Image
1294 // EFI_HII_STRING_PROTOCOL
1299 This function adds the string String to the group of strings owned by PackageList, with the
1300 specified font information StringFontInfo and returns a new string id.
1302 @param This A pointer to the EFI_HII_STRING_PROTOCOL
1304 @param PackageList Handle of the package list where this string will
1306 @param StringId On return, contains the new strings id, which is
1307 unique within PackageList.
1308 @param Language Points to the language for the new string.
1309 @param LanguageName Points to the printable language name to
1310 associate with the passed in Language field.If
1311 LanguageName is not NULL and the string package
1312 header's LanguageName associated with a given
1313 Language is not zero, the LanguageName being
1314 passed in will be ignored.
1315 @param String Points to the new null-terminated string.
1316 @param StringFontInfo Points to the new string's font information or
1317 NULL if the string should have the default system
1318 font, size and style.
1320 @retval EFI_SUCCESS The new string was added successfully.
1321 @retval EFI_NOT_FOUND The specified PackageList could not be found in
1323 @retval EFI_OUT_OF_RESOURCES Could not add the string due to lack of
1325 @retval EFI_INVALID_PARAMETER String is NULL or StringId is NULL or Language is
1332 IN CONST EFI_HII_STRING_PROTOCOL
*This
,
1333 IN EFI_HII_HANDLE PackageList
,
1334 OUT EFI_STRING_ID
*StringId
,
1335 IN CONST CHAR8
*Language
,
1336 IN CONST CHAR16
*LanguageName
, OPTIONAL
1337 IN CONST EFI_STRING String
,
1338 IN CONST EFI_FONT_INFO
*StringFontInfo OPTIONAL
1343 This function retrieves the string specified by StringId which is associated
1344 with the specified PackageList in the language Language and copies it into
1345 the buffer specified by String.
1347 @param This A pointer to the EFI_HII_STRING_PROTOCOL
1349 @param Language Points to the language for the retrieved string.
1350 @param PackageList The package list in the HII database to search
1351 for the specified string.
1352 @param StringId The string's id, which is unique within
1354 @param String Points to the new null-terminated string.
1355 @param StringSize On entry, points to the size of the buffer
1356 pointed to by String, in bytes. On return,
1357 points to the length of the string, in bytes.
1358 @param StringFontInfo If not NULL, points to the string's font
1359 information. It's caller's responsibility to
1362 @retval EFI_SUCCESS The string was returned successfully.
1363 @retval EFI_NOT_FOUND The string specified by StringId is not
1365 The specified PackageList is not in the database.
1366 @retval EFI_INVALID_LANGUAGE The string specified by StringId is available but
1367 not in the specified language.
1368 @retval EFI_BUFFER_TOO_SMALL The buffer specified by StringSize is too small
1370 @retval EFI_INVALID_PARAMETER The Language or StringSize was NULL.
1371 @retval EFI_INVALID_PARAMETER The value referenced by StringSize was not zero
1372 and String was NULL.
1373 @retval EFI_OUT_OF_RESOURCES There were insufficient resources to complete the
1380 IN CONST EFI_HII_STRING_PROTOCOL
*This
,
1381 IN CONST CHAR8
*Language
,
1382 IN EFI_HII_HANDLE PackageList
,
1383 IN EFI_STRING_ID StringId
,
1384 OUT EFI_STRING String
,
1385 IN OUT UINTN
*StringSize
,
1386 OUT EFI_FONT_INFO
**StringFontInfo OPTIONAL
1391 This function updates the string specified by StringId in the specified PackageList to the text
1392 specified by String and, optionally, the font information specified by StringFontInfo.
1394 @param This A pointer to the EFI_HII_STRING_PROTOCOL
1396 @param PackageList The package list containing the strings.
1397 @param StringId The string's id, which is unique within
1399 @param Language Points to the language for the updated string.
1400 @param String Points to the new null-terminated string.
1401 @param StringFontInfo Points to the string's font information or NULL
1402 if the string font information is not changed.
1404 @retval EFI_SUCCESS The string was updated successfully.
1405 @retval EFI_NOT_FOUND The string specified by StringId is not in the
1407 @retval EFI_INVALID_PARAMETER The String or Language was NULL.
1408 @retval EFI_OUT_OF_RESOURCES The system is out of resources to accomplish the
1415 IN CONST EFI_HII_STRING_PROTOCOL
*This
,
1416 IN EFI_HII_HANDLE PackageList
,
1417 IN EFI_STRING_ID StringId
,
1418 IN CONST CHAR8
*Language
,
1419 IN CONST EFI_STRING String
,
1420 IN CONST EFI_FONT_INFO
*StringFontInfo OPTIONAL
1425 This function returns the list of supported languages, in the format specified
1426 in Appendix M of UEFI 2.1 spec.
1428 @param This A pointer to the EFI_HII_STRING_PROTOCOL
1430 @param PackageList The package list to examine.
1431 @param Languages Points to the buffer to hold the returned
1432 null-terminated ASCII string.
1433 @param LanguagesSize On entry, points to the size of the buffer
1434 pointed to by Languages, in bytes. On return,
1435 points to the length of Languages, in bytes.
1437 @retval EFI_SUCCESS The languages were returned successfully.
1438 @retval EFI_INVALID_PARAMETER The LanguagesSize was NULL.
1439 @retval EFI_INVALID_PARAMETER The value referenced by LanguagesSize is not zero and Languages is NULL.
1440 @retval EFI_BUFFER_TOO_SMALL The LanguagesSize is too small to hold the list
1441 of supported languages. LanguageSize is updated
1442 to contain the required size.
1443 @retval EFI_NOT_FOUND Could not find string package in specified
1450 IN CONST EFI_HII_STRING_PROTOCOL
*This
,
1451 IN EFI_HII_HANDLE PackageList
,
1452 IN OUT CHAR8
*Languages
,
1453 IN OUT UINTN
*LanguagesSize
1458 Each string package has associated with it a single primary language and zero
1459 or more secondary languages. This routine returns the secondary languages
1460 associated with a package list.
1462 @param This A pointer to the EFI_HII_STRING_PROTOCOL
1464 @param PackageList The package list to examine.
1465 @param PrimaryLanguage Points to the null-terminated ASCII string that specifies
1466 the primary language. Languages are specified in the
1467 format specified in Appendix M of the UEFI 2.0 specification.
1468 @param SecondaryLanguages Points to the buffer to hold the returned null-terminated
1469 ASCII string that describes the list of
1470 secondary languages for the specified
1471 PrimaryLanguage. If there are no secondary
1472 languages, the function returns successfully,
1473 but this is set to NULL.
1474 @param SecondaryLanguagesSize On entry, points to the size of the buffer
1475 pointed to by SecondaryLanguages, in bytes. On
1476 return, points to the length of SecondaryLanguages
1479 @retval EFI_SUCCESS Secondary languages were correctly returned.
1480 @retval EFI_INVALID_PARAMETER PrimaryLanguage or SecondaryLanguagesSize was NULL.
1481 @retval EFI_INVALID_PARAMETER The value referenced by SecondaryLanguagesSize is not
1482 zero and SecondaryLanguages is NULL.
1483 @retval EFI_BUFFER_TOO_SMALL The buffer specified by SecondaryLanguagesSize is
1484 too small to hold the returned information.
1485 SecondaryLanguageSize is updated to hold the size of
1486 the buffer required.
1487 @retval EFI_INVALID_LANGUAGE The language specified by PrimaryLanguage is not
1488 present in the specified package list.
1489 @retval EFI_NOT_FOUND The specified PackageList is not in the Database.
1494 HiiGetSecondaryLanguages (
1495 IN CONST EFI_HII_STRING_PROTOCOL
*This
,
1496 IN EFI_HII_HANDLE PackageList
,
1497 IN CONST CHAR8
*PrimaryLanguage
,
1498 IN OUT CHAR8
*SecondaryLanguages
,
1499 IN OUT UINTN
*SecondaryLanguagesSize
1503 // EFI_HII_DATABASE_PROTOCOL protocol interfaces
1508 This function adds the packages in the package list to the database and returns a handle. If there is a
1509 EFI_DEVICE_PATH_PROTOCOL associated with the DriverHandle, then this function will
1510 create a package of type EFI_PACKAGE_TYPE_DEVICE_PATH and add it to the package list.
1512 @param This A pointer to the EFI_HII_DATABASE_PROTOCOL
1514 @param PackageList A pointer to an EFI_HII_PACKAGE_LIST_HEADER
1516 @param DriverHandle Associate the package list with this EFI handle.
1517 If a NULL is specified, this data will not be associate
1518 with any drivers and cannot have a callback induced.
1519 @param Handle A pointer to the EFI_HII_HANDLE instance.
1521 @retval EFI_SUCCESS The package list associated with the Handle was
1522 added to the HII database.
1523 @retval EFI_OUT_OF_RESOURCES Unable to allocate necessary resources for the
1524 new database contents.
1525 @retval EFI_INVALID_PARAMETER PackageList is NULL or Handle is NULL.
1531 IN CONST EFI_HII_DATABASE_PROTOCOL
*This
,
1532 IN CONST EFI_HII_PACKAGE_LIST_HEADER
*PackageList
,
1533 IN CONST EFI_HANDLE DriverHandle
, OPTIONAL
1534 OUT EFI_HII_HANDLE
*Handle
1539 This function removes the package list that is associated with a handle Handle
1540 from the HII database. Before removing the package, any registered functions
1541 with the notification type REMOVE_PACK and the same package type will be called.
1543 @param This A pointer to the EFI_HII_DATABASE_PROTOCOL
1545 @param Handle The handle that was registered to the data that
1546 is requested for removal.
1548 @retval EFI_SUCCESS The data associated with the Handle was removed
1549 from the HII database.
1550 @retval EFI_NOT_FOUND The specified Handle is not in database.
1555 HiiRemovePackageList (
1556 IN CONST EFI_HII_DATABASE_PROTOCOL
*This
,
1557 IN EFI_HII_HANDLE Handle
1562 This function updates the existing package list (which has the specified Handle)
1563 in the HII databases, using the new package list specified by PackageList.
1565 @param This A pointer to the EFI_HII_DATABASE_PROTOCOL
1567 @param Handle The handle that was registered to the data that
1568 is requested to be updated.
1569 @param PackageList A pointer to an EFI_HII_PACKAGE_LIST_HEADER
1572 @retval EFI_SUCCESS The HII database was successfully updated.
1573 @retval EFI_OUT_OF_RESOURCES Unable to allocate enough memory for the updated
1575 @retval EFI_INVALID_PARAMETER PackageList was NULL.
1576 @retval EFI_NOT_FOUND The specified Handle is not in database.
1581 HiiUpdatePackageList (
1582 IN CONST EFI_HII_DATABASE_PROTOCOL
*This
,
1583 IN EFI_HII_HANDLE Handle
,
1584 IN CONST EFI_HII_PACKAGE_LIST_HEADER
*PackageList
1589 This function returns a list of the package handles of the specified type
1590 that are currently active in the database. The pseudo-type
1591 EFI_HII_PACKAGE_TYPE_ALL will cause all package handles to be listed.
1593 @param This A pointer to the EFI_HII_DATABASE_PROTOCOL
1595 @param PackageType Specifies the package type of the packages to
1596 list or EFI_HII_PACKAGE_TYPE_ALL for all packages
1598 @param PackageGuid If PackageType is EFI_HII_PACKAGE_TYPE_GUID, then
1599 this is the pointer to the GUID which must match
1600 the Guid field of EFI_HII_GUID_PACKAGE_GUID_HDR.
1601 Otherwise, it must be NULL.
1602 @param HandleBufferLength On input, a pointer to the length of the handle
1603 buffer. On output, the length of the handle
1604 buffer that is required for the handles found.
1605 @param Handle An array of EFI_HII_HANDLE instances returned.
1607 @retval EFI_SUCCESS The matching handles are outputted successfully.
1608 HandleBufferLength is updated with the actual length.
1609 @retval EFI_BUFFER_TO_SMALL The HandleBufferLength parameter indicates that
1610 Handle is too small to support the number of
1611 handles. HandleBufferLength is updated with a
1612 value that will enable the data to fit.
1613 @retval EFI_NOT_FOUND No matching handle could not be found in
1615 @retval EFI_INVALID_PARAMETER HandleBufferLength was NULL.
1616 @retval EFI_INVALID_PARAMETER The value referenced by HandleBufferLength was not
1617 zero and Handle was NULL.
1618 @retval EFI_INVALID_PARAMETER PackageType is not a EFI_HII_PACKAGE_TYPE_GUID but
1619 PackageGuid is not NULL, PackageType is a EFI_HII_
1620 PACKAGE_TYPE_GUID but PackageGuid is NULL.
1625 HiiListPackageLists (
1626 IN CONST EFI_HII_DATABASE_PROTOCOL
*This
,
1627 IN UINT8 PackageType
,
1628 IN CONST EFI_GUID
*PackageGuid
,
1629 IN OUT UINTN
*HandleBufferLength
,
1630 OUT EFI_HII_HANDLE
*Handle
1635 This function will export one or all package lists in the database to a buffer.
1636 For each package list exported, this function will call functions registered
1637 with EXPORT_PACK and then copy the package list to the buffer.
1639 @param This A pointer to the EFI_HII_DATABASE_PROTOCOL
1641 @param Handle An EFI_HII_HANDLE that corresponds to the desired
1642 package list in the HII database to export or
1643 NULL to indicate all package lists should be
1645 @param BufferSize On input, a pointer to the length of the buffer.
1646 On output, the length of the buffer that is
1647 required for the exported data.
1648 @param Buffer A pointer to a buffer that will contain the
1649 results of the export function.
1651 @retval EFI_SUCCESS Package exported.
1652 @retval EFI_BUFFER_TO_SMALL The HandleBufferLength parameter indicates that
1653 Handle is too small to support the number of
1654 handles. HandleBufferLength is updated with
1655 a value that will enable the data to fit.
1656 @retval EFI_NOT_FOUND The specified Handle could not be found in the
1658 @retval EFI_INVALID_PARAMETER BufferSize was NULL.
1659 @retval EFI_INVALID_PARAMETER The value referenced by BufferSize was not zero
1660 and Buffer was NULL.
1665 HiiExportPackageLists (
1666 IN CONST EFI_HII_DATABASE_PROTOCOL
*This
,
1667 IN EFI_HII_HANDLE Handle
,
1668 IN OUT UINTN
*BufferSize
,
1669 OUT EFI_HII_PACKAGE_LIST_HEADER
*Buffer
1674 This function registers a function which will be called when specified actions related to packages of
1675 the specified type occur in the HII database. By registering a function, other HII-related drivers are
1676 notified when specific package types are added, removed or updated in the HII database.
1677 Each driver or application which registers a notification should use
1678 EFI_HII_DATABASE_PROTOCOL.UnregisterPackageNotify() before exiting.
1680 @param This A pointer to the EFI_HII_DATABASE_PROTOCOL
1682 @param PackageType Specifies the package type of the packages to
1683 list or EFI_HII_PACKAGE_TYPE_ALL for all packages
1685 @param PackageGuid If PackageType is EFI_HII_PACKAGE_TYPE_GUID, then
1686 this is the pointer to the GUID which must match
1688 EFI_HII_GUID_PACKAGE_GUID_HDR. Otherwise, it must
1690 @param PackageNotifyFn Points to the function to be called when the
1692 NotificationType occurs.
1693 @param NotifyType Describes the types of notification which this
1694 function will be receiving.
1695 @param NotifyHandle Points to the unique handle assigned to the
1696 registered notification. Can be used in
1697 EFI_HII_DATABASE_PROTOCOL.UnregisterPackageNotify()
1698 to stop notifications.
1700 @retval EFI_SUCCESS Notification registered successfully.
1701 @retval EFI_OUT_OF_RESOURCES Unable to allocate necessary data structures
1702 @retval EFI_INVALID_PARAMETER NotifyHandle is NULL.
1703 @retval EFI_INVALID_PARAMETER PackageGuid is not NULL when PackageType is not
1704 EFI_HII_PACKAGE_TYPE_GUID.
1705 @retval EFI_INVALID_PARAMETER PackageGuid is NULL when PackageType is
1706 EFI_HII_PACKAGE_TYPE_GUID.
1711 HiiRegisterPackageNotify (
1712 IN CONST EFI_HII_DATABASE_PROTOCOL
*This
,
1713 IN UINT8 PackageType
,
1714 IN CONST EFI_GUID
*PackageGuid
,
1715 IN CONST EFI_HII_DATABASE_NOTIFY PackageNotifyFn
,
1716 IN EFI_HII_DATABASE_NOTIFY_TYPE NotifyType
,
1717 OUT EFI_HANDLE
*NotifyHandle
1722 Removes the specified HII database package-related notification.
1724 @param This A pointer to the EFI_HII_DATABASE_PROTOCOL
1726 @param NotificationHandle The handle of the notification function being
1729 @retval EFI_SUCCESS Notification is unregistered successfully.
1730 @retval EFI_NOT_FOUND The incoming notification handle does not exist
1731 in current hii database.
1736 HiiUnregisterPackageNotify (
1737 IN CONST EFI_HII_DATABASE_PROTOCOL
*This
,
1738 IN EFI_HANDLE NotificationHandle
1743 This routine retrieves an array of GUID values for each keyboard layout that
1744 was previously registered in the system.
1746 @param This A pointer to the EFI_HII_DATABASE_PROTOCOL
1748 @param KeyGuidBufferLength On input, a pointer to the length of the keyboard
1749 GUID buffer. On output, the length of the handle
1750 buffer that is required for the handles found.
1751 @param KeyGuidBuffer An array of keyboard layout GUID instances
1754 @retval EFI_SUCCESS KeyGuidBuffer was updated successfully.
1755 @retval EFI_BUFFER_TOO_SMALL The KeyGuidBufferLength parameter indicates
1756 that KeyGuidBuffer is too small to support the
1757 number of GUIDs. KeyGuidBufferLength is
1758 updated with a value that will enable the data to
1760 @retval EFI_INVALID_PARAMETER The KeyGuidBufferLength is NULL.
1761 @retval EFI_INVALID_PARAMETER The value referenced by KeyGuidBufferLength is not
1762 zero and KeyGuidBuffer is NULL.
1763 @retval EFI_NOT_FOUND There was no keyboard layout.
1768 HiiFindKeyboardLayouts (
1769 IN CONST EFI_HII_DATABASE_PROTOCOL
*This
,
1770 IN OUT UINT16
*KeyGuidBufferLength
,
1771 OUT EFI_GUID
*KeyGuidBuffer
1776 This routine retrieves the requested keyboard layout. The layout is a physical description of the keys
1777 on a keyboard and the character(s) that are associated with a particular set of key strokes.
1779 @param This A pointer to the EFI_HII_DATABASE_PROTOCOL
1781 @param KeyGuid A pointer to the unique ID associated with a
1782 given keyboard layout. If KeyGuid is NULL then
1783 the current layout will be retrieved.
1784 @param KeyboardLayoutLength On input, a pointer to the length of the
1785 KeyboardLayout buffer. On output, the length of
1786 the data placed into KeyboardLayout.
1787 @param KeyboardLayout A pointer to a buffer containing the retrieved
1790 @retval EFI_SUCCESS The keyboard layout was retrieved successfully.
1791 @retval EFI_NOT_FOUND The requested keyboard layout was not found.
1792 @retval EFI_INVALID_PARAMETER The KeyboardLayout or KeyboardLayoutLength was
1798 HiiGetKeyboardLayout (
1799 IN CONST EFI_HII_DATABASE_PROTOCOL
*This
,
1800 IN CONST EFI_GUID
*KeyGuid
,
1801 IN OUT UINT16
*KeyboardLayoutLength
,
1802 OUT EFI_HII_KEYBOARD_LAYOUT
*KeyboardLayout
1807 This routine sets the default keyboard layout to the one referenced by KeyGuid. When this routine
1808 is called, an event will be signaled of the EFI_HII_SET_KEYBOARD_LAYOUT_EVENT_GUID
1809 group type. This is so that agents which are sensitive to the current keyboard layout being changed
1810 can be notified of this change.
1812 @param This A pointer to the EFI_HII_DATABASE_PROTOCOL
1814 @param KeyGuid A pointer to the unique ID associated with a
1815 given keyboard layout.
1817 @retval EFI_SUCCESS The current keyboard layout was successfully set.
1818 @retval EFI_NOT_FOUND The referenced keyboard layout was not found, so
1820 @retval EFI_INVALID_PARAMETER The KeyGuid was NULL.
1825 HiiSetKeyboardLayout (
1826 IN CONST EFI_HII_DATABASE_PROTOCOL
*This
,
1827 IN CONST EFI_GUID
*KeyGuid
1832 Return the EFI handle associated with a package list.
1834 @param This A pointer to the EFI_HII_DATABASE_PROTOCOL
1836 @param PackageListHandle An EFI_HII_HANDLE that corresponds to the desired
1837 package list in the HIIdatabase.
1838 @param DriverHandle On return, contains the EFI_HANDLE which was
1839 registered with the package list in
1842 @retval EFI_SUCCESS The DriverHandle was returned successfully.
1843 @retval EFI_INVALID_PARAMETER The PackageListHandle was not valid or
1844 DriverHandle was NULL.
1849 HiiGetPackageListHandle (
1850 IN CONST EFI_HII_DATABASE_PROTOCOL
*This
,
1851 IN EFI_HII_HANDLE PackageListHandle
,
1852 OUT EFI_HANDLE
*DriverHandle
1856 // EFI_HII_CONFIG_ROUTING_PROTOCOL interfaces
1861 This function allows a caller to extract the current configuration
1862 for one or more named elements from one or more drivers.
1864 @param This A pointer to the EFI_HII_CONFIG_ROUTING_PROTOCOL
1866 @param Request A null-terminated Unicode string in
1867 <MultiConfigRequest> format.
1868 @param Progress On return, points to a character in the Request
1869 string. Points to the string's null terminator if
1870 request was successful. Points to the most recent
1871 & before the first failing name / value pair (or
1872 the beginning of the string if the failure is in
1873 the first name / value pair) if the request was
1875 @param Results Null-terminated Unicode string in
1876 <MultiConfigAltResp> format which has all values
1877 filled in for the names in the Request string.
1878 String to be allocated by the called function.
1880 @retval EFI_SUCCESS The Results string is filled with the values
1881 corresponding to all requested names.
1882 @retval EFI_OUT_OF_RESOURCES Not enough memory to store the parts of the
1883 results that must be stored awaiting possible
1885 @retval EFI_NOT_FOUND Routing data doesn't match any known driver.
1886 Progress set to the "G" in "GUID" of the
1887 routing header that doesn't match. Note: There
1888 is no requirement that all routing data
1889 be validated before any configuration extraction.
1890 @retval EFI_INVALID_PARAMETER For example, passing in a NULL for the Request
1891 parameter would result in this type of error. The
1892 Progress parameter is set to NULL.
1893 @retval EFI_INVALID_PARAMETER Illegal syntax. Progress set to most recent &
1894 before the error or the beginning of the string.
1895 @retval EFI_INVALID_PARAMETER Unknown name. Progress points to the & before the
1901 HiiConfigRoutingExtractConfig (
1902 IN CONST EFI_HII_CONFIG_ROUTING_PROTOCOL
*This
,
1903 IN CONST EFI_STRING Request
,
1904 OUT EFI_STRING
*Progress
,
1905 OUT EFI_STRING
*Results
1910 This function allows the caller to request the current configuration for the
1911 entirety of the current HII database and returns the data in a null-terminated Unicode string.
1913 @param This A pointer to the EFI_HII_CONFIG_ROUTING_PROTOCOL
1915 @param Results Null-terminated Unicode string in
1916 <MultiConfigAltResp> format which has all values
1917 filled in for the entirety of the current HII
1918 database. String to be allocated by the called
1919 function. De-allocation is up to the caller.
1921 @retval EFI_SUCCESS The Results string is filled with the values
1922 corresponding to all requested names.
1923 @retval EFI_OUT_OF_RESOURCES Not enough memory to store the parts of the
1924 results that must be stored awaiting possible
1926 @retval EFI_INVALID_PARAMETER For example, passing in a NULL for the Results
1927 parameter would result in this type of error.
1932 HiiConfigRoutingExportConfig (
1933 IN CONST EFI_HII_CONFIG_ROUTING_PROTOCOL
*This
,
1934 OUT EFI_STRING
*Results
1939 This function processes the results of processing forms and routes it to the
1940 appropriate handlers or storage.
1942 @param This A pointer to the EFI_HII_CONFIG_ROUTING_PROTOCOL
1944 @param Configuration A null-terminated Unicode string in
1945 <MulltiConfigResp> format.
1946 @param Progress A pointer to a string filled in with the offset
1947 of the most recent & before the first failing
1948 name / value pair (or the beginning of the string
1949 if the failure is in the first name / value pair)
1950 or the terminating NULL if all was successful.
1952 @retval EFI_SUCCESS The results have been distributed or are awaiting
1954 @retval EFI_OUT_OF_RESOURCES Not enough memory to store the parts of the
1955 results that must be stored awaiting possible
1957 @retval EFI_INVALID_PARAMETER Passing in a NULL for the Configuration parameter
1958 would result in this type of error.
1959 @retval EFI_NOT_FOUND Target for the specified routing data was not
1965 HiiConfigRoutingRouteConfig (
1966 IN CONST EFI_HII_CONFIG_ROUTING_PROTOCOL
*This
,
1967 IN CONST EFI_STRING Configuration
,
1968 OUT EFI_STRING
*Progress
1974 This helper function is to be called by drivers to map configuration data stored
1975 in byte array ("block") formats such as UEFI Variables into current configuration strings.
1977 @param This A pointer to the EFI_HII_CONFIG_ROUTING_PROTOCOL
1979 @param ConfigRequest A null-terminated Unicode string in
1980 <ConfigRequest> format.
1981 @param Block Array of bytes defining the block's
1983 @param BlockSize Length in bytes of Block.
1984 @param Config Filled-in configuration string. String allocated
1985 by the function. Returned only if call is
1987 @param Progress A pointer to a string filled in with the offset
1988 of the most recent & before the first failing
1989 name/value pair (or the beginning of the string
1990 if the failure is in the first name / value pair)
1991 or the terminating NULL if all was successful.
1993 @retval EFI_SUCCESS The request succeeded. Progress points to the
1994 null terminator at the end of the ConfigRequest
1996 @retval EFI_OUT_OF_RESOURCES Not enough memory to allocate Config.
1997 Progress points to the first character of
1999 @retval EFI_INVALID_PARAMETER Passing in a NULL for the ConfigRequest or
2000 Block parameter would result in this type of
2001 error. Progress points to the first character of
2003 @retval EFI_NOT_FOUND Target for the specified routing data was not
2004 found. Progress points to the "G" in "GUID" of
2005 the errant routing data.
2006 @retval EFI_DEVICE_ERROR Block not large enough. Progress undefined.
2007 @retval EFI_INVALID_PARAMETER Encountered non <BlockName> formatted string.
2008 Block is left updated and Progress points at
2009 the '&' preceding the first non-<BlockName>.
2015 IN CONST EFI_HII_CONFIG_ROUTING_PROTOCOL
*This
,
2016 IN CONST EFI_STRING ConfigRequest
,
2017 IN CONST UINT8
*Block
,
2018 IN CONST UINTN BlockSize
,
2019 OUT EFI_STRING
*Config
,
2020 OUT EFI_STRING
*Progress
2025 This helper function is to be called by drivers to map configuration strings
2026 to configurations stored in byte array ("block") formats such as UEFI Variables.
2028 @param This A pointer to the EFI_HII_CONFIG_ROUTING_PROTOCOL
2030 @param ConfigResp A null-terminated Unicode string in <ConfigResp>
2032 @param Block A possibly null array of bytes representing the
2033 current block. Only bytes referenced in the
2034 ConfigResp string in the block are modified. If
2035 this parameter is null or if the *BlockSize
2036 parameter is (on input) shorter than required by
2037 the Configuration string, only the BlockSize
2038 parameter is updated and an appropriate status
2039 (see below) is returned.
2040 @param BlockSize The length of the Block in units of UINT8. On
2041 input, this is the size of the Block. On output,
2042 if successful, contains the largest index of the
2043 modified byte in the Block, or the required buffer
2044 size if the Block is not large enough.
2045 @param Progress On return, points to an element of the ConfigResp
2046 string filled in with the offset of the most
2047 recent '&' before the first failing name / value
2048 pair (or the beginning of the string if the
2049 failure is in the first name / value pair) or
2050 the terminating NULL if all was successful.
2052 @retval EFI_SUCCESS The request succeeded. Progress points to the
2053 null terminator at the end of the ConfigResp
2055 @retval EFI_OUT_OF_RESOURCES Not enough memory to allocate Config.
2056 Progress points to the first character of
2058 @retval EFI_INVALID_PARAMETER Passing in a NULL for the ConfigResp or
2059 Block parameter would result in this type of
2060 error. Progress points to the first character of
2062 @retval EFI_NOT_FOUND Target for the specified routing data was not
2063 found. Progress points to the "G" in "GUID" of
2064 the errant routing data.
2065 @retval EFI_INVALID_PARAMETER Encountered non <BlockName> formatted name /
2066 value pair. Block is left updated and
2067 Progress points at the '&' preceding the first
2069 @retval EFI_BUFFER_TOO_SMALL Block not large enough. Progress undefined.
2070 BlockSize is updated with the required buffer size.
2076 IN CONST EFI_HII_CONFIG_ROUTING_PROTOCOL
*This
,
2077 IN CONST EFI_STRING ConfigResp
,
2078 IN OUT UINT8
*Block
,
2079 IN OUT UINTN
*BlockSize
,
2080 OUT EFI_STRING
*Progress
2085 This helper function is to be called by drivers to extract portions of
2086 a larger configuration string.
2088 @param This A pointer to the EFI_HII_CONFIG_ROUTING_PROTOCOL
2090 @param Configuration A null-terminated Unicode string in
2091 <MultiConfigAltResp> format.
2092 @param Guid A pointer to the GUID value to search for in the
2093 routing portion of the ConfigResp string when
2094 retrieving the requested data. If Guid is NULL,
2095 then all GUID values will be searched for.
2096 @param Name A pointer to the NAME value to search for in the
2097 routing portion of the ConfigResp string when
2098 retrieving the requested data. If Name is NULL,
2099 then all Name values will be searched for.
2100 @param DevicePath A pointer to the PATH value to search for in the
2101 routing portion of the ConfigResp string when
2102 retrieving the requested data. If DevicePath is
2103 NULL, then all DevicePath values will be
2105 @param AltCfgId A pointer to the ALTCFG value to search for in
2106 the routing portion of the ConfigResp string
2107 when retrieving the requested data. If this
2108 parameter is NULL, then the current setting will
2110 @param AltCfgResp A pointer to a buffer which will be allocated by
2111 the function which contains the retrieved string
2112 as requested. This buffer is only allocated if
2113 the call was successful.
2115 @retval EFI_SUCCESS The request succeeded. The requested data was
2116 extracted and placed in the newly allocated
2118 @retval EFI_OUT_OF_RESOURCES Not enough memory to allocate AltCfgResp.
2119 @retval EFI_INVALID_PARAMETER Any parameter is invalid.
2120 @retval EFI_NOT_FOUND Target for the specified routing data was not
2127 IN CONST EFI_HII_CONFIG_ROUTING_PROTOCOL
*This
,
2128 IN CONST EFI_STRING Configuration
,
2129 IN CONST EFI_GUID
*Guid
,
2130 IN CONST EFI_STRING Name
,
2131 IN CONST EFI_DEVICE_PATH_PROTOCOL
*DevicePath
,
2132 IN CONST UINT16
*AltCfgId
,
2133 OUT EFI_STRING
*AltCfgResp
2138 This function accepts a <MultiKeywordResp> formatted string, finds the associated
2139 keyword owners, creates a <MultiConfigResp> string from it and forwards it to the
2140 EFI_HII_ROUTING_PROTOCOL.RouteConfig function.
2142 If there is an issue in resolving the contents of the KeywordString, then the
2143 function returns an error and also sets the Progress and ProgressErr with the
2144 appropriate information about where the issue occurred and additional data about
2145 the nature of the issue.
2147 In the case when KeywordString containing multiple keywords, when an EFI_NOT_FOUND
2148 error is generated during processing the second or later keyword element, the system
2149 storage associated with earlier keywords is not modified. All elements of the
2150 KeywordString must successfully pass all tests for format and access prior to making
2151 any modifications to storage.
2153 In the case when EFI_DEVICE_ERROR is returned from the processing of a KeywordString
2154 containing multiple keywords, the state of storage associated with earlier keywords
2158 @param This Pointer to the EFI_KEYWORD_HANDLER _PROTOCOL instance.
2160 @param KeywordString A null-terminated string in <MultiKeywordResp> format.
2162 @param Progress On return, points to a character in the KeywordString.
2163 Points to the string's NULL terminator if the request
2164 was successful. Points to the most recent '&' before
2165 the first failing name / value pair (or the beginning
2166 of the string if the failure is in the first name / value
2167 pair) if the request was not successful.
2169 @param ProgressErr If during the processing of the KeywordString there was
2170 a failure, this parameter gives additional information
2171 about the possible source of the problem. The various
2172 errors are defined in "Related Definitions" below.
2175 @retval EFI_SUCCESS The specified action was completed successfully.
2177 @retval EFI_INVALID_PARAMETER One or more of the following are TRUE:
2178 1. KeywordString is NULL.
2179 2. Parsing of the KeywordString resulted in an
2180 error. See Progress and ProgressErr for more data.
2182 @retval EFI_NOT_FOUND An element of the KeywordString was not found.
2183 See ProgressErr for more data.
2185 @retval EFI_OUT_OF_RESOURCES Required system resources could not be allocated.
2186 See ProgressErr for more data.
2188 @retval EFI_ACCESS_DENIED The action violated system policy. See ProgressErr
2191 @retval EFI_DEVICE_ERROR An unexpected system error occurred. See ProgressErr
2197 EfiConfigKeywordHandlerSetData (
2198 IN EFI_CONFIG_KEYWORD_HANDLER_PROTOCOL
*This
,
2199 IN CONST EFI_STRING KeywordString
,
2200 OUT EFI_STRING
*Progress
,
2201 OUT UINT32
*ProgressErr
2206 This function accepts a <MultiKeywordRequest> formatted string, finds the underlying
2207 keyword owners, creates a <MultiConfigRequest> string from it and forwards it to the
2208 EFI_HII_ROUTING_PROTOCOL.ExtractConfig function.
2210 If there is an issue in resolving the contents of the KeywordString, then the function
2211 returns an EFI_INVALID_PARAMETER and also set the Progress and ProgressErr with the
2212 appropriate information about where the issue occurred and additional data about the
2213 nature of the issue.
2215 In the case when KeywordString is NULL, or contains multiple keywords, or when
2216 EFI_NOT_FOUND is generated while processing the keyword elements, the Results string
2217 contains values returned for all keywords processed prior to the keyword generating the
2218 error but no values for the keyword with error or any following keywords.
2221 @param This Pointer to the EFI_KEYWORD_HANDLER _PROTOCOL instance.
2223 @param NameSpaceId A null-terminated string containing the platform configuration
2224 language to search through in the system. If a NULL is passed
2225 in, then it is assumed that any platform configuration language
2226 with the prefix of "x-UEFI-" are searched.
2228 @param KeywordString A null-terminated string in <MultiKeywordRequest> format. If a
2229 NULL is passed in the KeywordString field, all of the known
2230 keywords in the system for the NameSpaceId specified are
2231 returned in the Results field.
2233 @param Progress On return, points to a character in the KeywordString. Points
2234 to the string's NULL terminator if the request was successful.
2235 Points to the most recent '&' before the first failing name / value
2236 pair (or the beginning of the string if the failure is in the first
2237 name / value pair) if the request was not successful.
2239 @param ProgressErr If during the processing of the KeywordString there was a
2240 failure, this parameter gives additional information about the
2241 possible source of the problem. See the definitions in SetData()
2242 for valid value definitions.
2244 @param Results A null-terminated string in <MultiKeywordResp> format is returned
2245 which has all the values filled in for the keywords in the
2246 KeywordString. This is a callee-allocated field, and must be freed
2247 by the caller after being used.
2249 @retval EFI_SUCCESS The specified action was completed successfully.
2251 @retval EFI_INVALID_PARAMETER One or more of the following are TRUE:
2252 1.Progress, ProgressErr, or Results is NULL.
2253 2.Parsing of the KeywordString resulted in an error. See
2254 Progress and ProgressErr for more data.
2257 @retval EFI_NOT_FOUND An element of the KeywordString was not found. See
2258 ProgressErr for more data.
2260 @retval EFI_NOT_FOUND The NamespaceId specified was not found. See ProgressErr
2263 @retval EFI_OUT_OF_RESOURCES Required system resources could not be allocated. See
2264 ProgressErr for more data.
2266 @retval EFI_ACCESS_DENIED The action violated system policy. See ProgressErr for
2269 @retval EFI_DEVICE_ERROR An unexpected system error occurred. See ProgressErr
2275 EfiConfigKeywordHandlerGetData (
2276 IN EFI_CONFIG_KEYWORD_HANDLER_PROTOCOL
*This
,
2277 IN CONST EFI_STRING NameSpaceId
, OPTIONAL
2278 IN CONST EFI_STRING KeywordString
, OPTIONAL
2279 OUT EFI_STRING
*Progress
,
2280 OUT UINT32
*ProgressErr
,
2281 OUT EFI_STRING
*Results
2285 Compare whether two names of languages are identical.
2287 @param Language1 Name of language 1 from StringPackage
2288 @param Language2 Name of language 2 to be compared with language 1.
2291 @retval FALSE not same
2295 HiiCompareLanguage (
2296 IN CHAR8
*Language1
,
2302 Retrieves a pointer to a Null-terminated ASCII string containing the list
2303 of languages that an HII handle in the HII Database supports. The returned
2304 string is allocated using AllocatePool(). The caller is responsible for freeing
2305 the returned string using FreePool(). The format of the returned string follows
2306 the language format assumed the HII Database.
2308 If HiiHandle is NULL, then ASSERT().
2310 @param[in] HiiHandle A handle that was previously registered in the HII Database.
2312 @retval NULL HiiHandle is not registered in the HII database
2313 @retval NULL There are not enough resources available to retrieve the supported
2315 @retval NULL The list of supported languages could not be retrieved.
2316 @retval Other A pointer to the Null-terminated ASCII string of supported languages.
2320 GetSupportedLanguages (
2321 IN EFI_HII_HANDLE HiiHandle
2325 This function mainly use to get HiiDatabase information.
2327 @param This A pointer to the EFI_HII_DATABASE_PROTOCOL instance.
2329 @retval EFI_SUCCESS Get the information successfully.
2330 @retval EFI_OUT_OF_RESOURCES Not enough memory to store the Hiidatabase data.
2334 HiiGetDatabaseInfo (
2335 IN CONST EFI_HII_DATABASE_PROTOCOL
*This
2339 This function mainly use to get and update ConfigResp string.
2341 @param This A pointer to the EFI_HII_DATABASE_PROTOCOL instance.
2343 @retval EFI_SUCCESS Get the information successfully.
2344 @retval EFI_OUT_OF_RESOURCES Not enough memory to store the Configuration Setting data.
2348 HiiGetConfigRespInfo (
2349 IN CONST EFI_HII_DATABASE_PROTOCOL
*This
2355 extern EFI_EVENT gHiiKeyboardLayoutChanged
;
2356 extern BOOLEAN gExportAfterReadyToBoot
;