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/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>
36 #include <Library/DebugLib.h>
37 #include <Library/BaseMemoryLib.h>
38 #include <Library/UefiDriverEntryPoint.h>
39 #include <Library/UefiBootServicesTableLib.h>
40 #include <Library/BaseLib.h>
41 #include <Library/DevicePathLib.h>
42 #include <Library/MemoryAllocationLib.h>
43 #include <Library/UefiLib.h>
44 #include <Library/PcdLib.h>
45 #include <Library/UefiRuntimeServicesTableLib.h>
46 #include <Library/PrintLib.h>
48 #define MAX_STRING_LENGTH 1024
49 #define MAX_FONT_NAME_LEN 256
50 #define NARROW_BASELINE 15
51 #define WIDE_BASELINE 14
52 #define SYS_FONT_INFO_MASK 0x37
53 #define REPLACE_UNKNOWN_GLYPH 0xFFFD
54 #define PROPORTIONAL_GLYPH 0x80
55 #define NARROW_GLYPH 0x40
57 #define BITMAP_LEN_1_BIT(Width, Height) (((Width) + 7) / 8 * (Height))
58 #define BITMAP_LEN_4_BIT(Width, Height) (((Width) + 1) / 2 * (Height))
59 #define BITMAP_LEN_8_BIT(Width, Height) ((Width) * (Height))
60 #define BITMAP_LEN_24_BIT(Width, Height) ((Width) * (Height) * 3)
65 // BASE_CR (a, IFR_DEFAULT_VALUE_DATA, Entry) to get the whole structure.
68 LIST_ENTRY Entry
; // Link to VarStorage
73 LIST_ENTRY BlockEntry
; // Link to its Block array
74 } IFR_VARSTORAGE_DATA
;
77 LIST_ENTRY Entry
; // Link to Block array
80 EFI_QUESTION_ID QuestionId
;
83 LIST_ENTRY DefaultValueEntry
; // Link to its default value array
88 // Get default value from IFR data.
91 DefaultValueFromDefault
= 0, // Get from the minimum or first one when not set default value.
92 DefaultValueFromOtherDefault
, // Get default vale from other default when no default(When other
93 // defaults are more than one, use the default with smallest default id).
94 DefaultValueFromFlag
, // Get default value from the default flag.
95 DefaultValueFromOpcode
// Get default value from default opcode, highest priority.
100 DEFAULT_VALUE_TYPE Type
;
101 BOOLEAN Cleaned
; // Whether this value is cleaned
102 // TRUE Cleaned, the value can't be used
103 // FALSE Not cleaned, the value can be used.
105 EFI_IFR_TYPE_VALUE Value
;
111 #define EFI_HII_VARSTORE_BUFFER 0
112 #define EFI_HII_VARSTORE_NAME_VALUE 1
113 #define EFI_HII_VARSTORE_EFI_VARIABLE 2
114 #define EFI_HII_VARSTORE_EFI_VARIABLE_BUFFER 3
117 // Keyword handler protocol filter type.
119 #define EFI_KEYWORD_FILTER_READONY 0x01
120 #define EFI_KEYWORD_FILTER_REAWRITE 0x02
121 #define EFI_KEYWORD_FILTER_BUFFER 0x10
122 #define EFI_KEYWORD_FILTER_NUMERIC 0x20
123 #define EFI_KEYWORD_FILTER_NUMERIC_1 0x30
124 #define EFI_KEYWORD_FILTER_NUMERIC_2 0x40
125 #define EFI_KEYWORD_FILTER_NUMERIC_4 0x50
126 #define EFI_KEYWORD_FILTER_NUMERIC_8 0x60
129 #define HII_FORMSET_STORAGE_SIGNATURE SIGNATURE_32 ('H', 'S', 'T', 'G')
134 EFI_HII_HANDLE HiiHandle
;
135 EFI_HANDLE DriverHandle
;
137 UINT8 Type
; // EFI_HII_VARSTORE_BUFFER, EFI_HII_VARSTORE_NAME_VALUE, EFI_HII_VARSTORE_EFI_VARIABLE
141 } HII_FORMSET_STORAGE
;
145 // String Package definitions
147 #define HII_STRING_PACKAGE_SIGNATURE SIGNATURE_32 ('h','i','s','p')
148 typedef struct _HII_STRING_PACKAGE_INSTANCE
{
150 EFI_HII_STRING_PACKAGE_HDR
*StringPkgHdr
;
152 LIST_ENTRY StringEntry
;
153 LIST_ENTRY FontInfoList
; // local font info list
155 EFI_STRING_ID MaxStringId
; // record StringId
156 } HII_STRING_PACKAGE_INSTANCE
;
159 // Form Package definitions
161 #define HII_IFR_PACKAGE_SIGNATURE SIGNATURE_32 ('h','f','r','p')
162 typedef struct _HII_IFR_PACKAGE_INSTANCE
{
164 EFI_HII_PACKAGE_HEADER FormPkgHdr
;
167 } HII_IFR_PACKAGE_INSTANCE
;
170 // Simple Font Package definitions
172 #define HII_S_FONT_PACKAGE_SIGNATURE SIGNATURE_32 ('h','s','f','p')
173 typedef struct _HII_SIMPLE_FONT_PACKAGE_INSTANCE
{
175 EFI_HII_SIMPLE_FONT_PACKAGE_HDR
*SimpleFontPkgHdr
;
176 LIST_ENTRY SimpleFontEntry
;
177 } HII_SIMPLE_FONT_PACKAGE_INSTANCE
;
180 // Font Package definitions
182 #define HII_FONT_PACKAGE_SIGNATURE SIGNATURE_32 ('h','i','f','p')
183 typedef struct _HII_FONT_PACKAGE_INSTANCE
{
185 EFI_HII_FONT_PACKAGE_HDR
*FontPkgHdr
;
189 LIST_ENTRY FontEntry
;
190 LIST_ENTRY GlyphInfoList
;
191 } HII_FONT_PACKAGE_INSTANCE
;
193 #define HII_GLYPH_INFO_SIGNATURE SIGNATURE_32 ('h','g','i','s')
194 typedef struct _HII_GLYPH_INFO
{
198 EFI_HII_GLYPH_INFO Cell
;
201 #define HII_FONT_INFO_SIGNATURE SIGNATURE_32 ('h','l','f','i')
202 typedef struct _HII_FONT_INFO
{
205 LIST_ENTRY
*GlobalEntry
;
209 #define HII_GLOBAL_FONT_INFO_SIGNATURE SIGNATURE_32 ('h','g','f','i')
210 typedef struct _HII_GLOBAL_FONT_INFO
{
213 HII_FONT_PACKAGE_INSTANCE
*FontPackage
;
215 EFI_FONT_INFO
*FontInfo
;
216 } HII_GLOBAL_FONT_INFO
;
219 // Image Package definitions
222 #define HII_PIXEL_MASK 0x80
224 typedef struct _HII_IMAGE_PACKAGE_INSTANCE
{
225 EFI_HII_IMAGE_PACKAGE_HDR ImagePkgHdr
;
226 UINT32 ImageBlockSize
;
227 UINT32 PaletteInfoSize
;
228 EFI_HII_IMAGE_BLOCK
*ImageBlock
;
230 } HII_IMAGE_PACKAGE_INSTANCE
;
233 // Keyboard Layout Package definitions
235 #define HII_KB_LAYOUT_PACKAGE_SIGNATURE SIGNATURE_32 ('h','k','l','p')
236 typedef struct _HII_KEYBOARD_LAYOUT_PACKAGE_INSTANCE
{
239 LIST_ENTRY KeyboardEntry
;
240 } HII_KEYBOARD_LAYOUT_PACKAGE_INSTANCE
;
243 // Guid Package definitions
245 #define HII_GUID_PACKAGE_SIGNATURE SIGNATURE_32 ('h','i','g','p')
246 typedef struct _HII_GUID_PACKAGE_INSTANCE
{
249 LIST_ENTRY GuidEntry
;
250 } HII_GUID_PACKAGE_INSTANCE
;
253 // A package list can contain only one or less than one device path package.
254 // This rule also applies to image package since ImageId can not be duplicate.
256 typedef struct _HII_DATABASE_PACKAGE_LIST_INSTANCE
{
257 EFI_HII_PACKAGE_LIST_HEADER PackageListHdr
;
258 LIST_ENTRY GuidPkgHdr
;
259 LIST_ENTRY FormPkgHdr
;
260 LIST_ENTRY KeyboardLayoutHdr
;
261 LIST_ENTRY StringPkgHdr
;
262 LIST_ENTRY FontPkgHdr
;
263 HII_IMAGE_PACKAGE_INSTANCE
*ImagePkg
;
264 LIST_ENTRY SimpleFontPkgHdr
;
265 UINT8
*DevicePathPkg
;
266 } HII_DATABASE_PACKAGE_LIST_INSTANCE
;
268 #define HII_HANDLE_SIGNATURE SIGNATURE_32 ('h','i','h','l')
276 #define HII_DATABASE_RECORD_SIGNATURE SIGNATURE_32 ('h','i','d','r')
278 typedef struct _HII_DATABASE_RECORD
{
280 HII_DATABASE_PACKAGE_LIST_INSTANCE
*PackageList
;
281 EFI_HANDLE DriverHandle
;
282 EFI_HII_HANDLE Handle
;
283 LIST_ENTRY DatabaseEntry
;
284 } HII_DATABASE_RECORD
;
286 #define HII_DATABASE_NOTIFY_SIGNATURE SIGNATURE_32 ('h','i','d','n')
288 typedef struct _HII_DATABASE_NOTIFY
{
290 EFI_HANDLE NotifyHandle
;
292 EFI_GUID
*PackageGuid
;
293 EFI_HII_DATABASE_NOTIFY PackageNotifyFn
;
294 EFI_HII_DATABASE_NOTIFY_TYPE NotifyType
;
295 LIST_ENTRY DatabaseNotifyEntry
;
296 } HII_DATABASE_NOTIFY
;
298 #define HII_DATABASE_PRIVATE_DATA_SIGNATURE SIGNATURE_32 ('H', 'i', 'D', 'p')
300 typedef struct _HII_DATABASE_PRIVATE_DATA
{
302 LIST_ENTRY DatabaseList
;
303 LIST_ENTRY DatabaseNotifyList
;
304 EFI_HII_FONT_PROTOCOL HiiFont
;
305 EFI_HII_IMAGE_PROTOCOL HiiImage
;
306 EFI_HII_IMAGE_EX_PROTOCOL HiiImageEx
;
307 EFI_HII_STRING_PROTOCOL HiiString
;
308 EFI_HII_DATABASE_PROTOCOL HiiDatabase
;
309 EFI_HII_CONFIG_ROUTING_PROTOCOL ConfigRouting
;
310 EFI_CONFIG_KEYWORD_HANDLER_PROTOCOL ConfigKeywordHandler
;
311 LIST_ENTRY HiiHandleList
;
313 LIST_ENTRY FontInfoList
; // global font info list
314 UINTN Attribute
; // default system color
315 EFI_GUID CurrentLayoutGuid
;
316 EFI_HII_KEYBOARD_LAYOUT
*CurrentLayout
;
317 } HII_DATABASE_PRIVATE_DATA
;
319 #define HII_FONT_DATABASE_PRIVATE_DATA_FROM_THIS(a) \
321 HII_DATABASE_PRIVATE_DATA, \
323 HII_DATABASE_PRIVATE_DATA_SIGNATURE \
326 #define HII_IMAGE_DATABASE_PRIVATE_DATA_FROM_THIS(a) \
328 HII_DATABASE_PRIVATE_DATA, \
330 HII_DATABASE_PRIVATE_DATA_SIGNATURE \
333 #define HII_IMAGE_EX_DATABASE_PRIVATE_DATA_FROM_THIS(a) \
335 HII_DATABASE_PRIVATE_DATA, \
337 HII_DATABASE_PRIVATE_DATA_SIGNATURE \
340 #define HII_STRING_DATABASE_PRIVATE_DATA_FROM_THIS(a) \
342 HII_DATABASE_PRIVATE_DATA, \
344 HII_DATABASE_PRIVATE_DATA_SIGNATURE \
347 #define HII_DATABASE_DATABASE_PRIVATE_DATA_FROM_THIS(a) \
349 HII_DATABASE_PRIVATE_DATA, \
351 HII_DATABASE_PRIVATE_DATA_SIGNATURE \
354 #define CONFIG_ROUTING_DATABASE_PRIVATE_DATA_FROM_THIS(a) \
356 HII_DATABASE_PRIVATE_DATA, \
358 HII_DATABASE_PRIVATE_DATA_SIGNATURE \
361 #define CONFIG_KEYWORD_HANDLER_DATABASE_PRIVATE_DATA_FROM_THIS(a) \
363 HII_DATABASE_PRIVATE_DATA, \
364 ConfigKeywordHandler, \
365 HII_DATABASE_PRIVATE_DATA_SIGNATURE \
369 // Internal function prototypes.
373 Generate a sub string then output it.
375 This is a internal function.
377 @param String A constant string which is the prefix of the to be
378 generated string, e.g. GUID=
380 @param BufferLen The length of the Buffer in bytes.
382 @param Buffer Points to a buffer which will be converted to be the
383 content of the generated string.
385 @param Flag If 1, the buffer contains data for the value of GUID or PATH stored in
386 UINT8 *; if 2, the buffer contains unicode string for the value of NAME;
387 if 3, the buffer contains other data.
389 @param SubStr Points to the output string. It's caller's
390 responsibility to free this buffer.
396 IN CONST EFI_STRING String
,
400 OUT EFI_STRING
*SubStr
404 This function checks whether a handle is a valid EFI_HII_HANDLE.
406 @param Handle Pointer to a EFI_HII_HANDLE
409 @retval FALSE Invalid
414 EFI_HII_HANDLE Handle
419 This function checks whether EFI_FONT_INFO exists in current database. If
420 FontInfoMask is specified, check what options can be used to make a match.
421 Note that the masks relate to where the system default should be supplied
422 are ignored by this function.
424 @param Private Hii database private structure.
425 @param FontInfo Points to EFI_FONT_INFO structure.
426 @param FontInfoMask If not NULL, describes what options can be used
427 to make a match between the font requested and
428 the font available. The caller must guarantee
430 @param FontHandle On entry, Points to the font handle returned by a
431 previous call to GetFontInfo() or NULL to start
433 @param GlobalFontInfo If not NULL, output the corresponding global font
437 @retval FALSE Not existed
442 IN HII_DATABASE_PRIVATE_DATA
*Private
,
443 IN EFI_FONT_INFO
*FontInfo
,
444 IN EFI_FONT_INFO_MASK
*FontInfoMask
, OPTIONAL
445 IN EFI_FONT_HANDLE FontHandle
, OPTIONAL
446 OUT HII_GLOBAL_FONT_INFO
**GlobalFontInfo OPTIONAL
451 This function invokes the matching registered function.
453 @param Private HII Database driver private structure.
454 @param NotifyType The type of change concerning the database.
455 @param PackageInstance Points to the package referred to by the notification.
456 @param PackageType Package type
457 @param Handle The handle of the package list which contains the specified package.
459 @retval EFI_SUCCESS Already checked all registered function and invoked
461 @retval EFI_INVALID_PARAMETER Any input parameter is not valid.
465 InvokeRegisteredFunction (
466 IN HII_DATABASE_PRIVATE_DATA
*Private
,
467 IN EFI_HII_DATABASE_NOTIFY_TYPE NotifyType
,
468 IN VOID
*PackageInstance
,
469 IN UINT8 PackageType
,
470 IN EFI_HII_HANDLE Handle
475 Retrieve system default font and color.
477 @param Private HII database driver private data.
478 @param FontInfo Points to system default font output-related
479 information. It's caller's responsibility to free
481 @param FontInfoSize If not NULL, output the size of buffer FontInfo.
483 @retval EFI_SUCCESS Cell information is added to the GlyphInfoList.
484 @retval EFI_OUT_OF_RESOURCES The system is out of resources to accomplish the
486 @retval EFI_INVALID_PARAMETER Any input parameter is invalid.
491 IN HII_DATABASE_PRIVATE_DATA
*Private
,
492 OUT EFI_FONT_DISPLAY_INFO
**FontInfo
,
493 OUT UINTN
*FontInfoSize OPTIONAL
498 Parse all string blocks to find a String block specified by StringId.
499 If StringId = (EFI_STRING_ID) (-1), find out all EFI_HII_SIBT_FONT blocks
500 within this string package and backup its information. If LastStringId is
501 specified, the string id of last string block will also be output.
502 If StringId = 0, output the string id of last string block (EFI_HII_SIBT_STRING).
504 @param Private Hii database private structure.
505 @param StringPackage Hii string package instance.
506 @param StringId The string's id, which is unique within
508 @param BlockType Output the block type of found string block.
509 @param StringBlockAddr Output the block address of found string block.
510 @param StringTextOffset Offset, relative to the found block address, of
511 the string text information.
512 @param LastStringId Output the last string id when StringId = 0 or StringId = -1.
513 @param StartStringId The first id in the skip block which StringId in the block.
515 @retval EFI_SUCCESS The string text and font is retrieved
517 @retval EFI_NOT_FOUND The specified text or font info can not be found
519 @retval EFI_OUT_OF_RESOURCES The system is out of resources to accomplish the
525 IN HII_DATABASE_PRIVATE_DATA
*Private
,
526 IN HII_STRING_PACKAGE_INSTANCE
*StringPackage
,
527 IN EFI_STRING_ID StringId
,
528 OUT UINT8
*BlockType
, OPTIONAL
529 OUT UINT8
**StringBlockAddr
, OPTIONAL
530 OUT UINTN
*StringTextOffset
, OPTIONAL
531 OUT EFI_STRING_ID
*LastStringId
, OPTIONAL
532 OUT EFI_STRING_ID
*StartStringId OPTIONAL
537 Parse all glyph blocks to find a glyph block specified by CharValue.
538 If CharValue = (CHAR16) (-1), collect all default character cell information
539 within this font package and backup its information.
541 @param FontPackage Hii string package instance.
542 @param CharValue Unicode character value, which identifies a glyph
544 @param GlyphBuffer Output the corresponding bitmap data of the found
545 block. It is the caller's responsibility to free
547 @param Cell Output cell information of the encoded bitmap.
548 @param GlyphBufferLen If not NULL, output the length of GlyphBuffer.
550 @retval EFI_SUCCESS The bitmap data is retrieved successfully.
551 @retval EFI_NOT_FOUND The specified CharValue does not exist in current
553 @retval EFI_OUT_OF_RESOURCES The system is out of resources to accomplish the
559 IN HII_FONT_PACKAGE_INSTANCE
*FontPackage
,
561 OUT UINT8
**GlyphBuffer
, OPTIONAL
562 OUT EFI_HII_GLYPH_INFO
*Cell
, OPTIONAL
563 OUT UINTN
*GlyphBufferLen OPTIONAL
567 This function exports Form packages to a buffer.
568 This is a internal function.
570 @param Private Hii database private structure.
571 @param Handle Identification of a package list.
572 @param PackageList Pointer to a package list which will be exported.
573 @param UsedSize The length of buffer be used.
574 @param BufferSize Length of the Buffer.
575 @param Buffer Allocated space for storing exported data.
576 @param ResultSize The size of the already exported content of this
579 @retval EFI_SUCCESS Form Packages are exported successfully.
580 @retval EFI_INVALID_PARAMETER Any input parameter is invalid.
585 IN HII_DATABASE_PRIVATE_DATA
*Private
,
586 IN EFI_HII_HANDLE Handle
,
587 IN HII_DATABASE_PACKAGE_LIST_INSTANCE
*PackageList
,
591 IN OUT UINTN
*ResultSize
595 // EFI_HII_FONT_PROTOCOL protocol interfaces
600 Renders a string to a bitmap or to the display.
602 @param This A pointer to the EFI_HII_FONT_PROTOCOL instance.
603 @param Flags Describes how the string is to be drawn.
604 @param String Points to the null-terminated string to be
606 @param StringInfo Points to the string output information,
607 including the color and font. If NULL, then the
608 string will be output in the default system font
610 @param Blt If this points to a non-NULL on entry, this
611 points to the image, which is Width pixels wide
612 and Height pixels high. The string will be drawn
614 EFI_HII_OUT_FLAG_CLIP is implied. If this points
615 to a NULL on entry, then a buffer
616 will be allocated to hold the generated image and
617 the pointer updated on exit. It is the caller's
618 responsibility to free this buffer.
619 @param BltX Together with BltX, Specifies the offset from the left and top edge
620 of the image of the first character cell in the
622 @param BltY Together with BltY, Specifies the offset from the left and top edge
623 of the image of the first character cell in the
625 @param RowInfoArray If this is non-NULL on entry, then on exit, this
626 will point to an allocated buffer containing
627 row information and RowInfoArraySize will be
628 updated to contain the number of elements.
629 This array describes the characters which were at
630 least partially drawn and the heights of the
631 rows. It is the caller's responsibility to free
633 @param RowInfoArraySize If this is non-NULL on entry, then on exit it
634 contains the number of elements in RowInfoArray.
635 @param ColumnInfoArray If this is non-NULL, then on return it will be
636 filled with the horizontal offset for each
637 character in the string on the row where it is
638 displayed. Non-printing characters will have
639 the offset ~0. The caller is responsible to
640 allocate a buffer large enough so that there
641 is one entry for each character in the string,
642 not including the null-terminator. It is possible
643 when character display is normalized that some
644 character cells overlap.
646 @retval EFI_SUCCESS The string was successfully rendered.
647 @retval EFI_OUT_OF_RESOURCES Unable to allocate an output buffer for
649 @retval EFI_INVALID_PARAMETER The String or Blt.
650 @retval EFI_INVALID_PARAMETER Flags were invalid combination..
656 IN CONST EFI_HII_FONT_PROTOCOL
*This
,
657 IN EFI_HII_OUT_FLAGS Flags
,
658 IN CONST EFI_STRING String
,
659 IN CONST EFI_FONT_DISPLAY_INFO
*StringInfo OPTIONAL
,
660 IN OUT EFI_IMAGE_OUTPUT
**Blt
,
663 OUT EFI_HII_ROW_INFO
**RowInfoArray OPTIONAL
,
664 OUT UINTN
*RowInfoArraySize OPTIONAL
,
665 OUT UINTN
*ColumnInfoArray OPTIONAL
670 Render a string to a bitmap or the screen containing the contents of the specified string.
672 @param This A pointer to the EFI_HII_FONT_PROTOCOL instance.
673 @param Flags Describes how the string is to be drawn.
674 @param PackageList The package list in the HII database to search
675 for the specified string.
676 @param StringId The string's id, which is unique within
678 @param Language Points to the language for the retrieved string.
679 If NULL, then the current system language is
681 @param StringInfo Points to the string output information,
682 including the color and font. If NULL, then the
683 string will be output in the default system font
685 @param Blt If this points to a non-NULL on entry, this
686 points to the image, which is Width pixels wide
687 and Height pixels high. The string will be drawn
689 EFI_HII_OUT_FLAG_CLIP is implied. If this points
690 to a NULL on entry, then a buffer
691 will be allocated to hold the generated image and
692 the pointer updated on exit. It is the caller's
693 responsibility to free this buffer.
694 @param BltX Together with BltX, Specifies the offset from the left and top edge
695 of the image of the first character cell in the
697 @param BltY Together with BltY, Specifies the offset from the left and top edge
698 of the image of the first character cell in the
700 @param RowInfoArray If this is non-NULL on entry, then on exit, this
701 will point to an allocated buffer containing
702 row information and RowInfoArraySize will be
703 updated to contain the number of elements.
704 This array describes the characters which were at
705 least partially drawn and the heights of the
706 rows. It is the caller's responsibility to free
708 @param RowInfoArraySize If this is non-NULL on entry, then on exit it
709 contains the number of elements in RowInfoArray.
710 @param ColumnInfoArray If this is non-NULL, then on return it will be
711 filled with the horizontal offset for each
712 character in the string on the row where it is
713 displayed. Non-printing characters will have
714 the offset ~0. The caller is responsible to
715 allocate a buffer large enough so that there
716 is one entry for each character in the string,
717 not including the null-terminator. It is possible
718 when character display is normalized that some
719 character cells overlap.
721 @retval EFI_SUCCESS The string was successfully rendered.
722 @retval EFI_OUT_OF_RESOURCES Unable to allocate an output buffer for
724 @retval EFI_INVALID_PARAMETER The Blt or PackageList was NULL.
725 @retval EFI_INVALID_PARAMETER Flags were invalid combination.
726 @retval EFI_NOT_FOUND The specified PackageList is not in the Database or the stringid is not
727 in the specified PackageList.
733 IN CONST EFI_HII_FONT_PROTOCOL
*This
,
734 IN EFI_HII_OUT_FLAGS Flags
,
735 IN EFI_HII_HANDLE PackageList
,
736 IN EFI_STRING_ID StringId
,
737 IN CONST CHAR8
* Language
,
738 IN CONST EFI_FONT_DISPLAY_INFO
*StringInfo OPTIONAL
,
739 IN OUT EFI_IMAGE_OUTPUT
**Blt
,
742 OUT EFI_HII_ROW_INFO
**RowInfoArray OPTIONAL
,
743 OUT UINTN
*RowInfoArraySize OPTIONAL
,
744 OUT UINTN
*ColumnInfoArray OPTIONAL
749 Convert the glyph for a single character into a bitmap.
751 @param This A pointer to the EFI_HII_FONT_PROTOCOL instance.
752 @param Char Character to retrieve.
753 @param StringInfo Points to the string font and color information
754 or NULL if the string should use the default
755 system font and color.
756 @param Blt Thus must point to a NULL on entry. A buffer will
757 be allocated to hold the output and the pointer
758 updated on exit. It is the caller's
759 responsibility to free this buffer.
760 @param Baseline Number of pixels from the bottom of the bitmap to
763 @retval EFI_SUCCESS Glyph bitmap created.
764 @retval EFI_OUT_OF_RESOURCES Unable to allocate the output buffer Blt.
765 @retval EFI_WARN_UNKNOWN_GLYPH The glyph was unknown and was replaced with the
766 glyph for Unicode character 0xFFFD.
767 @retval EFI_INVALID_PARAMETER Blt is NULL or *Blt is not NULL.
773 IN CONST EFI_HII_FONT_PROTOCOL
*This
,
775 IN CONST EFI_FONT_DISPLAY_INFO
*StringInfo
,
776 OUT EFI_IMAGE_OUTPUT
**Blt
,
777 OUT UINTN
*Baseline OPTIONAL
782 This function iterates through fonts which match the specified font, using
783 the specified criteria. If String is non-NULL, then all of the characters in
784 the string must exist in order for a candidate font to be returned.
786 @param This A pointer to the EFI_HII_FONT_PROTOCOL instance.
787 @param FontHandle On entry, points to the font handle returned by a
788 previous call to GetFontInfo() or NULL to start
789 with the first font. On return, points to the
790 returned font handle or points to NULL if there
791 are no more matching fonts.
792 @param StringInfoIn Upon entry, points to the font to return information
793 about. If NULL, then the information about the system
794 default font will be returned.
795 @param StringInfoOut Upon return, contains the matching font's information.
796 If NULL, then no information is returned. This buffer
797 is allocated with a call to the Boot Service AllocatePool().
798 It is the caller's responsibility to call the Boot
799 Service FreePool() when the caller no longer requires
800 the contents of StringInfoOut.
801 @param String Points to the string which will be tested to
802 determine if all characters are available. If
803 NULL, then any font is acceptable.
805 @retval EFI_SUCCESS Matching font returned successfully.
806 @retval EFI_NOT_FOUND No matching font was found.
807 @retval EFI_INVALID_PARAMETER StringInfoIn is NULL.
808 @retval EFI_INVALID_PARAMETER StringInfoIn->FontInfoMask is an invalid combination.
809 @retval EFI_OUT_OF_RESOURCES There were insufficient resources to complete the
815 IN CONST EFI_HII_FONT_PROTOCOL
*This
,
816 IN OUT EFI_FONT_HANDLE
*FontHandle
,
817 IN CONST EFI_FONT_DISPLAY_INFO
*StringInfoIn
, OPTIONAL
818 OUT EFI_FONT_DISPLAY_INFO
**StringInfoOut
,
819 IN CONST EFI_STRING String OPTIONAL
823 // EFI_HII_IMAGE_PROTOCOL interfaces
827 Get the image id of last image block: EFI_HII_IIBT_END_BLOCK when input
828 ImageId is zero, otherwise return the address of the
829 corresponding image block with identifier specified by ImageId.
831 This is a internal function.
833 @param ImageBlocks Points to the beginning of a series of image blocks stored in order.
834 @param ImageId If input ImageId is 0, output the image id of the EFI_HII_IIBT_END_BLOCK;
835 else use this id to find its corresponding image block address.
837 @return The image block address when input ImageId is not zero; otherwise return NULL.
840 EFI_HII_IMAGE_BLOCK
*
841 GetImageIdOrAddress (
842 IN EFI_HII_IMAGE_BLOCK
*ImageBlocks
,
843 IN OUT EFI_IMAGE_ID
*ImageId
847 Return the HII package list identified by PackageList HII handle.
849 @param Database Pointer to HII database list header.
850 @param PackageList HII handle of the package list to locate.
852 @retval The HII package list instance.
854 HII_DATABASE_PACKAGE_LIST_INSTANCE
*
856 IN LIST_ENTRY
*Database
,
857 IN EFI_HII_HANDLE PackageList
861 This function retrieves the image specified by ImageId which is associated with
862 the specified PackageList and copies it into the buffer specified by Image.
864 @param Database A pointer to the database list header.
865 @param PackageList Handle of the package list where this image will
867 @param ImageId The image's id,, which is unique within
869 @param Image Points to the image.
870 @param BitmapOnly TRUE to only return the bitmap type image.
871 FALSE to locate image decoder instance to decode image.
873 @retval EFI_SUCCESS The new image was returned successfully.
874 @retval EFI_NOT_FOUND The image specified by ImageId is not in the
875 database. The specified PackageList is not in the database.
876 @retval EFI_BUFFER_TOO_SMALL The buffer specified by ImageSize is too small to
878 @retval EFI_INVALID_PARAMETER The Image or ImageSize was NULL.
879 @retval EFI_OUT_OF_RESOURCES The bitmap could not be retrieved because there was not
884 IN LIST_ENTRY
*Database
,
885 IN EFI_HII_HANDLE PackageList
,
886 IN EFI_IMAGE_ID ImageId
,
887 OUT EFI_IMAGE_INPUT
*Image
,
888 IN BOOLEAN BitmapOnly
892 Return the first HII image decoder instance which supports the DecoderName.
894 @param BlockType The image block type.
896 @retval Pointer to the HII image decoder instance.
898 EFI_HII_IMAGE_DECODER_PROTOCOL
*
899 LocateHiiImageDecoder (
904 This function adds the image Image to the group of images owned by PackageList, and returns
905 a new image identifier (ImageId).
907 @param This A pointer to the EFI_HII_IMAGE_PROTOCOL instance.
908 @param PackageList Handle of the package list where this image will
910 @param ImageId On return, contains the new image id, which is
911 unique within PackageList.
912 @param Image Points to the image.
914 @retval EFI_SUCCESS The new image was added successfully.
915 @retval EFI_NOT_FOUND The specified PackageList could not be found in
917 @retval EFI_OUT_OF_RESOURCES Could not add the image due to lack of resources.
918 @retval EFI_INVALID_PARAMETER Image is NULL or ImageId is NULL.
924 IN CONST EFI_HII_IMAGE_PROTOCOL
*This
,
925 IN EFI_HII_HANDLE PackageList
,
926 OUT EFI_IMAGE_ID
*ImageId
,
927 IN CONST EFI_IMAGE_INPUT
*Image
932 This function retrieves the image specified by ImageId which is associated with
933 the specified PackageList and copies it into the buffer specified by Image.
935 @param This A pointer to the EFI_HII_IMAGE_PROTOCOL instance.
936 @param PackageList Handle of the package list where this image will
938 @param ImageId The image's id,, which is unique within
940 @param Image Points to the image.
942 @retval EFI_SUCCESS The new image was returned successfully.
943 @retval EFI_NOT_FOUND The image specified by ImageId is not available.
944 The specified PackageList is not in the database.
945 @retval EFI_BUFFER_TOO_SMALL The buffer specified by ImageSize is too small to
947 @retval EFI_INVALID_PARAMETER The Image or ImageSize was NULL.
948 @retval EFI_OUT_OF_RESOURCES The bitmap could not be retrieved because there was not
955 IN CONST EFI_HII_IMAGE_PROTOCOL
*This
,
956 IN EFI_HII_HANDLE PackageList
,
957 IN EFI_IMAGE_ID ImageId
,
958 OUT EFI_IMAGE_INPUT
*Image
963 This function updates the image specified by ImageId in the specified PackageListHandle to
964 the image specified by Image.
966 @param This A pointer to the EFI_HII_IMAGE_PROTOCOL instance.
967 @param PackageList The package list containing the images.
968 @param ImageId The image's id,, which is unique within
970 @param Image Points to the image.
972 @retval EFI_SUCCESS The new image was updated successfully.
973 @retval EFI_NOT_FOUND The image specified by ImageId is not in the
974 database. The specified PackageList is not in the database.
975 @retval EFI_INVALID_PARAMETER The Image was NULL.
981 IN CONST EFI_HII_IMAGE_PROTOCOL
*This
,
982 IN EFI_HII_HANDLE PackageList
,
983 IN EFI_IMAGE_ID ImageId
,
984 IN CONST EFI_IMAGE_INPUT
*Image
989 This function renders an image to a bitmap or the screen using the specified
990 color and options. It draws the image on an existing bitmap, allocates a new
991 bitmap or uses the screen. The images can be clipped.
993 @param This A pointer to the EFI_HII_IMAGE_PROTOCOL instance.
994 @param Flags Describes how the image is to be drawn.
995 @param Image Points to the image to be displayed.
996 @param Blt If this points to a non-NULL on entry, this
997 points to the image, which is Width pixels wide
998 and Height pixels high. The image will be drawn
999 onto this image and EFI_HII_DRAW_FLAG_CLIP is
1000 implied. If this points to a NULL on entry, then
1001 a buffer will be allocated to hold the generated
1002 image and the pointer updated on exit. It is the
1003 caller's responsibility to free this buffer.
1004 @param BltX Specifies the offset from the left and top edge
1005 of the output image of the first pixel in the
1007 @param BltY Specifies the offset from the left and top edge
1008 of the output image of the first pixel in the
1011 @retval EFI_SUCCESS The image was successfully drawn.
1012 @retval EFI_OUT_OF_RESOURCES Unable to allocate an output buffer for Blt.
1013 @retval EFI_INVALID_PARAMETER The Image or Blt was NULL.
1014 @retval EFI_INVALID_PARAMETER Any combination of Flags is invalid.
1020 IN CONST EFI_HII_IMAGE_PROTOCOL
*This
,
1021 IN EFI_HII_DRAW_FLAGS Flags
,
1022 IN CONST EFI_IMAGE_INPUT
*Image
,
1023 IN OUT EFI_IMAGE_OUTPUT
**Blt
,
1030 This function renders an image to a bitmap or the screen using the specified
1031 color and options. It draws the image on an existing bitmap, allocates a new
1032 bitmap or uses the screen. The images can be clipped.
1034 @param This A pointer to the EFI_HII_IMAGE_PROTOCOL instance.
1035 @param Flags Describes how the image is to be drawn.
1036 @param PackageList The package list in the HII database to search
1037 for the specified image.
1038 @param ImageId The image's id, which is unique within
1040 @param Blt If this points to a non-NULL on entry, this
1041 points to the image, which is Width pixels wide
1042 and Height pixels high. The image will be drawn
1044 EFI_HII_DRAW_FLAG_CLIP is implied. If this points
1045 to a NULL on entry, then a buffer will be
1046 allocated to hold the generated image and the
1047 pointer updated on exit. It is the caller's
1048 responsibility to free this buffer.
1049 @param BltX Specifies the offset from the left and top edge
1050 of the output image of the first pixel in the
1052 @param BltY Specifies the offset from the left and top edge
1053 of the output image of the first pixel in the
1056 @retval EFI_SUCCESS The image was successfully drawn.
1057 @retval EFI_OUT_OF_RESOURCES Unable to allocate an output buffer for Blt.
1058 @retval EFI_INVALID_PARAMETER The Blt was NULL.
1059 @retval EFI_NOT_FOUND The image specified by ImageId is not in the database.
1060 The specified PackageList is not in the database.
1066 IN CONST EFI_HII_IMAGE_PROTOCOL
*This
,
1067 IN EFI_HII_DRAW_FLAGS Flags
,
1068 IN EFI_HII_HANDLE PackageList
,
1069 IN EFI_IMAGE_ID ImageId
,
1070 IN OUT EFI_IMAGE_OUTPUT
**Blt
,
1076 The prototype of this extension function is the same with EFI_HII_IMAGE_PROTOCOL.NewImage().
1077 This protocol invokes EFI_HII_IMAGE_PROTOCOL.NewImage() implicitly.
1079 @param This A pointer to the EFI_HII_IMAGE_EX_PROTOCOL instance.
1080 @param PackageList Handle of the package list where this image will
1082 @param ImageId On return, contains the new image id, which is
1083 unique within PackageList.
1084 @param Image Points to the image.
1086 @retval EFI_SUCCESS The new image was added successfully.
1087 @retval EFI_NOT_FOUND The PackageList could not be found.
1088 @retval EFI_OUT_OF_RESOURCES Could not add the image due to lack of resources.
1089 @retval EFI_INVALID_PARAMETER Image is NULL or ImageId is NULL.
1094 IN CONST EFI_HII_IMAGE_EX_PROTOCOL
*This
,
1095 IN EFI_HII_HANDLE PackageList
,
1096 OUT EFI_IMAGE_ID
*ImageId
,
1097 IN CONST EFI_IMAGE_INPUT
*Image
1101 Return the information about the image, associated with the package list.
1102 The prototype of this extension function is the same with EFI_HII_IMAGE_PROTOCOL.GetImage().
1104 This function is similar to EFI_HII_IMAGE_PROTOCOL.GetImage(). The difference is that
1105 this function will locate all EFI_HII_IMAGE_DECODER_PROTOCOL instances installed in the
1106 system if the decoder of the certain image type is not supported by the
1107 EFI_HII_IMAGE_EX_PROTOCOL. The function will attempt to decode the image to the
1108 EFI_IMAGE_INPUT using the first EFI_HII_IMAGE_DECODER_PROTOCOL instance that
1109 supports the requested image type.
1111 @param This A pointer to the EFI_HII_IMAGE_EX_PROTOCOL instance.
1112 @param PackageList The package list in the HII database to search for the
1114 @param ImageId The image's id, which is unique within PackageList.
1115 @param Image Points to the image.
1117 @retval EFI_SUCCESS The new image was returned successfully.
1118 @retval EFI_NOT_FOUND The image specified by ImageId is not available. The specified
1119 PackageList is not in the Database.
1120 @retval EFI_INVALID_PARAMETER Image was NULL or ImageId was 0.
1121 @retval EFI_OUT_OF_RESOURCES The bitmap could not be retrieved because there
1122 was not enough memory.
1128 IN CONST EFI_HII_IMAGE_EX_PROTOCOL
*This
,
1129 IN EFI_HII_HANDLE PackageList
,
1130 IN EFI_IMAGE_ID ImageId
,
1131 OUT EFI_IMAGE_INPUT
*Image
1135 Change the information about the image.
1137 Same with EFI_HII_IMAGE_PROTOCOL.SetImage(), this protocol invokes
1138 EFI_HII_IMAGE_PROTOCOL.SetImage()implicitly.
1140 @param This A pointer to the EFI_HII_IMAGE_EX_PROTOCOL instance.
1141 @param PackageList The package list containing the images.
1142 @param ImageId The image's id, which is unique within PackageList.
1143 @param Image Points to the image.
1145 @retval EFI_SUCCESS The new image was successfully updated.
1146 @retval EFI_NOT_FOUND The image specified by ImageId is not in the
1147 database. The specified PackageList is not in
1149 @retval EFI_INVALID_PARAMETER The Image was NULL, the ImageId was 0 or
1150 the Image->Bitmap was NULL.
1156 IN CONST EFI_HII_IMAGE_EX_PROTOCOL
*This
,
1157 IN EFI_HII_HANDLE PackageList
,
1158 IN EFI_IMAGE_ID ImageId
,
1159 IN CONST EFI_IMAGE_INPUT
*Image
1163 Renders an image to a bitmap or to the display.
1165 The prototype of this extension function is the same with
1166 EFI_HII_IMAGE_PROTOCOL.DrawImage(). This protocol invokes
1167 EFI_HII_IMAGE_PROTOCOL.DrawImage() implicitly.
1169 @param This A pointer to the EFI_HII_IMAGE_EX_PROTOCOL instance.
1170 @param Flags Describes how the image is to be drawn.
1171 @param Image Points to the image to be displayed.
1172 @param Blt If this points to a non-NULL on entry, this points
1173 to the image, which is Width pixels wide and
1174 Height pixels high. The image will be drawn onto
1175 this image and EFI_HII_DRAW_FLAG_CLIP is implied.
1176 If this points to a NULL on entry, then a buffer
1177 will be allocated to hold the generated image and
1178 the pointer updated on exit. It is the caller's
1179 responsibility to free this buffer.
1180 @param BltX Specifies the offset from the left and top edge of
1181 the output image of the first pixel in the image.
1182 @param BltY Specifies the offset from the left and top edge of
1183 the output image of the first pixel in the image.
1185 @retval EFI_SUCCESS The image was successfully drawn.
1186 @retval EFI_OUT_OF_RESOURCES Unable to allocate an output buffer for Blt.
1187 @retval EFI_INVALID_PARAMETER The Image or Blt was NULL.
1193 IN CONST EFI_HII_IMAGE_EX_PROTOCOL
*This
,
1194 IN EFI_HII_DRAW_FLAGS Flags
,
1195 IN CONST EFI_IMAGE_INPUT
*Image
,
1196 IN OUT EFI_IMAGE_OUTPUT
**Blt
,
1202 Renders an image to a bitmap or the screen containing the contents of the specified
1205 This function is similar to EFI_HII_IMAGE_PROTOCOL.DrawImageId(). The difference is that
1206 this function will locate all EFI_HII_IMAGE_DECODER_PROTOCOL instances installed in the
1207 system if the decoder of the certain image type is not supported by the
1208 EFI_HII_IMAGE_EX_PROTOCOL. The function will attempt to decode the image to the
1209 EFI_IMAGE_INPUT using the first EFI_HII_IMAGE_DECODER_PROTOCOL instance that
1210 supports the requested image type.
1212 @param This A pointer to the EFI_HII_IMAGE_EX_PROTOCOL instance.
1213 @param Flags Describes how the image is to be drawn.
1214 @param PackageList The package list in the HII database to search for
1215 the specified image.
1216 @param ImageId The image's id, which is unique within PackageList.
1217 @param Blt If this points to a non-NULL on entry, this points
1218 to the image, which is Width pixels wide and
1219 Height pixels high. The image will be drawn onto
1220 this image and EFI_HII_DRAW_FLAG_CLIP is implied.
1221 If this points to a NULL on entry, then a buffer
1222 will be allocated to hold the generated image
1223 and the pointer updated on exit. It is the caller's
1224 responsibility to free this buffer.
1225 @param BltX Specifies the offset from the left and top edge of
1226 the output image of the first pixel in the image.
1227 @param BltY Specifies the offset from the left and top edge of
1228 the output image of the first pixel in the image.
1230 @retval EFI_SUCCESS The image was successfully drawn.
1231 @retval EFI_OUT_OF_RESOURCES Unable to allocate an output buffer for Blt.
1232 @retval EFI_INVALID_PARAMETER The Blt was NULL or ImageId was 0.
1233 @retval EFI_NOT_FOUND The image specified by ImageId is not in the database.
1234 The specified PackageList is not in the database.
1240 IN CONST EFI_HII_IMAGE_EX_PROTOCOL
*This
,
1241 IN EFI_HII_DRAW_FLAGS Flags
,
1242 IN EFI_HII_HANDLE PackageList
,
1243 IN EFI_IMAGE_ID ImageId
,
1244 IN OUT EFI_IMAGE_OUTPUT
**Blt
,
1250 This function returns the image information to EFI_IMAGE_OUTPUT. Only the width
1251 and height are returned to the EFI_IMAGE_OUTPUT instead of decoding the image
1252 to the buffer. This function is used to get the geometry of the image. This function
1253 will try to locate all of the EFI_HII_IMAGE_DECODER_PROTOCOL installed on the
1254 system if the decoder of image type is not supported by the EFI_HII_IMAGE_EX_PROTOCOL.
1256 @param This A pointer to the EFI_HII_IMAGE_EX_PROTOCOL instance.
1257 @param PackageList Handle of the package list where this image will
1259 @param ImageId The image's id, which is unique within PackageList.
1260 @param Image Points to the image.
1262 @retval EFI_SUCCESS The new image was returned successfully.
1263 @retval EFI_NOT_FOUND The image specified by ImageId is not in the
1264 database. The specified PackageList is not in the database.
1265 @retval EFI_BUFFER_TOO_SMALL The buffer specified by ImageSize is too small to
1267 @retval EFI_INVALID_PARAMETER The Image was NULL or the ImageId was 0.
1268 @retval EFI_OUT_OF_RESOURCES The bitmap could not be retrieved because there
1269 was not enough memory.
1275 IN CONST EFI_HII_IMAGE_EX_PROTOCOL
*This
,
1276 IN EFI_HII_HANDLE PackageList
,
1277 IN EFI_IMAGE_ID ImageId
,
1278 OUT EFI_IMAGE_OUTPUT
*Image
1281 // EFI_HII_STRING_PROTOCOL
1286 This function adds the string String to the group of strings owned by PackageList, with the
1287 specified font information StringFontInfo and returns a new string id.
1289 @param This A pointer to the EFI_HII_STRING_PROTOCOL
1291 @param PackageList Handle of the package list where this string will
1293 @param StringId On return, contains the new strings id, which is
1294 unique within PackageList.
1295 @param Language Points to the language for the new string.
1296 @param LanguageName Points to the printable language name to
1297 associate with the passed in Language field.If
1298 LanguageName is not NULL and the string package
1299 header's LanguageName associated with a given
1300 Language is not zero, the LanguageName being
1301 passed in will be ignored.
1302 @param String Points to the new null-terminated string.
1303 @param StringFontInfo Points to the new string's font information or
1304 NULL if the string should have the default system
1305 font, size and style.
1307 @retval EFI_SUCCESS The new string was added successfully.
1308 @retval EFI_NOT_FOUND The specified PackageList could not be found in
1310 @retval EFI_OUT_OF_RESOURCES Could not add the string due to lack of
1312 @retval EFI_INVALID_PARAMETER String is NULL or StringId is NULL or Language is
1319 IN CONST EFI_HII_STRING_PROTOCOL
*This
,
1320 IN EFI_HII_HANDLE PackageList
,
1321 OUT EFI_STRING_ID
*StringId
,
1322 IN CONST CHAR8
*Language
,
1323 IN CONST CHAR16
*LanguageName
, OPTIONAL
1324 IN CONST EFI_STRING String
,
1325 IN CONST EFI_FONT_INFO
*StringFontInfo OPTIONAL
1330 This function retrieves the string specified by StringId which is associated
1331 with the specified PackageList in the language Language and copies it into
1332 the buffer specified by String.
1334 @param This A pointer to the EFI_HII_STRING_PROTOCOL
1336 @param Language Points to the language for the retrieved string.
1337 @param PackageList The package list in the HII database to search
1338 for the specified string.
1339 @param StringId The string's id, which is unique within
1341 @param String Points to the new null-terminated string.
1342 @param StringSize On entry, points to the size of the buffer
1343 pointed to by String, in bytes. On return,
1344 points to the length of the string, in bytes.
1345 @param StringFontInfo If not NULL, points to the string's font
1346 information. It's caller's responsibility to
1349 @retval EFI_SUCCESS The string was returned successfully.
1350 @retval EFI_NOT_FOUND The string specified by StringId is not
1352 The specified PackageList is not in the database.
1353 @retval EFI_INVALID_LANGUAGE The string specified by StringId is available but
1354 not in the specified language.
1355 @retval EFI_BUFFER_TOO_SMALL The buffer specified by StringSize is too small
1357 @retval EFI_INVALID_PARAMETER The Language or StringSize was NULL.
1358 @retval EFI_INVALID_PARAMETER The value referenced by StringSize was not zero
1359 and String was NULL.
1360 @retval EFI_OUT_OF_RESOURCES There were insufficient resources to complete the
1367 IN CONST EFI_HII_STRING_PROTOCOL
*This
,
1368 IN CONST CHAR8
*Language
,
1369 IN EFI_HII_HANDLE PackageList
,
1370 IN EFI_STRING_ID StringId
,
1371 OUT EFI_STRING String
,
1372 IN OUT UINTN
*StringSize
,
1373 OUT EFI_FONT_INFO
**StringFontInfo OPTIONAL
1378 This function updates the string specified by StringId in the specified PackageList to the text
1379 specified by String and, optionally, the font information specified by StringFontInfo.
1381 @param This A pointer to the EFI_HII_STRING_PROTOCOL
1383 @param PackageList The package list containing the strings.
1384 @param StringId The string's id, which is unique within
1386 @param Language Points to the language for the updated string.
1387 @param String Points to the new null-terminated string.
1388 @param StringFontInfo Points to the string's font information or NULL
1389 if the string font information is not changed.
1391 @retval EFI_SUCCESS The string was updated successfully.
1392 @retval EFI_NOT_FOUND The string specified by StringId is not in the
1394 @retval EFI_INVALID_PARAMETER The String or Language was NULL.
1395 @retval EFI_OUT_OF_RESOURCES The system is out of resources to accomplish the
1402 IN CONST EFI_HII_STRING_PROTOCOL
*This
,
1403 IN EFI_HII_HANDLE PackageList
,
1404 IN EFI_STRING_ID StringId
,
1405 IN CONST CHAR8
*Language
,
1406 IN CONST EFI_STRING String
,
1407 IN CONST EFI_FONT_INFO
*StringFontInfo OPTIONAL
1412 This function returns the list of supported languages, in the format specified
1413 in Appendix M of UEFI 2.1 spec.
1415 @param This A pointer to the EFI_HII_STRING_PROTOCOL
1417 @param PackageList The package list to examine.
1418 @param Languages Points to the buffer to hold the returned
1419 null-terminated ASCII string.
1420 @param LanguagesSize On entry, points to the size of the buffer
1421 pointed to by Languages, in bytes. On return,
1422 points to the length of Languages, in bytes.
1424 @retval EFI_SUCCESS The languages were returned successfully.
1425 @retval EFI_INVALID_PARAMETER The LanguagesSize was NULL.
1426 @retval EFI_INVALID_PARAMETER The value referenced by LanguagesSize is not zero and Languages is NULL.
1427 @retval EFI_BUFFER_TOO_SMALL The LanguagesSize is too small to hold the list
1428 of supported languages. LanguageSize is updated
1429 to contain the required size.
1430 @retval EFI_NOT_FOUND Could not find string package in specified
1437 IN CONST EFI_HII_STRING_PROTOCOL
*This
,
1438 IN EFI_HII_HANDLE PackageList
,
1439 IN OUT CHAR8
*Languages
,
1440 IN OUT UINTN
*LanguagesSize
1445 Each string package has associated with it a single primary language and zero
1446 or more secondary languages. This routine returns the secondary languages
1447 associated with a package list.
1449 @param This A pointer to the EFI_HII_STRING_PROTOCOL
1451 @param PackageList The package list to examine.
1452 @param PrimaryLanguage Points to the null-terminated ASCII string that specifies
1453 the primary language. Languages are specified in the
1454 format specified in Appendix M of the UEFI 2.0 specification.
1455 @param SecondaryLanguages Points to the buffer to hold the returned null-terminated
1456 ASCII string that describes the list of
1457 secondary languages for the specified
1458 PrimaryLanguage. If there are no secondary
1459 languages, the function returns successfully,
1460 but this is set to NULL.
1461 @param SecondaryLanguagesSize On entry, points to the size of the buffer
1462 pointed to by SecondaryLanguages, in bytes. On
1463 return, points to the length of SecondaryLanguages
1466 @retval EFI_SUCCESS Secondary languages were correctly returned.
1467 @retval EFI_INVALID_PARAMETER PrimaryLanguage or SecondaryLanguagesSize was NULL.
1468 @retval EFI_INVALID_PARAMETER The value referenced by SecondaryLanguagesSize is not
1469 zero and SecondaryLanguages is NULL.
1470 @retval EFI_BUFFER_TOO_SMALL The buffer specified by SecondaryLanguagesSize is
1471 too small to hold the returned information.
1472 SecondaryLanguageSize is updated to hold the size of
1473 the buffer required.
1474 @retval EFI_INVALID_LANGUAGE The language specified by PrimaryLanguage is not
1475 present in the specified package list.
1476 @retval EFI_NOT_FOUND The specified PackageList is not in the Database.
1481 HiiGetSecondaryLanguages (
1482 IN CONST EFI_HII_STRING_PROTOCOL
*This
,
1483 IN EFI_HII_HANDLE PackageList
,
1484 IN CONST CHAR8
*PrimaryLanguage
,
1485 IN OUT CHAR8
*SecondaryLanguages
,
1486 IN OUT UINTN
*SecondaryLanguagesSize
1490 // EFI_HII_DATABASE_PROTOCOL protocol interfaces
1495 This function adds the packages in the package list to the database and returns a handle. If there is a
1496 EFI_DEVICE_PATH_PROTOCOL associated with the DriverHandle, then this function will
1497 create a package of type EFI_PACKAGE_TYPE_DEVICE_PATH and add it to the package list.
1499 @param This A pointer to the EFI_HII_DATABASE_PROTOCOL
1501 @param PackageList A pointer to an EFI_HII_PACKAGE_LIST_HEADER
1503 @param DriverHandle Associate the package list with this EFI handle.
1504 If a NULL is specified, this data will not be associate
1505 with any drivers and cannot have a callback induced.
1506 @param Handle A pointer to the EFI_HII_HANDLE instance.
1508 @retval EFI_SUCCESS The package list associated with the Handle was
1509 added to the HII database.
1510 @retval EFI_OUT_OF_RESOURCES Unable to allocate necessary resources for the
1511 new database contents.
1512 @retval EFI_INVALID_PARAMETER PackageList is NULL or Handle is NULL.
1518 IN CONST EFI_HII_DATABASE_PROTOCOL
*This
,
1519 IN CONST EFI_HII_PACKAGE_LIST_HEADER
*PackageList
,
1520 IN CONST EFI_HANDLE DriverHandle
, OPTIONAL
1521 OUT EFI_HII_HANDLE
*Handle
1526 This function removes the package list that is associated with a handle Handle
1527 from the HII database. Before removing the package, any registered functions
1528 with the notification type REMOVE_PACK and the same package type will be called.
1530 @param This A pointer to the EFI_HII_DATABASE_PROTOCOL
1532 @param Handle The handle that was registered to the data that
1533 is requested for removal.
1535 @retval EFI_SUCCESS The data associated with the Handle was removed
1536 from the HII database.
1537 @retval EFI_NOT_FOUND The specified Handle is not in database.
1542 HiiRemovePackageList (
1543 IN CONST EFI_HII_DATABASE_PROTOCOL
*This
,
1544 IN EFI_HII_HANDLE Handle
1549 This function updates the existing package list (which has the specified Handle)
1550 in the HII databases, using the new package list specified by PackageList.
1552 @param This A pointer to the EFI_HII_DATABASE_PROTOCOL
1554 @param Handle The handle that was registered to the data that
1555 is requested to be updated.
1556 @param PackageList A pointer to an EFI_HII_PACKAGE_LIST_HEADER
1559 @retval EFI_SUCCESS The HII database was successfully updated.
1560 @retval EFI_OUT_OF_RESOURCES Unable to allocate enough memory for the updated
1562 @retval EFI_INVALID_PARAMETER PackageList was NULL.
1563 @retval EFI_NOT_FOUND The specified Handle is not in database.
1568 HiiUpdatePackageList (
1569 IN CONST EFI_HII_DATABASE_PROTOCOL
*This
,
1570 IN EFI_HII_HANDLE Handle
,
1571 IN CONST EFI_HII_PACKAGE_LIST_HEADER
*PackageList
1576 This function returns a list of the package handles of the specified type
1577 that are currently active in the database. The pseudo-type
1578 EFI_HII_PACKAGE_TYPE_ALL will cause all package handles to be listed.
1580 @param This A pointer to the EFI_HII_DATABASE_PROTOCOL
1582 @param PackageType Specifies the package type of the packages to
1583 list or EFI_HII_PACKAGE_TYPE_ALL for all packages
1585 @param PackageGuid If PackageType is EFI_HII_PACKAGE_TYPE_GUID, then
1586 this is the pointer to the GUID which must match
1587 the Guid field of EFI_HII_GUID_PACKAGE_GUID_HDR.
1588 Otherwise, it must be NULL.
1589 @param HandleBufferLength On input, a pointer to the length of the handle
1590 buffer. On output, the length of the handle
1591 buffer that is required for the handles found.
1592 @param Handle An array of EFI_HII_HANDLE instances returned.
1594 @retval EFI_SUCCESS The matching handles are outputted successfully.
1595 HandleBufferLength is updated with the actual length.
1596 @retval EFI_BUFFER_TO_SMALL The HandleBufferLength parameter indicates that
1597 Handle is too small to support the number of
1598 handles. HandleBufferLength is updated with a
1599 value that will enable the data to fit.
1600 @retval EFI_NOT_FOUND No matching handle could not be found in
1602 @retval EFI_INVALID_PARAMETER HandleBufferLength was NULL.
1603 @retval EFI_INVALID_PARAMETER The value referenced by HandleBufferLength was not
1604 zero and Handle was NULL.
1605 @retval EFI_INVALID_PARAMETER PackageType is not a EFI_HII_PACKAGE_TYPE_GUID but
1606 PackageGuid is not NULL, PackageType is a EFI_HII_
1607 PACKAGE_TYPE_GUID but PackageGuid is NULL.
1612 HiiListPackageLists (
1613 IN CONST EFI_HII_DATABASE_PROTOCOL
*This
,
1614 IN UINT8 PackageType
,
1615 IN CONST EFI_GUID
*PackageGuid
,
1616 IN OUT UINTN
*HandleBufferLength
,
1617 OUT EFI_HII_HANDLE
*Handle
1622 This function will export one or all package lists in the database to a buffer.
1623 For each package list exported, this function will call functions registered
1624 with EXPORT_PACK and then copy the package list to the buffer.
1626 @param This A pointer to the EFI_HII_DATABASE_PROTOCOL
1628 @param Handle An EFI_HII_HANDLE that corresponds to the desired
1629 package list in the HII database to export or
1630 NULL to indicate all package lists should be
1632 @param BufferSize On input, a pointer to the length of the buffer.
1633 On output, the length of the buffer that is
1634 required for the exported data.
1635 @param Buffer A pointer to a buffer that will contain the
1636 results of the export function.
1638 @retval EFI_SUCCESS Package exported.
1639 @retval EFI_BUFFER_TO_SMALL The HandleBufferLength parameter indicates that
1640 Handle is too small to support the number of
1641 handles. HandleBufferLength is updated with
1642 a value that will enable the data to fit.
1643 @retval EFI_NOT_FOUND The specified Handle could not be found in the
1645 @retval EFI_INVALID_PARAMETER BufferSize was NULL.
1646 @retval EFI_INVALID_PARAMETER The value referenced by BufferSize was not zero
1647 and Buffer was NULL.
1652 HiiExportPackageLists (
1653 IN CONST EFI_HII_DATABASE_PROTOCOL
*This
,
1654 IN EFI_HII_HANDLE Handle
,
1655 IN OUT UINTN
*BufferSize
,
1656 OUT EFI_HII_PACKAGE_LIST_HEADER
*Buffer
1661 This function registers a function which will be called when specified actions related to packages of
1662 the specified type occur in the HII database. By registering a function, other HII-related drivers are
1663 notified when specific package types are added, removed or updated in the HII database.
1664 Each driver or application which registers a notification should use
1665 EFI_HII_DATABASE_PROTOCOL.UnregisterPackageNotify() before exiting.
1667 @param This A pointer to the EFI_HII_DATABASE_PROTOCOL
1669 @param PackageType Specifies the package type of the packages to
1670 list or EFI_HII_PACKAGE_TYPE_ALL for all packages
1672 @param PackageGuid If PackageType is EFI_HII_PACKAGE_TYPE_GUID, then
1673 this is the pointer to the GUID which must match
1675 EFI_HII_GUID_PACKAGE_GUID_HDR. Otherwise, it must
1677 @param PackageNotifyFn Points to the function to be called when the
1679 NotificationType occurs.
1680 @param NotifyType Describes the types of notification which this
1681 function will be receiving.
1682 @param NotifyHandle Points to the unique handle assigned to the
1683 registered notification. Can be used in
1684 EFI_HII_DATABASE_PROTOCOL.UnregisterPackageNotify()
1685 to stop notifications.
1687 @retval EFI_SUCCESS Notification registered successfully.
1688 @retval EFI_OUT_OF_RESOURCES Unable to allocate necessary data structures
1689 @retval EFI_INVALID_PARAMETER NotifyHandle is NULL.
1690 @retval EFI_INVALID_PARAMETER PackageGuid is not NULL when PackageType is not
1691 EFI_HII_PACKAGE_TYPE_GUID.
1692 @retval EFI_INVALID_PARAMETER PackageGuid is NULL when PackageType is
1693 EFI_HII_PACKAGE_TYPE_GUID.
1698 HiiRegisterPackageNotify (
1699 IN CONST EFI_HII_DATABASE_PROTOCOL
*This
,
1700 IN UINT8 PackageType
,
1701 IN CONST EFI_GUID
*PackageGuid
,
1702 IN CONST EFI_HII_DATABASE_NOTIFY PackageNotifyFn
,
1703 IN EFI_HII_DATABASE_NOTIFY_TYPE NotifyType
,
1704 OUT EFI_HANDLE
*NotifyHandle
1709 Removes the specified HII database package-related notification.
1711 @param This A pointer to the EFI_HII_DATABASE_PROTOCOL
1713 @param NotificationHandle The handle of the notification function being
1716 @retval EFI_SUCCESS Notification is unregistered successfully.
1717 @retval EFI_NOT_FOUND The incoming notification handle does not exist
1718 in current hii database.
1723 HiiUnregisterPackageNotify (
1724 IN CONST EFI_HII_DATABASE_PROTOCOL
*This
,
1725 IN EFI_HANDLE NotificationHandle
1730 This routine retrieves an array of GUID values for each keyboard layout that
1731 was previously registered in the system.
1733 @param This A pointer to the EFI_HII_DATABASE_PROTOCOL
1735 @param KeyGuidBufferLength On input, a pointer to the length of the keyboard
1736 GUID buffer. On output, the length of the handle
1737 buffer that is required for the handles found.
1738 @param KeyGuidBuffer An array of keyboard layout GUID instances
1741 @retval EFI_SUCCESS KeyGuidBuffer was updated successfully.
1742 @retval EFI_BUFFER_TOO_SMALL The KeyGuidBufferLength parameter indicates
1743 that KeyGuidBuffer is too small to support the
1744 number of GUIDs. KeyGuidBufferLength is
1745 updated with a value that will enable the data to
1747 @retval EFI_INVALID_PARAMETER The KeyGuidBufferLength is NULL.
1748 @retval EFI_INVALID_PARAMETER The value referenced by KeyGuidBufferLength is not
1749 zero and KeyGuidBuffer is NULL.
1750 @retval EFI_NOT_FOUND There was no keyboard layout.
1755 HiiFindKeyboardLayouts (
1756 IN CONST EFI_HII_DATABASE_PROTOCOL
*This
,
1757 IN OUT UINT16
*KeyGuidBufferLength
,
1758 OUT EFI_GUID
*KeyGuidBuffer
1763 This routine retrieves the requested keyboard layout. The layout is a physical description of the keys
1764 on a keyboard and the character(s) that are associated with a particular set of key strokes.
1766 @param This A pointer to the EFI_HII_DATABASE_PROTOCOL
1768 @param KeyGuid A pointer to the unique ID associated with a
1769 given keyboard layout. If KeyGuid is NULL then
1770 the current layout will be retrieved.
1771 @param KeyboardLayoutLength On input, a pointer to the length of the
1772 KeyboardLayout buffer. On output, the length of
1773 the data placed into KeyboardLayout.
1774 @param KeyboardLayout A pointer to a buffer containing the retrieved
1777 @retval EFI_SUCCESS The keyboard layout was retrieved successfully.
1778 @retval EFI_NOT_FOUND The requested keyboard layout was not found.
1779 @retval EFI_INVALID_PARAMETER The KeyboardLayout or KeyboardLayoutLength was
1785 HiiGetKeyboardLayout (
1786 IN CONST EFI_HII_DATABASE_PROTOCOL
*This
,
1787 IN CONST EFI_GUID
*KeyGuid
,
1788 IN OUT UINT16
*KeyboardLayoutLength
,
1789 OUT EFI_HII_KEYBOARD_LAYOUT
*KeyboardLayout
1794 This routine sets the default keyboard layout to the one referenced by KeyGuid. When this routine
1795 is called, an event will be signaled of the EFI_HII_SET_KEYBOARD_LAYOUT_EVENT_GUID
1796 group type. This is so that agents which are sensitive to the current keyboard layout being changed
1797 can be notified of this change.
1799 @param This A pointer to the EFI_HII_DATABASE_PROTOCOL
1801 @param KeyGuid A pointer to the unique ID associated with a
1802 given keyboard layout.
1804 @retval EFI_SUCCESS The current keyboard layout was successfully set.
1805 @retval EFI_NOT_FOUND The referenced keyboard layout was not found, so
1807 @retval EFI_INVALID_PARAMETER The KeyGuid was NULL.
1812 HiiSetKeyboardLayout (
1813 IN CONST EFI_HII_DATABASE_PROTOCOL
*This
,
1814 IN CONST EFI_GUID
*KeyGuid
1819 Return the EFI handle associated with a package list.
1821 @param This A pointer to the EFI_HII_DATABASE_PROTOCOL
1823 @param PackageListHandle An EFI_HII_HANDLE that corresponds to the desired
1824 package list in the HIIdatabase.
1825 @param DriverHandle On return, contains the EFI_HANDLE which was
1826 registered with the package list in
1829 @retval EFI_SUCCESS The DriverHandle was returned successfully.
1830 @retval EFI_INVALID_PARAMETER The PackageListHandle was not valid or
1831 DriverHandle was NULL.
1836 HiiGetPackageListHandle (
1837 IN CONST EFI_HII_DATABASE_PROTOCOL
*This
,
1838 IN EFI_HII_HANDLE PackageListHandle
,
1839 OUT EFI_HANDLE
*DriverHandle
1843 // EFI_HII_CONFIG_ROUTING_PROTOCOL interfaces
1848 This function allows a caller to extract the current configuration
1849 for one or more named elements from one or more drivers.
1851 @param This A pointer to the EFI_HII_CONFIG_ROUTING_PROTOCOL
1853 @param Request A null-terminated Unicode string in
1854 <MultiConfigRequest> format.
1855 @param Progress On return, points to a character in the Request
1856 string. Points to the string's null terminator if
1857 request was successful. Points to the most recent
1858 & before the first failing name / value pair (or
1859 the beginning of the string if the failure is in
1860 the first name / value pair) if the request was
1862 @param Results Null-terminated Unicode string in
1863 <MultiConfigAltResp> format which has all values
1864 filled in for the names in the Request string.
1865 String to be allocated by the called function.
1867 @retval EFI_SUCCESS The Results string is filled with the values
1868 corresponding to all requested names.
1869 @retval EFI_OUT_OF_RESOURCES Not enough memory to store the parts of the
1870 results that must be stored awaiting possible
1872 @retval EFI_NOT_FOUND Routing data doesn't match any known driver.
1873 Progress set to the "G" in "GUID" of the
1874 routing header that doesn't match. Note: There
1875 is no requirement that all routing data
1876 be validated before any configuration extraction.
1877 @retval EFI_INVALID_PARAMETER For example, passing in a NULL for the Request
1878 parameter would result in this type of error. The
1879 Progress parameter is set to NULL.
1880 @retval EFI_INVALID_PARAMETER Illegal syntax. Progress set to most recent &
1881 before the error or the beginning of the string.
1882 @retval EFI_INVALID_PARAMETER Unknown name. Progress points to the & before the
1888 HiiConfigRoutingExtractConfig (
1889 IN CONST EFI_HII_CONFIG_ROUTING_PROTOCOL
*This
,
1890 IN CONST EFI_STRING Request
,
1891 OUT EFI_STRING
*Progress
,
1892 OUT EFI_STRING
*Results
1897 This function allows the caller to request the current configuration for the
1898 entirety of the current HII database and returns the data in a null-terminated Unicode string.
1900 @param This A pointer to the EFI_HII_CONFIG_ROUTING_PROTOCOL
1902 @param Results Null-terminated Unicode string in
1903 <MultiConfigAltResp> format which has all values
1904 filled in for the entirety of the current HII
1905 database. String to be allocated by the called
1906 function. De-allocation is up to the caller.
1908 @retval EFI_SUCCESS The Results string is filled with the values
1909 corresponding to all requested names.
1910 @retval EFI_OUT_OF_RESOURCES Not enough memory to store the parts of the
1911 results that must be stored awaiting possible
1913 @retval EFI_INVALID_PARAMETER For example, passing in a NULL for the Results
1914 parameter would result in this type of error.
1919 HiiConfigRoutingExportConfig (
1920 IN CONST EFI_HII_CONFIG_ROUTING_PROTOCOL
*This
,
1921 OUT EFI_STRING
*Results
1926 This function processes the results of processing forms and routes it to the
1927 appropriate handlers or storage.
1929 @param This A pointer to the EFI_HII_CONFIG_ROUTING_PROTOCOL
1931 @param Configuration A null-terminated Unicode string in
1932 <MulltiConfigResp> format.
1933 @param Progress A pointer to a string filled in with the offset
1934 of the most recent & before the first failing
1935 name / value pair (or the beginning of the string
1936 if the failure is in the first name / value pair)
1937 or the terminating NULL if all was successful.
1939 @retval EFI_SUCCESS The results have been distributed or are awaiting
1941 @retval EFI_OUT_OF_RESOURCES Not enough memory to store the parts of the
1942 results that must be stored awaiting possible
1944 @retval EFI_INVALID_PARAMETER Passing in a NULL for the Configuration parameter
1945 would result in this type of error.
1946 @retval EFI_NOT_FOUND Target for the specified routing data was not
1952 HiiConfigRoutingRouteConfig (
1953 IN CONST EFI_HII_CONFIG_ROUTING_PROTOCOL
*This
,
1954 IN CONST EFI_STRING Configuration
,
1955 OUT EFI_STRING
*Progress
1961 This helper function is to be called by drivers to map configuration data stored
1962 in byte array ("block") formats such as UEFI Variables into current configuration strings.
1964 @param This A pointer to the EFI_HII_CONFIG_ROUTING_PROTOCOL
1966 @param ConfigRequest A null-terminated Unicode string in
1967 <ConfigRequest> format.
1968 @param Block Array of bytes defining the block's
1970 @param BlockSize Length in bytes of Block.
1971 @param Config Filled-in configuration string. String allocated
1972 by the function. Returned only if call is
1974 @param Progress A pointer to a string filled in with the offset
1975 of the most recent & before the first failing
1976 name/value pair (or the beginning of the string
1977 if the failure is in the first name / value pair)
1978 or the terminating NULL if all was successful.
1980 @retval EFI_SUCCESS The request succeeded. Progress points to the
1981 null terminator at the end of the ConfigRequest
1983 @retval EFI_OUT_OF_RESOURCES Not enough memory to allocate Config.
1984 Progress points to the first character of
1986 @retval EFI_INVALID_PARAMETER Passing in a NULL for the ConfigRequest or
1987 Block parameter would result in this type of
1988 error. Progress points to the first character of
1990 @retval EFI_NOT_FOUND Target for the specified routing data was not
1991 found. Progress points to the "G" in "GUID" of
1992 the errant routing data.
1993 @retval EFI_DEVICE_ERROR Block not large enough. Progress undefined.
1994 @retval EFI_INVALID_PARAMETER Encountered non <BlockName> formatted string.
1995 Block is left updated and Progress points at
1996 the '&' preceding the first non-<BlockName>.
2002 IN CONST EFI_HII_CONFIG_ROUTING_PROTOCOL
*This
,
2003 IN CONST EFI_STRING ConfigRequest
,
2004 IN CONST UINT8
*Block
,
2005 IN CONST UINTN BlockSize
,
2006 OUT EFI_STRING
*Config
,
2007 OUT EFI_STRING
*Progress
2012 This helper function is to be called by drivers to map configuration strings
2013 to configurations stored in byte array ("block") formats such as UEFI Variables.
2015 @param This A pointer to the EFI_HII_CONFIG_ROUTING_PROTOCOL
2017 @param ConfigResp A null-terminated Unicode string in <ConfigResp>
2019 @param Block A possibly null array of bytes representing the
2020 current block. Only bytes referenced in the
2021 ConfigResp string in the block are modified. If
2022 this parameter is null or if the *BlockSize
2023 parameter is (on input) shorter than required by
2024 the Configuration string, only the BlockSize
2025 parameter is updated and an appropriate status
2026 (see below) is returned.
2027 @param BlockSize The length of the Block in units of UINT8. On
2028 input, this is the size of the Block. On output,
2029 if successful, contains the largest index of the
2030 modified byte in the Block, or the required buffer
2031 size if the Block is not large enough.
2032 @param Progress On return, points to an element of the ConfigResp
2033 string filled in with the offset of the most
2034 recent '&' before the first failing name / value
2035 pair (or the beginning of the string if the
2036 failure is in the first name / value pair) or
2037 the terminating NULL if all was successful.
2039 @retval EFI_SUCCESS The request succeeded. Progress points to the
2040 null terminator at the end of the ConfigResp
2042 @retval EFI_OUT_OF_RESOURCES Not enough memory to allocate Config.
2043 Progress points to the first character of
2045 @retval EFI_INVALID_PARAMETER Passing in a NULL for the ConfigResp or
2046 Block parameter would result in this type of
2047 error. Progress points to the first character of
2049 @retval EFI_NOT_FOUND Target for the specified routing data was not
2050 found. Progress points to the "G" in "GUID" of
2051 the errant routing data.
2052 @retval EFI_INVALID_PARAMETER Encountered non <BlockName> formatted name /
2053 value pair. Block is left updated and
2054 Progress points at the '&' preceding the first
2056 @retval EFI_BUFFER_TOO_SMALL Block not large enough. Progress undefined.
2057 BlockSize is updated with the required buffer size.
2063 IN CONST EFI_HII_CONFIG_ROUTING_PROTOCOL
*This
,
2064 IN CONST EFI_STRING ConfigResp
,
2065 IN OUT UINT8
*Block
,
2066 IN OUT UINTN
*BlockSize
,
2067 OUT EFI_STRING
*Progress
2072 This helper function is to be called by drivers to extract portions of
2073 a larger configuration string.
2075 @param This A pointer to the EFI_HII_CONFIG_ROUTING_PROTOCOL
2077 @param Configuration A null-terminated Unicode string in
2078 <MultiConfigAltResp> format.
2079 @param Guid A pointer to the GUID value to search for in the
2080 routing portion of the ConfigResp string when
2081 retrieving the requested data. If Guid is NULL,
2082 then all GUID values will be searched for.
2083 @param Name A pointer to the NAME value to search for in the
2084 routing portion of the ConfigResp string when
2085 retrieving the requested data. If Name is NULL,
2086 then all Name values will be searched for.
2087 @param DevicePath A pointer to the PATH value to search for in the
2088 routing portion of the ConfigResp string when
2089 retrieving the requested data. If DevicePath is
2090 NULL, then all DevicePath values will be
2092 @param AltCfgId A pointer to the ALTCFG value to search for in
2093 the routing portion of the ConfigResp string
2094 when retrieving the requested data. If this
2095 parameter is NULL, then the current setting will
2097 @param AltCfgResp A pointer to a buffer which will be allocated by
2098 the function which contains the retrieved string
2099 as requested. This buffer is only allocated if
2100 the call was successful.
2102 @retval EFI_SUCCESS The request succeeded. The requested data was
2103 extracted and placed in the newly allocated
2105 @retval EFI_OUT_OF_RESOURCES Not enough memory to allocate AltCfgResp.
2106 @retval EFI_INVALID_PARAMETER Any parameter is invalid.
2107 @retval EFI_NOT_FOUND Target for the specified routing data was not
2114 IN CONST EFI_HII_CONFIG_ROUTING_PROTOCOL
*This
,
2115 IN CONST EFI_STRING Configuration
,
2116 IN CONST EFI_GUID
*Guid
,
2117 IN CONST EFI_STRING Name
,
2118 IN CONST EFI_DEVICE_PATH_PROTOCOL
*DevicePath
,
2119 IN CONST UINT16
*AltCfgId
,
2120 OUT EFI_STRING
*AltCfgResp
2125 This function accepts a <MultiKeywordResp> formatted string, finds the associated
2126 keyword owners, creates a <MultiConfigResp> string from it and forwards it to the
2127 EFI_HII_ROUTING_PROTOCOL.RouteConfig function.
2129 If there is an issue in resolving the contents of the KeywordString, then the
2130 function returns an error and also sets the Progress and ProgressErr with the
2131 appropriate information about where the issue occurred and additional data about
2132 the nature of the issue.
2134 In the case when KeywordString containing multiple keywords, when an EFI_NOT_FOUND
2135 error is generated during processing the second or later keyword element, the system
2136 storage associated with earlier keywords is not modified. All elements of the
2137 KeywordString must successfully pass all tests for format and access prior to making
2138 any modifications to storage.
2140 In the case when EFI_DEVICE_ERROR is returned from the processing of a KeywordString
2141 containing multiple keywords, the state of storage associated with earlier keywords
2145 @param This Pointer to the EFI_KEYWORD_HANDLER _PROTOCOL instance.
2147 @param KeywordString A null-terminated string in <MultiKeywordResp> format.
2149 @param Progress On return, points to a character in the KeywordString.
2150 Points to the string's NULL terminator if the request
2151 was successful. Points to the most recent '&' before
2152 the first failing name / value pair (or the beginning
2153 of the string if the failure is in the first name / value
2154 pair) if the request was not successful.
2156 @param ProgressErr If during the processing of the KeywordString there was
2157 a failure, this parameter gives additional information
2158 about the possible source of the problem. The various
2159 errors are defined in "Related Definitions" below.
2162 @retval EFI_SUCCESS The specified action was completed successfully.
2164 @retval EFI_INVALID_PARAMETER One or more of the following are TRUE:
2165 1. KeywordString is NULL.
2166 2. Parsing of the KeywordString resulted in an
2167 error. See Progress and ProgressErr for more data.
2169 @retval EFI_NOT_FOUND An element of the KeywordString was not found.
2170 See ProgressErr for more data.
2172 @retval EFI_OUT_OF_RESOURCES Required system resources could not be allocated.
2173 See ProgressErr for more data.
2175 @retval EFI_ACCESS_DENIED The action violated system policy. See ProgressErr
2178 @retval EFI_DEVICE_ERROR An unexpected system error occurred. See ProgressErr
2184 EfiConfigKeywordHandlerSetData (
2185 IN EFI_CONFIG_KEYWORD_HANDLER_PROTOCOL
*This
,
2186 IN CONST EFI_STRING KeywordString
,
2187 OUT EFI_STRING
*Progress
,
2188 OUT UINT32
*ProgressErr
2193 This function accepts a <MultiKeywordRequest> formatted string, finds the underlying
2194 keyword owners, creates a <MultiConfigRequest> string from it and forwards it to the
2195 EFI_HII_ROUTING_PROTOCOL.ExtractConfig function.
2197 If there is an issue in resolving the contents of the KeywordString, then the function
2198 returns an EFI_INVALID_PARAMETER and also set the Progress and ProgressErr with the
2199 appropriate information about where the issue occurred and additional data about the
2200 nature of the issue.
2202 In the case when KeywordString is NULL, or contains multiple keywords, or when
2203 EFI_NOT_FOUND is generated while processing the keyword elements, the Results string
2204 contains values returned for all keywords processed prior to the keyword generating the
2205 error but no values for the keyword with error or any following keywords.
2208 @param This Pointer to the EFI_KEYWORD_HANDLER _PROTOCOL instance.
2210 @param NameSpaceId A null-terminated string containing the platform configuration
2211 language to search through in the system. If a NULL is passed
2212 in, then it is assumed that any platform configuration language
2213 with the prefix of "x-UEFI-" are searched.
2215 @param KeywordString A null-terminated string in <MultiKeywordRequest> format. If a
2216 NULL is passed in the KeywordString field, all of the known
2217 keywords in the system for the NameSpaceId specified are
2218 returned in the Results field.
2220 @param Progress On return, points to a character in the KeywordString. Points
2221 to the string's NULL terminator if the request was successful.
2222 Points to the most recent '&' before the first failing name / value
2223 pair (or the beginning of the string if the failure is in the first
2224 name / value pair) if the request was not successful.
2226 @param ProgressErr If during the processing of the KeywordString there was a
2227 failure, this parameter gives additional information about the
2228 possible source of the problem. See the definitions in SetData()
2229 for valid value definitions.
2231 @param Results A null-terminated string in <MultiKeywordResp> format is returned
2232 which has all the values filled in for the keywords in the
2233 KeywordString. This is a callee-allocated field, and must be freed
2234 by the caller after being used.
2236 @retval EFI_SUCCESS The specified action was completed successfully.
2238 @retval EFI_INVALID_PARAMETER One or more of the following are TRUE:
2239 1.Progress, ProgressErr, or Results is NULL.
2240 2.Parsing of the KeywordString resulted in an error. See
2241 Progress and ProgressErr for more data.
2244 @retval EFI_NOT_FOUND An element of the KeywordString was not found. See
2245 ProgressErr for more data.
2247 @retval EFI_NOT_FOUND The NamespaceId specified was not found. See ProgressErr
2250 @retval EFI_OUT_OF_RESOURCES Required system resources could not be allocated. See
2251 ProgressErr for more data.
2253 @retval EFI_ACCESS_DENIED The action violated system policy. See ProgressErr for
2256 @retval EFI_DEVICE_ERROR An unexpected system error occurred. See ProgressErr
2262 EfiConfigKeywordHandlerGetData (
2263 IN EFI_CONFIG_KEYWORD_HANDLER_PROTOCOL
*This
,
2264 IN CONST EFI_STRING NameSpaceId
, OPTIONAL
2265 IN CONST EFI_STRING KeywordString
, OPTIONAL
2266 OUT EFI_STRING
*Progress
,
2267 OUT UINT32
*ProgressErr
,
2268 OUT EFI_STRING
*Results
2272 Compare whether two names of languages are identical.
2274 @param Language1 Name of language 1 from StringPackage
2275 @param Language2 Name of language 2 to be compared with language 1.
2278 @retval FALSE not same
2282 HiiCompareLanguage (
2283 IN CHAR8
*Language1
,
2289 Retrieves a pointer to a Null-terminated ASCII string containing the list
2290 of languages that an HII handle in the HII Database supports. The returned
2291 string is allocated using AllocatePool(). The caller is responsible for freeing
2292 the returned string using FreePool(). The format of the returned string follows
2293 the language format assumed the HII Database.
2295 If HiiHandle is NULL, then ASSERT().
2297 @param[in] HiiHandle A handle that was previously registered in the HII Database.
2299 @retval NULL HiiHandle is not registered in the HII database
2300 @retval NULL There are not enough resources available to retrieve the supported
2302 @retval NULL The list of supported languages could not be retrieved.
2303 @retval Other A pointer to the Null-terminated ASCII string of supported languages.
2307 GetSupportedLanguages (
2308 IN EFI_HII_HANDLE HiiHandle
2312 This function mainly use to get HiiDatabase information.
2314 @param This A pointer to the EFI_HII_DATABASE_PROTOCOL instance.
2316 @retval EFI_SUCCESS Get the information successfully.
2317 @retval EFI_OUT_OF_RESOURCES Not enough memory to store the Hiidatabase data.
2322 IN CONST EFI_HII_DATABASE_PROTOCOL
*This
2326 This is an internal function,mainly use to get and update configuration settings information.
2328 @param This A pointer to the EFI_HII_DATABASE_PROTOCOL instance.
2330 @retval EFI_SUCCESS Get the information successfully.
2331 @retval EFI_OUT_OF_RESOURCES Not enough memory to store the Configuration Setting data.
2335 HiiGetConfigurationSetting(
2336 IN CONST EFI_HII_DATABASE_PROTOCOL
*This
2342 extern EFI_EVENT gHiiKeyboardLayoutChanged
;
2343 extern BOOLEAN gExportAfterReadyToBoot
;