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>
35 #include <Guid/VariableFormat.h>
36 #include <Guid/PcdDataBaseSignatureGuid.h>
38 #include <Library/DebugLib.h>
39 #include <Library/BaseMemoryLib.h>
40 #include <Library/UefiDriverEntryPoint.h>
41 #include <Library/UefiBootServicesTableLib.h>
42 #include <Library/BaseLib.h>
43 #include <Library/DevicePathLib.h>
44 #include <Library/MemoryAllocationLib.h>
45 #include <Library/UefiLib.h>
46 #include <Library/PcdLib.h>
47 #include <Library/UefiRuntimeServicesTableLib.h>
48 #include <Library/PrintLib.h>
50 #define MAX_STRING_LENGTH 1024
51 #define MAX_FONT_NAME_LEN 256
52 #define NARROW_BASELINE 15
53 #define WIDE_BASELINE 14
54 #define SYS_FONT_INFO_MASK 0x37
55 #define REPLACE_UNKNOWN_GLYPH 0xFFFD
56 #define PROPORTIONAL_GLYPH 0x80
57 #define NARROW_GLYPH 0x40
59 #define BITMAP_LEN_1_BIT(Width, Height) (((Width) + 7) / 8 * (Height))
60 #define BITMAP_LEN_4_BIT(Width, Height) (((Width) + 1) / 2 * (Height))
61 #define BITMAP_LEN_8_BIT(Width, Height) ((Width) * (Height))
62 #define BITMAP_LEN_24_BIT(Width, Height) ((Width) * (Height) * 3)
67 // BASE_CR (a, IFR_DEFAULT_VALUE_DATA, Entry) to get the whole structure.
70 LIST_ENTRY Entry
; // Link to VarStorage Default Data
72 VARIABLE_STORE_HEADER
*VariableStorage
;
73 } VARSTORAGE_DEFAULT_DATA
;
76 LIST_ENTRY Entry
; // Link to VarStorage
81 LIST_ENTRY BlockEntry
; // Link to its Block array
82 } IFR_VARSTORAGE_DATA
;
85 LIST_ENTRY Entry
; // Link to Block array
90 EFI_QUESTION_ID QuestionId
;
93 LIST_ENTRY DefaultValueEntry
; // Link to its default value array
99 // Get default value from IFR data.
102 DefaultValueFromDefault
= 0, // Get from the minimum or first one when not set default value.
103 DefaultValueFromOtherDefault
, // Get default vale from other default when no default(When other
104 // defaults are more than one, use the default with smallest default id).
105 DefaultValueFromFlag
, // Get default value from the default flag.
106 DefaultValueFromOpcode
// Get default value from default opcode, highest priority.
107 } DEFAULT_VALUE_TYPE
;
111 DEFAULT_VALUE_TYPE Type
;
112 BOOLEAN Cleaned
; // Whether this value is cleaned
113 // TRUE Cleaned, the value can't be used
114 // FALSE Not cleaned, the value can be used.
116 EFI_IFR_TYPE_VALUE Value
;
122 #define EFI_HII_VARSTORE_BUFFER 0
123 #define EFI_HII_VARSTORE_NAME_VALUE 1
124 #define EFI_HII_VARSTORE_EFI_VARIABLE 2
125 #define EFI_HII_VARSTORE_EFI_VARIABLE_BUFFER 3
128 // Keyword handler protocol filter type.
130 #define EFI_KEYWORD_FILTER_READONY 0x01
131 #define EFI_KEYWORD_FILTER_REAWRITE 0x02
132 #define EFI_KEYWORD_FILTER_BUFFER 0x10
133 #define EFI_KEYWORD_FILTER_NUMERIC 0x20
134 #define EFI_KEYWORD_FILTER_NUMERIC_1 0x30
135 #define EFI_KEYWORD_FILTER_NUMERIC_2 0x40
136 #define EFI_KEYWORD_FILTER_NUMERIC_4 0x50
137 #define EFI_KEYWORD_FILTER_NUMERIC_8 0x60
140 #define HII_FORMSET_STORAGE_SIGNATURE SIGNATURE_32 ('H', 'S', 'T', 'G')
145 EFI_HII_HANDLE HiiHandle
;
146 EFI_HANDLE DriverHandle
;
148 UINT8 Type
; // EFI_HII_VARSTORE_BUFFER, EFI_HII_VARSTORE_NAME_VALUE, EFI_HII_VARSTORE_EFI_VARIABLE
152 } HII_FORMSET_STORAGE
;
156 // String Package definitions
158 #define HII_STRING_PACKAGE_SIGNATURE SIGNATURE_32 ('h','i','s','p')
159 typedef struct _HII_STRING_PACKAGE_INSTANCE
{
161 EFI_HII_STRING_PACKAGE_HDR
*StringPkgHdr
;
163 LIST_ENTRY StringEntry
;
164 LIST_ENTRY FontInfoList
; // local font info list
166 EFI_STRING_ID MaxStringId
; // record StringId
167 } HII_STRING_PACKAGE_INSTANCE
;
170 // Form Package definitions
172 #define HII_IFR_PACKAGE_SIGNATURE SIGNATURE_32 ('h','f','r','p')
173 typedef struct _HII_IFR_PACKAGE_INSTANCE
{
175 EFI_HII_PACKAGE_HEADER FormPkgHdr
;
178 } HII_IFR_PACKAGE_INSTANCE
;
181 // Simple Font Package definitions
183 #define HII_S_FONT_PACKAGE_SIGNATURE SIGNATURE_32 ('h','s','f','p')
184 typedef struct _HII_SIMPLE_FONT_PACKAGE_INSTANCE
{
186 EFI_HII_SIMPLE_FONT_PACKAGE_HDR
*SimpleFontPkgHdr
;
187 LIST_ENTRY SimpleFontEntry
;
188 } HII_SIMPLE_FONT_PACKAGE_INSTANCE
;
191 // Font Package definitions
193 #define HII_FONT_PACKAGE_SIGNATURE SIGNATURE_32 ('h','i','f','p')
194 typedef struct _HII_FONT_PACKAGE_INSTANCE
{
196 EFI_HII_FONT_PACKAGE_HDR
*FontPkgHdr
;
200 LIST_ENTRY FontEntry
;
201 LIST_ENTRY GlyphInfoList
;
202 } HII_FONT_PACKAGE_INSTANCE
;
204 #define HII_GLYPH_INFO_SIGNATURE SIGNATURE_32 ('h','g','i','s')
205 typedef struct _HII_GLYPH_INFO
{
209 EFI_HII_GLYPH_INFO Cell
;
212 #define HII_FONT_INFO_SIGNATURE SIGNATURE_32 ('h','l','f','i')
213 typedef struct _HII_FONT_INFO
{
216 LIST_ENTRY
*GlobalEntry
;
220 #define HII_GLOBAL_FONT_INFO_SIGNATURE SIGNATURE_32 ('h','g','f','i')
221 typedef struct _HII_GLOBAL_FONT_INFO
{
224 HII_FONT_PACKAGE_INSTANCE
*FontPackage
;
226 EFI_FONT_INFO
*FontInfo
;
227 } HII_GLOBAL_FONT_INFO
;
230 // Image Package definitions
233 #define HII_PIXEL_MASK 0x80
235 typedef struct _HII_IMAGE_PACKAGE_INSTANCE
{
236 EFI_HII_IMAGE_PACKAGE_HDR ImagePkgHdr
;
237 UINT32 ImageBlockSize
;
238 UINT32 PaletteInfoSize
;
239 EFI_HII_IMAGE_BLOCK
*ImageBlock
;
241 } HII_IMAGE_PACKAGE_INSTANCE
;
244 // Keyboard Layout Package definitions
246 #define HII_KB_LAYOUT_PACKAGE_SIGNATURE SIGNATURE_32 ('h','k','l','p')
247 typedef struct _HII_KEYBOARD_LAYOUT_PACKAGE_INSTANCE
{
250 LIST_ENTRY KeyboardEntry
;
251 } HII_KEYBOARD_LAYOUT_PACKAGE_INSTANCE
;
254 // Guid Package definitions
256 #define HII_GUID_PACKAGE_SIGNATURE SIGNATURE_32 ('h','i','g','p')
257 typedef struct _HII_GUID_PACKAGE_INSTANCE
{
260 LIST_ENTRY GuidEntry
;
261 } HII_GUID_PACKAGE_INSTANCE
;
264 // A package list can contain only one or less than one device path package.
265 // This rule also applies to image package since ImageId can not be duplicate.
267 typedef struct _HII_DATABASE_PACKAGE_LIST_INSTANCE
{
268 EFI_HII_PACKAGE_LIST_HEADER PackageListHdr
;
269 LIST_ENTRY GuidPkgHdr
;
270 LIST_ENTRY FormPkgHdr
;
271 LIST_ENTRY KeyboardLayoutHdr
;
272 LIST_ENTRY StringPkgHdr
;
273 LIST_ENTRY FontPkgHdr
;
274 HII_IMAGE_PACKAGE_INSTANCE
*ImagePkg
;
275 LIST_ENTRY SimpleFontPkgHdr
;
276 UINT8
*DevicePathPkg
;
277 } HII_DATABASE_PACKAGE_LIST_INSTANCE
;
279 #define HII_HANDLE_SIGNATURE SIGNATURE_32 ('h','i','h','l')
287 #define HII_DATABASE_RECORD_SIGNATURE SIGNATURE_32 ('h','i','d','r')
289 typedef struct _HII_DATABASE_RECORD
{
291 HII_DATABASE_PACKAGE_LIST_INSTANCE
*PackageList
;
292 EFI_HANDLE DriverHandle
;
293 EFI_HII_HANDLE Handle
;
294 LIST_ENTRY DatabaseEntry
;
295 } HII_DATABASE_RECORD
;
297 #define HII_DATABASE_NOTIFY_SIGNATURE SIGNATURE_32 ('h','i','d','n')
299 typedef struct _HII_DATABASE_NOTIFY
{
301 EFI_HANDLE NotifyHandle
;
303 EFI_GUID
*PackageGuid
;
304 EFI_HII_DATABASE_NOTIFY PackageNotifyFn
;
305 EFI_HII_DATABASE_NOTIFY_TYPE NotifyType
;
306 LIST_ENTRY DatabaseNotifyEntry
;
307 } HII_DATABASE_NOTIFY
;
309 #define HII_DATABASE_PRIVATE_DATA_SIGNATURE SIGNATURE_32 ('H', 'i', 'D', 'p')
311 typedef struct _HII_DATABASE_PRIVATE_DATA
{
313 LIST_ENTRY DatabaseList
;
314 LIST_ENTRY DatabaseNotifyList
;
315 EFI_HII_FONT_PROTOCOL HiiFont
;
316 EFI_HII_IMAGE_PROTOCOL HiiImage
;
317 EFI_HII_IMAGE_EX_PROTOCOL HiiImageEx
;
318 EFI_HII_STRING_PROTOCOL HiiString
;
319 EFI_HII_DATABASE_PROTOCOL HiiDatabase
;
320 EFI_HII_CONFIG_ROUTING_PROTOCOL ConfigRouting
;
321 EFI_CONFIG_KEYWORD_HANDLER_PROTOCOL ConfigKeywordHandler
;
322 LIST_ENTRY HiiHandleList
;
324 LIST_ENTRY FontInfoList
; // global font info list
325 UINTN Attribute
; // default system color
326 EFI_GUID CurrentLayoutGuid
;
327 EFI_HII_KEYBOARD_LAYOUT
*CurrentLayout
;
328 } HII_DATABASE_PRIVATE_DATA
;
330 #define HII_FONT_DATABASE_PRIVATE_DATA_FROM_THIS(a) \
332 HII_DATABASE_PRIVATE_DATA, \
334 HII_DATABASE_PRIVATE_DATA_SIGNATURE \
337 #define HII_IMAGE_DATABASE_PRIVATE_DATA_FROM_THIS(a) \
339 HII_DATABASE_PRIVATE_DATA, \
341 HII_DATABASE_PRIVATE_DATA_SIGNATURE \
344 #define HII_IMAGE_EX_DATABASE_PRIVATE_DATA_FROM_THIS(a) \
346 HII_DATABASE_PRIVATE_DATA, \
348 HII_DATABASE_PRIVATE_DATA_SIGNATURE \
351 #define HII_STRING_DATABASE_PRIVATE_DATA_FROM_THIS(a) \
353 HII_DATABASE_PRIVATE_DATA, \
355 HII_DATABASE_PRIVATE_DATA_SIGNATURE \
358 #define HII_DATABASE_DATABASE_PRIVATE_DATA_FROM_THIS(a) \
360 HII_DATABASE_PRIVATE_DATA, \
362 HII_DATABASE_PRIVATE_DATA_SIGNATURE \
365 #define CONFIG_ROUTING_DATABASE_PRIVATE_DATA_FROM_THIS(a) \
367 HII_DATABASE_PRIVATE_DATA, \
369 HII_DATABASE_PRIVATE_DATA_SIGNATURE \
372 #define CONFIG_KEYWORD_HANDLER_DATABASE_PRIVATE_DATA_FROM_THIS(a) \
374 HII_DATABASE_PRIVATE_DATA, \
375 ConfigKeywordHandler, \
376 HII_DATABASE_PRIVATE_DATA_SIGNATURE \
380 // Internal function prototypes.
384 Generate a sub string then output it.
386 This is a internal function.
388 @param String A constant string which is the prefix of the to be
389 generated string, e.g. GUID=
391 @param BufferLen The length of the Buffer in bytes.
393 @param Buffer Points to a buffer which will be converted to be the
394 content of the generated string.
396 @param Flag If 1, the buffer contains data for the value of GUID or PATH stored in
397 UINT8 *; if 2, the buffer contains unicode string for the value of NAME;
398 if 3, the buffer contains other data.
400 @param SubStr Points to the output string. It's caller's
401 responsibility to free this buffer.
407 IN CONST EFI_STRING String
,
411 OUT EFI_STRING
*SubStr
415 This function checks whether a handle is a valid EFI_HII_HANDLE.
417 @param Handle Pointer to a EFI_HII_HANDLE
420 @retval FALSE Invalid
425 EFI_HII_HANDLE Handle
430 This function checks whether EFI_FONT_INFO exists in current database. If
431 FontInfoMask is specified, check what options can be used to make a match.
432 Note that the masks relate to where the system default should be supplied
433 are ignored by this function.
435 @param Private Hii database private structure.
436 @param FontInfo Points to EFI_FONT_INFO structure.
437 @param FontInfoMask If not NULL, describes what options can be used
438 to make a match between the font requested and
439 the font available. The caller must guarantee
441 @param FontHandle On entry, Points to the font handle returned by a
442 previous call to GetFontInfo() or NULL to start
444 @param GlobalFontInfo If not NULL, output the corresponding global font
448 @retval FALSE Not existed
453 IN HII_DATABASE_PRIVATE_DATA
*Private
,
454 IN EFI_FONT_INFO
*FontInfo
,
455 IN EFI_FONT_INFO_MASK
*FontInfoMask
, OPTIONAL
456 IN EFI_FONT_HANDLE FontHandle
, OPTIONAL
457 OUT HII_GLOBAL_FONT_INFO
**GlobalFontInfo OPTIONAL
462 This function invokes the matching registered function.
464 @param Private HII Database driver private structure.
465 @param NotifyType The type of change concerning the database.
466 @param PackageInstance Points to the package referred to by the notification.
467 @param PackageType Package type
468 @param Handle The handle of the package list which contains the specified package.
470 @retval EFI_SUCCESS Already checked all registered function and invoked
472 @retval EFI_INVALID_PARAMETER Any input parameter is not valid.
476 InvokeRegisteredFunction (
477 IN HII_DATABASE_PRIVATE_DATA
*Private
,
478 IN EFI_HII_DATABASE_NOTIFY_TYPE NotifyType
,
479 IN VOID
*PackageInstance
,
480 IN UINT8 PackageType
,
481 IN EFI_HII_HANDLE Handle
486 Retrieve system default font and color.
488 @param Private HII database driver private data.
489 @param FontInfo Points to system default font output-related
490 information. It's caller's responsibility to free
492 @param FontInfoSize If not NULL, output the size of buffer FontInfo.
494 @retval EFI_SUCCESS Cell information is added to the GlyphInfoList.
495 @retval EFI_OUT_OF_RESOURCES The system is out of resources to accomplish the
497 @retval EFI_INVALID_PARAMETER Any input parameter is invalid.
502 IN HII_DATABASE_PRIVATE_DATA
*Private
,
503 OUT EFI_FONT_DISPLAY_INFO
**FontInfo
,
504 OUT UINTN
*FontInfoSize OPTIONAL
509 Parse all string blocks to find a String block specified by StringId.
510 If StringId = (EFI_STRING_ID) (-1), find out all EFI_HII_SIBT_FONT blocks
511 within this string package and backup its information. If LastStringId is
512 specified, the string id of last string block will also be output.
513 If StringId = 0, output the string id of last string block (EFI_HII_SIBT_STRING).
515 @param Private Hii database private structure.
516 @param StringPackage Hii string package instance.
517 @param StringId The string's id, which is unique within
519 @param BlockType Output the block type of found string block.
520 @param StringBlockAddr Output the block address of found string block.
521 @param StringTextOffset Offset, relative to the found block address, of
522 the string text information.
523 @param LastStringId Output the last string id when StringId = 0 or StringId = -1.
524 @param StartStringId The first id in the skip block which StringId in the block.
526 @retval EFI_SUCCESS The string text and font is retrieved
528 @retval EFI_NOT_FOUND The specified text or font info can not be found
530 @retval EFI_OUT_OF_RESOURCES The system is out of resources to accomplish the
536 IN HII_DATABASE_PRIVATE_DATA
*Private
,
537 IN HII_STRING_PACKAGE_INSTANCE
*StringPackage
,
538 IN EFI_STRING_ID StringId
,
539 OUT UINT8
*BlockType
, OPTIONAL
540 OUT UINT8
**StringBlockAddr
, OPTIONAL
541 OUT UINTN
*StringTextOffset
, OPTIONAL
542 OUT EFI_STRING_ID
*LastStringId
, OPTIONAL
543 OUT EFI_STRING_ID
*StartStringId OPTIONAL
548 Parse all glyph blocks to find a glyph block specified by CharValue.
549 If CharValue = (CHAR16) (-1), collect all default character cell information
550 within this font package and backup its information.
552 @param FontPackage Hii string package instance.
553 @param CharValue Unicode character value, which identifies a glyph
555 @param GlyphBuffer Output the corresponding bitmap data of the found
556 block. It is the caller's responsibility to free
558 @param Cell Output cell information of the encoded bitmap.
559 @param GlyphBufferLen If not NULL, output the length of GlyphBuffer.
561 @retval EFI_SUCCESS The bitmap data is retrieved successfully.
562 @retval EFI_NOT_FOUND The specified CharValue does not exist in current
564 @retval EFI_OUT_OF_RESOURCES The system is out of resources to accomplish the
570 IN HII_FONT_PACKAGE_INSTANCE
*FontPackage
,
572 OUT UINT8
**GlyphBuffer
, OPTIONAL
573 OUT EFI_HII_GLYPH_INFO
*Cell
, OPTIONAL
574 OUT UINTN
*GlyphBufferLen OPTIONAL
578 This function exports Form packages to a buffer.
579 This is a internal function.
581 @param Private Hii database private structure.
582 @param Handle Identification of a package list.
583 @param PackageList Pointer to a package list which will be exported.
584 @param UsedSize The length of buffer be used.
585 @param BufferSize Length of the Buffer.
586 @param Buffer Allocated space for storing exported data.
587 @param ResultSize The size of the already exported content of this
590 @retval EFI_SUCCESS Form Packages are exported successfully.
591 @retval EFI_INVALID_PARAMETER Any input parameter is invalid.
596 IN HII_DATABASE_PRIVATE_DATA
*Private
,
597 IN EFI_HII_HANDLE Handle
,
598 IN HII_DATABASE_PACKAGE_LIST_INSTANCE
*PackageList
,
602 IN OUT UINTN
*ResultSize
606 // EFI_HII_FONT_PROTOCOL protocol interfaces
611 Renders a string to a bitmap or to the display.
613 @param This A pointer to the EFI_HII_FONT_PROTOCOL instance.
614 @param Flags Describes how the string is to be drawn.
615 @param String Points to the null-terminated string to be
617 @param StringInfo Points to the string output information,
618 including the color and font. If NULL, then the
619 string will be output in the default system font
621 @param Blt If this points to a non-NULL on entry, this
622 points to the image, which is Width pixels wide
623 and Height pixels high. The string will be drawn
625 EFI_HII_OUT_FLAG_CLIP is implied. If this points
626 to a NULL on entry, then a buffer
627 will be allocated to hold the generated image and
628 the pointer updated on exit. It is the caller's
629 responsibility to free this buffer.
630 @param BltX Together with BltX, Specifies the offset from the left and top edge
631 of the image of the first character cell in the
633 @param BltY Together with BltY, Specifies the offset from the left and top edge
634 of the image of the first character cell in the
636 @param RowInfoArray If this is non-NULL on entry, then on exit, this
637 will point to an allocated buffer containing
638 row information and RowInfoArraySize will be
639 updated to contain the number of elements.
640 This array describes the characters which were at
641 least partially drawn and the heights of the
642 rows. It is the caller's responsibility to free
644 @param RowInfoArraySize If this is non-NULL on entry, then on exit it
645 contains the number of elements in RowInfoArray.
646 @param ColumnInfoArray If this is non-NULL, then on return it will be
647 filled with the horizontal offset for each
648 character in the string on the row where it is
649 displayed. Non-printing characters will have
650 the offset ~0. The caller is responsible to
651 allocate a buffer large enough so that there
652 is one entry for each character in the string,
653 not including the null-terminator. It is possible
654 when character display is normalized that some
655 character cells overlap.
657 @retval EFI_SUCCESS The string was successfully rendered.
658 @retval EFI_OUT_OF_RESOURCES Unable to allocate an output buffer for
660 @retval EFI_INVALID_PARAMETER The String or Blt.
661 @retval EFI_INVALID_PARAMETER Flags were invalid combination..
667 IN CONST EFI_HII_FONT_PROTOCOL
*This
,
668 IN EFI_HII_OUT_FLAGS Flags
,
669 IN CONST EFI_STRING String
,
670 IN CONST EFI_FONT_DISPLAY_INFO
*StringInfo OPTIONAL
,
671 IN OUT EFI_IMAGE_OUTPUT
**Blt
,
674 OUT EFI_HII_ROW_INFO
**RowInfoArray OPTIONAL
,
675 OUT UINTN
*RowInfoArraySize OPTIONAL
,
676 OUT UINTN
*ColumnInfoArray OPTIONAL
681 Render a string to a bitmap or the screen containing the contents of the specified string.
683 @param This A pointer to the EFI_HII_FONT_PROTOCOL instance.
684 @param Flags Describes how the string is to be drawn.
685 @param PackageList The package list in the HII database to search
686 for the specified string.
687 @param StringId The string's id, which is unique within
689 @param Language Points to the language for the retrieved string.
690 If NULL, then the current system language is
692 @param StringInfo Points to the string output information,
693 including the color and font. If NULL, then the
694 string will be output in the default system font
696 @param Blt If this points to a non-NULL on entry, this
697 points to the image, which is Width pixels wide
698 and Height pixels high. The string will be drawn
700 EFI_HII_OUT_FLAG_CLIP is implied. If this points
701 to a NULL on entry, then a buffer
702 will be allocated to hold the generated image and
703 the pointer updated on exit. It is the caller's
704 responsibility to free this buffer.
705 @param BltX Together with BltX, Specifies the offset from the left and top edge
706 of the image of the first character cell in the
708 @param BltY Together with BltY, Specifies the offset from the left and top edge
709 of the image of the first character cell in the
711 @param RowInfoArray If this is non-NULL on entry, then on exit, this
712 will point to an allocated buffer containing
713 row information and RowInfoArraySize will be
714 updated to contain the number of elements.
715 This array describes the characters which were at
716 least partially drawn and the heights of the
717 rows. It is the caller's responsibility to free
719 @param RowInfoArraySize If this is non-NULL on entry, then on exit it
720 contains the number of elements in RowInfoArray.
721 @param ColumnInfoArray If this is non-NULL, then on return it will be
722 filled with the horizontal offset for each
723 character in the string on the row where it is
724 displayed. Non-printing characters will have
725 the offset ~0. The caller is responsible to
726 allocate a buffer large enough so that there
727 is one entry for each character in the string,
728 not including the null-terminator. It is possible
729 when character display is normalized that some
730 character cells overlap.
732 @retval EFI_SUCCESS The string was successfully rendered.
733 @retval EFI_OUT_OF_RESOURCES Unable to allocate an output buffer for
735 @retval EFI_INVALID_PARAMETER The Blt or PackageList was NULL.
736 @retval EFI_INVALID_PARAMETER Flags were invalid combination.
737 @retval EFI_NOT_FOUND The specified PackageList is not in the Database or the stringid is not
738 in the specified PackageList.
744 IN CONST EFI_HII_FONT_PROTOCOL
*This
,
745 IN EFI_HII_OUT_FLAGS Flags
,
746 IN EFI_HII_HANDLE PackageList
,
747 IN EFI_STRING_ID StringId
,
748 IN CONST CHAR8
* Language
,
749 IN CONST EFI_FONT_DISPLAY_INFO
*StringInfo OPTIONAL
,
750 IN OUT EFI_IMAGE_OUTPUT
**Blt
,
753 OUT EFI_HII_ROW_INFO
**RowInfoArray OPTIONAL
,
754 OUT UINTN
*RowInfoArraySize OPTIONAL
,
755 OUT UINTN
*ColumnInfoArray OPTIONAL
760 Convert the glyph for a single character into a bitmap.
762 @param This A pointer to the EFI_HII_FONT_PROTOCOL instance.
763 @param Char Character to retrieve.
764 @param StringInfo Points to the string font and color information
765 or NULL if the string should use the default
766 system font and color.
767 @param Blt Thus must point to a NULL on entry. A buffer will
768 be allocated to hold the output and the pointer
769 updated on exit. It is the caller's
770 responsibility to free this buffer.
771 @param Baseline Number of pixels from the bottom of the bitmap to
774 @retval EFI_SUCCESS Glyph bitmap created.
775 @retval EFI_OUT_OF_RESOURCES Unable to allocate the output buffer Blt.
776 @retval EFI_WARN_UNKNOWN_GLYPH The glyph was unknown and was replaced with the
777 glyph for Unicode character 0xFFFD.
778 @retval EFI_INVALID_PARAMETER Blt is NULL or *Blt is not NULL.
784 IN CONST EFI_HII_FONT_PROTOCOL
*This
,
786 IN CONST EFI_FONT_DISPLAY_INFO
*StringInfo
,
787 OUT EFI_IMAGE_OUTPUT
**Blt
,
788 OUT UINTN
*Baseline OPTIONAL
793 This function iterates through fonts which match the specified font, using
794 the specified criteria. If String is non-NULL, then all of the characters in
795 the string must exist in order for a candidate font to be returned.
797 @param This A pointer to the EFI_HII_FONT_PROTOCOL instance.
798 @param FontHandle On entry, points to the font handle returned by a
799 previous call to GetFontInfo() or NULL to start
800 with the first font. On return, points to the
801 returned font handle or points to NULL if there
802 are no more matching fonts.
803 @param StringInfoIn Upon entry, points to the font to return information
804 about. If NULL, then the information about the system
805 default font will be returned.
806 @param StringInfoOut Upon return, contains the matching font's information.
807 If NULL, then no information is returned. This buffer
808 is allocated with a call to the Boot Service AllocatePool().
809 It is the caller's responsibility to call the Boot
810 Service FreePool() when the caller no longer requires
811 the contents of StringInfoOut.
812 @param String Points to the string which will be tested to
813 determine if all characters are available. If
814 NULL, then any font is acceptable.
816 @retval EFI_SUCCESS Matching font returned successfully.
817 @retval EFI_NOT_FOUND No matching font was found.
818 @retval EFI_INVALID_PARAMETER StringInfoIn is NULL.
819 @retval EFI_INVALID_PARAMETER StringInfoIn->FontInfoMask is an invalid combination.
820 @retval EFI_OUT_OF_RESOURCES There were insufficient resources to complete the
826 IN CONST EFI_HII_FONT_PROTOCOL
*This
,
827 IN OUT EFI_FONT_HANDLE
*FontHandle
,
828 IN CONST EFI_FONT_DISPLAY_INFO
*StringInfoIn
, OPTIONAL
829 OUT EFI_FONT_DISPLAY_INFO
**StringInfoOut
,
830 IN CONST EFI_STRING String OPTIONAL
834 // EFI_HII_IMAGE_PROTOCOL interfaces
838 Get the image id of last image block: EFI_HII_IIBT_END_BLOCK when input
839 ImageId is zero, otherwise return the address of the
840 corresponding image block with identifier specified by ImageId.
842 This is a internal function.
844 @param ImageBlocks Points to the beginning of a series of image blocks stored in order.
845 @param ImageId If input ImageId is 0, output the image id of the EFI_HII_IIBT_END_BLOCK;
846 else use this id to find its corresponding image block address.
848 @return The image block address when input ImageId is not zero; otherwise return NULL.
851 EFI_HII_IMAGE_BLOCK
*
852 GetImageIdOrAddress (
853 IN EFI_HII_IMAGE_BLOCK
*ImageBlocks
,
854 IN OUT EFI_IMAGE_ID
*ImageId
858 Return the HII package list identified by PackageList HII handle.
860 @param Database Pointer to HII database list header.
861 @param PackageList HII handle of the package list to locate.
863 @retval The HII package list instance.
865 HII_DATABASE_PACKAGE_LIST_INSTANCE
*
867 IN LIST_ENTRY
*Database
,
868 IN EFI_HII_HANDLE PackageList
872 This function retrieves the image specified by ImageId which is associated with
873 the specified PackageList and copies it into the buffer specified by Image.
875 @param Database A pointer to the database list header.
876 @param PackageList Handle of the package list where this image will
878 @param ImageId The image's id,, which is unique within
880 @param Image Points to the image.
881 @param BitmapOnly TRUE to only return the bitmap type image.
882 FALSE to locate image decoder instance to decode image.
884 @retval EFI_SUCCESS The new image was returned successfully.
885 @retval EFI_NOT_FOUND The image specified by ImageId is not in the
886 database. The specified PackageList is not in the database.
887 @retval EFI_BUFFER_TOO_SMALL The buffer specified by ImageSize is too small to
889 @retval EFI_INVALID_PARAMETER The Image or ImageSize was NULL.
890 @retval EFI_OUT_OF_RESOURCES The bitmap could not be retrieved because there was not
895 IN LIST_ENTRY
*Database
,
896 IN EFI_HII_HANDLE PackageList
,
897 IN EFI_IMAGE_ID ImageId
,
898 OUT EFI_IMAGE_INPUT
*Image
,
899 IN BOOLEAN BitmapOnly
903 Return the first HII image decoder instance which supports the DecoderName.
905 @param BlockType The image block type.
907 @retval Pointer to the HII image decoder instance.
909 EFI_HII_IMAGE_DECODER_PROTOCOL
*
910 LocateHiiImageDecoder (
915 This function adds the image Image to the group of images owned by PackageList, and returns
916 a new image identifier (ImageId).
918 @param This A pointer to the EFI_HII_IMAGE_PROTOCOL instance.
919 @param PackageList Handle of the package list where this image will
921 @param ImageId On return, contains the new image id, which is
922 unique within PackageList.
923 @param Image Points to the image.
925 @retval EFI_SUCCESS The new image was added successfully.
926 @retval EFI_NOT_FOUND The specified PackageList could not be found in
928 @retval EFI_OUT_OF_RESOURCES Could not add the image due to lack of resources.
929 @retval EFI_INVALID_PARAMETER Image is NULL or ImageId is NULL.
935 IN CONST EFI_HII_IMAGE_PROTOCOL
*This
,
936 IN EFI_HII_HANDLE PackageList
,
937 OUT EFI_IMAGE_ID
*ImageId
,
938 IN CONST EFI_IMAGE_INPUT
*Image
943 This function retrieves the image specified by ImageId which is associated with
944 the specified PackageList and copies it into the buffer specified by Image.
946 @param This A pointer to the EFI_HII_IMAGE_PROTOCOL instance.
947 @param PackageList Handle of the package list where this image will
949 @param ImageId The image's id,, which is unique within
951 @param Image Points to the image.
953 @retval EFI_SUCCESS The new image was returned successfully.
954 @retval EFI_NOT_FOUND The image specified by ImageId is not available.
955 The specified PackageList is not in the database.
956 @retval EFI_BUFFER_TOO_SMALL The buffer specified by ImageSize is too small to
958 @retval EFI_INVALID_PARAMETER The Image or ImageSize was NULL.
959 @retval EFI_OUT_OF_RESOURCES The bitmap could not be retrieved because there was not
966 IN CONST EFI_HII_IMAGE_PROTOCOL
*This
,
967 IN EFI_HII_HANDLE PackageList
,
968 IN EFI_IMAGE_ID ImageId
,
969 OUT EFI_IMAGE_INPUT
*Image
974 This function updates the image specified by ImageId in the specified PackageListHandle to
975 the image specified by Image.
977 @param This A pointer to the EFI_HII_IMAGE_PROTOCOL instance.
978 @param PackageList The package list containing the images.
979 @param ImageId The image's id,, which is unique within
981 @param Image Points to the image.
983 @retval EFI_SUCCESS The new image was updated successfully.
984 @retval EFI_NOT_FOUND The image specified by ImageId is not in the
985 database. The specified PackageList is not in the database.
986 @retval EFI_INVALID_PARAMETER The Image was NULL.
992 IN CONST EFI_HII_IMAGE_PROTOCOL
*This
,
993 IN EFI_HII_HANDLE PackageList
,
994 IN EFI_IMAGE_ID ImageId
,
995 IN CONST EFI_IMAGE_INPUT
*Image
1000 This function renders an image to a bitmap or the screen using the specified
1001 color and options. It draws the image on an existing bitmap, allocates a new
1002 bitmap or uses the screen. The images can be clipped.
1004 @param This A pointer to the EFI_HII_IMAGE_PROTOCOL instance.
1005 @param Flags Describes how the image is to be drawn.
1006 @param Image Points to the image to be displayed.
1007 @param Blt If this points to a non-NULL on entry, this
1008 points to the image, which is Width pixels wide
1009 and Height pixels high. The image will be drawn
1010 onto this image and EFI_HII_DRAW_FLAG_CLIP is
1011 implied. If this points to a NULL on entry, then
1012 a buffer will be allocated to hold the generated
1013 image and the pointer updated on exit. It is the
1014 caller's responsibility to free this buffer.
1015 @param BltX Specifies the offset from the left and top edge
1016 of the output image of the first pixel in the
1018 @param BltY Specifies the offset from the left and top edge
1019 of the output image of the first pixel in the
1022 @retval EFI_SUCCESS The image was successfully drawn.
1023 @retval EFI_OUT_OF_RESOURCES Unable to allocate an output buffer for Blt.
1024 @retval EFI_INVALID_PARAMETER The Image or Blt was NULL.
1025 @retval EFI_INVALID_PARAMETER Any combination of Flags is invalid.
1031 IN CONST EFI_HII_IMAGE_PROTOCOL
*This
,
1032 IN EFI_HII_DRAW_FLAGS Flags
,
1033 IN CONST EFI_IMAGE_INPUT
*Image
,
1034 IN OUT EFI_IMAGE_OUTPUT
**Blt
,
1041 This function renders an image to a bitmap or the screen using the specified
1042 color and options. It draws the image on an existing bitmap, allocates a new
1043 bitmap or uses the screen. The images can be clipped.
1045 @param This A pointer to the EFI_HII_IMAGE_PROTOCOL instance.
1046 @param Flags Describes how the image is to be drawn.
1047 @param PackageList The package list in the HII database to search
1048 for the specified image.
1049 @param ImageId The image's id, which is unique within
1051 @param Blt If this points to a non-NULL on entry, this
1052 points to the image, which is Width pixels wide
1053 and Height pixels high. The image will be drawn
1055 EFI_HII_DRAW_FLAG_CLIP is implied. If this points
1056 to a NULL on entry, then a buffer will be
1057 allocated to hold the generated image and the
1058 pointer updated on exit. It is the caller's
1059 responsibility to free this buffer.
1060 @param BltX Specifies the offset from the left and top edge
1061 of the output image of the first pixel in the
1063 @param BltY Specifies the offset from the left and top edge
1064 of the output image of the first pixel in the
1067 @retval EFI_SUCCESS The image was successfully drawn.
1068 @retval EFI_OUT_OF_RESOURCES Unable to allocate an output buffer for Blt.
1069 @retval EFI_INVALID_PARAMETER The Blt was NULL.
1070 @retval EFI_NOT_FOUND The image specified by ImageId is not in the database.
1071 The specified PackageList is not in the database.
1077 IN CONST EFI_HII_IMAGE_PROTOCOL
*This
,
1078 IN EFI_HII_DRAW_FLAGS Flags
,
1079 IN EFI_HII_HANDLE PackageList
,
1080 IN EFI_IMAGE_ID ImageId
,
1081 IN OUT EFI_IMAGE_OUTPUT
**Blt
,
1087 The prototype of this extension function is the same with EFI_HII_IMAGE_PROTOCOL.NewImage().
1088 This protocol invokes EFI_HII_IMAGE_PROTOCOL.NewImage() implicitly.
1090 @param This A pointer to the EFI_HII_IMAGE_EX_PROTOCOL instance.
1091 @param PackageList Handle of the package list where this image will
1093 @param ImageId On return, contains the new image id, which is
1094 unique within PackageList.
1095 @param Image Points to the image.
1097 @retval EFI_SUCCESS The new image was added successfully.
1098 @retval EFI_NOT_FOUND The PackageList could not be found.
1099 @retval EFI_OUT_OF_RESOURCES Could not add the image due to lack of resources.
1100 @retval EFI_INVALID_PARAMETER Image is NULL or ImageId is NULL.
1105 IN CONST EFI_HII_IMAGE_EX_PROTOCOL
*This
,
1106 IN EFI_HII_HANDLE PackageList
,
1107 OUT EFI_IMAGE_ID
*ImageId
,
1108 IN CONST EFI_IMAGE_INPUT
*Image
1112 Return the information about the image, associated with the package list.
1113 The prototype of this extension function is the same with EFI_HII_IMAGE_PROTOCOL.GetImage().
1115 This function is similar to EFI_HII_IMAGE_PROTOCOL.GetImage(). The difference is that
1116 this function will locate all EFI_HII_IMAGE_DECODER_PROTOCOL instances installed in the
1117 system if the decoder of the certain image type is not supported by the
1118 EFI_HII_IMAGE_EX_PROTOCOL. The function will attempt to decode the image to the
1119 EFI_IMAGE_INPUT using the first EFI_HII_IMAGE_DECODER_PROTOCOL instance that
1120 supports the requested image type.
1122 @param This A pointer to the EFI_HII_IMAGE_EX_PROTOCOL instance.
1123 @param PackageList The package list in the HII database to search for the
1125 @param ImageId The image's id, which is unique within PackageList.
1126 @param Image Points to the image.
1128 @retval EFI_SUCCESS The new image was returned successfully.
1129 @retval EFI_NOT_FOUND The image specified by ImageId is not available. The specified
1130 PackageList is not in the Database.
1131 @retval EFI_INVALID_PARAMETER Image was NULL or ImageId was 0.
1132 @retval EFI_OUT_OF_RESOURCES The bitmap could not be retrieved because there
1133 was not enough memory.
1139 IN CONST EFI_HII_IMAGE_EX_PROTOCOL
*This
,
1140 IN EFI_HII_HANDLE PackageList
,
1141 IN EFI_IMAGE_ID ImageId
,
1142 OUT EFI_IMAGE_INPUT
*Image
1146 Change the information about the image.
1148 Same with EFI_HII_IMAGE_PROTOCOL.SetImage(), this protocol invokes
1149 EFI_HII_IMAGE_PROTOCOL.SetImage()implicitly.
1151 @param This A pointer to the EFI_HII_IMAGE_EX_PROTOCOL instance.
1152 @param PackageList The package list containing the images.
1153 @param ImageId The image's id, which is unique within PackageList.
1154 @param Image Points to the image.
1156 @retval EFI_SUCCESS The new image was successfully updated.
1157 @retval EFI_NOT_FOUND The image specified by ImageId is not in the
1158 database. The specified PackageList is not in
1160 @retval EFI_INVALID_PARAMETER The Image was NULL, the ImageId was 0 or
1161 the Image->Bitmap was NULL.
1167 IN CONST EFI_HII_IMAGE_EX_PROTOCOL
*This
,
1168 IN EFI_HII_HANDLE PackageList
,
1169 IN EFI_IMAGE_ID ImageId
,
1170 IN CONST EFI_IMAGE_INPUT
*Image
1174 Renders an image to a bitmap or to the display.
1176 The prototype of this extension function is the same with
1177 EFI_HII_IMAGE_PROTOCOL.DrawImage(). This protocol invokes
1178 EFI_HII_IMAGE_PROTOCOL.DrawImage() implicitly.
1180 @param This A pointer to the EFI_HII_IMAGE_EX_PROTOCOL instance.
1181 @param Flags Describes how the image is to be drawn.
1182 @param Image Points to the image to be displayed.
1183 @param Blt If this points to a non-NULL on entry, this points
1184 to the image, which is Width pixels wide and
1185 Height pixels high. The image will be drawn onto
1186 this image and EFI_HII_DRAW_FLAG_CLIP is implied.
1187 If this points to a NULL on entry, then a buffer
1188 will be allocated to hold the generated image and
1189 the pointer updated on exit. It is the caller's
1190 responsibility to free this buffer.
1191 @param BltX Specifies the offset from the left and top edge of
1192 the output image of the first pixel in the image.
1193 @param BltY Specifies the offset from the left and top edge of
1194 the output image of the first pixel in the image.
1196 @retval EFI_SUCCESS The image was successfully drawn.
1197 @retval EFI_OUT_OF_RESOURCES Unable to allocate an output buffer for Blt.
1198 @retval EFI_INVALID_PARAMETER The Image or Blt was NULL.
1204 IN CONST EFI_HII_IMAGE_EX_PROTOCOL
*This
,
1205 IN EFI_HII_DRAW_FLAGS Flags
,
1206 IN CONST EFI_IMAGE_INPUT
*Image
,
1207 IN OUT EFI_IMAGE_OUTPUT
**Blt
,
1213 Renders an image to a bitmap or the screen containing the contents of the specified
1216 This function is similar to EFI_HII_IMAGE_PROTOCOL.DrawImageId(). The difference is that
1217 this function will locate all EFI_HII_IMAGE_DECODER_PROTOCOL instances installed in the
1218 system if the decoder of the certain image type is not supported by the
1219 EFI_HII_IMAGE_EX_PROTOCOL. The function will attempt to decode the image to the
1220 EFI_IMAGE_INPUT using the first EFI_HII_IMAGE_DECODER_PROTOCOL instance that
1221 supports the requested image type.
1223 @param This A pointer to the EFI_HII_IMAGE_EX_PROTOCOL instance.
1224 @param Flags Describes how the image is to be drawn.
1225 @param PackageList The package list in the HII database to search for
1226 the specified image.
1227 @param ImageId The image's id, which is unique within PackageList.
1228 @param Blt If this points to a non-NULL on entry, this points
1229 to the image, which is Width pixels wide and
1230 Height pixels high. The image will be drawn onto
1231 this image and EFI_HII_DRAW_FLAG_CLIP is implied.
1232 If this points to a NULL on entry, then a buffer
1233 will be allocated to hold the generated image
1234 and the pointer updated on exit. It is the caller's
1235 responsibility to free this buffer.
1236 @param BltX Specifies the offset from the left and top edge of
1237 the output image of the first pixel in the image.
1238 @param BltY Specifies the offset from the left and top edge of
1239 the output image of the first pixel in the image.
1241 @retval EFI_SUCCESS The image was successfully drawn.
1242 @retval EFI_OUT_OF_RESOURCES Unable to allocate an output buffer for Blt.
1243 @retval EFI_INVALID_PARAMETER The Blt was NULL or ImageId was 0.
1244 @retval EFI_NOT_FOUND The image specified by ImageId is not in the database.
1245 The specified PackageList is not in the database.
1251 IN CONST EFI_HII_IMAGE_EX_PROTOCOL
*This
,
1252 IN EFI_HII_DRAW_FLAGS Flags
,
1253 IN EFI_HII_HANDLE PackageList
,
1254 IN EFI_IMAGE_ID ImageId
,
1255 IN OUT EFI_IMAGE_OUTPUT
**Blt
,
1261 This function returns the image information to EFI_IMAGE_OUTPUT. Only the width
1262 and height are returned to the EFI_IMAGE_OUTPUT instead of decoding the image
1263 to the buffer. This function is used to get the geometry of the image. This function
1264 will try to locate all of the EFI_HII_IMAGE_DECODER_PROTOCOL installed on the
1265 system if the decoder of image type is not supported by the EFI_HII_IMAGE_EX_PROTOCOL.
1267 @param This A pointer to the EFI_HII_IMAGE_EX_PROTOCOL instance.
1268 @param PackageList Handle of the package list where this image will
1270 @param ImageId The image's id, which is unique within PackageList.
1271 @param Image Points to the image.
1273 @retval EFI_SUCCESS The new image was returned successfully.
1274 @retval EFI_NOT_FOUND The image specified by ImageId is not in the
1275 database. The specified PackageList is not in the database.
1276 @retval EFI_BUFFER_TOO_SMALL The buffer specified by ImageSize is too small to
1278 @retval EFI_INVALID_PARAMETER The Image was NULL or the ImageId was 0.
1279 @retval EFI_OUT_OF_RESOURCES The bitmap could not be retrieved because there
1280 was not enough memory.
1286 IN CONST EFI_HII_IMAGE_EX_PROTOCOL
*This
,
1287 IN EFI_HII_HANDLE PackageList
,
1288 IN EFI_IMAGE_ID ImageId
,
1289 OUT EFI_IMAGE_OUTPUT
*Image
1292 // EFI_HII_STRING_PROTOCOL
1297 This function adds the string String to the group of strings owned by PackageList, with the
1298 specified font information StringFontInfo and returns a new string id.
1300 @param This A pointer to the EFI_HII_STRING_PROTOCOL
1302 @param PackageList Handle of the package list where this string will
1304 @param StringId On return, contains the new strings id, which is
1305 unique within PackageList.
1306 @param Language Points to the language for the new string.
1307 @param LanguageName Points to the printable language name to
1308 associate with the passed in Language field.If
1309 LanguageName is not NULL and the string package
1310 header's LanguageName associated with a given
1311 Language is not zero, the LanguageName being
1312 passed in will be ignored.
1313 @param String Points to the new null-terminated string.
1314 @param StringFontInfo Points to the new string's font information or
1315 NULL if the string should have the default system
1316 font, size and style.
1318 @retval EFI_SUCCESS The new string was added successfully.
1319 @retval EFI_NOT_FOUND The specified PackageList could not be found in
1321 @retval EFI_OUT_OF_RESOURCES Could not add the string due to lack of
1323 @retval EFI_INVALID_PARAMETER String is NULL or StringId is NULL or Language is
1330 IN CONST EFI_HII_STRING_PROTOCOL
*This
,
1331 IN EFI_HII_HANDLE PackageList
,
1332 OUT EFI_STRING_ID
*StringId
,
1333 IN CONST CHAR8
*Language
,
1334 IN CONST CHAR16
*LanguageName
, OPTIONAL
1335 IN CONST EFI_STRING String
,
1336 IN CONST EFI_FONT_INFO
*StringFontInfo OPTIONAL
1341 This function retrieves the string specified by StringId which is associated
1342 with the specified PackageList in the language Language and copies it into
1343 the buffer specified by String.
1345 @param This A pointer to the EFI_HII_STRING_PROTOCOL
1347 @param Language Points to the language for the retrieved string.
1348 @param PackageList The package list in the HII database to search
1349 for the specified string.
1350 @param StringId The string's id, which is unique within
1352 @param String Points to the new null-terminated string.
1353 @param StringSize On entry, points to the size of the buffer
1354 pointed to by String, in bytes. On return,
1355 points to the length of the string, in bytes.
1356 @param StringFontInfo If not NULL, points to the string's font
1357 information. It's caller's responsibility to
1360 @retval EFI_SUCCESS The string was returned successfully.
1361 @retval EFI_NOT_FOUND The string specified by StringId is not
1363 The specified PackageList is not in the database.
1364 @retval EFI_INVALID_LANGUAGE The string specified by StringId is available but
1365 not in the specified language.
1366 @retval EFI_BUFFER_TOO_SMALL The buffer specified by StringSize is too small
1368 @retval EFI_INVALID_PARAMETER The Language or StringSize was NULL.
1369 @retval EFI_INVALID_PARAMETER The value referenced by StringSize was not zero
1370 and String was NULL.
1371 @retval EFI_OUT_OF_RESOURCES There were insufficient resources to complete the
1378 IN CONST EFI_HII_STRING_PROTOCOL
*This
,
1379 IN CONST CHAR8
*Language
,
1380 IN EFI_HII_HANDLE PackageList
,
1381 IN EFI_STRING_ID StringId
,
1382 OUT EFI_STRING String
,
1383 IN OUT UINTN
*StringSize
,
1384 OUT EFI_FONT_INFO
**StringFontInfo OPTIONAL
1389 This function updates the string specified by StringId in the specified PackageList to the text
1390 specified by String and, optionally, the font information specified by StringFontInfo.
1392 @param This A pointer to the EFI_HII_STRING_PROTOCOL
1394 @param PackageList The package list containing the strings.
1395 @param StringId The string's id, which is unique within
1397 @param Language Points to the language for the updated string.
1398 @param String Points to the new null-terminated string.
1399 @param StringFontInfo Points to the string's font information or NULL
1400 if the string font information is not changed.
1402 @retval EFI_SUCCESS The string was updated successfully.
1403 @retval EFI_NOT_FOUND The string specified by StringId is not in the
1405 @retval EFI_INVALID_PARAMETER The String or Language was NULL.
1406 @retval EFI_OUT_OF_RESOURCES The system is out of resources to accomplish the
1413 IN CONST EFI_HII_STRING_PROTOCOL
*This
,
1414 IN EFI_HII_HANDLE PackageList
,
1415 IN EFI_STRING_ID StringId
,
1416 IN CONST CHAR8
*Language
,
1417 IN CONST EFI_STRING String
,
1418 IN CONST EFI_FONT_INFO
*StringFontInfo OPTIONAL
1423 This function returns the list of supported languages, in the format specified
1424 in Appendix M of UEFI 2.1 spec.
1426 @param This A pointer to the EFI_HII_STRING_PROTOCOL
1428 @param PackageList The package list to examine.
1429 @param Languages Points to the buffer to hold the returned
1430 null-terminated ASCII string.
1431 @param LanguagesSize On entry, points to the size of the buffer
1432 pointed to by Languages, in bytes. On return,
1433 points to the length of Languages, in bytes.
1435 @retval EFI_SUCCESS The languages were returned successfully.
1436 @retval EFI_INVALID_PARAMETER The LanguagesSize was NULL.
1437 @retval EFI_INVALID_PARAMETER The value referenced by LanguagesSize is not zero and Languages is NULL.
1438 @retval EFI_BUFFER_TOO_SMALL The LanguagesSize is too small to hold the list
1439 of supported languages. LanguageSize is updated
1440 to contain the required size.
1441 @retval EFI_NOT_FOUND Could not find string package in specified
1448 IN CONST EFI_HII_STRING_PROTOCOL
*This
,
1449 IN EFI_HII_HANDLE PackageList
,
1450 IN OUT CHAR8
*Languages
,
1451 IN OUT UINTN
*LanguagesSize
1456 Each string package has associated with it a single primary language and zero
1457 or more secondary languages. This routine returns the secondary languages
1458 associated with a package list.
1460 @param This A pointer to the EFI_HII_STRING_PROTOCOL
1462 @param PackageList The package list to examine.
1463 @param PrimaryLanguage Points to the null-terminated ASCII string that specifies
1464 the primary language. Languages are specified in the
1465 format specified in Appendix M of the UEFI 2.0 specification.
1466 @param SecondaryLanguages Points to the buffer to hold the returned null-terminated
1467 ASCII string that describes the list of
1468 secondary languages for the specified
1469 PrimaryLanguage. If there are no secondary
1470 languages, the function returns successfully,
1471 but this is set to NULL.
1472 @param SecondaryLanguagesSize On entry, points to the size of the buffer
1473 pointed to by SecondaryLanguages, in bytes. On
1474 return, points to the length of SecondaryLanguages
1477 @retval EFI_SUCCESS Secondary languages were correctly returned.
1478 @retval EFI_INVALID_PARAMETER PrimaryLanguage or SecondaryLanguagesSize was NULL.
1479 @retval EFI_INVALID_PARAMETER The value referenced by SecondaryLanguagesSize is not
1480 zero and SecondaryLanguages is NULL.
1481 @retval EFI_BUFFER_TOO_SMALL The buffer specified by SecondaryLanguagesSize is
1482 too small to hold the returned information.
1483 SecondaryLanguageSize is updated to hold the size of
1484 the buffer required.
1485 @retval EFI_INVALID_LANGUAGE The language specified by PrimaryLanguage is not
1486 present in the specified package list.
1487 @retval EFI_NOT_FOUND The specified PackageList is not in the Database.
1492 HiiGetSecondaryLanguages (
1493 IN CONST EFI_HII_STRING_PROTOCOL
*This
,
1494 IN EFI_HII_HANDLE PackageList
,
1495 IN CONST CHAR8
*PrimaryLanguage
,
1496 IN OUT CHAR8
*SecondaryLanguages
,
1497 IN OUT UINTN
*SecondaryLanguagesSize
1501 // EFI_HII_DATABASE_PROTOCOL protocol interfaces
1506 This function adds the packages in the package list to the database and returns a handle. If there is a
1507 EFI_DEVICE_PATH_PROTOCOL associated with the DriverHandle, then this function will
1508 create a package of type EFI_PACKAGE_TYPE_DEVICE_PATH and add it to the package list.
1510 @param This A pointer to the EFI_HII_DATABASE_PROTOCOL
1512 @param PackageList A pointer to an EFI_HII_PACKAGE_LIST_HEADER
1514 @param DriverHandle Associate the package list with this EFI handle.
1515 If a NULL is specified, this data will not be associate
1516 with any drivers and cannot have a callback induced.
1517 @param Handle A pointer to the EFI_HII_HANDLE instance.
1519 @retval EFI_SUCCESS The package list associated with the Handle was
1520 added to the HII database.
1521 @retval EFI_OUT_OF_RESOURCES Unable to allocate necessary resources for the
1522 new database contents.
1523 @retval EFI_INVALID_PARAMETER PackageList is NULL or Handle is NULL.
1529 IN CONST EFI_HII_DATABASE_PROTOCOL
*This
,
1530 IN CONST EFI_HII_PACKAGE_LIST_HEADER
*PackageList
,
1531 IN CONST EFI_HANDLE DriverHandle
, OPTIONAL
1532 OUT EFI_HII_HANDLE
*Handle
1537 This function removes the package list that is associated with a handle Handle
1538 from the HII database. Before removing the package, any registered functions
1539 with the notification type REMOVE_PACK and the same package type will be called.
1541 @param This A pointer to the EFI_HII_DATABASE_PROTOCOL
1543 @param Handle The handle that was registered to the data that
1544 is requested for removal.
1546 @retval EFI_SUCCESS The data associated with the Handle was removed
1547 from the HII database.
1548 @retval EFI_NOT_FOUND The specified Handle is not in database.
1553 HiiRemovePackageList (
1554 IN CONST EFI_HII_DATABASE_PROTOCOL
*This
,
1555 IN EFI_HII_HANDLE Handle
1560 This function updates the existing package list (which has the specified Handle)
1561 in the HII databases, using the new package list specified by PackageList.
1563 @param This A pointer to the EFI_HII_DATABASE_PROTOCOL
1565 @param Handle The handle that was registered to the data that
1566 is requested to be updated.
1567 @param PackageList A pointer to an EFI_HII_PACKAGE_LIST_HEADER
1570 @retval EFI_SUCCESS The HII database was successfully updated.
1571 @retval EFI_OUT_OF_RESOURCES Unable to allocate enough memory for the updated
1573 @retval EFI_INVALID_PARAMETER PackageList was NULL.
1574 @retval EFI_NOT_FOUND The specified Handle is not in database.
1579 HiiUpdatePackageList (
1580 IN CONST EFI_HII_DATABASE_PROTOCOL
*This
,
1581 IN EFI_HII_HANDLE Handle
,
1582 IN CONST EFI_HII_PACKAGE_LIST_HEADER
*PackageList
1587 This function returns a list of the package handles of the specified type
1588 that are currently active in the database. The pseudo-type
1589 EFI_HII_PACKAGE_TYPE_ALL will cause all package handles to be listed.
1591 @param This A pointer to the EFI_HII_DATABASE_PROTOCOL
1593 @param PackageType Specifies the package type of the packages to
1594 list or EFI_HII_PACKAGE_TYPE_ALL for all packages
1596 @param PackageGuid If PackageType is EFI_HII_PACKAGE_TYPE_GUID, then
1597 this is the pointer to the GUID which must match
1598 the Guid field of EFI_HII_GUID_PACKAGE_GUID_HDR.
1599 Otherwise, it must be NULL.
1600 @param HandleBufferLength On input, a pointer to the length of the handle
1601 buffer. On output, the length of the handle
1602 buffer that is required for the handles found.
1603 @param Handle An array of EFI_HII_HANDLE instances returned.
1605 @retval EFI_SUCCESS The matching handles are outputted successfully.
1606 HandleBufferLength is updated with the actual length.
1607 @retval EFI_BUFFER_TO_SMALL The HandleBufferLength parameter indicates that
1608 Handle is too small to support the number of
1609 handles. HandleBufferLength is updated with a
1610 value that will enable the data to fit.
1611 @retval EFI_NOT_FOUND No matching handle could not be found in
1613 @retval EFI_INVALID_PARAMETER HandleBufferLength was NULL.
1614 @retval EFI_INVALID_PARAMETER The value referenced by HandleBufferLength was not
1615 zero and Handle was NULL.
1616 @retval EFI_INVALID_PARAMETER PackageType is not a EFI_HII_PACKAGE_TYPE_GUID but
1617 PackageGuid is not NULL, PackageType is a EFI_HII_
1618 PACKAGE_TYPE_GUID but PackageGuid is NULL.
1623 HiiListPackageLists (
1624 IN CONST EFI_HII_DATABASE_PROTOCOL
*This
,
1625 IN UINT8 PackageType
,
1626 IN CONST EFI_GUID
*PackageGuid
,
1627 IN OUT UINTN
*HandleBufferLength
,
1628 OUT EFI_HII_HANDLE
*Handle
1633 This function will export one or all package lists in the database to a buffer.
1634 For each package list exported, this function will call functions registered
1635 with EXPORT_PACK and then copy the package list to the buffer.
1637 @param This A pointer to the EFI_HII_DATABASE_PROTOCOL
1639 @param Handle An EFI_HII_HANDLE that corresponds to the desired
1640 package list in the HII database to export or
1641 NULL to indicate all package lists should be
1643 @param BufferSize On input, a pointer to the length of the buffer.
1644 On output, the length of the buffer that is
1645 required for the exported data.
1646 @param Buffer A pointer to a buffer that will contain the
1647 results of the export function.
1649 @retval EFI_SUCCESS Package exported.
1650 @retval EFI_BUFFER_TO_SMALL The HandleBufferLength parameter indicates that
1651 Handle is too small to support the number of
1652 handles. HandleBufferLength is updated with
1653 a value that will enable the data to fit.
1654 @retval EFI_NOT_FOUND The specified Handle could not be found in the
1656 @retval EFI_INVALID_PARAMETER BufferSize was NULL.
1657 @retval EFI_INVALID_PARAMETER The value referenced by BufferSize was not zero
1658 and Buffer was NULL.
1663 HiiExportPackageLists (
1664 IN CONST EFI_HII_DATABASE_PROTOCOL
*This
,
1665 IN EFI_HII_HANDLE Handle
,
1666 IN OUT UINTN
*BufferSize
,
1667 OUT EFI_HII_PACKAGE_LIST_HEADER
*Buffer
1672 This function registers a function which will be called when specified actions related to packages of
1673 the specified type occur in the HII database. By registering a function, other HII-related drivers are
1674 notified when specific package types are added, removed or updated in the HII database.
1675 Each driver or application which registers a notification should use
1676 EFI_HII_DATABASE_PROTOCOL.UnregisterPackageNotify() before exiting.
1678 @param This A pointer to the EFI_HII_DATABASE_PROTOCOL
1680 @param PackageType Specifies the package type of the packages to
1681 list or EFI_HII_PACKAGE_TYPE_ALL for all packages
1683 @param PackageGuid If PackageType is EFI_HII_PACKAGE_TYPE_GUID, then
1684 this is the pointer to the GUID which must match
1686 EFI_HII_GUID_PACKAGE_GUID_HDR. Otherwise, it must
1688 @param PackageNotifyFn Points to the function to be called when the
1690 NotificationType occurs.
1691 @param NotifyType Describes the types of notification which this
1692 function will be receiving.
1693 @param NotifyHandle Points to the unique handle assigned to the
1694 registered notification. Can be used in
1695 EFI_HII_DATABASE_PROTOCOL.UnregisterPackageNotify()
1696 to stop notifications.
1698 @retval EFI_SUCCESS Notification registered successfully.
1699 @retval EFI_OUT_OF_RESOURCES Unable to allocate necessary data structures
1700 @retval EFI_INVALID_PARAMETER NotifyHandle is NULL.
1701 @retval EFI_INVALID_PARAMETER PackageGuid is not NULL when PackageType is not
1702 EFI_HII_PACKAGE_TYPE_GUID.
1703 @retval EFI_INVALID_PARAMETER PackageGuid is NULL when PackageType is
1704 EFI_HII_PACKAGE_TYPE_GUID.
1709 HiiRegisterPackageNotify (
1710 IN CONST EFI_HII_DATABASE_PROTOCOL
*This
,
1711 IN UINT8 PackageType
,
1712 IN CONST EFI_GUID
*PackageGuid
,
1713 IN CONST EFI_HII_DATABASE_NOTIFY PackageNotifyFn
,
1714 IN EFI_HII_DATABASE_NOTIFY_TYPE NotifyType
,
1715 OUT EFI_HANDLE
*NotifyHandle
1720 Removes the specified HII database package-related notification.
1722 @param This A pointer to the EFI_HII_DATABASE_PROTOCOL
1724 @param NotificationHandle The handle of the notification function being
1727 @retval EFI_SUCCESS Notification is unregistered successfully.
1728 @retval EFI_NOT_FOUND The incoming notification handle does not exist
1729 in current hii database.
1734 HiiUnregisterPackageNotify (
1735 IN CONST EFI_HII_DATABASE_PROTOCOL
*This
,
1736 IN EFI_HANDLE NotificationHandle
1741 This routine retrieves an array of GUID values for each keyboard layout that
1742 was previously registered in the system.
1744 @param This A pointer to the EFI_HII_DATABASE_PROTOCOL
1746 @param KeyGuidBufferLength On input, a pointer to the length of the keyboard
1747 GUID buffer. On output, the length of the handle
1748 buffer that is required for the handles found.
1749 @param KeyGuidBuffer An array of keyboard layout GUID instances
1752 @retval EFI_SUCCESS KeyGuidBuffer was updated successfully.
1753 @retval EFI_BUFFER_TOO_SMALL The KeyGuidBufferLength parameter indicates
1754 that KeyGuidBuffer is too small to support the
1755 number of GUIDs. KeyGuidBufferLength is
1756 updated with a value that will enable the data to
1758 @retval EFI_INVALID_PARAMETER The KeyGuidBufferLength is NULL.
1759 @retval EFI_INVALID_PARAMETER The value referenced by KeyGuidBufferLength is not
1760 zero and KeyGuidBuffer is NULL.
1761 @retval EFI_NOT_FOUND There was no keyboard layout.
1766 HiiFindKeyboardLayouts (
1767 IN CONST EFI_HII_DATABASE_PROTOCOL
*This
,
1768 IN OUT UINT16
*KeyGuidBufferLength
,
1769 OUT EFI_GUID
*KeyGuidBuffer
1774 This routine retrieves the requested keyboard layout. The layout is a physical description of the keys
1775 on a keyboard and the character(s) that are associated with a particular set of key strokes.
1777 @param This A pointer to the EFI_HII_DATABASE_PROTOCOL
1779 @param KeyGuid A pointer to the unique ID associated with a
1780 given keyboard layout. If KeyGuid is NULL then
1781 the current layout will be retrieved.
1782 @param KeyboardLayoutLength On input, a pointer to the length of the
1783 KeyboardLayout buffer. On output, the length of
1784 the data placed into KeyboardLayout.
1785 @param KeyboardLayout A pointer to a buffer containing the retrieved
1788 @retval EFI_SUCCESS The keyboard layout was retrieved successfully.
1789 @retval EFI_NOT_FOUND The requested keyboard layout was not found.
1790 @retval EFI_INVALID_PARAMETER The KeyboardLayout or KeyboardLayoutLength was
1796 HiiGetKeyboardLayout (
1797 IN CONST EFI_HII_DATABASE_PROTOCOL
*This
,
1798 IN CONST EFI_GUID
*KeyGuid
,
1799 IN OUT UINT16
*KeyboardLayoutLength
,
1800 OUT EFI_HII_KEYBOARD_LAYOUT
*KeyboardLayout
1805 This routine sets the default keyboard layout to the one referenced by KeyGuid. When this routine
1806 is called, an event will be signaled of the EFI_HII_SET_KEYBOARD_LAYOUT_EVENT_GUID
1807 group type. This is so that agents which are sensitive to the current keyboard layout being changed
1808 can be notified of this change.
1810 @param This A pointer to the EFI_HII_DATABASE_PROTOCOL
1812 @param KeyGuid A pointer to the unique ID associated with a
1813 given keyboard layout.
1815 @retval EFI_SUCCESS The current keyboard layout was successfully set.
1816 @retval EFI_NOT_FOUND The referenced keyboard layout was not found, so
1818 @retval EFI_INVALID_PARAMETER The KeyGuid was NULL.
1823 HiiSetKeyboardLayout (
1824 IN CONST EFI_HII_DATABASE_PROTOCOL
*This
,
1825 IN CONST EFI_GUID
*KeyGuid
1830 Return the EFI handle associated with a package list.
1832 @param This A pointer to the EFI_HII_DATABASE_PROTOCOL
1834 @param PackageListHandle An EFI_HII_HANDLE that corresponds to the desired
1835 package list in the HIIdatabase.
1836 @param DriverHandle On return, contains the EFI_HANDLE which was
1837 registered with the package list in
1840 @retval EFI_SUCCESS The DriverHandle was returned successfully.
1841 @retval EFI_INVALID_PARAMETER The PackageListHandle was not valid or
1842 DriverHandle was NULL.
1847 HiiGetPackageListHandle (
1848 IN CONST EFI_HII_DATABASE_PROTOCOL
*This
,
1849 IN EFI_HII_HANDLE PackageListHandle
,
1850 OUT EFI_HANDLE
*DriverHandle
1854 // EFI_HII_CONFIG_ROUTING_PROTOCOL interfaces
1859 This function allows a caller to extract the current configuration
1860 for one or more named elements from one or more drivers.
1862 @param This A pointer to the EFI_HII_CONFIG_ROUTING_PROTOCOL
1864 @param Request A null-terminated Unicode string in
1865 <MultiConfigRequest> format.
1866 @param Progress On return, points to a character in the Request
1867 string. Points to the string's null terminator if
1868 request was successful. Points to the most recent
1869 & before the first failing name / value pair (or
1870 the beginning of the string if the failure is in
1871 the first name / value pair) if the request was
1873 @param Results Null-terminated Unicode string in
1874 <MultiConfigAltResp> format which has all values
1875 filled in for the names in the Request string.
1876 String to be allocated by the called function.
1878 @retval EFI_SUCCESS The Results string is filled with the values
1879 corresponding to all requested names.
1880 @retval EFI_OUT_OF_RESOURCES Not enough memory to store the parts of the
1881 results that must be stored awaiting possible
1883 @retval EFI_NOT_FOUND Routing data doesn't match any known driver.
1884 Progress set to the "G" in "GUID" of the
1885 routing header that doesn't match. Note: There
1886 is no requirement that all routing data
1887 be validated before any configuration extraction.
1888 @retval EFI_INVALID_PARAMETER For example, passing in a NULL for the Request
1889 parameter would result in this type of error. The
1890 Progress parameter is set to NULL.
1891 @retval EFI_INVALID_PARAMETER Illegal syntax. Progress set to most recent &
1892 before the error or the beginning of the string.
1893 @retval EFI_INVALID_PARAMETER Unknown name. Progress points to the & before the
1899 HiiConfigRoutingExtractConfig (
1900 IN CONST EFI_HII_CONFIG_ROUTING_PROTOCOL
*This
,
1901 IN CONST EFI_STRING Request
,
1902 OUT EFI_STRING
*Progress
,
1903 OUT EFI_STRING
*Results
1908 This function allows the caller to request the current configuration for the
1909 entirety of the current HII database and returns the data in a null-terminated Unicode string.
1911 @param This A pointer to the EFI_HII_CONFIG_ROUTING_PROTOCOL
1913 @param Results Null-terminated Unicode string in
1914 <MultiConfigAltResp> format which has all values
1915 filled in for the entirety of the current HII
1916 database. String to be allocated by the called
1917 function. De-allocation is up to the caller.
1919 @retval EFI_SUCCESS The Results string is filled with the values
1920 corresponding to all requested names.
1921 @retval EFI_OUT_OF_RESOURCES Not enough memory to store the parts of the
1922 results that must be stored awaiting possible
1924 @retval EFI_INVALID_PARAMETER For example, passing in a NULL for the Results
1925 parameter would result in this type of error.
1930 HiiConfigRoutingExportConfig (
1931 IN CONST EFI_HII_CONFIG_ROUTING_PROTOCOL
*This
,
1932 OUT EFI_STRING
*Results
1937 This function processes the results of processing forms and routes it to the
1938 appropriate handlers or storage.
1940 @param This A pointer to the EFI_HII_CONFIG_ROUTING_PROTOCOL
1942 @param Configuration A null-terminated Unicode string in
1943 <MulltiConfigResp> format.
1944 @param Progress A pointer to a string filled in with the offset
1945 of the most recent & before the first failing
1946 name / value pair (or the beginning of the string
1947 if the failure is in the first name / value pair)
1948 or the terminating NULL if all was successful.
1950 @retval EFI_SUCCESS The results have been distributed or are awaiting
1952 @retval EFI_OUT_OF_RESOURCES Not enough memory to store the parts of the
1953 results that must be stored awaiting possible
1955 @retval EFI_INVALID_PARAMETER Passing in a NULL for the Configuration parameter
1956 would result in this type of error.
1957 @retval EFI_NOT_FOUND Target for the specified routing data was not
1963 HiiConfigRoutingRouteConfig (
1964 IN CONST EFI_HII_CONFIG_ROUTING_PROTOCOL
*This
,
1965 IN CONST EFI_STRING Configuration
,
1966 OUT EFI_STRING
*Progress
1972 This helper function is to be called by drivers to map configuration data stored
1973 in byte array ("block") formats such as UEFI Variables into current configuration strings.
1975 @param This A pointer to the EFI_HII_CONFIG_ROUTING_PROTOCOL
1977 @param ConfigRequest A null-terminated Unicode string in
1978 <ConfigRequest> format.
1979 @param Block Array of bytes defining the block's
1981 @param BlockSize Length in bytes of Block.
1982 @param Config Filled-in configuration string. String allocated
1983 by the function. Returned only if call is
1985 @param Progress A pointer to a string filled in with the offset
1986 of the most recent & before the first failing
1987 name/value pair (or the beginning of the string
1988 if the failure is in the first name / value pair)
1989 or the terminating NULL if all was successful.
1991 @retval EFI_SUCCESS The request succeeded. Progress points to the
1992 null terminator at the end of the ConfigRequest
1994 @retval EFI_OUT_OF_RESOURCES Not enough memory to allocate Config.
1995 Progress points to the first character of
1997 @retval EFI_INVALID_PARAMETER Passing in a NULL for the ConfigRequest or
1998 Block parameter would result in this type of
1999 error. Progress points to the first character of
2001 @retval EFI_NOT_FOUND Target for the specified routing data was not
2002 found. Progress points to the "G" in "GUID" of
2003 the errant routing data.
2004 @retval EFI_DEVICE_ERROR Block not large enough. Progress undefined.
2005 @retval EFI_INVALID_PARAMETER Encountered non <BlockName> formatted string.
2006 Block is left updated and Progress points at
2007 the '&' preceding the first non-<BlockName>.
2013 IN CONST EFI_HII_CONFIG_ROUTING_PROTOCOL
*This
,
2014 IN CONST EFI_STRING ConfigRequest
,
2015 IN CONST UINT8
*Block
,
2016 IN CONST UINTN BlockSize
,
2017 OUT EFI_STRING
*Config
,
2018 OUT EFI_STRING
*Progress
2023 This helper function is to be called by drivers to map configuration strings
2024 to configurations stored in byte array ("block") formats such as UEFI Variables.
2026 @param This A pointer to the EFI_HII_CONFIG_ROUTING_PROTOCOL
2028 @param ConfigResp A null-terminated Unicode string in <ConfigResp>
2030 @param Block A possibly null array of bytes representing the
2031 current block. Only bytes referenced in the
2032 ConfigResp string in the block are modified. If
2033 this parameter is null or if the *BlockSize
2034 parameter is (on input) shorter than required by
2035 the Configuration string, only the BlockSize
2036 parameter is updated and an appropriate status
2037 (see below) is returned.
2038 @param BlockSize The length of the Block in units of UINT8. On
2039 input, this is the size of the Block. On output,
2040 if successful, contains the largest index of the
2041 modified byte in the Block, or the required buffer
2042 size if the Block is not large enough.
2043 @param Progress On return, points to an element of the ConfigResp
2044 string filled in with the offset of the most
2045 recent '&' before the first failing name / value
2046 pair (or the beginning of the string if the
2047 failure is in the first name / value pair) or
2048 the terminating NULL if all was successful.
2050 @retval EFI_SUCCESS The request succeeded. Progress points to the
2051 null terminator at the end of the ConfigResp
2053 @retval EFI_OUT_OF_RESOURCES Not enough memory to allocate Config.
2054 Progress points to the first character of
2056 @retval EFI_INVALID_PARAMETER Passing in a NULL for the ConfigResp or
2057 Block parameter would result in this type of
2058 error. Progress points to the first character of
2060 @retval EFI_NOT_FOUND Target for the specified routing data was not
2061 found. Progress points to the "G" in "GUID" of
2062 the errant routing data.
2063 @retval EFI_INVALID_PARAMETER Encountered non <BlockName> formatted name /
2064 value pair. Block is left updated and
2065 Progress points at the '&' preceding the first
2067 @retval EFI_BUFFER_TOO_SMALL Block not large enough. Progress undefined.
2068 BlockSize is updated with the required buffer size.
2074 IN CONST EFI_HII_CONFIG_ROUTING_PROTOCOL
*This
,
2075 IN CONST EFI_STRING ConfigResp
,
2076 IN OUT UINT8
*Block
,
2077 IN OUT UINTN
*BlockSize
,
2078 OUT EFI_STRING
*Progress
2083 This helper function is to be called by drivers to extract portions of
2084 a larger configuration string.
2086 @param This A pointer to the EFI_HII_CONFIG_ROUTING_PROTOCOL
2088 @param Configuration A null-terminated Unicode string in
2089 <MultiConfigAltResp> format.
2090 @param Guid A pointer to the GUID value to search for in the
2091 routing portion of the ConfigResp string when
2092 retrieving the requested data. If Guid is NULL,
2093 then all GUID values will be searched for.
2094 @param Name A pointer to the NAME value to search for in the
2095 routing portion of the ConfigResp string when
2096 retrieving the requested data. If Name is NULL,
2097 then all Name values will be searched for.
2098 @param DevicePath A pointer to the PATH value to search for in the
2099 routing portion of the ConfigResp string when
2100 retrieving the requested data. If DevicePath is
2101 NULL, then all DevicePath values will be
2103 @param AltCfgId A pointer to the ALTCFG value to search for in
2104 the routing portion of the ConfigResp string
2105 when retrieving the requested data. If this
2106 parameter is NULL, then the current setting will
2108 @param AltCfgResp A pointer to a buffer which will be allocated by
2109 the function which contains the retrieved string
2110 as requested. This buffer is only allocated if
2111 the call was successful.
2113 @retval EFI_SUCCESS The request succeeded. The requested data was
2114 extracted and placed in the newly allocated
2116 @retval EFI_OUT_OF_RESOURCES Not enough memory to allocate AltCfgResp.
2117 @retval EFI_INVALID_PARAMETER Any parameter is invalid.
2118 @retval EFI_NOT_FOUND Target for the specified routing data was not
2125 IN CONST EFI_HII_CONFIG_ROUTING_PROTOCOL
*This
,
2126 IN CONST EFI_STRING Configuration
,
2127 IN CONST EFI_GUID
*Guid
,
2128 IN CONST EFI_STRING Name
,
2129 IN CONST EFI_DEVICE_PATH_PROTOCOL
*DevicePath
,
2130 IN CONST UINT16
*AltCfgId
,
2131 OUT EFI_STRING
*AltCfgResp
2136 This function accepts a <MultiKeywordResp> formatted string, finds the associated
2137 keyword owners, creates a <MultiConfigResp> string from it and forwards it to the
2138 EFI_HII_ROUTING_PROTOCOL.RouteConfig function.
2140 If there is an issue in resolving the contents of the KeywordString, then the
2141 function returns an error and also sets the Progress and ProgressErr with the
2142 appropriate information about where the issue occurred and additional data about
2143 the nature of the issue.
2145 In the case when KeywordString containing multiple keywords, when an EFI_NOT_FOUND
2146 error is generated during processing the second or later keyword element, the system
2147 storage associated with earlier keywords is not modified. All elements of the
2148 KeywordString must successfully pass all tests for format and access prior to making
2149 any modifications to storage.
2151 In the case when EFI_DEVICE_ERROR is returned from the processing of a KeywordString
2152 containing multiple keywords, the state of storage associated with earlier keywords
2156 @param This Pointer to the EFI_KEYWORD_HANDLER _PROTOCOL instance.
2158 @param KeywordString A null-terminated string in <MultiKeywordResp> format.
2160 @param Progress On return, points to a character in the KeywordString.
2161 Points to the string's NULL terminator if the request
2162 was successful. Points to the most recent '&' before
2163 the first failing name / value pair (or the beginning
2164 of the string if the failure is in the first name / value
2165 pair) if the request was not successful.
2167 @param ProgressErr If during the processing of the KeywordString there was
2168 a failure, this parameter gives additional information
2169 about the possible source of the problem. The various
2170 errors are defined in "Related Definitions" below.
2173 @retval EFI_SUCCESS The specified action was completed successfully.
2175 @retval EFI_INVALID_PARAMETER One or more of the following are TRUE:
2176 1. KeywordString is NULL.
2177 2. Parsing of the KeywordString resulted in an
2178 error. See Progress and ProgressErr for more data.
2180 @retval EFI_NOT_FOUND An element of the KeywordString was not found.
2181 See ProgressErr for more data.
2183 @retval EFI_OUT_OF_RESOURCES Required system resources could not be allocated.
2184 See ProgressErr for more data.
2186 @retval EFI_ACCESS_DENIED The action violated system policy. See ProgressErr
2189 @retval EFI_DEVICE_ERROR An unexpected system error occurred. See ProgressErr
2195 EfiConfigKeywordHandlerSetData (
2196 IN EFI_CONFIG_KEYWORD_HANDLER_PROTOCOL
*This
,
2197 IN CONST EFI_STRING KeywordString
,
2198 OUT EFI_STRING
*Progress
,
2199 OUT UINT32
*ProgressErr
2204 This function accepts a <MultiKeywordRequest> formatted string, finds the underlying
2205 keyword owners, creates a <MultiConfigRequest> string from it and forwards it to the
2206 EFI_HII_ROUTING_PROTOCOL.ExtractConfig function.
2208 If there is an issue in resolving the contents of the KeywordString, then the function
2209 returns an EFI_INVALID_PARAMETER and also set the Progress and ProgressErr with the
2210 appropriate information about where the issue occurred and additional data about the
2211 nature of the issue.
2213 In the case when KeywordString is NULL, or contains multiple keywords, or when
2214 EFI_NOT_FOUND is generated while processing the keyword elements, the Results string
2215 contains values returned for all keywords processed prior to the keyword generating the
2216 error but no values for the keyword with error or any following keywords.
2219 @param This Pointer to the EFI_KEYWORD_HANDLER _PROTOCOL instance.
2221 @param NameSpaceId A null-terminated string containing the platform configuration
2222 language to search through in the system. If a NULL is passed
2223 in, then it is assumed that any platform configuration language
2224 with the prefix of "x-UEFI-" are searched.
2226 @param KeywordString A null-terminated string in <MultiKeywordRequest> format. If a
2227 NULL is passed in the KeywordString field, all of the known
2228 keywords in the system for the NameSpaceId specified are
2229 returned in the Results field.
2231 @param Progress On return, points to a character in the KeywordString. Points
2232 to the string's NULL terminator if the request was successful.
2233 Points to the most recent '&' before the first failing name / value
2234 pair (or the beginning of the string if the failure is in the first
2235 name / value pair) if the request was not successful.
2237 @param ProgressErr If during the processing of the KeywordString there was a
2238 failure, this parameter gives additional information about the
2239 possible source of the problem. See the definitions in SetData()
2240 for valid value definitions.
2242 @param Results A null-terminated string in <MultiKeywordResp> format is returned
2243 which has all the values filled in for the keywords in the
2244 KeywordString. This is a callee-allocated field, and must be freed
2245 by the caller after being used.
2247 @retval EFI_SUCCESS The specified action was completed successfully.
2249 @retval EFI_INVALID_PARAMETER One or more of the following are TRUE:
2250 1.Progress, ProgressErr, or Results is NULL.
2251 2.Parsing of the KeywordString resulted in an error. See
2252 Progress and ProgressErr for more data.
2255 @retval EFI_NOT_FOUND An element of the KeywordString was not found. See
2256 ProgressErr for more data.
2258 @retval EFI_NOT_FOUND The NamespaceId specified was not found. See ProgressErr
2261 @retval EFI_OUT_OF_RESOURCES Required system resources could not be allocated. See
2262 ProgressErr for more data.
2264 @retval EFI_ACCESS_DENIED The action violated system policy. See ProgressErr for
2267 @retval EFI_DEVICE_ERROR An unexpected system error occurred. See ProgressErr
2273 EfiConfigKeywordHandlerGetData (
2274 IN EFI_CONFIG_KEYWORD_HANDLER_PROTOCOL
*This
,
2275 IN CONST EFI_STRING NameSpaceId
, OPTIONAL
2276 IN CONST EFI_STRING KeywordString
, OPTIONAL
2277 OUT EFI_STRING
*Progress
,
2278 OUT UINT32
*ProgressErr
,
2279 OUT EFI_STRING
*Results
2283 Compare whether two names of languages are identical.
2285 @param Language1 Name of language 1 from StringPackage
2286 @param Language2 Name of language 2 to be compared with language 1.
2289 @retval FALSE not same
2293 HiiCompareLanguage (
2294 IN CHAR8
*Language1
,
2300 Retrieves a pointer to a Null-terminated ASCII string containing the list
2301 of languages that an HII handle in the HII Database supports. The returned
2302 string is allocated using AllocatePool(). The caller is responsible for freeing
2303 the returned string using FreePool(). The format of the returned string follows
2304 the language format assumed the HII Database.
2306 If HiiHandle is NULL, then ASSERT().
2308 @param[in] HiiHandle A handle that was previously registered in the HII Database.
2310 @retval NULL HiiHandle is not registered in the HII database
2311 @retval NULL There are not enough resources available to retrieve the supported
2313 @retval NULL The list of supported languages could not be retrieved.
2314 @retval Other A pointer to the Null-terminated ASCII string of supported languages.
2318 GetSupportedLanguages (
2319 IN EFI_HII_HANDLE HiiHandle
2323 This function mainly use to get HiiDatabase information.
2325 @param This A pointer to the EFI_HII_DATABASE_PROTOCOL instance.
2327 @retval EFI_SUCCESS Get the information successfully.
2328 @retval EFI_OUT_OF_RESOURCES Not enough memory to store the Hiidatabase data.
2333 IN CONST EFI_HII_DATABASE_PROTOCOL
*This
2337 This is an internal function,mainly use to get and update configuration settings information.
2339 @param This A pointer to the EFI_HII_DATABASE_PROTOCOL instance.
2341 @retval EFI_SUCCESS Get the information successfully.
2342 @retval EFI_OUT_OF_RESOURCES Not enough memory to store the Configuration Setting data.
2346 HiiGetConfigurationSetting(
2347 IN CONST EFI_HII_DATABASE_PROTOCOL
*This
2353 extern EFI_EVENT gHiiKeyboardLayoutChanged
;
2354 extern BOOLEAN gExportAfterReadyToBoot
;