2 Private structures definitions in HiiDatabase.
4 Copyright (c) 2007 - 2008, Intel Corporation
5 All rights reserved. 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/ConsoleControl.h>
21 #include <Protocol/DevicePath.h>
22 #include <Protocol/HiiFont.h>
23 #include <Protocol/HiiImage.h>
24 #include <Protocol/HiiString.h>
25 #include <Protocol/HiiDatabase.h>
26 #include <Protocol/HiiConfigRouting.h>
27 #include <Protocol/HiiConfigAccess.h>
28 #include <Protocol/SimpleTextOut.h>
30 #include <Guid/HiiKeyBoardLayout.h>
33 #include <Library/DebugLib.h>
34 #include <Library/BaseMemoryLib.h>
35 #include <Library/UefiDriverEntryPoint.h>
36 #include <Library/UefiBootServicesTableLib.h>
37 #include <Library/BaseLib.h>
38 #include <Library/DevicePathLib.h>
39 #include <Library/MemoryAllocationLib.h>
40 #include <Library/IfrSupportLib.h>
41 #include <Library/UefiLib.h>
42 #include <Library/PcdLib.h>
44 #define HII_DATABASE_NOTIFY_GUID \
46 0xc1c76, 0xd79e, 0x42fe, {0x86, 0xb, 0x8b, 0xe8, 0x7b, 0x3e, 0x7a, 0x78} \
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 #define EFI_HII_VARSTORE_BUFFER 0
67 #define EFI_HII_VARSTORE_NAME_VALUE 1
68 #define EFI_HII_VARSTORE_EFI_VARIABLE 2
70 #define HII_FORMSET_STORAGE_SIGNATURE EFI_SIGNATURE_32 ('H', 'S', 'T', 'G')
75 EFI_HII_HANDLE HiiHandle
;
76 EFI_HANDLE DriverHandle
;
78 UINT8 Type
; // EFI_HII_VARSTORE_BUFFER, EFI_HII_VARSTORE_NAME_VALUE, EFI_HII_VARSTORE_EFI_VARIABLE
82 } HII_FORMSET_STORAGE
;
84 #define HII_FORMSET_STORAGE_FROM_LINK(a) CR (a, HII_FORMSET_STORAGE, Link, HII_FORMSET_STORAGE_SIGNATURE)
88 // String Package definitions
90 #define HII_STRING_PACKAGE_SIGNATURE EFI_SIGNATURE_32 ('h','i','s','p')
91 typedef struct _HII_STRING_PACKAGE_INSTANCE
{
93 EFI_HII_STRING_PACKAGE_HDR
*StringPkgHdr
;
95 LIST_ENTRY StringEntry
;
96 LIST_ENTRY FontInfoList
; // local font info list
98 } HII_STRING_PACKAGE_INSTANCE
;
101 // Form Package definitions
103 #define HII_IFR_PACKAGE_SIGNATURE EFI_SIGNATURE_32 ('h','f','r','p')
104 typedef struct _HII_IFR_PACKAGE_INSTANCE
{
106 EFI_HII_PACKAGE_HEADER FormPkgHdr
;
109 } HII_IFR_PACKAGE_INSTANCE
;
112 // Simple Font Package definitions
114 #define HII_S_FONT_PACKAGE_SIGNATURE EFI_SIGNATURE_32 ('h','s','f','p')
115 typedef struct _HII_SIMPLE_FONT_PACKAGE_INSTANCE
{
117 EFI_HII_SIMPLE_FONT_PACKAGE_HDR
*SimpleFontPkgHdr
;
118 LIST_ENTRY SimpleFontEntry
;
119 } HII_SIMPLE_FONT_PACKAGE_INSTANCE
;
122 // Font Package definitions
124 #define HII_FONT_PACKAGE_SIGNATURE EFI_SIGNATURE_32 ('h','i','f','p')
125 typedef struct _HII_FONT_PACKAGE_INSTANCE
{
127 EFI_HII_FONT_PACKAGE_HDR
*FontPkgHdr
;
129 LIST_ENTRY FontEntry
;
130 LIST_ENTRY GlyphInfoList
;
131 } HII_FONT_PACKAGE_INSTANCE
;
133 #define HII_GLYPH_INFO_SIGNATURE EFI_SIGNATURE_32 ('h','g','i','s')
134 typedef struct _HII_GLYPH_INFO
{
138 EFI_HII_GLYPH_INFO Cell
;
141 #define HII_FONT_INFO_SIGNATURE EFI_SIGNATURE_32 ('h','l','f','i')
142 typedef struct _HII_FONT_INFO
{
145 LIST_ENTRY
*GlobalEntry
;
149 #define HII_GLOBAL_FONT_INFO_SIGNATURE EFI_SIGNATURE_32 ('h','g','f','i')
150 typedef struct _HII_GLOBAL_FONT_INFO
{
153 HII_FONT_PACKAGE_INSTANCE
*FontPackage
;
155 EFI_FONT_INFO
*FontInfo
;
156 } HII_GLOBAL_FONT_INFO
;
159 // Image Package definitions
162 #define HII_PIXEL_MASK 0x80
164 typedef struct _HII_IMAGE_PACKAGE_INSTANCE
{
165 EFI_HII_IMAGE_PACKAGE_HDR ImagePkgHdr
;
166 UINT32 ImageBlockSize
;
167 UINT32 PaletteInfoSize
;
170 } HII_IMAGE_PACKAGE_INSTANCE
;
173 // Keyboard Layout Pacakge definitions
175 #define HII_KB_LAYOUT_PACKAGE_SIGNATURE EFI_SIGNATURE_32 ('h','k','l','p')
176 typedef struct _HII_KEYBOARD_LAYOUT_PACKAGE_INSTANCE
{
179 LIST_ENTRY KeyboardEntry
;
180 } HII_KEYBOARD_LAYOUT_PACKAGE_INSTANCE
;
183 // Guid Package definitions
185 #define HII_GUID_PACKAGE_SIGNATURE EFI_SIGNATURE_32 ('h','i','g','p')
186 typedef struct _HII_GUID_PACKAGE_INSTANCE
{
189 LIST_ENTRY GuidEntry
;
190 } HII_GUID_PACKAGE_INSTANCE
;
193 // A package list can contain only one or less than one device path package.
194 // This rule also applies to image package since ImageId can not be duplicate.
196 typedef struct _HII_DATABASE_PACKAGE_LIST_INSTANCE
{
197 EFI_HII_PACKAGE_LIST_HEADER PackageListHdr
;
198 LIST_ENTRY GuidPkgHdr
;
199 LIST_ENTRY FormPkgHdr
;
200 LIST_ENTRY KeyboardLayoutHdr
;
201 LIST_ENTRY StringPkgHdr
;
202 LIST_ENTRY FontPkgHdr
;
203 HII_IMAGE_PACKAGE_INSTANCE
*ImagePkg
;
204 LIST_ENTRY SimpleFontPkgHdr
;
205 UINT8
*DevicePathPkg
;
206 } HII_DATABASE_PACKAGE_LIST_INSTANCE
;
208 #define HII_HANDLE_SIGNATURE EFI_SIGNATURE_32 ('h','i','h','l')
216 #define HII_DATABASE_RECORD_SIGNATURE EFI_SIGNATURE_32 ('h','i','d','r')
218 typedef struct _HII_DATABASE_RECORD
{
220 HII_DATABASE_PACKAGE_LIST_INSTANCE
*PackageList
;
221 EFI_HANDLE DriverHandle
;
222 EFI_HII_HANDLE Handle
;
223 LIST_ENTRY DatabaseEntry
;
224 } HII_DATABASE_RECORD
;
226 #define HII_DATABASE_NOTIFY_SIGNATURE EFI_SIGNATURE_32 ('h','i','d','n')
228 typedef struct _HII_DATABASE_NOTIFY
{
230 EFI_HANDLE NotifyHandle
;
232 EFI_GUID
*PackageGuid
;
233 EFI_HII_DATABASE_NOTIFY PackageNotifyFn
;
234 EFI_HII_DATABASE_NOTIFY_TYPE NotifyType
;
235 LIST_ENTRY DatabaseNotifyEntry
;
236 } HII_DATABASE_NOTIFY
;
238 #define HII_DATABASE_PRIVATE_DATA_SIGNATURE EFI_SIGNATURE_32 ('H', 'i', 'D', 'p')
240 typedef struct _HII_DATABASE_PRIVATE_DATA
{
242 LIST_ENTRY DatabaseList
;
243 LIST_ENTRY DatabaseNotifyList
;
244 EFI_HII_FONT_PROTOCOL HiiFont
;
245 EFI_HII_IMAGE_PROTOCOL HiiImage
;
246 EFI_HII_STRING_PROTOCOL HiiString
;
247 EFI_HII_DATABASE_PROTOCOL HiiDatabase
;
248 EFI_HII_CONFIG_ROUTING_PROTOCOL ConfigRouting
;
249 LIST_ENTRY HiiHandleList
;
251 LIST_ENTRY FontInfoList
; // global font info list
252 UINTN Attribute
; // default system color
253 EFI_GUID CurrentLayoutGuid
;
254 EFI_HII_KEYBOARD_LAYOUT
*CurrentLayout
;
255 } HII_DATABASE_PRIVATE_DATA
;
257 #define HII_FONT_DATABASE_PRIVATE_DATA_FROM_THIS(a) \
259 HII_DATABASE_PRIVATE_DATA, \
261 HII_DATABASE_PRIVATE_DATA_SIGNATURE \
264 #define HII_IMAGE_DATABASE_PRIVATE_DATA_FROM_THIS(a) \
266 HII_DATABASE_PRIVATE_DATA, \
268 HII_DATABASE_PRIVATE_DATA_SIGNATURE \
271 #define HII_STRING_DATABASE_PRIVATE_DATA_FROM_THIS(a) \
273 HII_DATABASE_PRIVATE_DATA, \
275 HII_DATABASE_PRIVATE_DATA_SIGNATURE \
278 #define HII_DATABASE_DATABASE_PRIVATE_DATA_FROM_THIS(a) \
280 HII_DATABASE_PRIVATE_DATA, \
282 HII_DATABASE_PRIVATE_DATA_SIGNATURE \
285 #define CONFIG_ROUTING_DATABASE_PRIVATE_DATA_FROM_THIS(a) \
287 HII_DATABASE_PRIVATE_DATA, \
289 HII_DATABASE_PRIVATE_DATA_SIGNATURE \
293 // Internal function prototypes.
297 This function checks whether a handle is a valid EFI_HII_HANDLE.
299 @param Handle Pointer to a EFI_HII_HANDLE
302 @retval FALSE Invalid
307 EFI_HII_HANDLE Handle
312 This function checks whether EFI_FONT_INFO exists in current database. If
313 FontInfoMask is specified, check what options can be used to make a match.
314 Note that the masks relate to where the system default should be supplied
315 are ignored by this function.
317 @param Private Hii database private structure.
318 @param FontInfo Points to EFI_FONT_INFO structure.
319 @param FontInfoMask If not NULL, describes what options can be used
320 to make a match between the font requested and
321 the font available. The caller must guarantee
323 @param FontHandle On entry, Points to the font handle returned by a
324 previous call to GetFontInfo() or NULL to start
326 @param GlobalFontInfo If not NULL, output the corresponding globa font
330 @retval FALSE Not existed
335 IN HII_DATABASE_PRIVATE_DATA
*Private
,
336 IN EFI_FONT_INFO
*FontInfo
,
337 IN EFI_FONT_INFO_MASK
*FontInfoMask
, OPTIONAL
338 IN EFI_FONT_HANDLE FontHandle
, OPTIONAL
339 OUT HII_GLOBAL_FONT_INFO
**GlobalFontInfo OPTIONAL
344 This function invokes the matching registered function.
346 @param Private HII Database driver private structure.
347 @param NotifyType The type of change concerning the database.
348 @param PackageInstance Points to the package referred to by the notification.
349 @param PackageType Package type
350 @param Handle The handle of the package list which contains the specified package.
352 @retval EFI_SUCCESS Already checked all registered function and invoked
354 @retval EFI_INVALID_PARAMETER Any input parameter is not valid.
358 InvokeRegisteredFunction (
359 IN HII_DATABASE_PRIVATE_DATA
*Private
,
360 IN EFI_HII_DATABASE_NOTIFY_TYPE NotifyType
,
361 IN VOID
*PackageInstance
,
362 IN UINT8 PackageType
,
363 IN EFI_HII_HANDLE Handle
368 Retrieve system default font and color.
370 @param Private HII database driver private data.
371 @param FontInfo Points to system default font output-related
372 information. It's caller's responsibility to free
374 @param FontInfoSize If not NULL, output the size of buffer FontInfo.
376 @retval EFI_SUCCESS Cell information is added to the GlyphInfoList.
377 @retval EFI_OUT_OF_RESOURCES The system is out of resources to accomplish the
379 @retval EFI_INVALID_PARAMETER Any input parameter is invalid.
384 IN HII_DATABASE_PRIVATE_DATA
*Private
,
385 OUT EFI_FONT_DISPLAY_INFO
**FontInfo
,
386 OUT UINTN
*FontInfoSize OPTIONAL
391 Parse all string blocks to find a String block specified by StringId.
392 If StringId = (EFI_STRING_ID) (-1), find out all EFI_HII_SIBT_FONT blocks
393 within this string package and backup its information.
394 If StringId = 0, output the string id of last string block (EFI_HII_SIBT_END).
396 @param Private Hii database private structure.
397 @param StringPackage Hii string package instance.
398 @param StringId The string's id, which is unique within
400 @param BlockType Output the block type of found string block.
401 @param StringBlockAddr Output the block address of found string block.
402 @param StringTextOffset Offset, relative to the found block address, of
403 the string text information.
404 @param LastStringId Output the last string id when StringId = 0.
406 @retval EFI_SUCCESS The string text and font is retrieved
408 @retval EFI_NOT_FOUND The specified text or font info can not be found
410 @retval EFI_OUT_OF_RESOURCES The system is out of resources to accomplish the
416 IN HII_DATABASE_PRIVATE_DATA
*Private
,
417 IN HII_STRING_PACKAGE_INSTANCE
*StringPackage
,
418 IN EFI_STRING_ID StringId
,
419 OUT UINT8
*BlockType
, OPTIONAL
420 OUT UINT8
**StringBlockAddr
, OPTIONAL
421 OUT UINTN
*StringTextOffset
, OPTIONAL
422 OUT EFI_STRING_ID
*LastStringId OPTIONAL
427 Parse all glyph blocks to find a glyph block specified by CharValue.
428 If CharValue = (CHAR16) (-1), collect all default character cell information
429 within this font package and backup its information.
431 @param FontPackage Hii string package instance.
432 @param CharValue Unicode character value, which identifies a glyph
434 @param GlyphBuffer Output the corresponding bitmap data of the found
435 block. It is the caller's responsiblity to free
437 @param Cell Output cell information of the encoded bitmap.
438 @param GlyphBufferLen If not NULL, output the length of GlyphBuffer.
440 @retval EFI_SUCCESS The bitmap data is retrieved successfully.
441 @retval EFI_NOT_FOUND The specified CharValue does not exist in current
443 @retval EFI_OUT_OF_RESOURCES The system is out of resources to accomplish the
449 IN HII_FONT_PACKAGE_INSTANCE
*FontPackage
,
451 OUT UINT8
**GlyphBuffer
, OPTIONAL
452 OUT EFI_HII_GLYPH_INFO
*Cell
, OPTIONAL
453 OUT UINTN
*GlyphBufferLen OPTIONAL
457 // EFI_HII_FONT_PROTOCOL protocol interfaces
462 Renders a string to a bitmap or to the display.
464 @param This A pointer to the EFI_HII_FONT_PROTOCOL instance.
465 @param Flags Describes how the string is to be drawn.
466 @param String Points to the null-terminated string to be
468 @param StringInfo Points to the string output information,
469 including the color and font. If NULL, then the
470 string will be output in the default system font
472 @param Blt If this points to a non-NULL on entry, this
473 points to the image, which is Width pixels wide
474 and Height pixels high. The string will be drawn
476 EFI_HII_OUT_FLAG_CLIP is implied. If this points
477 to a NULL on entry, then a buffer
478 will be allocated to hold the generated image and
479 the pointer updated on exit. It is the caller's
480 responsibility to free this buffer.
481 @param BltX Together with BltX, Specifies the offset from the left and top edge
482 of the image of the first character cell in the
484 @param BltY Together with BltY, Specifies the offset from the left and top edge
485 of the image of the first character cell in the
487 @param RowInfoArray If this is non-NULL on entry, then on exit, this
488 will point to an allocated buffer containing
489 row information and RowInfoArraySize will be
490 updated to contain the number of elements.
491 This array describes the characters which were at
492 least partially drawn and the heights of the
493 rows. It is the caller's responsibility to free
495 @param RowInfoArraySize If this is non-NULL on entry, then on exit it
496 contains the number of elements in RowInfoArray.
497 @param ColumnInfoArray If this is non-NULL, then on return it will be
498 filled with the horizontal offset for each
499 character in the string on the row where it is
500 displayed. Non-printing characters will have
501 the offset ~0. The caller is responsible to
502 allocate a buffer large enough so that there
503 is one entry for each character in the string,
504 not including the null-terminator. It is possible
505 when character display is normalized that some
506 character cells overlap.
508 @retval EFI_SUCCESS The string was successfully rendered.
509 @retval EFI_OUT_OF_RESOURCES Unable to allocate an output buffer for
511 @retval EFI_INVALID_PARAMETER The String or Blt.
512 @retval EFI_INVALID_PARAMETER Flags were invalid combination..
518 IN CONST EFI_HII_FONT_PROTOCOL
*This
,
519 IN EFI_HII_OUT_FLAGS Flags
,
520 IN CONST EFI_STRING String
,
521 IN CONST EFI_FONT_DISPLAY_INFO
*StringInfo OPTIONAL
,
522 IN OUT EFI_IMAGE_OUTPUT
**Blt
,
525 OUT EFI_HII_ROW_INFO
**RowInfoArray OPTIONAL
,
526 OUT UINTN
*RowInfoArraySize OPTIONAL
,
527 OUT UINTN
*ColumnInfoArray OPTIONAL
532 Render a string to a bitmap or the screen containing the contents of the specified string.
534 @param This A pointer to the EFI_HII_FONT_PROTOCOL instance.
535 @param Flags Describes how the string is to be drawn.
536 @param PackageList The package list in the HII database to search
537 for the specified string.
538 @param StringId The string's id, which is unique within
540 @param Language Points to the language for the retrieved string.
541 If NULL, then the current system language is
543 @param StringInfo Points to the string output information,
544 including the color and font. If NULL, then the
545 string will be output in the default system font
547 @param Blt If this points to a non-NULL on entry, this
548 points to the image, which is Width pixels wide
549 and Height pixels high. The string will be drawn
551 EFI_HII_OUT_FLAG_CLIP is implied. If this points
552 to a NULL on entry, then a buffer
553 will be allocated to hold the generated image and
554 the pointer updated on exit. It is the caller's
555 responsibility to free this buffer.
556 @param BltX Together with BltX, Specifies the offset from the left and top edge
557 of the image of the first character cell in the
559 @param BltY Together with BltY, Specifies the offset from the left and top edge
560 of the image of the first character cell in the
562 @param RowInfoArray If this is non-NULL on entry, then on exit, this
563 will point to an allocated buffer containing
564 row information and RowInfoArraySize will be
565 updated to contain the number of elements.
566 This array describes the characters which were at
567 least partially drawn and the heights of the
568 rows. It is the caller's responsibility to free
570 @param RowInfoArraySize If this is non-NULL on entry, then on exit it
571 contains the number of elements in RowInfoArray.
572 @param ColumnInfoArray If this is non-NULL, then on return it will be
573 filled with the horizontal offset for each
574 character in the string on the row where it is
575 displayed. Non-printing characters will have
576 the offset ~0. The caller is responsible to
577 allocate a buffer large enough so that there
578 is one entry for each character in the string,
579 not including the null-terminator. It is possible
580 when character display is normalized that some
581 character cells overlap.
583 @retval EFI_SUCCESS The string was successfully rendered.
584 @retval EFI_OUT_OF_RESOURCES Unable to allocate an output buffer for
586 @retval EFI_INVALID_PARAMETER The Blt or PackageList was NULL.
587 @retval EFI_INVALID_PARAMETER Flags were invalid combination.
588 @retval EFI_NOT_FOUND The specified PackageList is not in the Database or the stringid is not
589 in the specified PackageList.
595 IN CONST EFI_HII_FONT_PROTOCOL
*This
,
596 IN EFI_HII_OUT_FLAGS Flags
,
597 IN EFI_HII_HANDLE PackageList
,
598 IN EFI_STRING_ID StringId
,
599 IN CONST CHAR8
* Language
,
600 IN CONST EFI_FONT_DISPLAY_INFO
*StringInfo OPTIONAL
,
601 IN OUT EFI_IMAGE_OUTPUT
**Blt
,
604 OUT EFI_HII_ROW_INFO
**RowInfoArray OPTIONAL
,
605 OUT UINTN
*RowInfoArraySize OPTIONAL
,
606 OUT UINTN
*ColumnInfoArray OPTIONAL
611 Convert the glyph for a single character into a bitmap.
613 @param This A pointer to the EFI_HII_FONT_PROTOCOL instance.
614 @param Char Character to retrieve.
615 @param StringInfo Points to the string font and color information
616 or NULL if the string should use the default
617 system font and color.
618 @param Blt Thus must point to a NULL on entry. A buffer will
619 be allocated to hold the output and the pointer
620 updated on exit. It is the caller's
621 responsibility to free this buffer.
622 @param Baseline Number of pixels from the bottom of the bitmap to
625 @retval EFI_SUCCESS Glyph bitmap created.
626 @retval EFI_OUT_OF_RESOURCES Unable to allocate the output buffer Blt.
627 @retval EFI_WARN_UNKNOWN_GLYPH The glyph was unknown and was replaced with the
628 glyph for Unicode character 0xFFFD.
629 @retval EFI_INVALID_PARAMETER Blt is NULL or *Blt is not NULL.
635 IN CONST EFI_HII_FONT_PROTOCOL
*This
,
637 IN CONST EFI_FONT_DISPLAY_INFO
*StringInfo
,
638 OUT EFI_IMAGE_OUTPUT
**Blt
,
639 OUT UINTN
*Baseline OPTIONAL
644 This function iterates through fonts which match the specified font, using
645 the specified criteria. If String is non-NULL, then all of the characters in
646 the string must exist in order for a candidate font to be returned.
648 @param This A pointer to the EFI_HII_FONT_PROTOCOL instance.
649 @param FontHandle On entry, points to the font handle returned by a
650 previous call to GetFontInfo() or NULL to start
651 with the first font. On return, points to the
652 returned font handle or points to NULL if there
653 are no more matching fonts.
654 @param StringInfoIn Upon entry, points to the font to return
655 information about. If NULL, then the information about the system default
656 font will be returned.
657 @param StringInfoOut Upon return, contains the matching font's
658 information. If NULL, then no information is
659 returned. It's caller's responsibility to free
661 @param String Points to the string which will be tested to
662 determine if all characters are available. If
663 NULL, then any font is acceptable.
665 @retval EFI_SUCCESS Matching font returned successfully.
666 @retval EFI_NOT_FOUND No matching font was found.
667 @retval EFI_INVALID_PARAMETER StringInfoIn is NULL.
668 @retval EFI_INVALID_PARAMETER StringInfoIn->FontInfoMask is an invalid combination.
669 @retval EFI_OUT_OF_RESOURCES There were insufficient resources to complete the
675 IN CONST EFI_HII_FONT_PROTOCOL
*This
,
676 IN OUT EFI_FONT_HANDLE
*FontHandle
,
677 IN CONST EFI_FONT_DISPLAY_INFO
*StringInfoIn
, OPTIONAL
678 OUT EFI_FONT_DISPLAY_INFO
**StringInfoOut
,
679 IN CONST EFI_STRING String OPTIONAL
683 // EFI_HII_IMAGE_PROTOCOL interfaces
688 This function adds the image Image to the group of images owned by PackageList, and returns
689 a new image identifier (ImageId).
691 @param This A pointer to the EFI_HII_IMAGE_PROTOCOL instance.
692 @param PackageList Handle of the package list where this image will
694 @param ImageId On return, contains the new image id, which is
695 unique within PackageList.
696 @param Image Points to the image.
698 @retval EFI_SUCCESS The new image was added successfully.
699 @retval EFI_NOT_FOUND The specified PackageList could not be found in
701 @retval EFI_OUT_OF_RESOURCES Could not add the image due to lack of resources.
702 @retval EFI_INVALID_PARAMETER Image is NULL or ImageId is NULL.
708 IN CONST EFI_HII_IMAGE_PROTOCOL
*This
,
709 IN EFI_HII_HANDLE PackageList
,
710 OUT EFI_IMAGE_ID
*ImageId
,
711 IN CONST EFI_IMAGE_INPUT
*Image
716 This function retrieves the image specified by ImageId which is associated with
717 the specified PackageList and copies it into the buffer specified by Image.
719 @param This A pointer to the EFI_HII_IMAGE_PROTOCOL instance.
720 @param PackageList Handle of the package list where this image will
722 @param ImageId The image's id,, which is unique within
724 @param Image Points to the image.
726 @retval EFI_SUCCESS The new image was returned successfully.
727 @retval EFI_NOT_FOUND The image specified by ImageId is not available.
728 The specified PackageList is not in the database.
729 @retval EFI_BUFFER_TOO_SMALL The buffer specified by ImageSize is too small to
731 @retval EFI_INVALID_PARAMETER The Image or ImageSize was NULL.
732 @retval EFI_OUT_OF_RESOURCES The bitmap could not be retrieved because there was not
739 IN CONST EFI_HII_IMAGE_PROTOCOL
*This
,
740 IN EFI_HII_HANDLE PackageList
,
741 IN EFI_IMAGE_ID ImageId
,
742 OUT EFI_IMAGE_INPUT
*Image
747 This function updates the image specified by ImageId in the specified PackageListHandle to
748 the image specified by Image.
750 @param This A pointer to the EFI_HII_IMAGE_PROTOCOL instance.
751 @param PackageList The package list containing the images.
752 @param ImageId The image's id,, which is unique within
754 @param Image Points to the image.
756 @retval EFI_SUCCESS The new image was updated successfully.
757 @retval EFI_NOT_FOUND The image specified by ImageId is not in the
758 database. The specified PackageList is not in the database.
759 @retval EFI_INVALID_PARAMETER The Image was NULL.
765 IN CONST EFI_HII_IMAGE_PROTOCOL
*This
,
766 IN EFI_HII_HANDLE PackageList
,
767 IN EFI_IMAGE_ID ImageId
,
768 IN CONST EFI_IMAGE_INPUT
*Image
773 This function renders an image to a bitmap or the screen using the specified
774 color and options. It draws the image on an existing bitmap, allocates a new
775 bitmap or uses the screen. The images can be clipped.
777 @param This A pointer to the EFI_HII_IMAGE_PROTOCOL instance.
778 @param Flags Describes how the image is to be drawn.
779 @param Image Points to the image to be displayed.
780 @param Blt If this points to a non-NULL on entry, this
781 points to the image, which is Width pixels wide
782 and Height pixels high. The image will be drawn
783 onto this image and EFI_HII_DRAW_FLAG_CLIP is
784 implied. If this points to a NULL on entry, then
785 a buffer will be allocated to hold the generated
786 image and the pointer updated on exit. It is the
787 caller's responsibility to free this buffer.
788 @param BltX Specifies the offset from the left and top edge
789 of the output image of the first pixel in the
791 @param BltY Specifies the offset from the left and top edge
792 of the output image of the first pixel in the
795 @retval EFI_SUCCESS The image was successfully drawn.
796 @retval EFI_OUT_OF_RESOURCES Unable to allocate an output buffer for Blt.
797 @retval EFI_INVALID_PARAMETER The Image or Blt was NULL.
798 @retval EFI_INVALID_PARAMETER Any combination of Flags is invalid.
804 IN CONST EFI_HII_IMAGE_PROTOCOL
*This
,
805 IN EFI_HII_DRAW_FLAGS Flags
,
806 IN CONST EFI_IMAGE_INPUT
*Image
,
807 IN OUT EFI_IMAGE_OUTPUT
**Blt
,
814 This function renders an image to a bitmap or the screen using the specified
815 color and options. It draws the image on an existing bitmap, allocates a new
816 bitmap or uses the screen. The images can be clipped.
818 @param This A pointer to the EFI_HII_IMAGE_PROTOCOL instance.
819 @param Flags Describes how the image is to be drawn.
820 @param PackageList The package list in the HII database to search
821 for the specified image.
822 @param ImageId The image's id, which is unique within
824 @param Blt If this points to a non-NULL on entry, this
825 points to the image, which is Width pixels wide
826 and Height pixels high. The image will be drawn
828 EFI_HII_DRAW_FLAG_CLIP is implied. If this points
829 to a NULL on entry, then a buffer will be
830 allocated to hold the generated image and the
831 pointer updated on exit. It is the caller's
832 responsibility to free this buffer.
833 @param BltX Specifies the offset from the left and top edge
834 of the output image of the first pixel in the
836 @param BltY Specifies the offset from the left and top edge
837 of the output image of the first pixel in the
840 @retval EFI_SUCCESS The image was successfully drawn.
841 @retval EFI_OUT_OF_RESOURCES Unable to allocate an output buffer for Blt.
842 @retval EFI_INVALID_PARAMETER The Blt was NULL.
843 @retval EFI_NOT_FOUND The image specified by ImageId is not in the database.
844 The specified PackageList is not in the database.
850 IN CONST EFI_HII_IMAGE_PROTOCOL
*This
,
851 IN EFI_HII_DRAW_FLAGS Flags
,
852 IN EFI_HII_HANDLE PackageList
,
853 IN EFI_IMAGE_ID ImageId
,
854 IN OUT EFI_IMAGE_OUTPUT
**Blt
,
862 // EFI_HII_STRING_PROTOCOL
867 This function adds the string String to the group of strings owned by PackageList, with the
868 specified font information StringFontInfo and returns a new string id.
870 @param This A pointer to the EFI_HII_STRING_PROTOCOL
872 @param PackageList Handle of the package list where this string will
874 @param StringId On return, contains the new strings id, which is
875 unique within PackageList.
876 @param Language Points to the language for the new string.
877 @param LanguageName Points to the printable language name to
878 associate with the passed in Language field.If
879 LanguageName is not NULL and the string package
880 header's LanguageName associated with a given
881 Language is not zero, the LanguageName being
882 passed in will be ignored.
883 @param String Points to the new null-terminated string.
884 @param StringFontInfo Points to the new string's font information or
885 NULL if the string should have the default system
886 font, size and style.
888 @retval EFI_SUCCESS The new string was added successfully.
889 @retval EFI_NOT_FOUND The specified PackageList could not be found in
891 @retval EFI_OUT_OF_RESOURCES Could not add the string due to lack of
893 @retval EFI_INVALID_PARAMETER String is NULL or StringId is NULL or Language is
900 IN CONST EFI_HII_STRING_PROTOCOL
*This
,
901 IN EFI_HII_HANDLE PackageList
,
902 OUT EFI_STRING_ID
*StringId
,
903 IN CONST CHAR8
*Language
,
904 IN CONST CHAR16
*LanguageName
, OPTIONAL
905 IN CONST EFI_STRING String
,
906 IN CONST EFI_FONT_INFO
*StringFontInfo OPTIONAL
911 This function retrieves the string specified by StringId which is associated
912 with the specified PackageList in the language Language and copies it into
913 the buffer specified by String.
915 @param This A pointer to the EFI_HII_STRING_PROTOCOL
917 @param Language Points to the language for the retrieved string.
918 @param PackageList The package list in the HII database to search
919 for the specified string.
920 @param StringId The string's id, which is unique within
922 @param String Points to the new null-terminated string.
923 @param StringSize On entry, points to the size of the buffer
924 pointed to by String, in bytes. On return,
925 points to the length of the string, in bytes.
926 @param StringFontInfo If not NULL, points to the string's font
927 information. It's caller's responsibility to
930 @retval EFI_SUCCESS The string was returned successfully.
931 @retval EFI_NOT_FOUND The string specified by StringId is not
933 @retval EFI_NOT_FOUND The string specified by StringId is available but
934 not in the specified language.
935 The specified PackageList is not in the database.
936 @retval EFI_INVALID_LANGUAGE - The string specified by StringId is available but
937 @retval EFI_BUFFER_TOO_SMALL The buffer specified by StringSize is too small
939 @retval EFI_INVALID_PARAMETER The String or Language or StringSize was NULL.
940 @retval EFI_OUT_OF_RESOURCES There were insufficient resources to complete the
947 IN CONST EFI_HII_STRING_PROTOCOL
*This
,
948 IN CONST CHAR8
*Language
,
949 IN EFI_HII_HANDLE PackageList
,
950 IN EFI_STRING_ID StringId
,
951 OUT EFI_STRING String
,
952 IN OUT UINTN
*StringSize
,
953 OUT EFI_FONT_INFO
**StringFontInfo OPTIONAL
958 This function updates the string specified by StringId in the specified PackageList to the text
959 specified by String and, optionally, the font information specified by StringFontInfo.
961 @param This A pointer to the EFI_HII_STRING_PROTOCOL
963 @param PackageList The package list containing the strings.
964 @param StringId The string's id, which is unique within
966 @param Language Points to the language for the updated string.
967 @param String Points to the new null-terminated string.
968 @param StringFontInfo Points to the string's font information or NULL
969 if the string font information is not changed.
971 @retval EFI_SUCCESS The string was updated successfully.
972 @retval EFI_NOT_FOUND The string specified by StringId is not in the
974 @retval EFI_INVALID_PARAMETER The String or Language was NULL.
975 @retval EFI_OUT_OF_RESOURCES The system is out of resources to accomplish the
982 IN CONST EFI_HII_STRING_PROTOCOL
*This
,
983 IN EFI_HII_HANDLE PackageList
,
984 IN EFI_STRING_ID StringId
,
985 IN CONST CHAR8
*Language
,
986 IN CONST EFI_STRING String
,
987 IN CONST EFI_FONT_INFO
*StringFontInfo OPTIONAL
992 This function returns the list of supported languages, in the format specified
993 in Appendix M of UEFI 2.1 spec.
995 @param This A pointer to the EFI_HII_STRING_PROTOCOL
997 @param PackageList The package list to examine.
998 @param Languages Points to the buffer to hold the returned string.
999 @param LanguagesSize On entry, points to the size of the buffer
1000 pointed to by Languages, in bytes. On return,
1001 points to the length of Languages, in bytes.
1003 @retval EFI_SUCCESS The languages were returned successfully.
1004 @retval EFI_INVALID_PARAMETER The Languages or LanguagesSize was NULL.
1005 @retval EFI_BUFFER_TOO_SMALL The LanguagesSize is too small to hold the list
1006 of supported languages. LanguageSize is updated
1007 to contain the required size.
1008 @retval EFI_NOT_FOUND Could not find string package in specified
1015 IN CONST EFI_HII_STRING_PROTOCOL
*This
,
1016 IN EFI_HII_HANDLE PackageList
,
1017 IN OUT CHAR8
*Languages
,
1018 IN OUT UINTN
*LanguagesSize
1023 Each string package has associated with it a single primary language and zero
1024 or more secondary languages. This routine returns the secondary languages
1025 associated with a package list.
1027 @param This A pointer to the EFI_HII_STRING_PROTOCOL
1029 @param PackageList The package list to examine.
1030 @param FirstLanguage Points to the primary language.
1031 @param SecondaryLanguages Points to the buffer to hold the returned list of
1032 secondary languages for the specified
1033 FirstLanguage. If there are no secondary
1034 languages, the function returns successfully,
1035 but this is set to NULL.
1036 @param SecondaryLanguagesSize On entry, points to the size of the buffer
1037 pointed to by SecondLanguages, in bytes. On
1038 return, points to the length of SecondLanguages
1041 @retval EFI_SUCCESS Secondary languages were correctly returned.
1042 @retval EFI_INVALID_PARAMETER FirstLanguage or SecondLanguages or
1043 SecondLanguagesSize was NULL.
1044 @retval EFI_BUFFER_TOO_SMALL The buffer specified by SecondLanguagesSize is
1045 too small to hold the returned information.
1046 SecondLanguageSize is updated to hold the size of
1047 the buffer required.
1048 @retval EFI_INVALID_LANGUAGE The language specified by FirstLanguage is not
1049 present in the specified package list.
1050 @retval EFI_NOT_FOUND The specified PackageList is not in the Database.
1055 HiiGetSecondaryLanguages (
1056 IN CONST EFI_HII_STRING_PROTOCOL
*This
,
1057 IN EFI_HII_HANDLE PackageList
,
1058 IN CONST CHAR8
*FirstLanguage
,
1059 IN OUT CHAR8
*SecondaryLanguages
,
1060 IN OUT UINTN
*SecondaryLanguagesSize
1064 // EFI_HII_DATABASE_PROTOCOL protocol interfaces
1069 This function adds the packages in the package list to the database and returns a handle. If there is a
1070 EFI_DEVICE_PATH_PROTOCOL associated with the DriverHandle, then this function will
1071 create a package of type EFI_PACKAGE_TYPE_DEVICE_PATH and add it to the package list.
1073 @param This A pointer to the EFI_HII_DATABASE_PROTOCOL
1075 @param PackageList A pointer to an EFI_HII_PACKAGE_LIST_HEADER
1077 @param DriverHandle Associate the package list with this EFI handle.
1078 @param Handle A pointer to the EFI_HII_HANDLE instance.
1080 @retval EFI_SUCCESS The package list associated with the Handle was
1081 added to the HII database.
1082 @retval EFI_OUT_OF_RESOURCES Unable to allocate necessary resources for the
1083 new database contents.
1084 @retval EFI_INVALID_PARAMETER PackageList is NULL or Handle is NULL.
1090 IN CONST EFI_HII_DATABASE_PROTOCOL
*This
,
1091 IN CONST EFI_HII_PACKAGE_LIST_HEADER
*PackageList
,
1092 IN CONST EFI_HANDLE DriverHandle
,
1093 OUT EFI_HII_HANDLE
*Handle
1098 This function removes the package list that is associated with a handle Handle
1099 from the HII database. Before removing the package, any registered functions
1100 with the notification type REMOVE_PACK and the same package type will be called.
1102 @param This A pointer to the EFI_HII_DATABASE_PROTOCOL
1104 @param Handle The handle that was registered to the data that
1105 is requested for removal.
1107 @retval EFI_SUCCESS The data associated with the Handle was removed
1108 from the HII database.
1109 @retval EFI_NOT_FOUND The specified Handle is not in database.
1114 HiiRemovePackageList (
1115 IN CONST EFI_HII_DATABASE_PROTOCOL
*This
,
1116 IN EFI_HII_HANDLE Handle
1121 This function updates the existing package list (which has the specified Handle)
1122 in the HII databases, using the new package list specified by PackageList.
1124 @param This A pointer to the EFI_HII_DATABASE_PROTOCOL
1126 @param Handle The handle that was registered to the data that
1127 is requested to be updated.
1128 @param PackageList A pointer to an EFI_HII_PACKAGE_LIST_HEADER
1131 @retval EFI_SUCCESS The HII database was successfully updated.
1132 @retval EFI_OUT_OF_RESOURCES Unable to allocate enough memory for the updated
1134 @retval EFI_INVALID_PARAMETER PackageList was NULL.
1135 @retval EFI_NOT_FOUND The specified Handle is not in database.
1140 HiiUpdatePackageList (
1141 IN CONST EFI_HII_DATABASE_PROTOCOL
*This
,
1142 IN EFI_HII_HANDLE Handle
,
1143 IN CONST EFI_HII_PACKAGE_LIST_HEADER
*PackageList
1148 This function returns a list of the package handles of the specified type
1149 that are currently active in the database. The pseudo-type
1150 EFI_HII_PACKAGE_TYPE_ALL will cause all package handles to be listed.
1152 @param This A pointer to the EFI_HII_DATABASE_PROTOCOL
1154 @param PackageType Specifies the package type of the packages to
1155 list or EFI_HII_PACKAGE_TYPE_ALL for all packages
1157 @param PackageGuid If PackageType is EFI_HII_PACKAGE_TYPE_GUID, then
1158 this is the pointer to the GUID which must match
1159 the Guid field of EFI_HII_GUID_PACKAGE_GUID_HDR.
1160 Otherwise, it must be NULL.
1161 @param HandleBufferLength On input, a pointer to the length of the handle
1162 buffer. On output, the length of the handle
1163 buffer that is required for the handles found.
1164 @param Handle An array of EFI_HII_HANDLE instances returned.
1166 @retval EFI_SUCCESS The matching handles are outputed successfully.
1167 HandleBufferLength is updated with the actual length.
1168 @retval EFI_BUFFER_TO_SMALL The HandleBufferLength parameter indicates that
1169 Handle is too small to support the number of
1170 handles. HandleBufferLength is updated with a
1171 value that will enable the data to fit.
1172 @retval EFI_NOT_FOUND No matching handle could not be found in
1174 @retval EFI_INVALID_PARAMETER Handle or HandleBufferLength was NULL.
1175 @retval EFI_INVALID_PARAMETER PackageType is not a EFI_HII_PACKAGE_TYPE_GUID but
1176 PackageGuid is not NULL, PackageType is a EFI_HII_
1177 PACKAGE_TYPE_GUID but PackageGuid is NULL.
1183 HiiListPackageLists (
1184 IN CONST EFI_HII_DATABASE_PROTOCOL
*This
,
1185 IN UINT8 PackageType
,
1186 IN CONST EFI_GUID
*PackageGuid
,
1187 IN OUT UINTN
*HandleBufferLength
,
1188 OUT EFI_HII_HANDLE
*Handle
1193 This function will export one or all package lists in the database to a buffer.
1194 For each package list exported, this function will call functions registered
1195 with EXPORT_PACK and then copy the package list to the buffer.
1197 @param This A pointer to the EFI_HII_DATABASE_PROTOCOL
1199 @param Handle An EFI_HII_HANDLE that corresponds to the desired
1200 package list in the HII database to export or
1201 NULL to indicate all package lists should be
1203 @param BufferSize On input, a pointer to the length of the buffer.
1204 On output, the length of the buffer that is
1205 required for the exported data.
1206 @param Buffer A pointer to a buffer that will contain the
1207 results of the export function.
1209 @retval EFI_SUCCESS Package exported.
1210 @retval EFI_BUFFER_TO_SMALL The HandleBufferLength parameter indicates that
1211 Handle is too small to support the number of
1212 handles. HandleBufferLength is updated with
1213 a value that will enable the data to fit.
1214 @retval EFI_NOT_FOUND The specifiecd Handle could not be found in the
1216 @retval EFI_INVALID_PARAMETER Handle or Buffer or BufferSize was NULL.
1221 HiiExportPackageLists (
1222 IN CONST EFI_HII_DATABASE_PROTOCOL
*This
,
1223 IN EFI_HII_HANDLE Handle
,
1224 IN OUT UINTN
*BufferSize
,
1225 OUT EFI_HII_PACKAGE_LIST_HEADER
*Buffer
1230 This function registers a function which will be called when specified actions related to packages of
1231 the specified type occur in the HII database. By registering a function, other HII-related drivers are
1232 notified when specific package types are added, removed or updated in the HII database.
1233 Each driver or application which registers a notification should use
1234 EFI_HII_DATABASE_PROTOCOL.UnregisterPackageNotify() before exiting.
1236 @param This A pointer to the EFI_HII_DATABASE_PROTOCOL
1238 @param PackageType Specifies the package type of the packages to
1239 list or EFI_HII_PACKAGE_TYPE_ALL for all packages
1241 @param PackageGuid If PackageType is EFI_HII_PACKAGE_TYPE_GUID, then
1242 this is the pointer to the GUID which must match
1244 EFI_HII_GUID_PACKAGE_GUID_HDR. Otherwise, it must
1246 @param PackageNotifyFn Points to the function to be called when the
1248 NotificationType occurs.
1249 @param NotifyType Describes the types of notification which this
1250 function will be receiving.
1251 @param NotifyHandle Points to the unique handle assigned to the
1252 registered notification. Can be used in
1253 EFI_HII_DATABASE_PROTOCOL.UnregisterPackageNotify()
1254 to stop notifications.
1256 @retval EFI_SUCCESS Notification registered successfully.
1257 @retval EFI_OUT_OF_RESOURCES Unable to allocate necessary data structures
1258 @retval EFI_INVALID_PARAMETER NotifyHandle is NULL.
1259 @retval EFI_INVALID_PARAMETER PackageGuid is not NULL when PackageType is not
1260 EFI_HII_PACKAGE_TYPE_GUID.
1261 @retval EFI_INVALID_PARAMETER PackageGuid is NULL when PackageType is
1262 EFI_HII_PACKAGE_TYPE_GUID.
1267 HiiRegisterPackageNotify (
1268 IN CONST EFI_HII_DATABASE_PROTOCOL
*This
,
1269 IN UINT8 PackageType
,
1270 IN CONST EFI_GUID
*PackageGuid
,
1271 IN CONST EFI_HII_DATABASE_NOTIFY PackageNotifyFn
,
1272 IN EFI_HII_DATABASE_NOTIFY_TYPE NotifyType
,
1273 OUT EFI_HANDLE
*NotifyHandle
1278 Removes the specified HII database package-related notification.
1280 @param This A pointer to the EFI_HII_DATABASE_PROTOCOL
1282 @param NotificationHandle The handle of the notification function being
1285 @retval EFI_SUCCESS Notification is unregistered successfully.
1286 @retval EFI_NOT_FOUND The incoming notification handle does not exist
1287 in current hii database.
1292 HiiUnregisterPackageNotify (
1293 IN CONST EFI_HII_DATABASE_PROTOCOL
*This
,
1294 IN EFI_HANDLE NotificationHandle
1299 This routine retrieves an array of GUID values for each keyboard layout that
1300 was previously registered in the system.
1302 @param This A pointer to the EFI_HII_DATABASE_PROTOCOL
1304 @param KeyGuidBufferLength On input, a pointer to the length of the keyboard
1305 GUID buffer. On output, the length of the handle
1306 buffer that is required for the handles found.
1307 @param KeyGuidBuffer An array of keyboard layout GUID instances
1310 @retval EFI_SUCCESS KeyGuidBuffer was updated successfully.
1311 @retval EFI_BUFFER_TOO_SMALL The KeyGuidBufferLength parameter indicates
1312 that KeyGuidBuffer is too small to support the
1313 number of GUIDs. KeyGuidBufferLength is
1314 updated with a value that will enable the data to
1316 @retval EFI_INVALID_PARAMETER The KeyGuidBuffer or KeyGuidBufferLength was
1318 @retval EFI_NOT_FOUND There was no keyboard layout.
1323 HiiFindKeyboardLayouts (
1324 IN CONST EFI_HII_DATABASE_PROTOCOL
*This
,
1325 IN OUT UINT16
*KeyGuidBufferLength
,
1326 OUT EFI_GUID
*KeyGuidBuffer
1331 This routine retrieves the requested keyboard layout. The layout is a physical description of the keys
1332 on a keyboard and the character(s) that are associated with a particular set of key strokes.
1334 @param This A pointer to the EFI_HII_DATABASE_PROTOCOL
1336 @param KeyGuid A pointer to the unique ID associated with a
1337 given keyboard layout. If KeyGuid is NULL then
1338 the current layout will be retrieved.
1339 @param KeyboardLayoutLength On input, a pointer to the length of the
1340 KeyboardLayout buffer. On output, the length of
1341 the data placed into KeyboardLayout.
1342 @param KeyboardLayout A pointer to a buffer containing the retrieved
1345 @retval EFI_SUCCESS The keyboard layout was retrieved successfully.
1346 @retval EFI_NOT_FOUND The requested keyboard layout was not found.
1347 @retval EFI_INVALID_PARAMETER The KeyboardLayout or KeyboardLayoutLength was
1353 HiiGetKeyboardLayout (
1354 IN CONST EFI_HII_DATABASE_PROTOCOL
*This
,
1355 IN CONST EFI_GUID
*KeyGuid
,
1356 IN OUT UINT16
*KeyboardLayoutLength
,
1357 OUT EFI_HII_KEYBOARD_LAYOUT
*KeyboardLayout
1362 This routine sets the default keyboard layout to the one referenced by KeyGuid. When this routine
1363 is called, an event will be signaled of the EFI_HII_SET_KEYBOARD_LAYOUT_EVENT_GUID
1364 group type. This is so that agents which are sensitive to the current keyboard layout being changed
1365 can be notified of this change.
1367 @param This A pointer to the EFI_HII_DATABASE_PROTOCOL
1369 @param KeyGuid A pointer to the unique ID associated with a
1370 given keyboard layout.
1372 @retval EFI_SUCCESS The current keyboard layout was successfully set.
1373 @retval EFI_NOT_FOUND The referenced keyboard layout was not found, so
1375 @retval EFI_INVALID_PARAMETER The KeyGuid was NULL.
1380 HiiSetKeyboardLayout (
1381 IN CONST EFI_HII_DATABASE_PROTOCOL
*This
,
1382 IN CONST EFI_GUID
*KeyGuid
1387 Return the EFI handle associated with a package list.
1389 @param This A pointer to the EFI_HII_DATABASE_PROTOCOL
1391 @param PackageListHandle An EFI_HII_HANDLE that corresponds to the desired
1392 package list in the HIIdatabase.
1393 @param DriverHandle On return, contains the EFI_HANDLE which was
1394 registered with the package list in
1397 @retval EFI_SUCCESS The DriverHandle was returned successfully.
1398 @retval EFI_INVALID_PARAMETER The PackageListHandle was not valid or
1399 DriverHandle was NULL.
1404 HiiGetPackageListHandle (
1405 IN CONST EFI_HII_DATABASE_PROTOCOL
*This
,
1406 IN EFI_HII_HANDLE PackageListHandle
,
1407 OUT EFI_HANDLE
*DriverHandle
1411 // EFI_HII_CONFIG_ROUTING_PROTOCOL interfaces
1416 This function allows a caller to extract the current configuration
1417 for one or more named elements from one or more drivers.
1419 @param This A pointer to the EFI_HII_CONFIG_ROUTING_PROTOCOL
1421 @param Request A null-terminated Unicode string in
1422 <MultiConfigRequest> format.
1423 @param Progress On return, points to a character in the Request
1424 string. Points to the string's null terminator if
1425 request was successful. Points to the most recent
1426 & before the first failing name / value pair (or
1427 the beginning of the string if the failure is in
1428 the first name / value pair) if the request was
1430 @param Results Null-terminated Unicode string in
1431 <MultiConfigAltResp> format which has all values
1432 filled in for the names in the Request string.
1433 String to be allocated by the called function.
1435 @retval EFI_SUCCESS The Results string is filled with the values
1436 corresponding to all requested names.
1437 @retval EFI_OUT_OF_RESOURCES Not enough memory to store the parts of the
1438 results that must be stored awaiting possible
1440 @retval EFI_NOT_FOUND Routing data doesn't match any known driver.
1441 Progress set to the "G" in "GUID" of the
1442 routing header that doesn't match. Note: There
1443 is no requirement that all routing data
1444 be validated before any configuration extraction.
1445 @retval EFI_INVALID_PARAMETER For example, passing in a NULL for the Request
1446 parameter would result in this type of error. The
1447 Progress parameter is set to NULL.
1448 @retval EFI_INVALID_PARAMETER Illegal syntax. Progress set to most recent &
1449 before the error or the beginning of the string.
1450 @retval EFI_INVALID_PARAMETER Unknown name. Progress points to the & before the
1456 HiiConfigRoutingExtractConfig (
1457 IN CONST EFI_HII_CONFIG_ROUTING_PROTOCOL
*This
,
1458 IN CONST EFI_STRING Request
,
1459 OUT EFI_STRING
*Progress
,
1460 OUT EFI_STRING
*Results
1465 This function allows the caller to request the current configuration for the
1466 entirety of the current HII database and returns the data in a null-terminated Unicode string.
1468 @param This A pointer to the EFI_HII_CONFIG_ROUTING_PROTOCOL
1470 @param Results Null-terminated Unicode string in
1471 <MultiConfigAltResp> format which has all values
1472 filled in for the names in the Request string.
1473 String to be allocated by the called function.
1474 De-allocation is up to the caller.
1476 @retval EFI_SUCCESS The Results string is filled with the values
1477 corresponding to all requested names.
1478 @retval EFI_OUT_OF_RESOURCES Not enough memory to store the parts of the
1479 results that must be stored awaiting possible
1481 @retval EFI_INVALID_PARAMETER For example, passing in a NULL for the Results
1482 parameter would result in this type of error.
1487 HiiConfigRoutingExportConfig (
1488 IN CONST EFI_HII_CONFIG_ROUTING_PROTOCOL
*This
,
1489 OUT EFI_STRING
*Results
1494 This function processes the results of processing forms and routes it to the
1495 appropriate handlers or storage.
1497 @param This A pointer to the EFI_HII_CONFIG_ROUTING_PROTOCOL
1499 @param Configuration A null-terminated Unicode string in
1500 <MulltiConfigResp> format.
1501 @param Progress A pointer to a string filled in with the offset
1502 of the most recent & before the first failing
1503 name / value pair (or the beginning of the string
1504 if the failure is in the first name / value pair)
1505 or the terminating NULL if all was successful.
1507 @retval EFI_SUCCESS The results have been distributed or are awaiting
1509 @retval EFI_OUT_OF_RESOURCES Not enough memory to store the parts of the
1510 results that must be stored awaiting possible
1512 @retval EFI_INVALID_PARAMETER Passing in a NULL for the Configuration parameter
1513 would result in this type of error.
1514 @retval EFI_NOT_FOUND Target for the specified routing data was not
1520 HiiConfigRoutingRouteConfig (
1521 IN CONST EFI_HII_CONFIG_ROUTING_PROTOCOL
*This
,
1522 IN CONST EFI_STRING Configuration
,
1523 OUT EFI_STRING
*Progress
1529 This helper function is to be called by drivers to map configuration data stored
1530 in byte array ("block") formats such as UEFI Variables into current configuration strings.
1532 @param This A pointer to the EFI_HII_CONFIG_ROUTING_PROTOCOL
1534 @param ConfigRequest A null-terminated Unicode string in
1535 <ConfigRequest> format.
1536 @param Block Array of bytes defining the block's
1538 @param BlockSize Length in bytes of Block.
1539 @param Config Filled-in configuration string. String allocated
1540 by the function. Returned only if call is
1542 @param Progress A pointer to a string filled in with the offset
1543 of the most recent & before the first failing
1544 name/value pair (or the beginning of the string
1545 if the failure is in the first name / value pair)
1546 or the terminating NULL if all was successful.
1548 @retval EFI_SUCCESS The request succeeded. Progress points to the
1549 null terminator at the end of the ConfigRequest
1551 @retval EFI_OUT_OF_RESOURCES Not enough memory to allocate Config.
1552 Progress points to the first character of
1554 @retval EFI_INVALID_PARAMETER Passing in a NULL for the ConfigRequest or
1555 Block parameter would result in this type of
1556 error. Progress points to the first character of
1558 @retval EFI_NOT_FOUND Target for the specified routing data was not
1559 found. Progress points to the "G" in "GUID" of
1560 the errant routing data.
1561 @retval EFI_DEVICE_ERROR Block not large enough. Progress undefined.
1562 @retval EFI_INVALID_PARAMETER Encountered non <BlockName> formatted string.
1563 Block is left updated and Progress points at
1564 the '&' preceding the first non-<BlockName>.
1570 IN CONST EFI_HII_CONFIG_ROUTING_PROTOCOL
*This
,
1571 IN CONST EFI_STRING ConfigRequest
,
1572 IN CONST UINT8
*Block
,
1573 IN CONST UINTN BlockSize
,
1574 OUT EFI_STRING
*Config
,
1575 OUT EFI_STRING
*Progress
1580 This helper function is to be called by drivers to map configuration strings
1581 to configurations stored in byte array ("block") formats such as UEFI Variables.
1583 @param This A pointer to the EFI_HII_CONFIG_ROUTING_PROTOCOL
1585 @param ConfigResp A null-terminated Unicode string in <ConfigResp>
1587 @param Block A possibly null array of bytes representing the
1588 current block. Only bytes referenced in the
1589 ConfigResp string in the block are modified. If
1590 this parameter is null or if the *BlockSize
1591 parameter is (on input) shorter than required by
1592 the Configuration string, only the BlockSize
1593 parameter is updated and an appropriate status
1594 (see below) is returned.
1595 @param BlockSize The length of the Block in units of UINT8. On
1596 input, this is the size of the Block. On output,
1597 if successful, contains the index of the last
1598 modified byte in the Block.
1599 @param Progress On return, points to an element of the ConfigResp
1600 string filled in with the offset of the most
1601 recent '&' before the first failing name / value
1602 pair (or the beginning of the string if the
1603 failure is in the first name / value pair) or
1604 the terminating NULL if all was successful.
1606 @retval EFI_SUCCESS The request succeeded. Progress points to the
1607 null terminator at the end of the ConfigResp
1609 @retval EFI_OUT_OF_RESOURCES Not enough memory to allocate Config.
1610 Progress points to the first character of
1612 @retval EFI_INVALID_PARAMETER Passing in a NULL for the ConfigResp or
1613 Block parameter would result in this type of
1614 error. Progress points to the first character of
1616 @retval EFI_NOT_FOUND Target for the specified routing data was not
1617 found. Progress points to the "G" in "GUID" of
1618 the errant routing data.
1619 @retval EFI_INVALID_PARAMETER Encountered non <BlockName> formatted name /
1620 value pair. Block is left updated and
1621 Progress points at the '&' preceding the first
1628 IN CONST EFI_HII_CONFIG_ROUTING_PROTOCOL
*This
,
1629 IN CONST EFI_STRING ConfigResp
,
1630 IN OUT UINT8
*Block
,
1631 IN OUT UINTN
*BlockSize
,
1632 OUT EFI_STRING
*Progress
1637 This helper function is to be called by drivers to extract portions of
1638 a larger configuration string.
1640 @param This A pointer to the EFI_HII_CONFIG_ROUTING_PROTOCOL
1642 @param Configuration A null-terminated Unicode string in
1643 <MultiConfigAltResp> format.
1644 @param Guid A pointer to the GUID value to search for in the
1645 routing portion of the ConfigResp string when
1646 retrieving the requested data. If Guid is NULL,
1647 then all GUID values will be searched for.
1648 @param Name A pointer to the NAME value to search for in the
1649 routing portion of the ConfigResp string when
1650 retrieving the requested data. If Name is NULL,
1651 then all Name values will be searched for.
1652 @param DevicePath A pointer to the PATH value to search for in the
1653 routing portion of the ConfigResp string when
1654 retrieving the requested data. If DevicePath is
1655 NULL, then all DevicePath values will be
1657 @param AltCfgId A pointer to the ALTCFG value to search for in
1658 the routing portion of the ConfigResp string
1659 when retrieving the requested data. If this
1660 parameter is NULL, then the current setting will
1662 @param AltCfgResp A pointer to a buffer which will be allocated by
1663 the function which contains the retrieved string
1664 as requested. This buffer is only allocated if
1665 the call was successful.
1667 @retval EFI_SUCCESS The request succeeded. The requested data was
1668 extracted and placed in the newly allocated
1670 @retval EFI_OUT_OF_RESOURCES Not enough memory to allocate AltCfgResp.
1671 @retval EFI_INVALID_PARAMETER Any parameter is invalid.
1672 @retval EFI_NOT_FOUND Target for the specified routing data was not
1679 IN CONST EFI_HII_CONFIG_ROUTING_PROTOCOL
*This
,
1680 IN CONST EFI_STRING Configuration
,
1681 IN CONST EFI_GUID
*Guid
,
1682 IN CONST EFI_STRING Name
,
1683 IN CONST EFI_DEVICE_PATH_PROTOCOL
*DevicePath
,
1684 IN CONST UINT16
*AltCfgId
,
1685 OUT EFI_STRING
*AltCfgResp
1692 extern EFI_EVENT gHiiKeyboardLayoutChanged
;