2 Private structures definitions in HiiDatabase.
4 Copyright (c) 2007 - 2017, 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>
37 #include <Library/DebugLib.h>
38 #include <Library/BaseMemoryLib.h>
39 #include <Library/UefiDriverEntryPoint.h>
40 #include <Library/UefiBootServicesTableLib.h>
41 #include <Library/BaseLib.h>
42 #include <Library/DevicePathLib.h>
43 #include <Library/MemoryAllocationLib.h>
44 #include <Library/UefiLib.h>
45 #include <Library/PcdLib.h>
46 #include <Library/UefiRuntimeServicesTableLib.h>
47 #include <Library/PrintLib.h>
49 #define MAX_STRING_LENGTH 1024
50 #define MAX_FONT_NAME_LEN 256
51 #define NARROW_BASELINE 15
52 #define WIDE_BASELINE 14
53 #define SYS_FONT_INFO_MASK 0x37
54 #define REPLACE_UNKNOWN_GLYPH 0xFFFD
55 #define PROPORTIONAL_GLYPH 0x80
56 #define NARROW_GLYPH 0x40
58 #define BITMAP_LEN_1_BIT(Width, Height) (((Width) + 7) / 8 * (Height))
59 #define BITMAP_LEN_4_BIT(Width, Height) (((Width) + 1) / 2 * (Height))
60 #define BITMAP_LEN_8_BIT(Width, Height) ((Width) * (Height))
61 #define BITMAP_LEN_24_BIT(Width, Height) ((Width) * (Height) * 3)
66 // BASE_CR (a, IFR_DEFAULT_VALUE_DATA, Entry) to get the whole structure.
69 LIST_ENTRY Entry
; // Link to VarStorage
74 LIST_ENTRY BlockEntry
; // Link to its Block array
75 } IFR_VARSTORAGE_DATA
;
78 LIST_ENTRY Entry
; // Link to Block array
83 EFI_QUESTION_ID QuestionId
;
86 LIST_ENTRY DefaultValueEntry
; // Link to its default value array
92 // Get default value from IFR data.
95 DefaultValueFromDefault
= 0, // Get from the minimum or first one when not set default value.
96 DefaultValueFromOtherDefault
, // Get default vale from other default when no default(When other
97 // defaults are more than one, use the default with smallest default id).
98 DefaultValueFromFlag
, // Get default value from the default flag.
99 DefaultValueFromOpcode
// Get default value from default opcode, highest priority.
100 } DEFAULT_VALUE_TYPE
;
104 DEFAULT_VALUE_TYPE Type
;
105 BOOLEAN Cleaned
; // Whether this value is cleaned
106 // TRUE Cleaned, the value can't be used
107 // FALSE Not cleaned, the value can be used.
109 EFI_IFR_TYPE_VALUE Value
;
115 #define EFI_HII_VARSTORE_BUFFER 0
116 #define EFI_HII_VARSTORE_NAME_VALUE 1
117 #define EFI_HII_VARSTORE_EFI_VARIABLE 2
118 #define EFI_HII_VARSTORE_EFI_VARIABLE_BUFFER 3
121 // Keyword handler protocol filter type.
123 #define EFI_KEYWORD_FILTER_READONY 0x01
124 #define EFI_KEYWORD_FILTER_REAWRITE 0x02
125 #define EFI_KEYWORD_FILTER_BUFFER 0x10
126 #define EFI_KEYWORD_FILTER_NUMERIC 0x20
127 #define EFI_KEYWORD_FILTER_NUMERIC_1 0x30
128 #define EFI_KEYWORD_FILTER_NUMERIC_2 0x40
129 #define EFI_KEYWORD_FILTER_NUMERIC_4 0x50
130 #define EFI_KEYWORD_FILTER_NUMERIC_8 0x60
133 #define HII_FORMSET_STORAGE_SIGNATURE SIGNATURE_32 ('H', 'S', 'T', 'G')
138 EFI_HII_HANDLE HiiHandle
;
139 EFI_HANDLE DriverHandle
;
141 UINT8 Type
; // EFI_HII_VARSTORE_BUFFER, EFI_HII_VARSTORE_NAME_VALUE, EFI_HII_VARSTORE_EFI_VARIABLE
145 } HII_FORMSET_STORAGE
;
149 // String Package definitions
151 #define HII_STRING_PACKAGE_SIGNATURE SIGNATURE_32 ('h','i','s','p')
152 typedef struct _HII_STRING_PACKAGE_INSTANCE
{
154 EFI_HII_STRING_PACKAGE_HDR
*StringPkgHdr
;
156 LIST_ENTRY StringEntry
;
157 LIST_ENTRY FontInfoList
; // local font info list
159 EFI_STRING_ID MaxStringId
; // record StringId
160 } HII_STRING_PACKAGE_INSTANCE
;
163 // Form Package definitions
165 #define HII_IFR_PACKAGE_SIGNATURE SIGNATURE_32 ('h','f','r','p')
166 typedef struct _HII_IFR_PACKAGE_INSTANCE
{
168 EFI_HII_PACKAGE_HEADER FormPkgHdr
;
171 } HII_IFR_PACKAGE_INSTANCE
;
174 // Simple Font Package definitions
176 #define HII_S_FONT_PACKAGE_SIGNATURE SIGNATURE_32 ('h','s','f','p')
177 typedef struct _HII_SIMPLE_FONT_PACKAGE_INSTANCE
{
179 EFI_HII_SIMPLE_FONT_PACKAGE_HDR
*SimpleFontPkgHdr
;
180 LIST_ENTRY SimpleFontEntry
;
181 } HII_SIMPLE_FONT_PACKAGE_INSTANCE
;
184 // Font Package definitions
186 #define HII_FONT_PACKAGE_SIGNATURE SIGNATURE_32 ('h','i','f','p')
187 typedef struct _HII_FONT_PACKAGE_INSTANCE
{
189 EFI_HII_FONT_PACKAGE_HDR
*FontPkgHdr
;
193 LIST_ENTRY FontEntry
;
194 LIST_ENTRY GlyphInfoList
;
195 } HII_FONT_PACKAGE_INSTANCE
;
197 #define HII_GLYPH_INFO_SIGNATURE SIGNATURE_32 ('h','g','i','s')
198 typedef struct _HII_GLYPH_INFO
{
202 EFI_HII_GLYPH_INFO Cell
;
205 #define HII_FONT_INFO_SIGNATURE SIGNATURE_32 ('h','l','f','i')
206 typedef struct _HII_FONT_INFO
{
209 LIST_ENTRY
*GlobalEntry
;
213 #define HII_GLOBAL_FONT_INFO_SIGNATURE SIGNATURE_32 ('h','g','f','i')
214 typedef struct _HII_GLOBAL_FONT_INFO
{
217 HII_FONT_PACKAGE_INSTANCE
*FontPackage
;
219 EFI_FONT_INFO
*FontInfo
;
220 } HII_GLOBAL_FONT_INFO
;
223 // Image Package definitions
226 #define HII_PIXEL_MASK 0x80
228 typedef struct _HII_IMAGE_PACKAGE_INSTANCE
{
229 EFI_HII_IMAGE_PACKAGE_HDR ImagePkgHdr
;
230 UINT32 ImageBlockSize
;
231 UINT32 PaletteInfoSize
;
232 EFI_HII_IMAGE_BLOCK
*ImageBlock
;
234 } HII_IMAGE_PACKAGE_INSTANCE
;
237 // Keyboard Layout Package definitions
239 #define HII_KB_LAYOUT_PACKAGE_SIGNATURE SIGNATURE_32 ('h','k','l','p')
240 typedef struct _HII_KEYBOARD_LAYOUT_PACKAGE_INSTANCE
{
243 LIST_ENTRY KeyboardEntry
;
244 } HII_KEYBOARD_LAYOUT_PACKAGE_INSTANCE
;
247 // Guid Package definitions
249 #define HII_GUID_PACKAGE_SIGNATURE SIGNATURE_32 ('h','i','g','p')
250 typedef struct _HII_GUID_PACKAGE_INSTANCE
{
253 LIST_ENTRY GuidEntry
;
254 } HII_GUID_PACKAGE_INSTANCE
;
257 // A package list can contain only one or less than one device path package.
258 // This rule also applies to image package since ImageId can not be duplicate.
260 typedef struct _HII_DATABASE_PACKAGE_LIST_INSTANCE
{
261 EFI_HII_PACKAGE_LIST_HEADER PackageListHdr
;
262 LIST_ENTRY GuidPkgHdr
;
263 LIST_ENTRY FormPkgHdr
;
264 LIST_ENTRY KeyboardLayoutHdr
;
265 LIST_ENTRY StringPkgHdr
;
266 LIST_ENTRY FontPkgHdr
;
267 HII_IMAGE_PACKAGE_INSTANCE
*ImagePkg
;
268 LIST_ENTRY SimpleFontPkgHdr
;
269 UINT8
*DevicePathPkg
;
270 } HII_DATABASE_PACKAGE_LIST_INSTANCE
;
272 #define HII_HANDLE_SIGNATURE SIGNATURE_32 ('h','i','h','l')
280 #define HII_DATABASE_RECORD_SIGNATURE SIGNATURE_32 ('h','i','d','r')
282 typedef struct _HII_DATABASE_RECORD
{
284 HII_DATABASE_PACKAGE_LIST_INSTANCE
*PackageList
;
285 EFI_HANDLE DriverHandle
;
286 EFI_HII_HANDLE Handle
;
287 LIST_ENTRY DatabaseEntry
;
288 } HII_DATABASE_RECORD
;
290 #define HII_DATABASE_NOTIFY_SIGNATURE SIGNATURE_32 ('h','i','d','n')
292 typedef struct _HII_DATABASE_NOTIFY
{
294 EFI_HANDLE NotifyHandle
;
296 EFI_GUID
*PackageGuid
;
297 EFI_HII_DATABASE_NOTIFY PackageNotifyFn
;
298 EFI_HII_DATABASE_NOTIFY_TYPE NotifyType
;
299 LIST_ENTRY DatabaseNotifyEntry
;
300 } HII_DATABASE_NOTIFY
;
302 #define HII_DATABASE_PRIVATE_DATA_SIGNATURE SIGNATURE_32 ('H', 'i', 'D', 'p')
304 typedef struct _HII_DATABASE_PRIVATE_DATA
{
306 LIST_ENTRY DatabaseList
;
307 LIST_ENTRY DatabaseNotifyList
;
308 EFI_HII_FONT_PROTOCOL HiiFont
;
309 EFI_HII_IMAGE_PROTOCOL HiiImage
;
310 EFI_HII_IMAGE_EX_PROTOCOL HiiImageEx
;
311 EFI_HII_STRING_PROTOCOL HiiString
;
312 EFI_HII_DATABASE_PROTOCOL HiiDatabase
;
313 EFI_HII_CONFIG_ROUTING_PROTOCOL ConfigRouting
;
314 EFI_CONFIG_KEYWORD_HANDLER_PROTOCOL ConfigKeywordHandler
;
315 LIST_ENTRY HiiHandleList
;
317 LIST_ENTRY FontInfoList
; // global font info list
318 UINTN Attribute
; // default system color
319 EFI_GUID CurrentLayoutGuid
;
320 EFI_HII_KEYBOARD_LAYOUT
*CurrentLayout
;
321 } HII_DATABASE_PRIVATE_DATA
;
323 #define HII_FONT_DATABASE_PRIVATE_DATA_FROM_THIS(a) \
325 HII_DATABASE_PRIVATE_DATA, \
327 HII_DATABASE_PRIVATE_DATA_SIGNATURE \
330 #define HII_IMAGE_DATABASE_PRIVATE_DATA_FROM_THIS(a) \
332 HII_DATABASE_PRIVATE_DATA, \
334 HII_DATABASE_PRIVATE_DATA_SIGNATURE \
337 #define HII_IMAGE_EX_DATABASE_PRIVATE_DATA_FROM_THIS(a) \
339 HII_DATABASE_PRIVATE_DATA, \
341 HII_DATABASE_PRIVATE_DATA_SIGNATURE \
344 #define HII_STRING_DATABASE_PRIVATE_DATA_FROM_THIS(a) \
346 HII_DATABASE_PRIVATE_DATA, \
348 HII_DATABASE_PRIVATE_DATA_SIGNATURE \
351 #define HII_DATABASE_DATABASE_PRIVATE_DATA_FROM_THIS(a) \
353 HII_DATABASE_PRIVATE_DATA, \
355 HII_DATABASE_PRIVATE_DATA_SIGNATURE \
358 #define CONFIG_ROUTING_DATABASE_PRIVATE_DATA_FROM_THIS(a) \
360 HII_DATABASE_PRIVATE_DATA, \
362 HII_DATABASE_PRIVATE_DATA_SIGNATURE \
365 #define CONFIG_KEYWORD_HANDLER_DATABASE_PRIVATE_DATA_FROM_THIS(a) \
367 HII_DATABASE_PRIVATE_DATA, \
368 ConfigKeywordHandler, \
369 HII_DATABASE_PRIVATE_DATA_SIGNATURE \
373 // Internal function prototypes.
377 Generate a sub string then output it.
379 This is a internal function.
381 @param String A constant string which is the prefix of the to be
382 generated string, e.g. GUID=
384 @param BufferLen The length of the Buffer in bytes.
386 @param Buffer Points to a buffer which will be converted to be the
387 content of the generated string.
389 @param Flag If 1, the buffer contains data for the value of GUID or PATH stored in
390 UINT8 *; if 2, the buffer contains unicode string for the value of NAME;
391 if 3, the buffer contains other data.
393 @param SubStr Points to the output string. It's caller's
394 responsibility to free this buffer.
400 IN CONST EFI_STRING String
,
404 OUT EFI_STRING
*SubStr
408 This function checks whether a handle is a valid EFI_HII_HANDLE.
410 @param Handle Pointer to a EFI_HII_HANDLE
413 @retval FALSE Invalid
418 EFI_HII_HANDLE Handle
423 This function checks whether EFI_FONT_INFO exists in current database. If
424 FontInfoMask is specified, check what options can be used to make a match.
425 Note that the masks relate to where the system default should be supplied
426 are ignored by this function.
428 @param Private Hii database private structure.
429 @param FontInfo Points to EFI_FONT_INFO structure.
430 @param FontInfoMask If not NULL, describes what options can be used
431 to make a match between the font requested and
432 the font available. The caller must guarantee
434 @param FontHandle On entry, Points to the font handle returned by a
435 previous call to GetFontInfo() or NULL to start
437 @param GlobalFontInfo If not NULL, output the corresponding global font
441 @retval FALSE Not existed
446 IN HII_DATABASE_PRIVATE_DATA
*Private
,
447 IN EFI_FONT_INFO
*FontInfo
,
448 IN EFI_FONT_INFO_MASK
*FontInfoMask
, OPTIONAL
449 IN EFI_FONT_HANDLE FontHandle
, OPTIONAL
450 OUT HII_GLOBAL_FONT_INFO
**GlobalFontInfo OPTIONAL
455 This function invokes the matching registered function.
457 @param Private HII Database driver private structure.
458 @param NotifyType The type of change concerning the database.
459 @param PackageInstance Points to the package referred to by the notification.
460 @param PackageType Package type
461 @param Handle The handle of the package list which contains the specified package.
463 @retval EFI_SUCCESS Already checked all registered function and invoked
465 @retval EFI_INVALID_PARAMETER Any input parameter is not valid.
469 InvokeRegisteredFunction (
470 IN HII_DATABASE_PRIVATE_DATA
*Private
,
471 IN EFI_HII_DATABASE_NOTIFY_TYPE NotifyType
,
472 IN VOID
*PackageInstance
,
473 IN UINT8 PackageType
,
474 IN EFI_HII_HANDLE Handle
479 Retrieve system default font and color.
481 @param Private HII database driver private data.
482 @param FontInfo Points to system default font output-related
483 information. It's caller's responsibility to free
485 @param FontInfoSize If not NULL, output the size of buffer FontInfo.
487 @retval EFI_SUCCESS Cell information is added to the GlyphInfoList.
488 @retval EFI_OUT_OF_RESOURCES The system is out of resources to accomplish the
490 @retval EFI_INVALID_PARAMETER Any input parameter is invalid.
495 IN HII_DATABASE_PRIVATE_DATA
*Private
,
496 OUT EFI_FONT_DISPLAY_INFO
**FontInfo
,
497 OUT UINTN
*FontInfoSize OPTIONAL
502 Parse all string blocks to find a String block specified by StringId.
503 If StringId = (EFI_STRING_ID) (-1), find out all EFI_HII_SIBT_FONT blocks
504 within this string package and backup its information. If LastStringId is
505 specified, the string id of last string block will also be output.
506 If StringId = 0, output the string id of last string block (EFI_HII_SIBT_STRING).
508 @param Private Hii database private structure.
509 @param StringPackage Hii string package instance.
510 @param StringId The string's id, which is unique within
512 @param BlockType Output the block type of found string block.
513 @param StringBlockAddr Output the block address of found string block.
514 @param StringTextOffset Offset, relative to the found block address, of
515 the string text information.
516 @param LastStringId Output the last string id when StringId = 0 or StringId = -1.
517 @param StartStringId The first id in the skip block which StringId in the block.
519 @retval EFI_SUCCESS The string text and font is retrieved
521 @retval EFI_NOT_FOUND The specified text or font info can not be found
523 @retval EFI_OUT_OF_RESOURCES The system is out of resources to accomplish the
529 IN HII_DATABASE_PRIVATE_DATA
*Private
,
530 IN HII_STRING_PACKAGE_INSTANCE
*StringPackage
,
531 IN EFI_STRING_ID StringId
,
532 OUT UINT8
*BlockType
, OPTIONAL
533 OUT UINT8
**StringBlockAddr
, OPTIONAL
534 OUT UINTN
*StringTextOffset
, OPTIONAL
535 OUT EFI_STRING_ID
*LastStringId
, OPTIONAL
536 OUT EFI_STRING_ID
*StartStringId OPTIONAL
541 Parse all glyph blocks to find a glyph block specified by CharValue.
542 If CharValue = (CHAR16) (-1), collect all default character cell information
543 within this font package and backup its information.
545 @param FontPackage Hii string package instance.
546 @param CharValue Unicode character value, which identifies a glyph
548 @param GlyphBuffer Output the corresponding bitmap data of the found
549 block. It is the caller's responsibility to free
551 @param Cell Output cell information of the encoded bitmap.
552 @param GlyphBufferLen If not NULL, output the length of GlyphBuffer.
554 @retval EFI_SUCCESS The bitmap data is retrieved successfully.
555 @retval EFI_NOT_FOUND The specified CharValue does not exist in current
557 @retval EFI_OUT_OF_RESOURCES The system is out of resources to accomplish the
563 IN HII_FONT_PACKAGE_INSTANCE
*FontPackage
,
565 OUT UINT8
**GlyphBuffer
, OPTIONAL
566 OUT EFI_HII_GLYPH_INFO
*Cell
, OPTIONAL
567 OUT UINTN
*GlyphBufferLen OPTIONAL
571 This function exports Form packages to a buffer.
572 This is a internal function.
574 @param Private Hii database private structure.
575 @param Handle Identification of a package list.
576 @param PackageList Pointer to a package list which will be exported.
577 @param UsedSize The length of buffer be used.
578 @param BufferSize Length of the Buffer.
579 @param Buffer Allocated space for storing exported data.
580 @param ResultSize The size of the already exported content of this
583 @retval EFI_SUCCESS Form Packages are exported successfully.
584 @retval EFI_INVALID_PARAMETER Any input parameter is invalid.
589 IN HII_DATABASE_PRIVATE_DATA
*Private
,
590 IN EFI_HII_HANDLE Handle
,
591 IN HII_DATABASE_PACKAGE_LIST_INSTANCE
*PackageList
,
595 IN OUT UINTN
*ResultSize
599 // EFI_HII_FONT_PROTOCOL protocol interfaces
604 Renders a string to a bitmap or to the display.
606 @param This A pointer to the EFI_HII_FONT_PROTOCOL instance.
607 @param Flags Describes how the string is to be drawn.
608 @param String Points to the null-terminated string to be
610 @param StringInfo Points to the string output information,
611 including the color and font. If NULL, then the
612 string will be output in the default system font
614 @param Blt If this points to a non-NULL on entry, this
615 points to the image, which is Width pixels wide
616 and Height pixels high. The string will be drawn
618 EFI_HII_OUT_FLAG_CLIP is implied. If this points
619 to a NULL on entry, then a buffer
620 will be allocated to hold the generated image and
621 the pointer updated on exit. It is the caller's
622 responsibility to free this buffer.
623 @param BltX Together with BltX, Specifies the offset from the left and top edge
624 of the image of the first character cell in the
626 @param BltY Together with BltY, Specifies the offset from the left and top edge
627 of the image of the first character cell in the
629 @param RowInfoArray If this is non-NULL on entry, then on exit, this
630 will point to an allocated buffer containing
631 row information and RowInfoArraySize will be
632 updated to contain the number of elements.
633 This array describes the characters which were at
634 least partially drawn and the heights of the
635 rows. It is the caller's responsibility to free
637 @param RowInfoArraySize If this is non-NULL on entry, then on exit it
638 contains the number of elements in RowInfoArray.
639 @param ColumnInfoArray If this is non-NULL, then on return it will be
640 filled with the horizontal offset for each
641 character in the string on the row where it is
642 displayed. Non-printing characters will have
643 the offset ~0. The caller is responsible to
644 allocate a buffer large enough so that there
645 is one entry for each character in the string,
646 not including the null-terminator. It is possible
647 when character display is normalized that some
648 character cells overlap.
650 @retval EFI_SUCCESS The string was successfully rendered.
651 @retval EFI_OUT_OF_RESOURCES Unable to allocate an output buffer for
653 @retval EFI_INVALID_PARAMETER The String or Blt.
654 @retval EFI_INVALID_PARAMETER Flags were invalid combination..
660 IN CONST EFI_HII_FONT_PROTOCOL
*This
,
661 IN EFI_HII_OUT_FLAGS Flags
,
662 IN CONST EFI_STRING String
,
663 IN CONST EFI_FONT_DISPLAY_INFO
*StringInfo OPTIONAL
,
664 IN OUT EFI_IMAGE_OUTPUT
**Blt
,
667 OUT EFI_HII_ROW_INFO
**RowInfoArray OPTIONAL
,
668 OUT UINTN
*RowInfoArraySize OPTIONAL
,
669 OUT UINTN
*ColumnInfoArray OPTIONAL
674 Render a string to a bitmap or the screen containing the contents of the specified string.
676 @param This A pointer to the EFI_HII_FONT_PROTOCOL instance.
677 @param Flags Describes how the string is to be drawn.
678 @param PackageList The package list in the HII database to search
679 for the specified string.
680 @param StringId The string's id, which is unique within
682 @param Language Points to the language for the retrieved string.
683 If NULL, then the current system language is
685 @param StringInfo Points to the string output information,
686 including the color and font. If NULL, then the
687 string will be output in the default system font
689 @param Blt If this points to a non-NULL on entry, this
690 points to the image, which is Width pixels wide
691 and Height pixels high. The string will be drawn
693 EFI_HII_OUT_FLAG_CLIP is implied. If this points
694 to a NULL on entry, then a buffer
695 will be allocated to hold the generated image and
696 the pointer updated on exit. It is the caller's
697 responsibility to free this buffer.
698 @param BltX Together with BltX, Specifies the offset from the left and top edge
699 of the image of the first character cell in the
701 @param BltY Together with BltY, Specifies the offset from the left and top edge
702 of the image of the first character cell in the
704 @param RowInfoArray If this is non-NULL on entry, then on exit, this
705 will point to an allocated buffer containing
706 row information and RowInfoArraySize will be
707 updated to contain the number of elements.
708 This array describes the characters which were at
709 least partially drawn and the heights of the
710 rows. It is the caller's responsibility to free
712 @param RowInfoArraySize If this is non-NULL on entry, then on exit it
713 contains the number of elements in RowInfoArray.
714 @param ColumnInfoArray If this is non-NULL, then on return it will be
715 filled with the horizontal offset for each
716 character in the string on the row where it is
717 displayed. Non-printing characters will have
718 the offset ~0. The caller is responsible to
719 allocate a buffer large enough so that there
720 is one entry for each character in the string,
721 not including the null-terminator. It is possible
722 when character display is normalized that some
723 character cells overlap.
725 @retval EFI_SUCCESS The string was successfully rendered.
726 @retval EFI_OUT_OF_RESOURCES Unable to allocate an output buffer for
728 @retval EFI_INVALID_PARAMETER The Blt or PackageList was NULL.
729 @retval EFI_INVALID_PARAMETER Flags were invalid combination.
730 @retval EFI_NOT_FOUND The specified PackageList is not in the Database or the stringid is not
731 in the specified PackageList.
737 IN CONST EFI_HII_FONT_PROTOCOL
*This
,
738 IN EFI_HII_OUT_FLAGS Flags
,
739 IN EFI_HII_HANDLE PackageList
,
740 IN EFI_STRING_ID StringId
,
741 IN CONST CHAR8
* Language
,
742 IN CONST EFI_FONT_DISPLAY_INFO
*StringInfo OPTIONAL
,
743 IN OUT EFI_IMAGE_OUTPUT
**Blt
,
746 OUT EFI_HII_ROW_INFO
**RowInfoArray OPTIONAL
,
747 OUT UINTN
*RowInfoArraySize OPTIONAL
,
748 OUT UINTN
*ColumnInfoArray OPTIONAL
753 Convert the glyph for a single character into a bitmap.
755 @param This A pointer to the EFI_HII_FONT_PROTOCOL instance.
756 @param Char Character to retrieve.
757 @param StringInfo Points to the string font and color information
758 or NULL if the string should use the default
759 system font and color.
760 @param Blt Thus must point to a NULL on entry. A buffer will
761 be allocated to hold the output and the pointer
762 updated on exit. It is the caller's
763 responsibility to free this buffer.
764 @param Baseline Number of pixels from the bottom of the bitmap to
767 @retval EFI_SUCCESS Glyph bitmap created.
768 @retval EFI_OUT_OF_RESOURCES Unable to allocate the output buffer Blt.
769 @retval EFI_WARN_UNKNOWN_GLYPH The glyph was unknown and was replaced with the
770 glyph for Unicode character 0xFFFD.
771 @retval EFI_INVALID_PARAMETER Blt is NULL or *Blt is not NULL.
777 IN CONST EFI_HII_FONT_PROTOCOL
*This
,
779 IN CONST EFI_FONT_DISPLAY_INFO
*StringInfo
,
780 OUT EFI_IMAGE_OUTPUT
**Blt
,
781 OUT UINTN
*Baseline OPTIONAL
786 This function iterates through fonts which match the specified font, using
787 the specified criteria. If String is non-NULL, then all of the characters in
788 the string must exist in order for a candidate font to be returned.
790 @param This A pointer to the EFI_HII_FONT_PROTOCOL instance.
791 @param FontHandle On entry, points to the font handle returned by a
792 previous call to GetFontInfo() or NULL to start
793 with the first font. On return, points to the
794 returned font handle or points to NULL if there
795 are no more matching fonts.
796 @param StringInfoIn Upon entry, points to the font to return information
797 about. If NULL, then the information about the system
798 default font will be returned.
799 @param StringInfoOut Upon return, contains the matching font's information.
800 If NULL, then no information is returned. This buffer
801 is allocated with a call to the Boot Service AllocatePool().
802 It is the caller's responsibility to call the Boot
803 Service FreePool() when the caller no longer requires
804 the contents of StringInfoOut.
805 @param String Points to the string which will be tested to
806 determine if all characters are available. If
807 NULL, then any font is acceptable.
809 @retval EFI_SUCCESS Matching font returned successfully.
810 @retval EFI_NOT_FOUND No matching font was found.
811 @retval EFI_INVALID_PARAMETER StringInfoIn is NULL.
812 @retval EFI_INVALID_PARAMETER StringInfoIn->FontInfoMask is an invalid combination.
813 @retval EFI_OUT_OF_RESOURCES There were insufficient resources to complete the
819 IN CONST EFI_HII_FONT_PROTOCOL
*This
,
820 IN OUT EFI_FONT_HANDLE
*FontHandle
,
821 IN CONST EFI_FONT_DISPLAY_INFO
*StringInfoIn
, OPTIONAL
822 OUT EFI_FONT_DISPLAY_INFO
**StringInfoOut
,
823 IN CONST EFI_STRING String OPTIONAL
827 // EFI_HII_IMAGE_PROTOCOL interfaces
831 Get the image id of last image block: EFI_HII_IIBT_END_BLOCK when input
832 ImageId is zero, otherwise return the address of the
833 corresponding image block with identifier specified by ImageId.
835 This is a internal function.
837 @param ImageBlocks Points to the beginning of a series of image blocks stored in order.
838 @param ImageId If input ImageId is 0, output the image id of the EFI_HII_IIBT_END_BLOCK;
839 else use this id to find its corresponding image block address.
841 @return The image block address when input ImageId is not zero; otherwise return NULL.
844 EFI_HII_IMAGE_BLOCK
*
845 GetImageIdOrAddress (
846 IN EFI_HII_IMAGE_BLOCK
*ImageBlocks
,
847 IN OUT EFI_IMAGE_ID
*ImageId
851 Return the HII package list identified by PackageList HII handle.
853 @param Database Pointer to HII database list header.
854 @param PackageList HII handle of the package list to locate.
856 @retval The HII package list instance.
858 HII_DATABASE_PACKAGE_LIST_INSTANCE
*
860 IN LIST_ENTRY
*Database
,
861 IN EFI_HII_HANDLE PackageList
865 This function retrieves the image specified by ImageId which is associated with
866 the specified PackageList and copies it into the buffer specified by Image.
868 @param Database A pointer to the database list header.
869 @param PackageList Handle of the package list where this image will
871 @param ImageId The image's id,, which is unique within
873 @param Image Points to the image.
874 @param BitmapOnly TRUE to only return the bitmap type image.
875 FALSE to locate image decoder instance to decode image.
877 @retval EFI_SUCCESS The new image was returned successfully.
878 @retval EFI_NOT_FOUND The image specified by ImageId is not in the
879 database. The specified PackageList is not in the database.
880 @retval EFI_BUFFER_TOO_SMALL The buffer specified by ImageSize is too small to
882 @retval EFI_INVALID_PARAMETER The Image or ImageSize was NULL.
883 @retval EFI_OUT_OF_RESOURCES The bitmap could not be retrieved because there was not
888 IN LIST_ENTRY
*Database
,
889 IN EFI_HII_HANDLE PackageList
,
890 IN EFI_IMAGE_ID ImageId
,
891 OUT EFI_IMAGE_INPUT
*Image
,
892 IN BOOLEAN BitmapOnly
896 Return the first HII image decoder instance which supports the DecoderName.
898 @param BlockType The image block type.
900 @retval Pointer to the HII image decoder instance.
902 EFI_HII_IMAGE_DECODER_PROTOCOL
*
903 LocateHiiImageDecoder (
908 This function adds the image Image to the group of images owned by PackageList, and returns
909 a new image identifier (ImageId).
911 @param This A pointer to the EFI_HII_IMAGE_PROTOCOL instance.
912 @param PackageList Handle of the package list where this image will
914 @param ImageId On return, contains the new image id, which is
915 unique within PackageList.
916 @param Image Points to the image.
918 @retval EFI_SUCCESS The new image was added successfully.
919 @retval EFI_NOT_FOUND The specified PackageList could not be found in
921 @retval EFI_OUT_OF_RESOURCES Could not add the image due to lack of resources.
922 @retval EFI_INVALID_PARAMETER Image is NULL or ImageId is NULL.
928 IN CONST EFI_HII_IMAGE_PROTOCOL
*This
,
929 IN EFI_HII_HANDLE PackageList
,
930 OUT EFI_IMAGE_ID
*ImageId
,
931 IN CONST EFI_IMAGE_INPUT
*Image
936 This function retrieves the image specified by ImageId which is associated with
937 the specified PackageList and copies it into the buffer specified by Image.
939 @param This A pointer to the EFI_HII_IMAGE_PROTOCOL instance.
940 @param PackageList Handle of the package list where this image will
942 @param ImageId The image's id,, which is unique within
944 @param Image Points to the image.
946 @retval EFI_SUCCESS The new image was returned successfully.
947 @retval EFI_NOT_FOUND The image specified by ImageId is not available.
948 The specified PackageList is not in the database.
949 @retval EFI_BUFFER_TOO_SMALL The buffer specified by ImageSize is too small to
951 @retval EFI_INVALID_PARAMETER The Image or ImageSize was NULL.
952 @retval EFI_OUT_OF_RESOURCES The bitmap could not be retrieved because there was not
959 IN CONST EFI_HII_IMAGE_PROTOCOL
*This
,
960 IN EFI_HII_HANDLE PackageList
,
961 IN EFI_IMAGE_ID ImageId
,
962 OUT EFI_IMAGE_INPUT
*Image
967 This function updates the image specified by ImageId in the specified PackageListHandle to
968 the image specified by Image.
970 @param This A pointer to the EFI_HII_IMAGE_PROTOCOL instance.
971 @param PackageList The package list containing the images.
972 @param ImageId The image's id,, which is unique within
974 @param Image Points to the image.
976 @retval EFI_SUCCESS The new image was updated successfully.
977 @retval EFI_NOT_FOUND The image specified by ImageId is not in the
978 database. The specified PackageList is not in the database.
979 @retval EFI_INVALID_PARAMETER The Image was NULL.
985 IN CONST EFI_HII_IMAGE_PROTOCOL
*This
,
986 IN EFI_HII_HANDLE PackageList
,
987 IN EFI_IMAGE_ID ImageId
,
988 IN CONST EFI_IMAGE_INPUT
*Image
993 This function renders an image to a bitmap or the screen using the specified
994 color and options. It draws the image on an existing bitmap, allocates a new
995 bitmap or uses the screen. The images can be clipped.
997 @param This A pointer to the EFI_HII_IMAGE_PROTOCOL instance.
998 @param Flags Describes how the image is to be drawn.
999 @param Image Points to the image to be displayed.
1000 @param Blt If this points to a non-NULL on entry, this
1001 points to the image, which is Width pixels wide
1002 and Height pixels high. The image will be drawn
1003 onto this image and EFI_HII_DRAW_FLAG_CLIP is
1004 implied. If this points to a NULL on entry, then
1005 a buffer will be allocated to hold the generated
1006 image and the pointer updated on exit. It is the
1007 caller's responsibility to free this buffer.
1008 @param BltX Specifies the offset from the left and top edge
1009 of the output image of the first pixel in the
1011 @param BltY Specifies the offset from the left and top edge
1012 of the output image of the first pixel in the
1015 @retval EFI_SUCCESS The image was successfully drawn.
1016 @retval EFI_OUT_OF_RESOURCES Unable to allocate an output buffer for Blt.
1017 @retval EFI_INVALID_PARAMETER The Image or Blt was NULL.
1018 @retval EFI_INVALID_PARAMETER Any combination of Flags is invalid.
1024 IN CONST EFI_HII_IMAGE_PROTOCOL
*This
,
1025 IN EFI_HII_DRAW_FLAGS Flags
,
1026 IN CONST EFI_IMAGE_INPUT
*Image
,
1027 IN OUT EFI_IMAGE_OUTPUT
**Blt
,
1034 This function renders an image to a bitmap or the screen using the specified
1035 color and options. It draws the image on an existing bitmap, allocates a new
1036 bitmap or uses the screen. The images can be clipped.
1038 @param This A pointer to the EFI_HII_IMAGE_PROTOCOL instance.
1039 @param Flags Describes how the image is to be drawn.
1040 @param PackageList The package list in the HII database to search
1041 for the specified image.
1042 @param ImageId The image's id, which is unique within
1044 @param Blt If this points to a non-NULL on entry, this
1045 points to the image, which is Width pixels wide
1046 and Height pixels high. The image will be drawn
1048 EFI_HII_DRAW_FLAG_CLIP is implied. If this points
1049 to a NULL on entry, then a buffer will be
1050 allocated to hold the generated image and the
1051 pointer updated on exit. It is the caller's
1052 responsibility to free this buffer.
1053 @param BltX Specifies the offset from the left and top edge
1054 of the output image of the first pixel in the
1056 @param BltY Specifies the offset from the left and top edge
1057 of the output image of the first pixel in the
1060 @retval EFI_SUCCESS The image was successfully drawn.
1061 @retval EFI_OUT_OF_RESOURCES Unable to allocate an output buffer for Blt.
1062 @retval EFI_INVALID_PARAMETER The Blt was NULL.
1063 @retval EFI_NOT_FOUND The image specified by ImageId is not in the database.
1064 The specified PackageList is not in the database.
1070 IN CONST EFI_HII_IMAGE_PROTOCOL
*This
,
1071 IN EFI_HII_DRAW_FLAGS Flags
,
1072 IN EFI_HII_HANDLE PackageList
,
1073 IN EFI_IMAGE_ID ImageId
,
1074 IN OUT EFI_IMAGE_OUTPUT
**Blt
,
1080 The prototype of this extension function is the same with EFI_HII_IMAGE_PROTOCOL.NewImage().
1081 This protocol invokes EFI_HII_IMAGE_PROTOCOL.NewImage() implicitly.
1083 @param This A pointer to the EFI_HII_IMAGE_EX_PROTOCOL instance.
1084 @param PackageList Handle of the package list where this image will
1086 @param ImageId On return, contains the new image id, which is
1087 unique within PackageList.
1088 @param Image Points to the image.
1090 @retval EFI_SUCCESS The new image was added successfully.
1091 @retval EFI_NOT_FOUND The PackageList could not be found.
1092 @retval EFI_OUT_OF_RESOURCES Could not add the image due to lack of resources.
1093 @retval EFI_INVALID_PARAMETER Image is NULL or ImageId is NULL.
1098 IN CONST EFI_HII_IMAGE_EX_PROTOCOL
*This
,
1099 IN EFI_HII_HANDLE PackageList
,
1100 OUT EFI_IMAGE_ID
*ImageId
,
1101 IN CONST EFI_IMAGE_INPUT
*Image
1105 Return the information about the image, associated with the package list.
1106 The prototype of this extension function is the same with EFI_HII_IMAGE_PROTOCOL.GetImage().
1108 This function is similar to EFI_HII_IMAGE_PROTOCOL.GetImage(). The difference is that
1109 this function will locate all EFI_HII_IMAGE_DECODER_PROTOCOL instances installed in the
1110 system if the decoder of the certain image type is not supported by the
1111 EFI_HII_IMAGE_EX_PROTOCOL. The function will attempt to decode the image to the
1112 EFI_IMAGE_INPUT using the first EFI_HII_IMAGE_DECODER_PROTOCOL instance that
1113 supports the requested image type.
1115 @param This A pointer to the EFI_HII_IMAGE_EX_PROTOCOL instance.
1116 @param PackageList The package list in the HII database to search for the
1118 @param ImageId The image's id, which is unique within PackageList.
1119 @param Image Points to the image.
1121 @retval EFI_SUCCESS The new image was returned successfully.
1122 @retval EFI_NOT_FOUND The image specified by ImageId is not available. The specified
1123 PackageList is not in the Database.
1124 @retval EFI_INVALID_PARAMETER Image was NULL or ImageId was 0.
1125 @retval EFI_OUT_OF_RESOURCES The bitmap could not be retrieved because there
1126 was not enough memory.
1132 IN CONST EFI_HII_IMAGE_EX_PROTOCOL
*This
,
1133 IN EFI_HII_HANDLE PackageList
,
1134 IN EFI_IMAGE_ID ImageId
,
1135 OUT EFI_IMAGE_INPUT
*Image
1139 Change the information about the image.
1141 Same with EFI_HII_IMAGE_PROTOCOL.SetImage(), this protocol invokes
1142 EFI_HII_IMAGE_PROTOCOL.SetImage()implicitly.
1144 @param This A pointer to the EFI_HII_IMAGE_EX_PROTOCOL instance.
1145 @param PackageList The package list containing the images.
1146 @param ImageId The image's id, which is unique within PackageList.
1147 @param Image Points to the image.
1149 @retval EFI_SUCCESS The new image was successfully updated.
1150 @retval EFI_NOT_FOUND The image specified by ImageId is not in the
1151 database. The specified PackageList is not in
1153 @retval EFI_INVALID_PARAMETER The Image was NULL, the ImageId was 0 or
1154 the Image->Bitmap was NULL.
1160 IN CONST EFI_HII_IMAGE_EX_PROTOCOL
*This
,
1161 IN EFI_HII_HANDLE PackageList
,
1162 IN EFI_IMAGE_ID ImageId
,
1163 IN CONST EFI_IMAGE_INPUT
*Image
1167 Renders an image to a bitmap or to the display.
1169 The prototype of this extension function is the same with
1170 EFI_HII_IMAGE_PROTOCOL.DrawImage(). This protocol invokes
1171 EFI_HII_IMAGE_PROTOCOL.DrawImage() implicitly.
1173 @param This A pointer to the EFI_HII_IMAGE_EX_PROTOCOL instance.
1174 @param Flags Describes how the image is to be drawn.
1175 @param Image Points to the image to be displayed.
1176 @param Blt If this points to a non-NULL on entry, this points
1177 to the image, which is Width pixels wide and
1178 Height pixels high. The image will be drawn onto
1179 this image and EFI_HII_DRAW_FLAG_CLIP is implied.
1180 If this points to a NULL on entry, then a buffer
1181 will be allocated to hold the generated image and
1182 the pointer updated on exit. It is the caller's
1183 responsibility to free this buffer.
1184 @param BltX Specifies the offset from the left and top edge of
1185 the output image of the first pixel in the image.
1186 @param BltY Specifies the offset from the left and top edge of
1187 the output image of the first pixel in the image.
1189 @retval EFI_SUCCESS The image was successfully drawn.
1190 @retval EFI_OUT_OF_RESOURCES Unable to allocate an output buffer for Blt.
1191 @retval EFI_INVALID_PARAMETER The Image or Blt was NULL.
1197 IN CONST EFI_HII_IMAGE_EX_PROTOCOL
*This
,
1198 IN EFI_HII_DRAW_FLAGS Flags
,
1199 IN CONST EFI_IMAGE_INPUT
*Image
,
1200 IN OUT EFI_IMAGE_OUTPUT
**Blt
,
1206 Renders an image to a bitmap or the screen containing the contents of the specified
1209 This function is similar to EFI_HII_IMAGE_PROTOCOL.DrawImageId(). The difference is that
1210 this function will locate all EFI_HII_IMAGE_DECODER_PROTOCOL instances installed in the
1211 system if the decoder of the certain image type is not supported by the
1212 EFI_HII_IMAGE_EX_PROTOCOL. The function will attempt to decode the image to the
1213 EFI_IMAGE_INPUT using the first EFI_HII_IMAGE_DECODER_PROTOCOL instance that
1214 supports the requested image type.
1216 @param This A pointer to the EFI_HII_IMAGE_EX_PROTOCOL instance.
1217 @param Flags Describes how the image is to be drawn.
1218 @param PackageList The package list in the HII database to search for
1219 the specified image.
1220 @param ImageId The image's id, which is unique within PackageList.
1221 @param Blt If this points to a non-NULL on entry, this points
1222 to the image, which is Width pixels wide and
1223 Height pixels high. The image will be drawn onto
1224 this image and EFI_HII_DRAW_FLAG_CLIP is implied.
1225 If this points to a NULL on entry, then a buffer
1226 will be allocated to hold the generated image
1227 and the pointer updated on exit. It is the caller's
1228 responsibility to free this buffer.
1229 @param BltX Specifies the offset from the left and top edge of
1230 the output image of the first pixel in the image.
1231 @param BltY Specifies the offset from the left and top edge of
1232 the output image of the first pixel in the image.
1234 @retval EFI_SUCCESS The image was successfully drawn.
1235 @retval EFI_OUT_OF_RESOURCES Unable to allocate an output buffer for Blt.
1236 @retval EFI_INVALID_PARAMETER The Blt was NULL or ImageId was 0.
1237 @retval EFI_NOT_FOUND The image specified by ImageId is not in the database.
1238 The specified PackageList is not in the database.
1244 IN CONST EFI_HII_IMAGE_EX_PROTOCOL
*This
,
1245 IN EFI_HII_DRAW_FLAGS Flags
,
1246 IN EFI_HII_HANDLE PackageList
,
1247 IN EFI_IMAGE_ID ImageId
,
1248 IN OUT EFI_IMAGE_OUTPUT
**Blt
,
1254 This function returns the image information to EFI_IMAGE_OUTPUT. Only the width
1255 and height are returned to the EFI_IMAGE_OUTPUT instead of decoding the image
1256 to the buffer. This function is used to get the geometry of the image. This function
1257 will try to locate all of the EFI_HII_IMAGE_DECODER_PROTOCOL installed on the
1258 system if the decoder of image type is not supported by the EFI_HII_IMAGE_EX_PROTOCOL.
1260 @param This A pointer to the EFI_HII_IMAGE_EX_PROTOCOL instance.
1261 @param PackageList Handle of the package list where this image will
1263 @param ImageId The image's id, which is unique within PackageList.
1264 @param Image Points to the image.
1266 @retval EFI_SUCCESS The new image was returned successfully.
1267 @retval EFI_NOT_FOUND The image specified by ImageId is not in the
1268 database. The specified PackageList is not in the database.
1269 @retval EFI_BUFFER_TOO_SMALL The buffer specified by ImageSize is too small to
1271 @retval EFI_INVALID_PARAMETER The Image was NULL or the ImageId was 0.
1272 @retval EFI_OUT_OF_RESOURCES The bitmap could not be retrieved because there
1273 was not enough memory.
1279 IN CONST EFI_HII_IMAGE_EX_PROTOCOL
*This
,
1280 IN EFI_HII_HANDLE PackageList
,
1281 IN EFI_IMAGE_ID ImageId
,
1282 OUT EFI_IMAGE_OUTPUT
*Image
1285 // EFI_HII_STRING_PROTOCOL
1290 This function adds the string String to the group of strings owned by PackageList, with the
1291 specified font information StringFontInfo and returns a new string id.
1293 @param This A pointer to the EFI_HII_STRING_PROTOCOL
1295 @param PackageList Handle of the package list where this string will
1297 @param StringId On return, contains the new strings id, which is
1298 unique within PackageList.
1299 @param Language Points to the language for the new string.
1300 @param LanguageName Points to the printable language name to
1301 associate with the passed in Language field.If
1302 LanguageName is not NULL and the string package
1303 header's LanguageName associated with a given
1304 Language is not zero, the LanguageName being
1305 passed in will be ignored.
1306 @param String Points to the new null-terminated string.
1307 @param StringFontInfo Points to the new string's font information or
1308 NULL if the string should have the default system
1309 font, size and style.
1311 @retval EFI_SUCCESS The new string was added successfully.
1312 @retval EFI_NOT_FOUND The specified PackageList could not be found in
1314 @retval EFI_OUT_OF_RESOURCES Could not add the string due to lack of
1316 @retval EFI_INVALID_PARAMETER String is NULL or StringId is NULL or Language is
1323 IN CONST EFI_HII_STRING_PROTOCOL
*This
,
1324 IN EFI_HII_HANDLE PackageList
,
1325 OUT EFI_STRING_ID
*StringId
,
1326 IN CONST CHAR8
*Language
,
1327 IN CONST CHAR16
*LanguageName
, OPTIONAL
1328 IN CONST EFI_STRING String
,
1329 IN CONST EFI_FONT_INFO
*StringFontInfo OPTIONAL
1334 This function retrieves the string specified by StringId which is associated
1335 with the specified PackageList in the language Language and copies it into
1336 the buffer specified by String.
1338 @param This A pointer to the EFI_HII_STRING_PROTOCOL
1340 @param Language Points to the language for the retrieved string.
1341 @param PackageList The package list in the HII database to search
1342 for the specified string.
1343 @param StringId The string's id, which is unique within
1345 @param String Points to the new null-terminated string.
1346 @param StringSize On entry, points to the size of the buffer
1347 pointed to by String, in bytes. On return,
1348 points to the length of the string, in bytes.
1349 @param StringFontInfo If not NULL, points to the string's font
1350 information. It's caller's responsibility to
1353 @retval EFI_SUCCESS The string was returned successfully.
1354 @retval EFI_NOT_FOUND The string specified by StringId is not
1356 The specified PackageList is not in the database.
1357 @retval EFI_INVALID_LANGUAGE The string specified by StringId is available but
1358 not in the specified language.
1359 @retval EFI_BUFFER_TOO_SMALL The buffer specified by StringSize is too small
1361 @retval EFI_INVALID_PARAMETER The Language or StringSize was NULL.
1362 @retval EFI_INVALID_PARAMETER The value referenced by StringSize was not zero
1363 and String was NULL.
1364 @retval EFI_OUT_OF_RESOURCES There were insufficient resources to complete the
1371 IN CONST EFI_HII_STRING_PROTOCOL
*This
,
1372 IN CONST CHAR8
*Language
,
1373 IN EFI_HII_HANDLE PackageList
,
1374 IN EFI_STRING_ID StringId
,
1375 OUT EFI_STRING String
,
1376 IN OUT UINTN
*StringSize
,
1377 OUT EFI_FONT_INFO
**StringFontInfo OPTIONAL
1382 This function updates the string specified by StringId in the specified PackageList to the text
1383 specified by String and, optionally, the font information specified by StringFontInfo.
1385 @param This A pointer to the EFI_HII_STRING_PROTOCOL
1387 @param PackageList The package list containing the strings.
1388 @param StringId The string's id, which is unique within
1390 @param Language Points to the language for the updated string.
1391 @param String Points to the new null-terminated string.
1392 @param StringFontInfo Points to the string's font information or NULL
1393 if the string font information is not changed.
1395 @retval EFI_SUCCESS The string was updated successfully.
1396 @retval EFI_NOT_FOUND The string specified by StringId is not in the
1398 @retval EFI_INVALID_PARAMETER The String or Language was NULL.
1399 @retval EFI_OUT_OF_RESOURCES The system is out of resources to accomplish the
1406 IN CONST EFI_HII_STRING_PROTOCOL
*This
,
1407 IN EFI_HII_HANDLE PackageList
,
1408 IN EFI_STRING_ID StringId
,
1409 IN CONST CHAR8
*Language
,
1410 IN CONST EFI_STRING String
,
1411 IN CONST EFI_FONT_INFO
*StringFontInfo OPTIONAL
1416 This function returns the list of supported languages, in the format specified
1417 in Appendix M of UEFI 2.1 spec.
1419 @param This A pointer to the EFI_HII_STRING_PROTOCOL
1421 @param PackageList The package list to examine.
1422 @param Languages Points to the buffer to hold the returned
1423 null-terminated ASCII string.
1424 @param LanguagesSize On entry, points to the size of the buffer
1425 pointed to by Languages, in bytes. On return,
1426 points to the length of Languages, in bytes.
1428 @retval EFI_SUCCESS The languages were returned successfully.
1429 @retval EFI_INVALID_PARAMETER The LanguagesSize was NULL.
1430 @retval EFI_INVALID_PARAMETER The value referenced by LanguagesSize is not zero and Languages is NULL.
1431 @retval EFI_BUFFER_TOO_SMALL The LanguagesSize is too small to hold the list
1432 of supported languages. LanguageSize is updated
1433 to contain the required size.
1434 @retval EFI_NOT_FOUND Could not find string package in specified
1441 IN CONST EFI_HII_STRING_PROTOCOL
*This
,
1442 IN EFI_HII_HANDLE PackageList
,
1443 IN OUT CHAR8
*Languages
,
1444 IN OUT UINTN
*LanguagesSize
1449 Each string package has associated with it a single primary language and zero
1450 or more secondary languages. This routine returns the secondary languages
1451 associated with a package list.
1453 @param This A pointer to the EFI_HII_STRING_PROTOCOL
1455 @param PackageList The package list to examine.
1456 @param PrimaryLanguage Points to the null-terminated ASCII string that specifies
1457 the primary language. Languages are specified in the
1458 format specified in Appendix M of the UEFI 2.0 specification.
1459 @param SecondaryLanguages Points to the buffer to hold the returned null-terminated
1460 ASCII string that describes the list of
1461 secondary languages for the specified
1462 PrimaryLanguage. If there are no secondary
1463 languages, the function returns successfully,
1464 but this is set to NULL.
1465 @param SecondaryLanguagesSize On entry, points to the size of the buffer
1466 pointed to by SecondaryLanguages, in bytes. On
1467 return, points to the length of SecondaryLanguages
1470 @retval EFI_SUCCESS Secondary languages were correctly returned.
1471 @retval EFI_INVALID_PARAMETER PrimaryLanguage or SecondaryLanguagesSize was NULL.
1472 @retval EFI_INVALID_PARAMETER The value referenced by SecondaryLanguagesSize is not
1473 zero and SecondaryLanguages is NULL.
1474 @retval EFI_BUFFER_TOO_SMALL The buffer specified by SecondaryLanguagesSize is
1475 too small to hold the returned information.
1476 SecondaryLanguageSize is updated to hold the size of
1477 the buffer required.
1478 @retval EFI_INVALID_LANGUAGE The language specified by PrimaryLanguage is not
1479 present in the specified package list.
1480 @retval EFI_NOT_FOUND The specified PackageList is not in the Database.
1485 HiiGetSecondaryLanguages (
1486 IN CONST EFI_HII_STRING_PROTOCOL
*This
,
1487 IN EFI_HII_HANDLE PackageList
,
1488 IN CONST CHAR8
*PrimaryLanguage
,
1489 IN OUT CHAR8
*SecondaryLanguages
,
1490 IN OUT UINTN
*SecondaryLanguagesSize
1494 // EFI_HII_DATABASE_PROTOCOL protocol interfaces
1499 This function adds the packages in the package list to the database and returns a handle. If there is a
1500 EFI_DEVICE_PATH_PROTOCOL associated with the DriverHandle, then this function will
1501 create a package of type EFI_PACKAGE_TYPE_DEVICE_PATH and add it to the package list.
1503 @param This A pointer to the EFI_HII_DATABASE_PROTOCOL
1505 @param PackageList A pointer to an EFI_HII_PACKAGE_LIST_HEADER
1507 @param DriverHandle Associate the package list with this EFI handle.
1508 If a NULL is specified, this data will not be associate
1509 with any drivers and cannot have a callback induced.
1510 @param Handle A pointer to the EFI_HII_HANDLE instance.
1512 @retval EFI_SUCCESS The package list associated with the Handle was
1513 added to the HII database.
1514 @retval EFI_OUT_OF_RESOURCES Unable to allocate necessary resources for the
1515 new database contents.
1516 @retval EFI_INVALID_PARAMETER PackageList is NULL or Handle is NULL.
1522 IN CONST EFI_HII_DATABASE_PROTOCOL
*This
,
1523 IN CONST EFI_HII_PACKAGE_LIST_HEADER
*PackageList
,
1524 IN CONST EFI_HANDLE DriverHandle
, OPTIONAL
1525 OUT EFI_HII_HANDLE
*Handle
1530 This function removes the package list that is associated with a handle Handle
1531 from the HII database. Before removing the package, any registered functions
1532 with the notification type REMOVE_PACK and the same package type will be called.
1534 @param This A pointer to the EFI_HII_DATABASE_PROTOCOL
1536 @param Handle The handle that was registered to the data that
1537 is requested for removal.
1539 @retval EFI_SUCCESS The data associated with the Handle was removed
1540 from the HII database.
1541 @retval EFI_NOT_FOUND The specified Handle is not in database.
1546 HiiRemovePackageList (
1547 IN CONST EFI_HII_DATABASE_PROTOCOL
*This
,
1548 IN EFI_HII_HANDLE Handle
1553 This function updates the existing package list (which has the specified Handle)
1554 in the HII databases, using the new package list specified by PackageList.
1556 @param This A pointer to the EFI_HII_DATABASE_PROTOCOL
1558 @param Handle The handle that was registered to the data that
1559 is requested to be updated.
1560 @param PackageList A pointer to an EFI_HII_PACKAGE_LIST_HEADER
1563 @retval EFI_SUCCESS The HII database was successfully updated.
1564 @retval EFI_OUT_OF_RESOURCES Unable to allocate enough memory for the updated
1566 @retval EFI_INVALID_PARAMETER PackageList was NULL.
1567 @retval EFI_NOT_FOUND The specified Handle is not in database.
1572 HiiUpdatePackageList (
1573 IN CONST EFI_HII_DATABASE_PROTOCOL
*This
,
1574 IN EFI_HII_HANDLE Handle
,
1575 IN CONST EFI_HII_PACKAGE_LIST_HEADER
*PackageList
1580 This function returns a list of the package handles of the specified type
1581 that are currently active in the database. The pseudo-type
1582 EFI_HII_PACKAGE_TYPE_ALL will cause all package handles to be listed.
1584 @param This A pointer to the EFI_HII_DATABASE_PROTOCOL
1586 @param PackageType Specifies the package type of the packages to
1587 list or EFI_HII_PACKAGE_TYPE_ALL for all packages
1589 @param PackageGuid If PackageType is EFI_HII_PACKAGE_TYPE_GUID, then
1590 this is the pointer to the GUID which must match
1591 the Guid field of EFI_HII_GUID_PACKAGE_GUID_HDR.
1592 Otherwise, it must be NULL.
1593 @param HandleBufferLength On input, a pointer to the length of the handle
1594 buffer. On output, the length of the handle
1595 buffer that is required for the handles found.
1596 @param Handle An array of EFI_HII_HANDLE instances returned.
1598 @retval EFI_SUCCESS The matching handles are outputted successfully.
1599 HandleBufferLength is updated with the actual length.
1600 @retval EFI_BUFFER_TO_SMALL The HandleBufferLength parameter indicates that
1601 Handle is too small to support the number of
1602 handles. HandleBufferLength is updated with a
1603 value that will enable the data to fit.
1604 @retval EFI_NOT_FOUND No matching handle could not be found in
1606 @retval EFI_INVALID_PARAMETER HandleBufferLength was NULL.
1607 @retval EFI_INVALID_PARAMETER The value referenced by HandleBufferLength was not
1608 zero and Handle was NULL.
1609 @retval EFI_INVALID_PARAMETER PackageType is not a EFI_HII_PACKAGE_TYPE_GUID but
1610 PackageGuid is not NULL, PackageType is a EFI_HII_
1611 PACKAGE_TYPE_GUID but PackageGuid is NULL.
1616 HiiListPackageLists (
1617 IN CONST EFI_HII_DATABASE_PROTOCOL
*This
,
1618 IN UINT8 PackageType
,
1619 IN CONST EFI_GUID
*PackageGuid
,
1620 IN OUT UINTN
*HandleBufferLength
,
1621 OUT EFI_HII_HANDLE
*Handle
1626 This function will export one or all package lists in the database to a buffer.
1627 For each package list exported, this function will call functions registered
1628 with EXPORT_PACK and then copy the package list to the buffer.
1630 @param This A pointer to the EFI_HII_DATABASE_PROTOCOL
1632 @param Handle An EFI_HII_HANDLE that corresponds to the desired
1633 package list in the HII database to export or
1634 NULL to indicate all package lists should be
1636 @param BufferSize On input, a pointer to the length of the buffer.
1637 On output, the length of the buffer that is
1638 required for the exported data.
1639 @param Buffer A pointer to a buffer that will contain the
1640 results of the export function.
1642 @retval EFI_SUCCESS Package exported.
1643 @retval EFI_BUFFER_TO_SMALL The HandleBufferLength parameter indicates that
1644 Handle is too small to support the number of
1645 handles. HandleBufferLength is updated with
1646 a value that will enable the data to fit.
1647 @retval EFI_NOT_FOUND The specified Handle could not be found in the
1649 @retval EFI_INVALID_PARAMETER BufferSize was NULL.
1650 @retval EFI_INVALID_PARAMETER The value referenced by BufferSize was not zero
1651 and Buffer was NULL.
1656 HiiExportPackageLists (
1657 IN CONST EFI_HII_DATABASE_PROTOCOL
*This
,
1658 IN EFI_HII_HANDLE Handle
,
1659 IN OUT UINTN
*BufferSize
,
1660 OUT EFI_HII_PACKAGE_LIST_HEADER
*Buffer
1665 This function registers a function which will be called when specified actions related to packages of
1666 the specified type occur in the HII database. By registering a function, other HII-related drivers are
1667 notified when specific package types are added, removed or updated in the HII database.
1668 Each driver or application which registers a notification should use
1669 EFI_HII_DATABASE_PROTOCOL.UnregisterPackageNotify() before exiting.
1671 @param This A pointer to the EFI_HII_DATABASE_PROTOCOL
1673 @param PackageType Specifies the package type of the packages to
1674 list or EFI_HII_PACKAGE_TYPE_ALL for all packages
1676 @param PackageGuid If PackageType is EFI_HII_PACKAGE_TYPE_GUID, then
1677 this is the pointer to the GUID which must match
1679 EFI_HII_GUID_PACKAGE_GUID_HDR. Otherwise, it must
1681 @param PackageNotifyFn Points to the function to be called when the
1683 NotificationType occurs.
1684 @param NotifyType Describes the types of notification which this
1685 function will be receiving.
1686 @param NotifyHandle Points to the unique handle assigned to the
1687 registered notification. Can be used in
1688 EFI_HII_DATABASE_PROTOCOL.UnregisterPackageNotify()
1689 to stop notifications.
1691 @retval EFI_SUCCESS Notification registered successfully.
1692 @retval EFI_OUT_OF_RESOURCES Unable to allocate necessary data structures
1693 @retval EFI_INVALID_PARAMETER NotifyHandle is NULL.
1694 @retval EFI_INVALID_PARAMETER PackageGuid is not NULL when PackageType is not
1695 EFI_HII_PACKAGE_TYPE_GUID.
1696 @retval EFI_INVALID_PARAMETER PackageGuid is NULL when PackageType is
1697 EFI_HII_PACKAGE_TYPE_GUID.
1702 HiiRegisterPackageNotify (
1703 IN CONST EFI_HII_DATABASE_PROTOCOL
*This
,
1704 IN UINT8 PackageType
,
1705 IN CONST EFI_GUID
*PackageGuid
,
1706 IN CONST EFI_HII_DATABASE_NOTIFY PackageNotifyFn
,
1707 IN EFI_HII_DATABASE_NOTIFY_TYPE NotifyType
,
1708 OUT EFI_HANDLE
*NotifyHandle
1713 Removes the specified HII database package-related notification.
1715 @param This A pointer to the EFI_HII_DATABASE_PROTOCOL
1717 @param NotificationHandle The handle of the notification function being
1720 @retval EFI_SUCCESS Notification is unregistered successfully.
1721 @retval EFI_NOT_FOUND The incoming notification handle does not exist
1722 in current hii database.
1727 HiiUnregisterPackageNotify (
1728 IN CONST EFI_HII_DATABASE_PROTOCOL
*This
,
1729 IN EFI_HANDLE NotificationHandle
1734 This routine retrieves an array of GUID values for each keyboard layout that
1735 was previously registered in the system.
1737 @param This A pointer to the EFI_HII_DATABASE_PROTOCOL
1739 @param KeyGuidBufferLength On input, a pointer to the length of the keyboard
1740 GUID buffer. On output, the length of the handle
1741 buffer that is required for the handles found.
1742 @param KeyGuidBuffer An array of keyboard layout GUID instances
1745 @retval EFI_SUCCESS KeyGuidBuffer was updated successfully.
1746 @retval EFI_BUFFER_TOO_SMALL The KeyGuidBufferLength parameter indicates
1747 that KeyGuidBuffer is too small to support the
1748 number of GUIDs. KeyGuidBufferLength is
1749 updated with a value that will enable the data to
1751 @retval EFI_INVALID_PARAMETER The KeyGuidBufferLength is NULL.
1752 @retval EFI_INVALID_PARAMETER The value referenced by KeyGuidBufferLength is not
1753 zero and KeyGuidBuffer is NULL.
1754 @retval EFI_NOT_FOUND There was no keyboard layout.
1759 HiiFindKeyboardLayouts (
1760 IN CONST EFI_HII_DATABASE_PROTOCOL
*This
,
1761 IN OUT UINT16
*KeyGuidBufferLength
,
1762 OUT EFI_GUID
*KeyGuidBuffer
1767 This routine retrieves the requested keyboard layout. The layout is a physical description of the keys
1768 on a keyboard and the character(s) that are associated with a particular set of key strokes.
1770 @param This A pointer to the EFI_HII_DATABASE_PROTOCOL
1772 @param KeyGuid A pointer to the unique ID associated with a
1773 given keyboard layout. If KeyGuid is NULL then
1774 the current layout will be retrieved.
1775 @param KeyboardLayoutLength On input, a pointer to the length of the
1776 KeyboardLayout buffer. On output, the length of
1777 the data placed into KeyboardLayout.
1778 @param KeyboardLayout A pointer to a buffer containing the retrieved
1781 @retval EFI_SUCCESS The keyboard layout was retrieved successfully.
1782 @retval EFI_NOT_FOUND The requested keyboard layout was not found.
1783 @retval EFI_INVALID_PARAMETER The KeyboardLayout or KeyboardLayoutLength was
1789 HiiGetKeyboardLayout (
1790 IN CONST EFI_HII_DATABASE_PROTOCOL
*This
,
1791 IN CONST EFI_GUID
*KeyGuid
,
1792 IN OUT UINT16
*KeyboardLayoutLength
,
1793 OUT EFI_HII_KEYBOARD_LAYOUT
*KeyboardLayout
1798 This routine sets the default keyboard layout to the one referenced by KeyGuid. When this routine
1799 is called, an event will be signaled of the EFI_HII_SET_KEYBOARD_LAYOUT_EVENT_GUID
1800 group type. This is so that agents which are sensitive to the current keyboard layout being changed
1801 can be notified of this change.
1803 @param This A pointer to the EFI_HII_DATABASE_PROTOCOL
1805 @param KeyGuid A pointer to the unique ID associated with a
1806 given keyboard layout.
1808 @retval EFI_SUCCESS The current keyboard layout was successfully set.
1809 @retval EFI_NOT_FOUND The referenced keyboard layout was not found, so
1811 @retval EFI_INVALID_PARAMETER The KeyGuid was NULL.
1816 HiiSetKeyboardLayout (
1817 IN CONST EFI_HII_DATABASE_PROTOCOL
*This
,
1818 IN CONST EFI_GUID
*KeyGuid
1823 Return the EFI handle associated with a package list.
1825 @param This A pointer to the EFI_HII_DATABASE_PROTOCOL
1827 @param PackageListHandle An EFI_HII_HANDLE that corresponds to the desired
1828 package list in the HIIdatabase.
1829 @param DriverHandle On return, contains the EFI_HANDLE which was
1830 registered with the package list in
1833 @retval EFI_SUCCESS The DriverHandle was returned successfully.
1834 @retval EFI_INVALID_PARAMETER The PackageListHandle was not valid or
1835 DriverHandle was NULL.
1840 HiiGetPackageListHandle (
1841 IN CONST EFI_HII_DATABASE_PROTOCOL
*This
,
1842 IN EFI_HII_HANDLE PackageListHandle
,
1843 OUT EFI_HANDLE
*DriverHandle
1847 // EFI_HII_CONFIG_ROUTING_PROTOCOL interfaces
1852 This function allows a caller to extract the current configuration
1853 for one or more named elements from one or more drivers.
1855 @param This A pointer to the EFI_HII_CONFIG_ROUTING_PROTOCOL
1857 @param Request A null-terminated Unicode string in
1858 <MultiConfigRequest> format.
1859 @param Progress On return, points to a character in the Request
1860 string. Points to the string's null terminator if
1861 request was successful. Points to the most recent
1862 & before the first failing name / value pair (or
1863 the beginning of the string if the failure is in
1864 the first name / value pair) if the request was
1866 @param Results Null-terminated Unicode string in
1867 <MultiConfigAltResp> format which has all values
1868 filled in for the names in the Request string.
1869 String to be allocated by the called function.
1871 @retval EFI_SUCCESS The Results string is filled with the values
1872 corresponding to all requested names.
1873 @retval EFI_OUT_OF_RESOURCES Not enough memory to store the parts of the
1874 results that must be stored awaiting possible
1876 @retval EFI_NOT_FOUND Routing data doesn't match any known driver.
1877 Progress set to the "G" in "GUID" of the
1878 routing header that doesn't match. Note: There
1879 is no requirement that all routing data
1880 be validated before any configuration extraction.
1881 @retval EFI_INVALID_PARAMETER For example, passing in a NULL for the Request
1882 parameter would result in this type of error. The
1883 Progress parameter is set to NULL.
1884 @retval EFI_INVALID_PARAMETER Illegal syntax. Progress set to most recent &
1885 before the error or the beginning of the string.
1886 @retval EFI_INVALID_PARAMETER Unknown name. Progress points to the & before the
1892 HiiConfigRoutingExtractConfig (
1893 IN CONST EFI_HII_CONFIG_ROUTING_PROTOCOL
*This
,
1894 IN CONST EFI_STRING Request
,
1895 OUT EFI_STRING
*Progress
,
1896 OUT EFI_STRING
*Results
1901 This function allows the caller to request the current configuration for the
1902 entirety of the current HII database and returns the data in a null-terminated Unicode string.
1904 @param This A pointer to the EFI_HII_CONFIG_ROUTING_PROTOCOL
1906 @param Results Null-terminated Unicode string in
1907 <MultiConfigAltResp> format which has all values
1908 filled in for the entirety of the current HII
1909 database. String to be allocated by the called
1910 function. De-allocation is up to the caller.
1912 @retval EFI_SUCCESS The Results string is filled with the values
1913 corresponding to all requested names.
1914 @retval EFI_OUT_OF_RESOURCES Not enough memory to store the parts of the
1915 results that must be stored awaiting possible
1917 @retval EFI_INVALID_PARAMETER For example, passing in a NULL for the Results
1918 parameter would result in this type of error.
1923 HiiConfigRoutingExportConfig (
1924 IN CONST EFI_HII_CONFIG_ROUTING_PROTOCOL
*This
,
1925 OUT EFI_STRING
*Results
1930 This function processes the results of processing forms and routes it to the
1931 appropriate handlers or storage.
1933 @param This A pointer to the EFI_HII_CONFIG_ROUTING_PROTOCOL
1935 @param Configuration A null-terminated Unicode string in
1936 <MulltiConfigResp> format.
1937 @param Progress A pointer to a string filled in with the offset
1938 of the most recent & before the first failing
1939 name / value pair (or the beginning of the string
1940 if the failure is in the first name / value pair)
1941 or the terminating NULL if all was successful.
1943 @retval EFI_SUCCESS The results have been distributed or are awaiting
1945 @retval EFI_OUT_OF_RESOURCES Not enough memory to store the parts of the
1946 results that must be stored awaiting possible
1948 @retval EFI_INVALID_PARAMETER Passing in a NULL for the Configuration parameter
1949 would result in this type of error.
1950 @retval EFI_NOT_FOUND Target for the specified routing data was not
1956 HiiConfigRoutingRouteConfig (
1957 IN CONST EFI_HII_CONFIG_ROUTING_PROTOCOL
*This
,
1958 IN CONST EFI_STRING Configuration
,
1959 OUT EFI_STRING
*Progress
1965 This helper function is to be called by drivers to map configuration data stored
1966 in byte array ("block") formats such as UEFI Variables into current configuration strings.
1968 @param This A pointer to the EFI_HII_CONFIG_ROUTING_PROTOCOL
1970 @param ConfigRequest A null-terminated Unicode string in
1971 <ConfigRequest> format.
1972 @param Block Array of bytes defining the block's
1974 @param BlockSize Length in bytes of Block.
1975 @param Config Filled-in configuration string. String allocated
1976 by the function. Returned only if call is
1978 @param Progress A pointer to a string filled in with the offset
1979 of the most recent & before the first failing
1980 name/value pair (or the beginning of the string
1981 if the failure is in the first name / value pair)
1982 or the terminating NULL if all was successful.
1984 @retval EFI_SUCCESS The request succeeded. Progress points to the
1985 null terminator at the end of the ConfigRequest
1987 @retval EFI_OUT_OF_RESOURCES Not enough memory to allocate Config.
1988 Progress points to the first character of
1990 @retval EFI_INVALID_PARAMETER Passing in a NULL for the ConfigRequest or
1991 Block parameter would result in this type of
1992 error. Progress points to the first character of
1994 @retval EFI_NOT_FOUND Target for the specified routing data was not
1995 found. Progress points to the "G" in "GUID" of
1996 the errant routing data.
1997 @retval EFI_DEVICE_ERROR Block not large enough. Progress undefined.
1998 @retval EFI_INVALID_PARAMETER Encountered non <BlockName> formatted string.
1999 Block is left updated and Progress points at
2000 the '&' preceding the first non-<BlockName>.
2006 IN CONST EFI_HII_CONFIG_ROUTING_PROTOCOL
*This
,
2007 IN CONST EFI_STRING ConfigRequest
,
2008 IN CONST UINT8
*Block
,
2009 IN CONST UINTN BlockSize
,
2010 OUT EFI_STRING
*Config
,
2011 OUT EFI_STRING
*Progress
2016 This helper function is to be called by drivers to map configuration strings
2017 to configurations stored in byte array ("block") formats such as UEFI Variables.
2019 @param This A pointer to the EFI_HII_CONFIG_ROUTING_PROTOCOL
2021 @param ConfigResp A null-terminated Unicode string in <ConfigResp>
2023 @param Block A possibly null array of bytes representing the
2024 current block. Only bytes referenced in the
2025 ConfigResp string in the block are modified. If
2026 this parameter is null or if the *BlockSize
2027 parameter is (on input) shorter than required by
2028 the Configuration string, only the BlockSize
2029 parameter is updated and an appropriate status
2030 (see below) is returned.
2031 @param BlockSize The length of the Block in units of UINT8. On
2032 input, this is the size of the Block. On output,
2033 if successful, contains the largest index of the
2034 modified byte in the Block, or the required buffer
2035 size if the Block is not large enough.
2036 @param Progress On return, points to an element of the ConfigResp
2037 string filled in with the offset of the most
2038 recent '&' before the first failing name / value
2039 pair (or the beginning of the string if the
2040 failure is in the first name / value pair) or
2041 the terminating NULL if all was successful.
2043 @retval EFI_SUCCESS The request succeeded. Progress points to the
2044 null terminator at the end of the ConfigResp
2046 @retval EFI_OUT_OF_RESOURCES Not enough memory to allocate Config.
2047 Progress points to the first character of
2049 @retval EFI_INVALID_PARAMETER Passing in a NULL for the ConfigResp or
2050 Block parameter would result in this type of
2051 error. Progress points to the first character of
2053 @retval EFI_NOT_FOUND Target for the specified routing data was not
2054 found. Progress points to the "G" in "GUID" of
2055 the errant routing data.
2056 @retval EFI_INVALID_PARAMETER Encountered non <BlockName> formatted name /
2057 value pair. Block is left updated and
2058 Progress points at the '&' preceding the first
2060 @retval EFI_BUFFER_TOO_SMALL Block not large enough. Progress undefined.
2061 BlockSize is updated with the required buffer size.
2067 IN CONST EFI_HII_CONFIG_ROUTING_PROTOCOL
*This
,
2068 IN CONST EFI_STRING ConfigResp
,
2069 IN OUT UINT8
*Block
,
2070 IN OUT UINTN
*BlockSize
,
2071 OUT EFI_STRING
*Progress
2076 This helper function is to be called by drivers to extract portions of
2077 a larger configuration string.
2079 @param This A pointer to the EFI_HII_CONFIG_ROUTING_PROTOCOL
2081 @param Configuration A null-terminated Unicode string in
2082 <MultiConfigAltResp> format.
2083 @param Guid A pointer to the GUID value to search for in the
2084 routing portion of the ConfigResp string when
2085 retrieving the requested data. If Guid is NULL,
2086 then all GUID values will be searched for.
2087 @param Name A pointer to the NAME value to search for in the
2088 routing portion of the ConfigResp string when
2089 retrieving the requested data. If Name is NULL,
2090 then all Name values will be searched for.
2091 @param DevicePath A pointer to the PATH value to search for in the
2092 routing portion of the ConfigResp string when
2093 retrieving the requested data. If DevicePath is
2094 NULL, then all DevicePath values will be
2096 @param AltCfgId A pointer to the ALTCFG value to search for in
2097 the routing portion of the ConfigResp string
2098 when retrieving the requested data. If this
2099 parameter is NULL, then the current setting will
2101 @param AltCfgResp A pointer to a buffer which will be allocated by
2102 the function which contains the retrieved string
2103 as requested. This buffer is only allocated if
2104 the call was successful.
2106 @retval EFI_SUCCESS The request succeeded. The requested data was
2107 extracted and placed in the newly allocated
2109 @retval EFI_OUT_OF_RESOURCES Not enough memory to allocate AltCfgResp.
2110 @retval EFI_INVALID_PARAMETER Any parameter is invalid.
2111 @retval EFI_NOT_FOUND Target for the specified routing data was not
2118 IN CONST EFI_HII_CONFIG_ROUTING_PROTOCOL
*This
,
2119 IN CONST EFI_STRING Configuration
,
2120 IN CONST EFI_GUID
*Guid
,
2121 IN CONST EFI_STRING Name
,
2122 IN CONST EFI_DEVICE_PATH_PROTOCOL
*DevicePath
,
2123 IN CONST UINT16
*AltCfgId
,
2124 OUT EFI_STRING
*AltCfgResp
2129 This function accepts a <MultiKeywordResp> formatted string, finds the associated
2130 keyword owners, creates a <MultiConfigResp> string from it and forwards it to the
2131 EFI_HII_ROUTING_PROTOCOL.RouteConfig function.
2133 If there is an issue in resolving the contents of the KeywordString, then the
2134 function returns an error and also sets the Progress and ProgressErr with the
2135 appropriate information about where the issue occurred and additional data about
2136 the nature of the issue.
2138 In the case when KeywordString containing multiple keywords, when an EFI_NOT_FOUND
2139 error is generated during processing the second or later keyword element, the system
2140 storage associated with earlier keywords is not modified. All elements of the
2141 KeywordString must successfully pass all tests for format and access prior to making
2142 any modifications to storage.
2144 In the case when EFI_DEVICE_ERROR is returned from the processing of a KeywordString
2145 containing multiple keywords, the state of storage associated with earlier keywords
2149 @param This Pointer to the EFI_KEYWORD_HANDLER _PROTOCOL instance.
2151 @param KeywordString A null-terminated string in <MultiKeywordResp> format.
2153 @param Progress On return, points to a character in the KeywordString.
2154 Points to the string's NULL terminator if the request
2155 was successful. Points to the most recent '&' before
2156 the first failing name / value pair (or the beginning
2157 of the string if the failure is in the first name / value
2158 pair) if the request was not successful.
2160 @param ProgressErr If during the processing of the KeywordString there was
2161 a failure, this parameter gives additional information
2162 about the possible source of the problem. The various
2163 errors are defined in "Related Definitions" below.
2166 @retval EFI_SUCCESS The specified action was completed successfully.
2168 @retval EFI_INVALID_PARAMETER One or more of the following are TRUE:
2169 1. KeywordString is NULL.
2170 2. Parsing of the KeywordString resulted in an
2171 error. See Progress and ProgressErr for more data.
2173 @retval EFI_NOT_FOUND An element of the KeywordString was not found.
2174 See ProgressErr for more data.
2176 @retval EFI_OUT_OF_RESOURCES Required system resources could not be allocated.
2177 See ProgressErr for more data.
2179 @retval EFI_ACCESS_DENIED The action violated system policy. See ProgressErr
2182 @retval EFI_DEVICE_ERROR An unexpected system error occurred. See ProgressErr
2188 EfiConfigKeywordHandlerSetData (
2189 IN EFI_CONFIG_KEYWORD_HANDLER_PROTOCOL
*This
,
2190 IN CONST EFI_STRING KeywordString
,
2191 OUT EFI_STRING
*Progress
,
2192 OUT UINT32
*ProgressErr
2197 This function accepts a <MultiKeywordRequest> formatted string, finds the underlying
2198 keyword owners, creates a <MultiConfigRequest> string from it and forwards it to the
2199 EFI_HII_ROUTING_PROTOCOL.ExtractConfig function.
2201 If there is an issue in resolving the contents of the KeywordString, then the function
2202 returns an EFI_INVALID_PARAMETER and also set the Progress and ProgressErr with the
2203 appropriate information about where the issue occurred and additional data about the
2204 nature of the issue.
2206 In the case when KeywordString is NULL, or contains multiple keywords, or when
2207 EFI_NOT_FOUND is generated while processing the keyword elements, the Results string
2208 contains values returned for all keywords processed prior to the keyword generating the
2209 error but no values for the keyword with error or any following keywords.
2212 @param This Pointer to the EFI_KEYWORD_HANDLER _PROTOCOL instance.
2214 @param NameSpaceId A null-terminated string containing the platform configuration
2215 language to search through in the system. If a NULL is passed
2216 in, then it is assumed that any platform configuration language
2217 with the prefix of "x-UEFI-" are searched.
2219 @param KeywordString A null-terminated string in <MultiKeywordRequest> format. If a
2220 NULL is passed in the KeywordString field, all of the known
2221 keywords in the system for the NameSpaceId specified are
2222 returned in the Results field.
2224 @param Progress On return, points to a character in the KeywordString. Points
2225 to the string's NULL terminator if the request was successful.
2226 Points to the most recent '&' before the first failing name / value
2227 pair (or the beginning of the string if the failure is in the first
2228 name / value pair) if the request was not successful.
2230 @param ProgressErr If during the processing of the KeywordString there was a
2231 failure, this parameter gives additional information about the
2232 possible source of the problem. See the definitions in SetData()
2233 for valid value definitions.
2235 @param Results A null-terminated string in <MultiKeywordResp> format is returned
2236 which has all the values filled in for the keywords in the
2237 KeywordString. This is a callee-allocated field, and must be freed
2238 by the caller after being used.
2240 @retval EFI_SUCCESS The specified action was completed successfully.
2242 @retval EFI_INVALID_PARAMETER One or more of the following are TRUE:
2243 1.Progress, ProgressErr, or Results is NULL.
2244 2.Parsing of the KeywordString resulted in an error. See
2245 Progress and ProgressErr for more data.
2248 @retval EFI_NOT_FOUND An element of the KeywordString was not found. See
2249 ProgressErr for more data.
2251 @retval EFI_NOT_FOUND The NamespaceId specified was not found. See ProgressErr
2254 @retval EFI_OUT_OF_RESOURCES Required system resources could not be allocated. See
2255 ProgressErr for more data.
2257 @retval EFI_ACCESS_DENIED The action violated system policy. See ProgressErr for
2260 @retval EFI_DEVICE_ERROR An unexpected system error occurred. See ProgressErr
2266 EfiConfigKeywordHandlerGetData (
2267 IN EFI_CONFIG_KEYWORD_HANDLER_PROTOCOL
*This
,
2268 IN CONST EFI_STRING NameSpaceId
, OPTIONAL
2269 IN CONST EFI_STRING KeywordString
, OPTIONAL
2270 OUT EFI_STRING
*Progress
,
2271 OUT UINT32
*ProgressErr
,
2272 OUT EFI_STRING
*Results
2276 Compare whether two names of languages are identical.
2278 @param Language1 Name of language 1 from StringPackage
2279 @param Language2 Name of language 2 to be compared with language 1.
2282 @retval FALSE not same
2286 HiiCompareLanguage (
2287 IN CHAR8
*Language1
,
2293 Retrieves a pointer to a Null-terminated ASCII string containing the list
2294 of languages that an HII handle in the HII Database supports. The returned
2295 string is allocated using AllocatePool(). The caller is responsible for freeing
2296 the returned string using FreePool(). The format of the returned string follows
2297 the language format assumed the HII Database.
2299 If HiiHandle is NULL, then ASSERT().
2301 @param[in] HiiHandle A handle that was previously registered in the HII Database.
2303 @retval NULL HiiHandle is not registered in the HII database
2304 @retval NULL There are not enough resources available to retrieve the supported
2306 @retval NULL The list of supported languages could not be retrieved.
2307 @retval Other A pointer to the Null-terminated ASCII string of supported languages.
2311 GetSupportedLanguages (
2312 IN EFI_HII_HANDLE HiiHandle
2316 This function mainly use to get HiiDatabase information.
2318 @param This A pointer to the EFI_HII_DATABASE_PROTOCOL instance.
2320 @retval EFI_SUCCESS Get the information successfully.
2321 @retval EFI_OUT_OF_RESOURCES Not enough memory to store the Hiidatabase data.
2326 IN CONST EFI_HII_DATABASE_PROTOCOL
*This
2330 This is an internal function,mainly use to get and update configuration settings information.
2332 @param This A pointer to the EFI_HII_DATABASE_PROTOCOL instance.
2334 @retval EFI_SUCCESS Get the information successfully.
2335 @retval EFI_OUT_OF_RESOURCES Not enough memory to store the Configuration Setting data.
2339 HiiGetConfigurationSetting(
2340 IN CONST EFI_HII_DATABASE_PROTOCOL
*This
2346 extern EFI_EVENT gHiiKeyboardLayoutChanged
;
2347 extern BOOLEAN gExportAfterReadyToBoot
;