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>
43 #include <Library/HiiLib.h>
45 #define HII_DATABASE_NOTIFY_GUID \
47 0xc1c76, 0xd79e, 0x42fe, {0x86, 0xb, 0x8b, 0xe8, 0x7b, 0x3e, 0x7a, 0x78} \
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 #define EFI_HII_VARSTORE_BUFFER 0
68 #define EFI_HII_VARSTORE_NAME_VALUE 1
69 #define EFI_HII_VARSTORE_EFI_VARIABLE 2
71 #define HII_FORMSET_STORAGE_SIGNATURE EFI_SIGNATURE_32 ('H', 'S', 'T', 'G')
76 EFI_HII_HANDLE HiiHandle
;
77 EFI_HANDLE DriverHandle
;
79 UINT8 Type
; // EFI_HII_VARSTORE_BUFFER, EFI_HII_VARSTORE_NAME_VALUE, EFI_HII_VARSTORE_EFI_VARIABLE
83 } HII_FORMSET_STORAGE
;
85 #define HII_FORMSET_STORAGE_FROM_LINK(a) CR (a, HII_FORMSET_STORAGE, Link, HII_FORMSET_STORAGE_SIGNATURE)
89 // String Package definitions
91 #define HII_STRING_PACKAGE_SIGNATURE EFI_SIGNATURE_32 ('h','i','s','p')
92 typedef struct _HII_STRING_PACKAGE_INSTANCE
{
94 EFI_HII_STRING_PACKAGE_HDR
*StringPkgHdr
;
96 LIST_ENTRY StringEntry
;
97 LIST_ENTRY FontInfoList
; // local font info list
99 } HII_STRING_PACKAGE_INSTANCE
;
102 // Form Package definitions
104 #define HII_IFR_PACKAGE_SIGNATURE EFI_SIGNATURE_32 ('h','f','r','p')
105 typedef struct _HII_IFR_PACKAGE_INSTANCE
{
107 EFI_HII_PACKAGE_HEADER FormPkgHdr
;
110 } HII_IFR_PACKAGE_INSTANCE
;
113 // Simple Font Package definitions
115 #define HII_S_FONT_PACKAGE_SIGNATURE EFI_SIGNATURE_32 ('h','s','f','p')
116 typedef struct _HII_SIMPLE_FONT_PACKAGE_INSTANCE
{
118 EFI_HII_SIMPLE_FONT_PACKAGE_HDR
*SimpleFontPkgHdr
;
119 LIST_ENTRY SimpleFontEntry
;
120 } HII_SIMPLE_FONT_PACKAGE_INSTANCE
;
123 // Font Package definitions
125 #define HII_FONT_PACKAGE_SIGNATURE EFI_SIGNATURE_32 ('h','i','f','p')
126 typedef struct _HII_FONT_PACKAGE_INSTANCE
{
128 EFI_HII_FONT_PACKAGE_HDR
*FontPkgHdr
;
130 LIST_ENTRY FontEntry
;
131 LIST_ENTRY GlyphInfoList
;
132 } HII_FONT_PACKAGE_INSTANCE
;
134 #define HII_GLYPH_INFO_SIGNATURE EFI_SIGNATURE_32 ('h','g','i','s')
135 typedef struct _HII_GLYPH_INFO
{
139 EFI_HII_GLYPH_INFO Cell
;
142 #define HII_FONT_INFO_SIGNATURE EFI_SIGNATURE_32 ('h','l','f','i')
143 typedef struct _HII_FONT_INFO
{
146 LIST_ENTRY
*GlobalEntry
;
150 #define HII_GLOBAL_FONT_INFO_SIGNATURE EFI_SIGNATURE_32 ('h','g','f','i')
151 typedef struct _HII_GLOBAL_FONT_INFO
{
154 HII_FONT_PACKAGE_INSTANCE
*FontPackage
;
156 EFI_FONT_INFO
*FontInfo
;
157 } HII_GLOBAL_FONT_INFO
;
160 // Image Package definitions
163 #define HII_PIXEL_MASK 0x80
165 typedef struct _HII_IMAGE_PACKAGE_INSTANCE
{
166 EFI_HII_IMAGE_PACKAGE_HDR ImagePkgHdr
;
167 UINT32 ImageBlockSize
;
168 UINT32 PaletteInfoSize
;
171 } HII_IMAGE_PACKAGE_INSTANCE
;
174 // Keyboard Layout Pacakge definitions
176 #define HII_KB_LAYOUT_PACKAGE_SIGNATURE EFI_SIGNATURE_32 ('h','k','l','p')
177 typedef struct _HII_KEYBOARD_LAYOUT_PACKAGE_INSTANCE
{
180 LIST_ENTRY KeyboardEntry
;
181 } HII_KEYBOARD_LAYOUT_PACKAGE_INSTANCE
;
184 // Guid Package definitions
186 #define HII_GUID_PACKAGE_SIGNATURE EFI_SIGNATURE_32 ('h','i','g','p')
187 typedef struct _HII_GUID_PACKAGE_INSTANCE
{
190 LIST_ENTRY GuidEntry
;
191 } HII_GUID_PACKAGE_INSTANCE
;
194 // A package list can contain only one or less than one device path package.
195 // This rule also applies to image package since ImageId can not be duplicate.
197 typedef struct _HII_DATABASE_PACKAGE_LIST_INSTANCE
{
198 EFI_HII_PACKAGE_LIST_HEADER PackageListHdr
;
199 LIST_ENTRY GuidPkgHdr
;
200 LIST_ENTRY FormPkgHdr
;
201 LIST_ENTRY KeyboardLayoutHdr
;
202 LIST_ENTRY StringPkgHdr
;
203 LIST_ENTRY FontPkgHdr
;
204 HII_IMAGE_PACKAGE_INSTANCE
*ImagePkg
;
205 LIST_ENTRY SimpleFontPkgHdr
;
206 UINT8
*DevicePathPkg
;
207 } HII_DATABASE_PACKAGE_LIST_INSTANCE
;
209 #define HII_HANDLE_SIGNATURE EFI_SIGNATURE_32 ('h','i','h','l')
217 #define HII_DATABASE_RECORD_SIGNATURE EFI_SIGNATURE_32 ('h','i','d','r')
219 typedef struct _HII_DATABASE_RECORD
{
221 HII_DATABASE_PACKAGE_LIST_INSTANCE
*PackageList
;
222 EFI_HANDLE DriverHandle
;
223 EFI_HII_HANDLE Handle
;
224 LIST_ENTRY DatabaseEntry
;
225 } HII_DATABASE_RECORD
;
227 #define HII_DATABASE_NOTIFY_SIGNATURE EFI_SIGNATURE_32 ('h','i','d','n')
229 typedef struct _HII_DATABASE_NOTIFY
{
231 EFI_HANDLE NotifyHandle
;
233 EFI_GUID
*PackageGuid
;
234 EFI_HII_DATABASE_NOTIFY PackageNotifyFn
;
235 EFI_HII_DATABASE_NOTIFY_TYPE NotifyType
;
236 LIST_ENTRY DatabaseNotifyEntry
;
237 } HII_DATABASE_NOTIFY
;
239 #define HII_DATABASE_PRIVATE_DATA_SIGNATURE EFI_SIGNATURE_32 ('H', 'i', 'D', 'p')
241 typedef struct _HII_DATABASE_PRIVATE_DATA
{
243 LIST_ENTRY DatabaseList
;
244 LIST_ENTRY DatabaseNotifyList
;
245 EFI_HII_FONT_PROTOCOL HiiFont
;
246 EFI_HII_IMAGE_PROTOCOL HiiImage
;
247 EFI_HII_STRING_PROTOCOL HiiString
;
248 EFI_HII_DATABASE_PROTOCOL HiiDatabase
;
249 EFI_HII_CONFIG_ROUTING_PROTOCOL ConfigRouting
;
250 LIST_ENTRY HiiHandleList
;
252 LIST_ENTRY FontInfoList
; // global font info list
253 UINTN Attribute
; // default system color
254 EFI_GUID CurrentLayoutGuid
;
255 EFI_HII_KEYBOARD_LAYOUT
*CurrentLayout
;
256 } HII_DATABASE_PRIVATE_DATA
;
258 #define HII_FONT_DATABASE_PRIVATE_DATA_FROM_THIS(a) \
260 HII_DATABASE_PRIVATE_DATA, \
262 HII_DATABASE_PRIVATE_DATA_SIGNATURE \
265 #define HII_IMAGE_DATABASE_PRIVATE_DATA_FROM_THIS(a) \
267 HII_DATABASE_PRIVATE_DATA, \
269 HII_DATABASE_PRIVATE_DATA_SIGNATURE \
272 #define HII_STRING_DATABASE_PRIVATE_DATA_FROM_THIS(a) \
274 HII_DATABASE_PRIVATE_DATA, \
276 HII_DATABASE_PRIVATE_DATA_SIGNATURE \
279 #define HII_DATABASE_DATABASE_PRIVATE_DATA_FROM_THIS(a) \
281 HII_DATABASE_PRIVATE_DATA, \
283 HII_DATABASE_PRIVATE_DATA_SIGNATURE \
286 #define CONFIG_ROUTING_DATABASE_PRIVATE_DATA_FROM_THIS(a) \
288 HII_DATABASE_PRIVATE_DATA, \
290 HII_DATABASE_PRIVATE_DATA_SIGNATURE \
294 // Internal function prototypes.
298 This function checks whether a handle is a valid EFI_HII_HANDLE.
300 @param Handle Pointer to a EFI_HII_HANDLE
303 @retval FALSE Invalid
308 EFI_HII_HANDLE Handle
313 This function checks whether EFI_FONT_INFO exists in current database. If
314 FontInfoMask is specified, check what options can be used to make a match.
315 Note that the masks relate to where the system default should be supplied
316 are ignored by this function.
318 @param Private Hii database private structure.
319 @param FontInfo Points to EFI_FONT_INFO structure.
320 @param FontInfoMask If not NULL, describes what options can be used
321 to make a match between the font requested and
322 the font available. The caller must guarantee
324 @param FontHandle On entry, Points to the font handle returned by a
325 previous call to GetFontInfo() or NULL to start
327 @param GlobalFontInfo If not NULL, output the corresponding globa font
331 @retval FALSE Not existed
336 IN HII_DATABASE_PRIVATE_DATA
*Private
,
337 IN EFI_FONT_INFO
*FontInfo
,
338 IN EFI_FONT_INFO_MASK
*FontInfoMask
, OPTIONAL
339 IN EFI_FONT_HANDLE FontHandle
, OPTIONAL
340 OUT HII_GLOBAL_FONT_INFO
**GlobalFontInfo OPTIONAL
345 This function invokes the matching registered function.
347 @param Private HII Database driver private structure.
348 @param NotifyType The type of change concerning the database.
349 @param PackageInstance Points to the package referred to by the notification.
350 @param PackageType Package type
351 @param Handle The handle of the package list which contains the specified package.
353 @retval EFI_SUCCESS Already checked all registered function and invoked
355 @retval EFI_INVALID_PARAMETER Any input parameter is not valid.
359 InvokeRegisteredFunction (
360 IN HII_DATABASE_PRIVATE_DATA
*Private
,
361 IN EFI_HII_DATABASE_NOTIFY_TYPE NotifyType
,
362 IN VOID
*PackageInstance
,
363 IN UINT8 PackageType
,
364 IN EFI_HII_HANDLE Handle
369 Retrieve system default font and color.
371 @param Private HII database driver private data.
372 @param FontInfo Points to system default font output-related
373 information. It's caller's responsibility to free
375 @param FontInfoSize If not NULL, output the size of buffer FontInfo.
377 @retval EFI_SUCCESS Cell information is added to the GlyphInfoList.
378 @retval EFI_OUT_OF_RESOURCES The system is out of resources to accomplish the
380 @retval EFI_INVALID_PARAMETER Any input parameter is invalid.
385 IN HII_DATABASE_PRIVATE_DATA
*Private
,
386 OUT EFI_FONT_DISPLAY_INFO
**FontInfo
,
387 OUT UINTN
*FontInfoSize OPTIONAL
392 Parse all string blocks to find a String block specified by StringId.
393 If StringId = (EFI_STRING_ID) (-1), find out all EFI_HII_SIBT_FONT blocks
394 within this string package and backup its information.
395 If StringId = 0, output the string id of last string block (EFI_HII_SIBT_END).
397 @param Private Hii database private structure.
398 @param StringPackage Hii string package instance.
399 @param StringId The string's id, which is unique within
401 @param BlockType Output the block type of found string block.
402 @param StringBlockAddr Output the block address of found string block.
403 @param StringTextOffset Offset, relative to the found block address, of
404 the string text information.
405 @param LastStringId Output the last string id when StringId = 0.
407 @retval EFI_SUCCESS The string text and font is retrieved
409 @retval EFI_NOT_FOUND The specified text or font info can not be found
411 @retval EFI_OUT_OF_RESOURCES The system is out of resources to accomplish the
417 IN HII_DATABASE_PRIVATE_DATA
*Private
,
418 IN HII_STRING_PACKAGE_INSTANCE
*StringPackage
,
419 IN EFI_STRING_ID StringId
,
420 OUT UINT8
*BlockType
, OPTIONAL
421 OUT UINT8
**StringBlockAddr
, OPTIONAL
422 OUT UINTN
*StringTextOffset
, OPTIONAL
423 OUT EFI_STRING_ID
*LastStringId OPTIONAL
428 Parse all glyph blocks to find a glyph block specified by CharValue.
429 If CharValue = (CHAR16) (-1), collect all default character cell information
430 within this font package and backup its information.
432 @param FontPackage Hii string package instance.
433 @param CharValue Unicode character value, which identifies a glyph
435 @param GlyphBuffer Output the corresponding bitmap data of the found
436 block. It is the caller's responsiblity to free
438 @param Cell Output cell information of the encoded bitmap.
439 @param GlyphBufferLen If not NULL, output the length of GlyphBuffer.
441 @retval EFI_SUCCESS The bitmap data is retrieved successfully.
442 @retval EFI_NOT_FOUND The specified CharValue does not exist in current
444 @retval EFI_OUT_OF_RESOURCES The system is out of resources to accomplish the
450 IN HII_FONT_PACKAGE_INSTANCE
*FontPackage
,
452 OUT UINT8
**GlyphBuffer
, OPTIONAL
453 OUT EFI_HII_GLYPH_INFO
*Cell
, OPTIONAL
454 OUT UINTN
*GlyphBufferLen OPTIONAL
458 // EFI_HII_FONT_PROTOCOL protocol interfaces
463 Renders a string to a bitmap or to the display.
465 @param This A pointer to the EFI_HII_FONT_PROTOCOL instance.
466 @param Flags Describes how the string is to be drawn.
467 @param String Points to the null-terminated string to be
469 @param StringInfo Points to the string output information,
470 including the color and font. If NULL, then the
471 string will be output in the default system font
473 @param Blt If this points to a non-NULL on entry, this
474 points to the image, which is Width pixels wide
475 and Height pixels high. The string will be drawn
477 EFI_HII_OUT_FLAG_CLIP is implied. If this points
478 to a NULL on entry, then a buffer
479 will be allocated to hold the generated image and
480 the pointer updated on exit. It is the caller's
481 responsibility to free this buffer.
482 @param BltX Together with BltX, Specifies the offset from the left and top edge
483 of the image of the first character cell in the
485 @param BltY Together with BltY, Specifies the offset from the left and top edge
486 of the image of the first character cell in the
488 @param RowInfoArray If this is non-NULL on entry, then on exit, this
489 will point to an allocated buffer containing
490 row information and RowInfoArraySize will be
491 updated to contain the number of elements.
492 This array describes the characters which were at
493 least partially drawn and the heights of the
494 rows. It is the caller's responsibility to free
496 @param RowInfoArraySize If this is non-NULL on entry, then on exit it
497 contains the number of elements in RowInfoArray.
498 @param ColumnInfoArray If this is non-NULL, then on return it will be
499 filled with the horizontal offset for each
500 character in the string on the row where it is
501 displayed. Non-printing characters will have
502 the offset ~0. The caller is responsible to
503 allocate a buffer large enough so that there
504 is one entry for each character in the string,
505 not including the null-terminator. It is possible
506 when character display is normalized that some
507 character cells overlap.
509 @retval EFI_SUCCESS The string was successfully rendered.
510 @retval EFI_OUT_OF_RESOURCES Unable to allocate an output buffer for
512 @retval EFI_INVALID_PARAMETER The String or Blt.
513 @retval EFI_INVALID_PARAMETER Flags were invalid combination..
519 IN CONST EFI_HII_FONT_PROTOCOL
*This
,
520 IN EFI_HII_OUT_FLAGS Flags
,
521 IN CONST EFI_STRING String
,
522 IN CONST EFI_FONT_DISPLAY_INFO
*StringInfo OPTIONAL
,
523 IN OUT EFI_IMAGE_OUTPUT
**Blt
,
526 OUT EFI_HII_ROW_INFO
**RowInfoArray OPTIONAL
,
527 OUT UINTN
*RowInfoArraySize OPTIONAL
,
528 OUT UINTN
*ColumnInfoArray OPTIONAL
533 Render a string to a bitmap or the screen containing the contents of the specified string.
535 @param This A pointer to the EFI_HII_FONT_PROTOCOL instance.
536 @param Flags Describes how the string is to be drawn.
537 @param PackageList The package list in the HII database to search
538 for the specified string.
539 @param StringId The string's id, which is unique within
541 @param Language Points to the language for the retrieved string.
542 If NULL, then the current system language is
544 @param StringInfo Points to the string output information,
545 including the color and font. If NULL, then the
546 string will be output in the default system font
548 @param Blt If this points to a non-NULL on entry, this
549 points to the image, which is Width pixels wide
550 and Height pixels high. The string will be drawn
552 EFI_HII_OUT_FLAG_CLIP is implied. If this points
553 to a NULL on entry, then a buffer
554 will be allocated to hold the generated image and
555 the pointer updated on exit. It is the caller's
556 responsibility to free this buffer.
557 @param BltX Together with BltX, Specifies the offset from the left and top edge
558 of the image of the first character cell in the
560 @param BltY Together with BltY, Specifies the offset from the left and top edge
561 of the image of the first character cell in the
563 @param RowInfoArray If this is non-NULL on entry, then on exit, this
564 will point to an allocated buffer containing
565 row information and RowInfoArraySize will be
566 updated to contain the number of elements.
567 This array describes the characters which were at
568 least partially drawn and the heights of the
569 rows. It is the caller's responsibility to free
571 @param RowInfoArraySize If this is non-NULL on entry, then on exit it
572 contains the number of elements in RowInfoArray.
573 @param ColumnInfoArray If this is non-NULL, then on return it will be
574 filled with the horizontal offset for each
575 character in the string on the row where it is
576 displayed. Non-printing characters will have
577 the offset ~0. The caller is responsible to
578 allocate a buffer large enough so that there
579 is one entry for each character in the string,
580 not including the null-terminator. It is possible
581 when character display is normalized that some
582 character cells overlap.
584 @retval EFI_SUCCESS The string was successfully rendered.
585 @retval EFI_OUT_OF_RESOURCES Unable to allocate an output buffer for
587 @retval EFI_INVALID_PARAMETER The Blt or PackageList was NULL.
588 @retval EFI_INVALID_PARAMETER Flags were invalid combination.
589 @retval EFI_NOT_FOUND The specified PackageList is not in the Database or the stringid is not
590 in the specified PackageList.
596 IN CONST EFI_HII_FONT_PROTOCOL
*This
,
597 IN EFI_HII_OUT_FLAGS Flags
,
598 IN EFI_HII_HANDLE PackageList
,
599 IN EFI_STRING_ID StringId
,
600 IN CONST CHAR8
* Language
,
601 IN CONST EFI_FONT_DISPLAY_INFO
*StringInfo OPTIONAL
,
602 IN OUT EFI_IMAGE_OUTPUT
**Blt
,
605 OUT EFI_HII_ROW_INFO
**RowInfoArray OPTIONAL
,
606 OUT UINTN
*RowInfoArraySize OPTIONAL
,
607 OUT UINTN
*ColumnInfoArray OPTIONAL
612 Convert the glyph for a single character into a bitmap.
614 @param This A pointer to the EFI_HII_FONT_PROTOCOL instance.
615 @param Char Character to retrieve.
616 @param StringInfo Points to the string font and color information
617 or NULL if the string should use the default
618 system font and color.
619 @param Blt Thus must point to a NULL on entry. A buffer will
620 be allocated to hold the output and the pointer
621 updated on exit. It is the caller's
622 responsibility to free this buffer.
623 @param Baseline Number of pixels from the bottom of the bitmap to
626 @retval EFI_SUCCESS Glyph bitmap created.
627 @retval EFI_OUT_OF_RESOURCES Unable to allocate the output buffer Blt.
628 @retval EFI_WARN_UNKNOWN_GLYPH The glyph was unknown and was replaced with the
629 glyph for Unicode character 0xFFFD.
630 @retval EFI_INVALID_PARAMETER Blt is NULL or *Blt is not NULL.
636 IN CONST EFI_HII_FONT_PROTOCOL
*This
,
638 IN CONST EFI_FONT_DISPLAY_INFO
*StringInfo
,
639 OUT EFI_IMAGE_OUTPUT
**Blt
,
640 OUT UINTN
*Baseline OPTIONAL
645 This function iterates through fonts which match the specified font, using
646 the specified criteria. If String is non-NULL, then all of the characters in
647 the string must exist in order for a candidate font to be returned.
649 @param This A pointer to the EFI_HII_FONT_PROTOCOL instance.
650 @param FontHandle On entry, points to the font handle returned by a
651 previous call to GetFontInfo() or NULL to start
652 with the first font. On return, points to the
653 returned font handle or points to NULL if there
654 are no more matching fonts.
655 @param StringInfoIn Upon entry, points to the font to return
656 information about. If NULL, then the information about the system default
657 font will be returned.
658 @param StringInfoOut Upon return, contains the matching font's
659 information. If NULL, then no information is
660 returned. It's caller's responsibility to free
662 @param String Points to the string which will be tested to
663 determine if all characters are available. If
664 NULL, then any font is acceptable.
666 @retval EFI_SUCCESS Matching font returned successfully.
667 @retval EFI_NOT_FOUND No matching font was found.
668 @retval EFI_INVALID_PARAMETER StringInfoIn is NULL.
669 @retval EFI_INVALID_PARAMETER StringInfoIn->FontInfoMask is an invalid combination.
670 @retval EFI_OUT_OF_RESOURCES There were insufficient resources to complete the
676 IN CONST EFI_HII_FONT_PROTOCOL
*This
,
677 IN OUT EFI_FONT_HANDLE
*FontHandle
,
678 IN CONST EFI_FONT_DISPLAY_INFO
*StringInfoIn
, OPTIONAL
679 OUT EFI_FONT_DISPLAY_INFO
**StringInfoOut
,
680 IN CONST EFI_STRING String OPTIONAL
684 // EFI_HII_IMAGE_PROTOCOL interfaces
689 This function adds the image Image to the group of images owned by PackageList, and returns
690 a new image identifier (ImageId).
692 @param This A pointer to the EFI_HII_IMAGE_PROTOCOL instance.
693 @param PackageList Handle of the package list where this image will
695 @param ImageId On return, contains the new image id, which is
696 unique within PackageList.
697 @param Image Points to the image.
699 @retval EFI_SUCCESS The new image was added successfully.
700 @retval EFI_NOT_FOUND The specified PackageList could not be found in
702 @retval EFI_OUT_OF_RESOURCES Could not add the image due to lack of resources.
703 @retval EFI_INVALID_PARAMETER Image is NULL or ImageId is NULL.
709 IN CONST EFI_HII_IMAGE_PROTOCOL
*This
,
710 IN EFI_HII_HANDLE PackageList
,
711 OUT EFI_IMAGE_ID
*ImageId
,
712 IN CONST EFI_IMAGE_INPUT
*Image
717 This function retrieves the image specified by ImageId which is associated with
718 the specified PackageList and copies it into the buffer specified by Image.
720 @param This A pointer to the EFI_HII_IMAGE_PROTOCOL instance.
721 @param PackageList Handle of the package list where this image will
723 @param ImageId The image's id,, which is unique within
725 @param Image Points to the image.
727 @retval EFI_SUCCESS The new image was returned successfully.
728 @retval EFI_NOT_FOUND The image specified by ImageId is not available.
729 The specified PackageList is not in the database.
730 @retval EFI_BUFFER_TOO_SMALL The buffer specified by ImageSize is too small to
732 @retval EFI_INVALID_PARAMETER The Image or ImageSize was NULL.
733 @retval EFI_OUT_OF_RESOURCES The bitmap could not be retrieved because there was not
740 IN CONST EFI_HII_IMAGE_PROTOCOL
*This
,
741 IN EFI_HII_HANDLE PackageList
,
742 IN EFI_IMAGE_ID ImageId
,
743 OUT EFI_IMAGE_INPUT
*Image
748 This function updates the image specified by ImageId in the specified PackageListHandle to
749 the image specified by Image.
751 @param This A pointer to the EFI_HII_IMAGE_PROTOCOL instance.
752 @param PackageList The package list containing the images.
753 @param ImageId The image's id,, which is unique within
755 @param Image Points to the image.
757 @retval EFI_SUCCESS The new image was updated successfully.
758 @retval EFI_NOT_FOUND The image specified by ImageId is not in the
759 database. The specified PackageList is not in the database.
760 @retval EFI_INVALID_PARAMETER The Image was NULL.
766 IN CONST EFI_HII_IMAGE_PROTOCOL
*This
,
767 IN EFI_HII_HANDLE PackageList
,
768 IN EFI_IMAGE_ID ImageId
,
769 IN CONST EFI_IMAGE_INPUT
*Image
774 This function renders an image to a bitmap or the screen using the specified
775 color and options. It draws the image on an existing bitmap, allocates a new
776 bitmap or uses the screen. The images can be clipped.
778 @param This A pointer to the EFI_HII_IMAGE_PROTOCOL instance.
779 @param Flags Describes how the image is to be drawn.
780 @param Image Points to the image to be displayed.
781 @param Blt If this points to a non-NULL on entry, this
782 points to the image, which is Width pixels wide
783 and Height pixels high. The image will be drawn
784 onto this image and EFI_HII_DRAW_FLAG_CLIP is
785 implied. If this points to a NULL on entry, then
786 a buffer will be allocated to hold the generated
787 image and the pointer updated on exit. It is the
788 caller's responsibility to free this buffer.
789 @param BltX Specifies the offset from the left and top edge
790 of the output image of the first pixel in the
792 @param BltY Specifies the offset from the left and top edge
793 of the output image of the first pixel in the
796 @retval EFI_SUCCESS The image was successfully drawn.
797 @retval EFI_OUT_OF_RESOURCES Unable to allocate an output buffer for Blt.
798 @retval EFI_INVALID_PARAMETER The Image or Blt was NULL.
799 @retval EFI_INVALID_PARAMETER Any combination of Flags is invalid.
805 IN CONST EFI_HII_IMAGE_PROTOCOL
*This
,
806 IN EFI_HII_DRAW_FLAGS Flags
,
807 IN CONST EFI_IMAGE_INPUT
*Image
,
808 IN OUT EFI_IMAGE_OUTPUT
**Blt
,
815 This function renders an image to a bitmap or the screen using the specified
816 color and options. It draws the image on an existing bitmap, allocates a new
817 bitmap or uses the screen. The images can be clipped.
819 @param This A pointer to the EFI_HII_IMAGE_PROTOCOL instance.
820 @param Flags Describes how the image is to be drawn.
821 @param PackageList The package list in the HII database to search
822 for the specified image.
823 @param ImageId The image's id, which is unique within
825 @param Blt If this points to a non-NULL on entry, this
826 points to the image, which is Width pixels wide
827 and Height pixels high. The image will be drawn
829 EFI_HII_DRAW_FLAG_CLIP is implied. If this points
830 to a NULL on entry, then a buffer will be
831 allocated to hold the generated image and the
832 pointer updated on exit. It is the caller's
833 responsibility to free this buffer.
834 @param BltX Specifies the offset from the left and top edge
835 of the output image of the first pixel in the
837 @param BltY Specifies the offset from the left and top edge
838 of the output image of the first pixel in the
841 @retval EFI_SUCCESS The image was successfully drawn.
842 @retval EFI_OUT_OF_RESOURCES Unable to allocate an output buffer for Blt.
843 @retval EFI_INVALID_PARAMETER The Blt was NULL.
844 @retval EFI_NOT_FOUND The image specified by ImageId is not in the database.
845 The specified PackageList is not in the database.
851 IN CONST EFI_HII_IMAGE_PROTOCOL
*This
,
852 IN EFI_HII_DRAW_FLAGS Flags
,
853 IN EFI_HII_HANDLE PackageList
,
854 IN EFI_IMAGE_ID ImageId
,
855 IN OUT EFI_IMAGE_OUTPUT
**Blt
,
863 // EFI_HII_STRING_PROTOCOL
868 This function adds the string String to the group of strings owned by PackageList, with the
869 specified font information StringFontInfo and returns a new string id.
871 @param This A pointer to the EFI_HII_STRING_PROTOCOL
873 @param PackageList Handle of the package list where this string will
875 @param StringId On return, contains the new strings id, which is
876 unique within PackageList.
877 @param Language Points to the language for the new string.
878 @param LanguageName Points to the printable language name to
879 associate with the passed in Language field.If
880 LanguageName is not NULL and the string package
881 header's LanguageName associated with a given
882 Language is not zero, the LanguageName being
883 passed in will be ignored.
884 @param String Points to the new null-terminated string.
885 @param StringFontInfo Points to the new string's font information or
886 NULL if the string should have the default system
887 font, size and style.
889 @retval EFI_SUCCESS The new string was added successfully.
890 @retval EFI_NOT_FOUND The specified PackageList could not be found in
892 @retval EFI_OUT_OF_RESOURCES Could not add the string due to lack of
894 @retval EFI_INVALID_PARAMETER String is NULL or StringId is NULL or Language is
901 IN CONST EFI_HII_STRING_PROTOCOL
*This
,
902 IN EFI_HII_HANDLE PackageList
,
903 OUT EFI_STRING_ID
*StringId
,
904 IN CONST CHAR8
*Language
,
905 IN CONST CHAR16
*LanguageName
, OPTIONAL
906 IN CONST EFI_STRING String
,
907 IN CONST EFI_FONT_INFO
*StringFontInfo OPTIONAL
912 This function retrieves the string specified by StringId which is associated
913 with the specified PackageList in the language Language and copies it into
914 the buffer specified by String.
916 @param This A pointer to the EFI_HII_STRING_PROTOCOL
918 @param Language Points to the language for the retrieved string.
919 @param PackageList The package list in the HII database to search
920 for the specified string.
921 @param StringId The string's id, which is unique within
923 @param String Points to the new null-terminated string.
924 @param StringSize On entry, points to the size of the buffer
925 pointed to by String, in bytes. On return,
926 points to the length of the string, in bytes.
927 @param StringFontInfo If not NULL, points to the string's font
928 information. It's caller's responsibility to
931 @retval EFI_SUCCESS The string was returned successfully.
932 @retval EFI_NOT_FOUND The string specified by StringId is not
934 @retval EFI_NOT_FOUND The string specified by StringId is available but
935 not in the specified language.
936 The specified PackageList is not in the database.
937 @retval EFI_INVALID_LANGUAGE - The string specified by StringId is available but
938 @retval EFI_BUFFER_TOO_SMALL The buffer specified by StringSize is too small
940 @retval EFI_INVALID_PARAMETER The String or Language or StringSize was NULL.
941 @retval EFI_OUT_OF_RESOURCES There were insufficient resources to complete the
948 IN CONST EFI_HII_STRING_PROTOCOL
*This
,
949 IN CONST CHAR8
*Language
,
950 IN EFI_HII_HANDLE PackageList
,
951 IN EFI_STRING_ID StringId
,
952 OUT EFI_STRING String
,
953 IN OUT UINTN
*StringSize
,
954 OUT EFI_FONT_INFO
**StringFontInfo OPTIONAL
959 This function updates the string specified by StringId in the specified PackageList to the text
960 specified by String and, optionally, the font information specified by StringFontInfo.
962 @param This A pointer to the EFI_HII_STRING_PROTOCOL
964 @param PackageList The package list containing the strings.
965 @param StringId The string's id, which is unique within
967 @param Language Points to the language for the updated string.
968 @param String Points to the new null-terminated string.
969 @param StringFontInfo Points to the string's font information or NULL
970 if the string font information is not changed.
972 @retval EFI_SUCCESS The string was updated successfully.
973 @retval EFI_NOT_FOUND The string specified by StringId is not in the
975 @retval EFI_INVALID_PARAMETER The String or Language was NULL.
976 @retval EFI_OUT_OF_RESOURCES The system is out of resources to accomplish the
983 IN CONST EFI_HII_STRING_PROTOCOL
*This
,
984 IN EFI_HII_HANDLE PackageList
,
985 IN EFI_STRING_ID StringId
,
986 IN CONST CHAR8
*Language
,
987 IN CONST EFI_STRING String
,
988 IN CONST EFI_FONT_INFO
*StringFontInfo OPTIONAL
993 This function returns the list of supported languages, in the format specified
994 in Appendix M of UEFI 2.1 spec.
996 @param This A pointer to the EFI_HII_STRING_PROTOCOL
998 @param PackageList The package list to examine.
999 @param Languages Points to the buffer to hold the returned string.
1000 @param LanguagesSize On entry, points to the size of the buffer
1001 pointed to by Languages, in bytes. On return,
1002 points to the length of Languages, in bytes.
1004 @retval EFI_SUCCESS The languages were returned successfully.
1005 @retval EFI_INVALID_PARAMETER The Languages or LanguagesSize was NULL.
1006 @retval EFI_BUFFER_TOO_SMALL The LanguagesSize is too small to hold the list
1007 of supported languages. LanguageSize is updated
1008 to contain the required size.
1009 @retval EFI_NOT_FOUND Could not find string package in specified
1016 IN CONST EFI_HII_STRING_PROTOCOL
*This
,
1017 IN EFI_HII_HANDLE PackageList
,
1018 IN OUT CHAR8
*Languages
,
1019 IN OUT UINTN
*LanguagesSize
1024 Each string package has associated with it a single primary language and zero
1025 or more secondary languages. This routine returns the secondary languages
1026 associated with a package list.
1028 @param This A pointer to the EFI_HII_STRING_PROTOCOL
1030 @param PackageList The package list to examine.
1031 @param FirstLanguage Points to the primary language.
1032 @param SecondaryLanguages Points to the buffer to hold the returned list of
1033 secondary languages for the specified
1034 FirstLanguage. If there are no secondary
1035 languages, the function returns successfully,
1036 but this is set to NULL.
1037 @param SecondaryLanguagesSize On entry, points to the size of the buffer
1038 pointed to by SecondLanguages, in bytes. On
1039 return, points to the length of SecondLanguages
1042 @retval EFI_SUCCESS Secondary languages were correctly returned.
1043 @retval EFI_INVALID_PARAMETER FirstLanguage or SecondLanguages or
1044 SecondLanguagesSize was NULL.
1045 @retval EFI_BUFFER_TOO_SMALL The buffer specified by SecondLanguagesSize is
1046 too small to hold the returned information.
1047 SecondLanguageSize is updated to hold the size of
1048 the buffer required.
1049 @retval EFI_INVALID_LANGUAGE The language specified by FirstLanguage is not
1050 present in the specified package list.
1051 @retval EFI_NOT_FOUND The specified PackageList is not in the Database.
1056 HiiGetSecondaryLanguages (
1057 IN CONST EFI_HII_STRING_PROTOCOL
*This
,
1058 IN EFI_HII_HANDLE PackageList
,
1059 IN CONST CHAR8
*FirstLanguage
,
1060 IN OUT CHAR8
*SecondaryLanguages
,
1061 IN OUT UINTN
*SecondaryLanguagesSize
1065 // EFI_HII_DATABASE_PROTOCOL protocol interfaces
1070 This function adds the packages in the package list to the database and returns a handle. If there is a
1071 EFI_DEVICE_PATH_PROTOCOL associated with the DriverHandle, then this function will
1072 create a package of type EFI_PACKAGE_TYPE_DEVICE_PATH and add it to the package list.
1074 @param This A pointer to the EFI_HII_DATABASE_PROTOCOL
1076 @param PackageList A pointer to an EFI_HII_PACKAGE_LIST_HEADER
1078 @param DriverHandle Associate the package list with this EFI handle.
1079 @param Handle A pointer to the EFI_HII_HANDLE instance.
1081 @retval EFI_SUCCESS The package list associated with the Handle was
1082 added to the HII database.
1083 @retval EFI_OUT_OF_RESOURCES Unable to allocate necessary resources for the
1084 new database contents.
1085 @retval EFI_INVALID_PARAMETER PackageList is NULL or Handle is NULL.
1091 IN CONST EFI_HII_DATABASE_PROTOCOL
*This
,
1092 IN CONST EFI_HII_PACKAGE_LIST_HEADER
*PackageList
,
1093 IN CONST EFI_HANDLE DriverHandle
,
1094 OUT EFI_HII_HANDLE
*Handle
1099 This function removes the package list that is associated with a handle Handle
1100 from the HII database. Before removing the package, any registered functions
1101 with the notification type REMOVE_PACK and the same package type will be called.
1103 @param This A pointer to the EFI_HII_DATABASE_PROTOCOL
1105 @param Handle The handle that was registered to the data that
1106 is requested for removal.
1108 @retval EFI_SUCCESS The data associated with the Handle was removed
1109 from the HII database.
1110 @retval EFI_NOT_FOUND The specified Handle is not in database.
1115 HiiRemovePackageList (
1116 IN CONST EFI_HII_DATABASE_PROTOCOL
*This
,
1117 IN EFI_HII_HANDLE Handle
1122 This function updates the existing package list (which has the specified Handle)
1123 in the HII databases, using the new package list specified by PackageList.
1125 @param This A pointer to the EFI_HII_DATABASE_PROTOCOL
1127 @param Handle The handle that was registered to the data that
1128 is requested to be updated.
1129 @param PackageList A pointer to an EFI_HII_PACKAGE_LIST_HEADER
1132 @retval EFI_SUCCESS The HII database was successfully updated.
1133 @retval EFI_OUT_OF_RESOURCES Unable to allocate enough memory for the updated
1135 @retval EFI_INVALID_PARAMETER PackageList was NULL.
1136 @retval EFI_NOT_FOUND The specified Handle is not in database.
1141 HiiUpdatePackageList (
1142 IN CONST EFI_HII_DATABASE_PROTOCOL
*This
,
1143 IN EFI_HII_HANDLE Handle
,
1144 IN CONST EFI_HII_PACKAGE_LIST_HEADER
*PackageList
1149 This function returns a list of the package handles of the specified type
1150 that are currently active in the database. The pseudo-type
1151 EFI_HII_PACKAGE_TYPE_ALL will cause all package handles to be listed.
1153 @param This A pointer to the EFI_HII_DATABASE_PROTOCOL
1155 @param PackageType Specifies the package type of the packages to
1156 list or EFI_HII_PACKAGE_TYPE_ALL for all packages
1158 @param PackageGuid If PackageType is EFI_HII_PACKAGE_TYPE_GUID, then
1159 this is the pointer to the GUID which must match
1160 the Guid field of EFI_HII_GUID_PACKAGE_GUID_HDR.
1161 Otherwise, it must be NULL.
1162 @param HandleBufferLength On input, a pointer to the length of the handle
1163 buffer. On output, the length of the handle
1164 buffer that is required for the handles found.
1165 @param Handle An array of EFI_HII_HANDLE instances returned.
1167 @retval EFI_SUCCESS The matching handles are outputed successfully.
1168 HandleBufferLength is updated with the actual length.
1169 @retval EFI_BUFFER_TO_SMALL The HandleBufferLength parameter indicates that
1170 Handle is too small to support the number of
1171 handles. HandleBufferLength is updated with a
1172 value that will enable the data to fit.
1173 @retval EFI_NOT_FOUND No matching handle could not be found in
1175 @retval EFI_INVALID_PARAMETER Handle or HandleBufferLength was NULL.
1176 @retval EFI_INVALID_PARAMETER PackageType is not a EFI_HII_PACKAGE_TYPE_GUID but
1177 PackageGuid is not NULL, PackageType is a EFI_HII_
1178 PACKAGE_TYPE_GUID but PackageGuid is NULL.
1184 HiiListPackageLists (
1185 IN CONST EFI_HII_DATABASE_PROTOCOL
*This
,
1186 IN UINT8 PackageType
,
1187 IN CONST EFI_GUID
*PackageGuid
,
1188 IN OUT UINTN
*HandleBufferLength
,
1189 OUT EFI_HII_HANDLE
*Handle
1194 This function will export one or all package lists in the database to a buffer.
1195 For each package list exported, this function will call functions registered
1196 with EXPORT_PACK and then copy the package list to the buffer.
1198 @param This A pointer to the EFI_HII_DATABASE_PROTOCOL
1200 @param Handle An EFI_HII_HANDLE that corresponds to the desired
1201 package list in the HII database to export or
1202 NULL to indicate all package lists should be
1204 @param BufferSize On input, a pointer to the length of the buffer.
1205 On output, the length of the buffer that is
1206 required for the exported data.
1207 @param Buffer A pointer to a buffer that will contain the
1208 results of the export function.
1210 @retval EFI_SUCCESS Package exported.
1211 @retval EFI_BUFFER_TO_SMALL The HandleBufferLength parameter indicates that
1212 Handle is too small to support the number of
1213 handles. HandleBufferLength is updated with
1214 a value that will enable the data to fit.
1215 @retval EFI_NOT_FOUND The specifiecd Handle could not be found in the
1217 @retval EFI_INVALID_PARAMETER Handle or Buffer or BufferSize was NULL.
1222 HiiExportPackageLists (
1223 IN CONST EFI_HII_DATABASE_PROTOCOL
*This
,
1224 IN EFI_HII_HANDLE Handle
,
1225 IN OUT UINTN
*BufferSize
,
1226 OUT EFI_HII_PACKAGE_LIST_HEADER
*Buffer
1231 This function registers a function which will be called when specified actions related to packages of
1232 the specified type occur in the HII database. By registering a function, other HII-related drivers are
1233 notified when specific package types are added, removed or updated in the HII database.
1234 Each driver or application which registers a notification should use
1235 EFI_HII_DATABASE_PROTOCOL.UnregisterPackageNotify() before exiting.
1237 @param This A pointer to the EFI_HII_DATABASE_PROTOCOL
1239 @param PackageType Specifies the package type of the packages to
1240 list or EFI_HII_PACKAGE_TYPE_ALL for all packages
1242 @param PackageGuid If PackageType is EFI_HII_PACKAGE_TYPE_GUID, then
1243 this is the pointer to the GUID which must match
1245 EFI_HII_GUID_PACKAGE_GUID_HDR. Otherwise, it must
1247 @param PackageNotifyFn Points to the function to be called when the
1249 NotificationType occurs.
1250 @param NotifyType Describes the types of notification which this
1251 function will be receiving.
1252 @param NotifyHandle Points to the unique handle assigned to the
1253 registered notification. Can be used in
1254 EFI_HII_DATABASE_PROTOCOL.UnregisterPackageNotify()
1255 to stop notifications.
1257 @retval EFI_SUCCESS Notification registered successfully.
1258 @retval EFI_OUT_OF_RESOURCES Unable to allocate necessary data structures
1259 @retval EFI_INVALID_PARAMETER NotifyHandle is NULL.
1260 @retval EFI_INVALID_PARAMETER PackageGuid is not NULL when PackageType is not
1261 EFI_HII_PACKAGE_TYPE_GUID.
1262 @retval EFI_INVALID_PARAMETER PackageGuid is NULL when PackageType is
1263 EFI_HII_PACKAGE_TYPE_GUID.
1268 HiiRegisterPackageNotify (
1269 IN CONST EFI_HII_DATABASE_PROTOCOL
*This
,
1270 IN UINT8 PackageType
,
1271 IN CONST EFI_GUID
*PackageGuid
,
1272 IN CONST EFI_HII_DATABASE_NOTIFY PackageNotifyFn
,
1273 IN EFI_HII_DATABASE_NOTIFY_TYPE NotifyType
,
1274 OUT EFI_HANDLE
*NotifyHandle
1279 Removes the specified HII database package-related notification.
1281 @param This A pointer to the EFI_HII_DATABASE_PROTOCOL
1283 @param NotificationHandle The handle of the notification function being
1286 @retval EFI_SUCCESS Notification is unregistered successfully.
1287 @retval EFI_NOT_FOUND The incoming notification handle does not exist
1288 in current hii database.
1293 HiiUnregisterPackageNotify (
1294 IN CONST EFI_HII_DATABASE_PROTOCOL
*This
,
1295 IN EFI_HANDLE NotificationHandle
1300 This routine retrieves an array of GUID values for each keyboard layout that
1301 was previously registered in the system.
1303 @param This A pointer to the EFI_HII_DATABASE_PROTOCOL
1305 @param KeyGuidBufferLength On input, a pointer to the length of the keyboard
1306 GUID buffer. On output, the length of the handle
1307 buffer that is required for the handles found.
1308 @param KeyGuidBuffer An array of keyboard layout GUID instances
1311 @retval EFI_SUCCESS KeyGuidBuffer was updated successfully.
1312 @retval EFI_BUFFER_TOO_SMALL The KeyGuidBufferLength parameter indicates
1313 that KeyGuidBuffer is too small to support the
1314 number of GUIDs. KeyGuidBufferLength is
1315 updated with a value that will enable the data to
1317 @retval EFI_INVALID_PARAMETER The KeyGuidBuffer or KeyGuidBufferLength was
1319 @retval EFI_NOT_FOUND There was no keyboard layout.
1324 HiiFindKeyboardLayouts (
1325 IN CONST EFI_HII_DATABASE_PROTOCOL
*This
,
1326 IN OUT UINT16
*KeyGuidBufferLength
,
1327 OUT EFI_GUID
*KeyGuidBuffer
1332 This routine retrieves the requested keyboard layout. The layout is a physical description of the keys
1333 on a keyboard and the character(s) that are associated with a particular set of key strokes.
1335 @param This A pointer to the EFI_HII_DATABASE_PROTOCOL
1337 @param KeyGuid A pointer to the unique ID associated with a
1338 given keyboard layout. If KeyGuid is NULL then
1339 the current layout will be retrieved.
1340 @param KeyboardLayoutLength On input, a pointer to the length of the
1341 KeyboardLayout buffer. On output, the length of
1342 the data placed into KeyboardLayout.
1343 @param KeyboardLayout A pointer to a buffer containing the retrieved
1346 @retval EFI_SUCCESS The keyboard layout was retrieved successfully.
1347 @retval EFI_NOT_FOUND The requested keyboard layout was not found.
1348 @retval EFI_INVALID_PARAMETER The KeyboardLayout or KeyboardLayoutLength was
1354 HiiGetKeyboardLayout (
1355 IN CONST EFI_HII_DATABASE_PROTOCOL
*This
,
1356 IN CONST EFI_GUID
*KeyGuid
,
1357 IN OUT UINT16
*KeyboardLayoutLength
,
1358 OUT EFI_HII_KEYBOARD_LAYOUT
*KeyboardLayout
1363 This routine sets the default keyboard layout to the one referenced by KeyGuid. When this routine
1364 is called, an event will be signaled of the EFI_HII_SET_KEYBOARD_LAYOUT_EVENT_GUID
1365 group type. This is so that agents which are sensitive to the current keyboard layout being changed
1366 can be notified of this change.
1368 @param This A pointer to the EFI_HII_DATABASE_PROTOCOL
1370 @param KeyGuid A pointer to the unique ID associated with a
1371 given keyboard layout.
1373 @retval EFI_SUCCESS The current keyboard layout was successfully set.
1374 @retval EFI_NOT_FOUND The referenced keyboard layout was not found, so
1376 @retval EFI_INVALID_PARAMETER The KeyGuid was NULL.
1381 HiiSetKeyboardLayout (
1382 IN CONST EFI_HII_DATABASE_PROTOCOL
*This
,
1383 IN CONST EFI_GUID
*KeyGuid
1388 Return the EFI handle associated with a package list.
1390 @param This A pointer to the EFI_HII_DATABASE_PROTOCOL
1392 @param PackageListHandle An EFI_HII_HANDLE that corresponds to the desired
1393 package list in the HIIdatabase.
1394 @param DriverHandle On return, contains the EFI_HANDLE which was
1395 registered with the package list in
1398 @retval EFI_SUCCESS The DriverHandle was returned successfully.
1399 @retval EFI_INVALID_PARAMETER The PackageListHandle was not valid or
1400 DriverHandle was NULL.
1405 HiiGetPackageListHandle (
1406 IN CONST EFI_HII_DATABASE_PROTOCOL
*This
,
1407 IN EFI_HII_HANDLE PackageListHandle
,
1408 OUT EFI_HANDLE
*DriverHandle
1412 // EFI_HII_CONFIG_ROUTING_PROTOCOL interfaces
1417 This function allows a caller to extract the current configuration
1418 for one or more named elements from one or more drivers.
1420 @param This A pointer to the EFI_HII_CONFIG_ROUTING_PROTOCOL
1422 @param Request A null-terminated Unicode string in
1423 <MultiConfigRequest> format.
1424 @param Progress On return, points to a character in the Request
1425 string. Points to the string's null terminator if
1426 request was successful. Points to the most recent
1427 & before the first failing name / value pair (or
1428 the beginning of the string if the failure is in
1429 the first name / value pair) if the request was
1431 @param Results Null-terminated Unicode string in
1432 <MultiConfigAltResp> format which has all values
1433 filled in for the names in the Request string.
1434 String to be allocated by the called function.
1436 @retval EFI_SUCCESS The Results string is filled with the values
1437 corresponding to all requested names.
1438 @retval EFI_OUT_OF_RESOURCES Not enough memory to store the parts of the
1439 results that must be stored awaiting possible
1441 @retval EFI_NOT_FOUND Routing data doesn't match any known driver.
1442 Progress set to the "G" in "GUID" of the
1443 routing header that doesn't match. Note: There
1444 is no requirement that all routing data
1445 be validated before any configuration extraction.
1446 @retval EFI_INVALID_PARAMETER For example, passing in a NULL for the Request
1447 parameter would result in this type of error. The
1448 Progress parameter is set to NULL.
1449 @retval EFI_INVALID_PARAMETER Illegal syntax. Progress set to most recent &
1450 before the error or the beginning of the string.
1451 @retval EFI_INVALID_PARAMETER Unknown name. Progress points to the & before the
1457 HiiConfigRoutingExtractConfig (
1458 IN CONST EFI_HII_CONFIG_ROUTING_PROTOCOL
*This
,
1459 IN CONST EFI_STRING Request
,
1460 OUT EFI_STRING
*Progress
,
1461 OUT EFI_STRING
*Results
1466 This function allows the caller to request the current configuration for the
1467 entirety of the current HII database and returns the data in a null-terminated Unicode string.
1469 @param This A pointer to the EFI_HII_CONFIG_ROUTING_PROTOCOL
1471 @param Results Null-terminated Unicode string in
1472 <MultiConfigAltResp> format which has all values
1473 filled in for the names in the Request string.
1474 String to be allocated by the called function.
1475 De-allocation is up to the caller.
1477 @retval EFI_SUCCESS The Results string is filled with the values
1478 corresponding to all requested names.
1479 @retval EFI_OUT_OF_RESOURCES Not enough memory to store the parts of the
1480 results that must be stored awaiting possible
1482 @retval EFI_INVALID_PARAMETER For example, passing in a NULL for the Results
1483 parameter would result in this type of error.
1488 HiiConfigRoutingExportConfig (
1489 IN CONST EFI_HII_CONFIG_ROUTING_PROTOCOL
*This
,
1490 OUT EFI_STRING
*Results
1495 This function processes the results of processing forms and routes it to the
1496 appropriate handlers or storage.
1498 @param This A pointer to the EFI_HII_CONFIG_ROUTING_PROTOCOL
1500 @param Configuration A null-terminated Unicode string in
1501 <MulltiConfigResp> format.
1502 @param Progress A pointer to a string filled in with the offset
1503 of the most recent & before the first failing
1504 name / value pair (or the beginning of the string
1505 if the failure is in the first name / value pair)
1506 or the terminating NULL if all was successful.
1508 @retval EFI_SUCCESS The results have been distributed or are awaiting
1510 @retval EFI_OUT_OF_RESOURCES Not enough memory to store the parts of the
1511 results that must be stored awaiting possible
1513 @retval EFI_INVALID_PARAMETER Passing in a NULL for the Configuration parameter
1514 would result in this type of error.
1515 @retval EFI_NOT_FOUND Target for the specified routing data was not
1521 HiiConfigRoutingRouteConfig (
1522 IN CONST EFI_HII_CONFIG_ROUTING_PROTOCOL
*This
,
1523 IN CONST EFI_STRING Configuration
,
1524 OUT EFI_STRING
*Progress
1530 This helper function is to be called by drivers to map configuration data stored
1531 in byte array ("block") formats such as UEFI Variables into current configuration strings.
1533 @param This A pointer to the EFI_HII_CONFIG_ROUTING_PROTOCOL
1535 @param ConfigRequest A null-terminated Unicode string in
1536 <ConfigRequest> format.
1537 @param Block Array of bytes defining the block's
1539 @param BlockSize Length in bytes of Block.
1540 @param Config Filled-in configuration string. String allocated
1541 by the function. Returned only if call is
1543 @param Progress A pointer to a string filled in with the offset
1544 of the most recent & before the first failing
1545 name/value pair (or the beginning of the string
1546 if the failure is in the first name / value pair)
1547 or the terminating NULL if all was successful.
1549 @retval EFI_SUCCESS The request succeeded. Progress points to the
1550 null terminator at the end of the ConfigRequest
1552 @retval EFI_OUT_OF_RESOURCES Not enough memory to allocate Config.
1553 Progress points to the first character of
1555 @retval EFI_INVALID_PARAMETER Passing in a NULL for the ConfigRequest or
1556 Block parameter would result in this type of
1557 error. Progress points to the first character of
1559 @retval EFI_NOT_FOUND Target for the specified routing data was not
1560 found. Progress points to the "G" in "GUID" of
1561 the errant routing data.
1562 @retval EFI_DEVICE_ERROR Block not large enough. Progress undefined.
1563 @retval EFI_INVALID_PARAMETER Encountered non <BlockName> formatted string.
1564 Block is left updated and Progress points at
1565 the '&' preceding the first non-<BlockName>.
1571 IN CONST EFI_HII_CONFIG_ROUTING_PROTOCOL
*This
,
1572 IN CONST EFI_STRING ConfigRequest
,
1573 IN CONST UINT8
*Block
,
1574 IN CONST UINTN BlockSize
,
1575 OUT EFI_STRING
*Config
,
1576 OUT EFI_STRING
*Progress
1581 This helper function is to be called by drivers to map configuration strings
1582 to configurations stored in byte array ("block") formats such as UEFI Variables.
1584 @param This A pointer to the EFI_HII_CONFIG_ROUTING_PROTOCOL
1586 @param ConfigResp A null-terminated Unicode string in <ConfigResp>
1588 @param Block A possibly null array of bytes representing the
1589 current block. Only bytes referenced in the
1590 ConfigResp string in the block are modified. If
1591 this parameter is null or if the *BlockSize
1592 parameter is (on input) shorter than required by
1593 the Configuration string, only the BlockSize
1594 parameter is updated and an appropriate status
1595 (see below) is returned.
1596 @param BlockSize The length of the Block in units of UINT8. On
1597 input, this is the size of the Block. On output,
1598 if successful, contains the index of the last
1599 modified byte in the Block.
1600 @param Progress On return, points to an element of the ConfigResp
1601 string filled in with the offset of the most
1602 recent '&' before the first failing name / value
1603 pair (or the beginning of the string if the
1604 failure is in the first name / value pair) or
1605 the terminating NULL if all was successful.
1607 @retval EFI_SUCCESS The request succeeded. Progress points to the
1608 null terminator at the end of the ConfigResp
1610 @retval EFI_OUT_OF_RESOURCES Not enough memory to allocate Config.
1611 Progress points to the first character of
1613 @retval EFI_INVALID_PARAMETER Passing in a NULL for the ConfigResp or
1614 Block parameter would result in this type of
1615 error. Progress points to the first character of
1617 @retval EFI_NOT_FOUND Target for the specified routing data was not
1618 found. Progress points to the "G" in "GUID" of
1619 the errant routing data.
1620 @retval EFI_INVALID_PARAMETER Encountered non <BlockName> formatted name /
1621 value pair. Block is left updated and
1622 Progress points at the '&' preceding the first
1629 IN CONST EFI_HII_CONFIG_ROUTING_PROTOCOL
*This
,
1630 IN CONST EFI_STRING ConfigResp
,
1631 IN OUT UINT8
*Block
,
1632 IN OUT UINTN
*BlockSize
,
1633 OUT EFI_STRING
*Progress
1638 This helper function is to be called by drivers to extract portions of
1639 a larger configuration string.
1641 @param This A pointer to the EFI_HII_CONFIG_ROUTING_PROTOCOL
1643 @param Configuration A null-terminated Unicode string in
1644 <MultiConfigAltResp> format.
1645 @param Guid A pointer to the GUID value to search for in the
1646 routing portion of the ConfigResp string when
1647 retrieving the requested data. If Guid is NULL,
1648 then all GUID values will be searched for.
1649 @param Name A pointer to the NAME value to search for in the
1650 routing portion of the ConfigResp string when
1651 retrieving the requested data. If Name is NULL,
1652 then all Name values will be searched for.
1653 @param DevicePath A pointer to the PATH value to search for in the
1654 routing portion of the ConfigResp string when
1655 retrieving the requested data. If DevicePath is
1656 NULL, then all DevicePath values will be
1658 @param AltCfgId A pointer to the ALTCFG value to search for in
1659 the routing portion of the ConfigResp string
1660 when retrieving the requested data. If this
1661 parameter is NULL, then the current setting will
1663 @param AltCfgResp A pointer to a buffer which will be allocated by
1664 the function which contains the retrieved string
1665 as requested. This buffer is only allocated if
1666 the call was successful.
1668 @retval EFI_SUCCESS The request succeeded. The requested data was
1669 extracted and placed in the newly allocated
1671 @retval EFI_OUT_OF_RESOURCES Not enough memory to allocate AltCfgResp.
1672 @retval EFI_INVALID_PARAMETER Any parameter is invalid.
1673 @retval EFI_NOT_FOUND Target for the specified routing data was not
1680 IN CONST EFI_HII_CONFIG_ROUTING_PROTOCOL
*This
,
1681 IN CONST EFI_STRING Configuration
,
1682 IN CONST EFI_GUID
*Guid
,
1683 IN CONST EFI_STRING Name
,
1684 IN CONST EFI_DEVICE_PATH_PROTOCOL
*DevicePath
,
1685 IN CONST UINT16
*AltCfgId
,
1686 OUT EFI_STRING
*AltCfgResp
1693 extern EFI_EVENT gHiiKeyboardLayoutChanged
;