2 Private structures definitions in HiiDatabase.
4 Copyright (c) 2007 - 2009, 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/DevicePath.h>
21 #include <Protocol/HiiFont.h>
22 #include <Protocol/HiiImage.h>
23 #include <Protocol/HiiString.h>
24 #include <Protocol/HiiDatabase.h>
25 #include <Protocol/HiiConfigRouting.h>
26 #include <Protocol/HiiConfigAccess.h>
27 #include <Protocol/SimpleTextOut.h>
29 #include <Guid/HiiKeyBoardLayout.h>
30 #include <Guid/GlobalVariable.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/UefiRuntimeServicesTableLib.h>
44 #include <Library/PrintLib.h>
47 #define HII_DATABASE_NOTIFY_GUID \
49 0xc1c76, 0xd79e, 0x42fe, {0x86, 0xb, 0x8b, 0xe8, 0x7b, 0x3e, 0x7a, 0x78} \
52 #define MAX_STRING_LENGTH 1024
53 #define MAX_FONT_NAME_LEN 256
54 #define NARROW_BASELINE 15
55 #define WIDE_BASELINE 14
56 #define SYS_FONT_INFO_MASK 0x37
57 #define REPLACE_UNKNOWN_GLYPH 0xFFFD
58 #define PROPORTIONAL_GLYPH 0x80
59 #define NARROW_GLYPH 0x40
61 #define BITMAP_LEN_1_BIT(Width, Height) (((Width) + 7) / 8 * (Height))
62 #define BITMAP_LEN_4_BIT(Width, Height) (((Width) + 1) / 2 * (Height))
63 #define BITMAP_LEN_8_BIT(Width, Height) ((Width) * (Height))
64 #define BITMAP_LEN_24_BIT(Width, Height) ((Width) * (Height) * 3)
69 #define EFI_HII_VARSTORE_BUFFER 0
70 #define EFI_HII_VARSTORE_NAME_VALUE 1
71 #define EFI_HII_VARSTORE_EFI_VARIABLE 2
73 #define HII_FORMSET_STORAGE_SIGNATURE SIGNATURE_32 ('H', 'S', 'T', 'G')
78 EFI_HII_HANDLE HiiHandle
;
79 EFI_HANDLE DriverHandle
;
81 UINT8 Type
; // EFI_HII_VARSTORE_BUFFER, EFI_HII_VARSTORE_NAME_VALUE, EFI_HII_VARSTORE_EFI_VARIABLE
85 } HII_FORMSET_STORAGE
;
87 #define HII_FORMSET_STORAGE_FROM_LINK(a) CR (a, HII_FORMSET_STORAGE, Link, HII_FORMSET_STORAGE_SIGNATURE)
91 // String Package definitions
93 #define HII_STRING_PACKAGE_SIGNATURE SIGNATURE_32 ('h','i','s','p')
94 typedef struct _HII_STRING_PACKAGE_INSTANCE
{
96 EFI_HII_STRING_PACKAGE_HDR
*StringPkgHdr
;
98 LIST_ENTRY StringEntry
;
99 LIST_ENTRY FontInfoList
; // local font info list
101 } HII_STRING_PACKAGE_INSTANCE
;
104 // Form Package definitions
106 #define HII_IFR_PACKAGE_SIGNATURE SIGNATURE_32 ('h','f','r','p')
107 typedef struct _HII_IFR_PACKAGE_INSTANCE
{
109 EFI_HII_PACKAGE_HEADER FormPkgHdr
;
112 } HII_IFR_PACKAGE_INSTANCE
;
115 // Simple Font Package definitions
117 #define HII_S_FONT_PACKAGE_SIGNATURE SIGNATURE_32 ('h','s','f','p')
118 typedef struct _HII_SIMPLE_FONT_PACKAGE_INSTANCE
{
120 EFI_HII_SIMPLE_FONT_PACKAGE_HDR
*SimpleFontPkgHdr
;
121 LIST_ENTRY SimpleFontEntry
;
122 } HII_SIMPLE_FONT_PACKAGE_INSTANCE
;
125 // Font Package definitions
127 #define HII_FONT_PACKAGE_SIGNATURE SIGNATURE_32 ('h','i','f','p')
128 typedef struct _HII_FONT_PACKAGE_INSTANCE
{
130 EFI_HII_FONT_PACKAGE_HDR
*FontPkgHdr
;
132 LIST_ENTRY FontEntry
;
133 LIST_ENTRY GlyphInfoList
;
134 } HII_FONT_PACKAGE_INSTANCE
;
136 #define HII_GLYPH_INFO_SIGNATURE SIGNATURE_32 ('h','g','i','s')
137 typedef struct _HII_GLYPH_INFO
{
141 EFI_HII_GLYPH_INFO Cell
;
144 #define HII_FONT_INFO_SIGNATURE SIGNATURE_32 ('h','l','f','i')
145 typedef struct _HII_FONT_INFO
{
148 LIST_ENTRY
*GlobalEntry
;
152 #define HII_GLOBAL_FONT_INFO_SIGNATURE SIGNATURE_32 ('h','g','f','i')
153 typedef struct _HII_GLOBAL_FONT_INFO
{
156 HII_FONT_PACKAGE_INSTANCE
*FontPackage
;
158 EFI_FONT_INFO
*FontInfo
;
159 } HII_GLOBAL_FONT_INFO
;
162 // Image Package definitions
165 #define HII_PIXEL_MASK 0x80
167 typedef struct _HII_IMAGE_PACKAGE_INSTANCE
{
168 EFI_HII_IMAGE_PACKAGE_HDR ImagePkgHdr
;
169 UINT32 ImageBlockSize
;
170 UINT32 PaletteInfoSize
;
173 } HII_IMAGE_PACKAGE_INSTANCE
;
176 // Keyboard Layout Pacakge definitions
178 #define HII_KB_LAYOUT_PACKAGE_SIGNATURE SIGNATURE_32 ('h','k','l','p')
179 typedef struct _HII_KEYBOARD_LAYOUT_PACKAGE_INSTANCE
{
182 LIST_ENTRY KeyboardEntry
;
183 } HII_KEYBOARD_LAYOUT_PACKAGE_INSTANCE
;
186 // Guid Package definitions
188 #define HII_GUID_PACKAGE_SIGNATURE SIGNATURE_32 ('h','i','g','p')
189 typedef struct _HII_GUID_PACKAGE_INSTANCE
{
192 LIST_ENTRY GuidEntry
;
193 } HII_GUID_PACKAGE_INSTANCE
;
196 // A package list can contain only one or less than one device path package.
197 // This rule also applies to image package since ImageId can not be duplicate.
199 typedef struct _HII_DATABASE_PACKAGE_LIST_INSTANCE
{
200 EFI_HII_PACKAGE_LIST_HEADER PackageListHdr
;
201 LIST_ENTRY GuidPkgHdr
;
202 LIST_ENTRY FormPkgHdr
;
203 LIST_ENTRY KeyboardLayoutHdr
;
204 LIST_ENTRY StringPkgHdr
;
205 LIST_ENTRY FontPkgHdr
;
206 HII_IMAGE_PACKAGE_INSTANCE
*ImagePkg
;
207 LIST_ENTRY SimpleFontPkgHdr
;
208 UINT8
*DevicePathPkg
;
209 } HII_DATABASE_PACKAGE_LIST_INSTANCE
;
211 #define HII_HANDLE_SIGNATURE SIGNATURE_32 ('h','i','h','l')
219 #define HII_DATABASE_RECORD_SIGNATURE SIGNATURE_32 ('h','i','d','r')
221 typedef struct _HII_DATABASE_RECORD
{
223 HII_DATABASE_PACKAGE_LIST_INSTANCE
*PackageList
;
224 EFI_HANDLE DriverHandle
;
225 EFI_HII_HANDLE Handle
;
226 LIST_ENTRY DatabaseEntry
;
227 } HII_DATABASE_RECORD
;
229 #define HII_DATABASE_NOTIFY_SIGNATURE SIGNATURE_32 ('h','i','d','n')
231 typedef struct _HII_DATABASE_NOTIFY
{
233 EFI_HANDLE NotifyHandle
;
235 EFI_GUID
*PackageGuid
;
236 EFI_HII_DATABASE_NOTIFY PackageNotifyFn
;
237 EFI_HII_DATABASE_NOTIFY_TYPE NotifyType
;
238 LIST_ENTRY DatabaseNotifyEntry
;
239 } HII_DATABASE_NOTIFY
;
241 #define HII_DATABASE_PRIVATE_DATA_SIGNATURE SIGNATURE_32 ('H', 'i', 'D', 'p')
243 typedef struct _HII_DATABASE_PRIVATE_DATA
{
245 LIST_ENTRY DatabaseList
;
246 LIST_ENTRY DatabaseNotifyList
;
247 EFI_HII_FONT_PROTOCOL HiiFont
;
248 EFI_HII_IMAGE_PROTOCOL HiiImage
;
249 EFI_HII_STRING_PROTOCOL HiiString
;
250 EFI_HII_DATABASE_PROTOCOL HiiDatabase
;
251 EFI_HII_CONFIG_ROUTING_PROTOCOL ConfigRouting
;
252 LIST_ENTRY HiiHandleList
;
254 LIST_ENTRY FontInfoList
; // global font info list
255 UINTN Attribute
; // default system color
256 EFI_GUID CurrentLayoutGuid
;
257 EFI_HII_KEYBOARD_LAYOUT
*CurrentLayout
;
258 } HII_DATABASE_PRIVATE_DATA
;
260 #define HII_FONT_DATABASE_PRIVATE_DATA_FROM_THIS(a) \
262 HII_DATABASE_PRIVATE_DATA, \
264 HII_DATABASE_PRIVATE_DATA_SIGNATURE \
267 #define HII_IMAGE_DATABASE_PRIVATE_DATA_FROM_THIS(a) \
269 HII_DATABASE_PRIVATE_DATA, \
271 HII_DATABASE_PRIVATE_DATA_SIGNATURE \
274 #define HII_STRING_DATABASE_PRIVATE_DATA_FROM_THIS(a) \
276 HII_DATABASE_PRIVATE_DATA, \
278 HII_DATABASE_PRIVATE_DATA_SIGNATURE \
281 #define HII_DATABASE_DATABASE_PRIVATE_DATA_FROM_THIS(a) \
283 HII_DATABASE_PRIVATE_DATA, \
285 HII_DATABASE_PRIVATE_DATA_SIGNATURE \
288 #define CONFIG_ROUTING_DATABASE_PRIVATE_DATA_FROM_THIS(a) \
290 HII_DATABASE_PRIVATE_DATA, \
292 HII_DATABASE_PRIVATE_DATA_SIGNATURE \
296 // Internal function prototypes.
300 This function checks whether a handle is a valid EFI_HII_HANDLE.
302 @param Handle Pointer to a EFI_HII_HANDLE
305 @retval FALSE Invalid
310 EFI_HII_HANDLE Handle
315 This function checks whether EFI_FONT_INFO exists in current database. If
316 FontInfoMask is specified, check what options can be used to make a match.
317 Note that the masks relate to where the system default should be supplied
318 are ignored by this function.
320 @param Private Hii database private structure.
321 @param FontInfo Points to EFI_FONT_INFO structure.
322 @param FontInfoMask If not NULL, describes what options can be used
323 to make a match between the font requested and
324 the font available. The caller must guarantee
326 @param FontHandle On entry, Points to the font handle returned by a
327 previous call to GetFontInfo() or NULL to start
329 @param GlobalFontInfo If not NULL, output the corresponding globa font
333 @retval FALSE Not existed
338 IN HII_DATABASE_PRIVATE_DATA
*Private
,
339 IN EFI_FONT_INFO
*FontInfo
,
340 IN EFI_FONT_INFO_MASK
*FontInfoMask
, OPTIONAL
341 IN EFI_FONT_HANDLE FontHandle
, OPTIONAL
342 OUT HII_GLOBAL_FONT_INFO
**GlobalFontInfo OPTIONAL
347 This function invokes the matching registered function.
349 @param Private HII Database driver private structure.
350 @param NotifyType The type of change concerning the database.
351 @param PackageInstance Points to the package referred to by the notification.
352 @param PackageType Package type
353 @param Handle The handle of the package list which contains the specified package.
355 @retval EFI_SUCCESS Already checked all registered function and invoked
357 @retval EFI_INVALID_PARAMETER Any input parameter is not valid.
361 InvokeRegisteredFunction (
362 IN HII_DATABASE_PRIVATE_DATA
*Private
,
363 IN EFI_HII_DATABASE_NOTIFY_TYPE NotifyType
,
364 IN VOID
*PackageInstance
,
365 IN UINT8 PackageType
,
366 IN EFI_HII_HANDLE Handle
371 Retrieve system default font and color.
373 @param Private HII database driver private data.
374 @param FontInfo Points to system default font output-related
375 information. It's caller's responsibility to free
377 @param FontInfoSize If not NULL, output the size of buffer FontInfo.
379 @retval EFI_SUCCESS Cell information is added to the GlyphInfoList.
380 @retval EFI_OUT_OF_RESOURCES The system is out of resources to accomplish the
382 @retval EFI_INVALID_PARAMETER Any input parameter is invalid.
387 IN HII_DATABASE_PRIVATE_DATA
*Private
,
388 OUT EFI_FONT_DISPLAY_INFO
**FontInfo
,
389 OUT UINTN
*FontInfoSize OPTIONAL
394 Parse all string blocks to find a String block specified by StringId.
395 If StringId = (EFI_STRING_ID) (-1), find out all EFI_HII_SIBT_FONT blocks
396 within this string package and backup its information.
397 If StringId = 0, output the string id of last string block (EFI_HII_SIBT_END).
399 @param Private Hii database private structure.
400 @param StringPackage Hii string package instance.
401 @param StringId The string's id, which is unique within
403 @param BlockType Output the block type of found string block.
404 @param StringBlockAddr Output the block address of found string block.
405 @param StringTextOffset Offset, relative to the found block address, of
406 the string text information.
407 @param LastStringId Output the last string id when StringId = 0.
409 @retval EFI_SUCCESS The string text and font is retrieved
411 @retval EFI_NOT_FOUND The specified text or font info can not be found
413 @retval EFI_OUT_OF_RESOURCES The system is out of resources to accomplish the
419 IN HII_DATABASE_PRIVATE_DATA
*Private
,
420 IN HII_STRING_PACKAGE_INSTANCE
*StringPackage
,
421 IN EFI_STRING_ID StringId
,
422 OUT UINT8
*BlockType
, OPTIONAL
423 OUT UINT8
**StringBlockAddr
, OPTIONAL
424 OUT UINTN
*StringTextOffset
, OPTIONAL
425 OUT EFI_STRING_ID
*LastStringId OPTIONAL
430 Parse all glyph blocks to find a glyph block specified by CharValue.
431 If CharValue = (CHAR16) (-1), collect all default character cell information
432 within this font package and backup its information.
434 @param FontPackage Hii string package instance.
435 @param CharValue Unicode character value, which identifies a glyph
437 @param GlyphBuffer Output the corresponding bitmap data of the found
438 block. It is the caller's responsiblity to free
440 @param Cell Output cell information of the encoded bitmap.
441 @param GlyphBufferLen If not NULL, output the length of GlyphBuffer.
443 @retval EFI_SUCCESS The bitmap data is retrieved successfully.
444 @retval EFI_NOT_FOUND The specified CharValue does not exist in current
446 @retval EFI_OUT_OF_RESOURCES The system is out of resources to accomplish the
452 IN HII_FONT_PACKAGE_INSTANCE
*FontPackage
,
454 OUT UINT8
**GlyphBuffer
, OPTIONAL
455 OUT EFI_HII_GLYPH_INFO
*Cell
, OPTIONAL
456 OUT UINTN
*GlyphBufferLen OPTIONAL
460 // EFI_HII_FONT_PROTOCOL protocol interfaces
465 Renders a string to a bitmap or to the display.
467 @param This A pointer to the EFI_HII_FONT_PROTOCOL instance.
468 @param Flags Describes how the string is to be drawn.
469 @param String Points to the null-terminated string to be
471 @param StringInfo Points to the string output information,
472 including the color and font. If NULL, then the
473 string will be output in the default system font
475 @param Blt If this points to a non-NULL on entry, this
476 points to the image, which is Width pixels wide
477 and Height pixels high. The string will be drawn
479 EFI_HII_OUT_FLAG_CLIP is implied. If this points
480 to a NULL on entry, then a buffer
481 will be allocated to hold the generated image and
482 the pointer updated on exit. It is the caller's
483 responsibility to free this buffer.
484 @param BltX Together with BltX, Specifies the offset from the left and top edge
485 of the image of the first character cell in the
487 @param BltY Together with BltY, Specifies the offset from the left and top edge
488 of the image of the first character cell in the
490 @param RowInfoArray If this is non-NULL on entry, then on exit, this
491 will point to an allocated buffer containing
492 row information and RowInfoArraySize will be
493 updated to contain the number of elements.
494 This array describes the characters which were at
495 least partially drawn and the heights of the
496 rows. It is the caller's responsibility to free
498 @param RowInfoArraySize If this is non-NULL on entry, then on exit it
499 contains the number of elements in RowInfoArray.
500 @param ColumnInfoArray If this is non-NULL, then on return it will be
501 filled with the horizontal offset for each
502 character in the string on the row where it is
503 displayed. Non-printing characters will have
504 the offset ~0. The caller is responsible to
505 allocate a buffer large enough so that there
506 is one entry for each character in the string,
507 not including the null-terminator. It is possible
508 when character display is normalized that some
509 character cells overlap.
511 @retval EFI_SUCCESS The string was successfully rendered.
512 @retval EFI_OUT_OF_RESOURCES Unable to allocate an output buffer for
514 @retval EFI_INVALID_PARAMETER The String or Blt.
515 @retval EFI_INVALID_PARAMETER Flags were invalid combination..
521 IN CONST EFI_HII_FONT_PROTOCOL
*This
,
522 IN EFI_HII_OUT_FLAGS Flags
,
523 IN CONST EFI_STRING String
,
524 IN CONST EFI_FONT_DISPLAY_INFO
*StringInfo OPTIONAL
,
525 IN OUT EFI_IMAGE_OUTPUT
**Blt
,
528 OUT EFI_HII_ROW_INFO
**RowInfoArray OPTIONAL
,
529 OUT UINTN
*RowInfoArraySize OPTIONAL
,
530 OUT UINTN
*ColumnInfoArray OPTIONAL
535 Render a string to a bitmap or the screen containing the contents of the specified string.
537 @param This A pointer to the EFI_HII_FONT_PROTOCOL instance.
538 @param Flags Describes how the string is to be drawn.
539 @param PackageList The package list in the HII database to search
540 for the specified string.
541 @param StringId The string's id, which is unique within
543 @param Language Points to the language for the retrieved string.
544 If NULL, then the current system language is
546 @param StringInfo Points to the string output information,
547 including the color and font. If NULL, then the
548 string will be output in the default system font
550 @param Blt If this points to a non-NULL on entry, this
551 points to the image, which is Width pixels wide
552 and Height pixels high. The string will be drawn
554 EFI_HII_OUT_FLAG_CLIP is implied. If this points
555 to a NULL on entry, then a buffer
556 will be allocated to hold the generated image and
557 the pointer updated on exit. It is the caller's
558 responsibility to free this buffer.
559 @param BltX Together with BltX, Specifies the offset from the left and top edge
560 of the image of the first character cell in the
562 @param BltY Together with BltY, Specifies the offset from the left and top edge
563 of the image of the first character cell in the
565 @param RowInfoArray If this is non-NULL on entry, then on exit, this
566 will point to an allocated buffer containing
567 row information and RowInfoArraySize will be
568 updated to contain the number of elements.
569 This array describes the characters which were at
570 least partially drawn and the heights of the
571 rows. It is the caller's responsibility to free
573 @param RowInfoArraySize If this is non-NULL on entry, then on exit it
574 contains the number of elements in RowInfoArray.
575 @param ColumnInfoArray If this is non-NULL, then on return it will be
576 filled with the horizontal offset for each
577 character in the string on the row where it is
578 displayed. Non-printing characters will have
579 the offset ~0. The caller is responsible to
580 allocate a buffer large enough so that there
581 is one entry for each character in the string,
582 not including the null-terminator. It is possible
583 when character display is normalized that some
584 character cells overlap.
586 @retval EFI_SUCCESS The string was successfully rendered.
587 @retval EFI_OUT_OF_RESOURCES Unable to allocate an output buffer for
589 @retval EFI_INVALID_PARAMETER The Blt or PackageList was NULL.
590 @retval EFI_INVALID_PARAMETER Flags were invalid combination.
591 @retval EFI_NOT_FOUND The specified PackageList is not in the Database or the stringid is not
592 in the specified PackageList.
598 IN CONST EFI_HII_FONT_PROTOCOL
*This
,
599 IN EFI_HII_OUT_FLAGS Flags
,
600 IN EFI_HII_HANDLE PackageList
,
601 IN EFI_STRING_ID StringId
,
602 IN CONST CHAR8
* Language
,
603 IN CONST EFI_FONT_DISPLAY_INFO
*StringInfo OPTIONAL
,
604 IN OUT EFI_IMAGE_OUTPUT
**Blt
,
607 OUT EFI_HII_ROW_INFO
**RowInfoArray OPTIONAL
,
608 OUT UINTN
*RowInfoArraySize OPTIONAL
,
609 OUT UINTN
*ColumnInfoArray OPTIONAL
614 Convert the glyph for a single character into a bitmap.
616 @param This A pointer to the EFI_HII_FONT_PROTOCOL instance.
617 @param Char Character to retrieve.
618 @param StringInfo Points to the string font and color information
619 or NULL if the string should use the default
620 system font and color.
621 @param Blt Thus must point to a NULL on entry. A buffer will
622 be allocated to hold the output and the pointer
623 updated on exit. It is the caller's
624 responsibility to free this buffer.
625 @param Baseline Number of pixels from the bottom of the bitmap to
628 @retval EFI_SUCCESS Glyph bitmap created.
629 @retval EFI_OUT_OF_RESOURCES Unable to allocate the output buffer Blt.
630 @retval EFI_WARN_UNKNOWN_GLYPH The glyph was unknown and was replaced with the
631 glyph for Unicode character 0xFFFD.
632 @retval EFI_INVALID_PARAMETER Blt is NULL or *Blt is not NULL.
638 IN CONST EFI_HII_FONT_PROTOCOL
*This
,
640 IN CONST EFI_FONT_DISPLAY_INFO
*StringInfo
,
641 OUT EFI_IMAGE_OUTPUT
**Blt
,
642 OUT UINTN
*Baseline OPTIONAL
647 This function iterates through fonts which match the specified font, using
648 the specified criteria. If String is non-NULL, then all of the characters in
649 the string must exist in order for a candidate font to be returned.
651 @param This A pointer to the EFI_HII_FONT_PROTOCOL instance.
652 @param FontHandle On entry, points to the font handle returned by a
653 previous call to GetFontInfo() or NULL to start
654 with the first font. On return, points to the
655 returned font handle or points to NULL if there
656 are no more matching fonts.
657 @param StringInfoIn Upon entry, points to the font to return
658 information about. If NULL, then the information about the system default
659 font will be returned.
660 @param StringInfoOut Upon return, contains the matching font's
661 information. If NULL, then no information is
662 returned. It's caller's responsibility to free
664 @param String Points to the string which will be tested to
665 determine if all characters are available. If
666 NULL, then any font is acceptable.
668 @retval EFI_SUCCESS Matching font returned successfully.
669 @retval EFI_NOT_FOUND No matching font was found.
670 @retval EFI_INVALID_PARAMETER StringInfoIn is NULL.
671 @retval EFI_INVALID_PARAMETER StringInfoIn->FontInfoMask is an invalid combination.
672 @retval EFI_OUT_OF_RESOURCES There were insufficient resources to complete the
678 IN CONST EFI_HII_FONT_PROTOCOL
*This
,
679 IN OUT EFI_FONT_HANDLE
*FontHandle
,
680 IN CONST EFI_FONT_DISPLAY_INFO
*StringInfoIn
, OPTIONAL
681 OUT EFI_FONT_DISPLAY_INFO
**StringInfoOut
,
682 IN CONST EFI_STRING String OPTIONAL
686 // EFI_HII_IMAGE_PROTOCOL interfaces
691 This function adds the image Image to the group of images owned by PackageList, and returns
692 a new image identifier (ImageId).
694 @param This A pointer to the EFI_HII_IMAGE_PROTOCOL instance.
695 @param PackageList Handle of the package list where this image will
697 @param ImageId On return, contains the new image id, which is
698 unique within PackageList.
699 @param Image Points to the image.
701 @retval EFI_SUCCESS The new image was added successfully.
702 @retval EFI_NOT_FOUND The specified PackageList could not be found in
704 @retval EFI_OUT_OF_RESOURCES Could not add the image due to lack of resources.
705 @retval EFI_INVALID_PARAMETER Image is NULL or ImageId is NULL.
711 IN CONST EFI_HII_IMAGE_PROTOCOL
*This
,
712 IN EFI_HII_HANDLE PackageList
,
713 OUT EFI_IMAGE_ID
*ImageId
,
714 IN CONST EFI_IMAGE_INPUT
*Image
719 This function retrieves the image specified by ImageId which is associated with
720 the specified PackageList and copies it into the buffer specified by Image.
722 @param This A pointer to the EFI_HII_IMAGE_PROTOCOL instance.
723 @param PackageList Handle of the package list where this image will
725 @param ImageId The image's id,, which is unique within
727 @param Image Points to the image.
729 @retval EFI_SUCCESS The new image was returned successfully.
730 @retval EFI_NOT_FOUND The image specified by ImageId is not available.
731 The specified PackageList is not in the database.
732 @retval EFI_BUFFER_TOO_SMALL The buffer specified by ImageSize is too small to
734 @retval EFI_INVALID_PARAMETER The Image or ImageSize was NULL.
735 @retval EFI_OUT_OF_RESOURCES The bitmap could not be retrieved because there was not
742 IN CONST EFI_HII_IMAGE_PROTOCOL
*This
,
743 IN EFI_HII_HANDLE PackageList
,
744 IN EFI_IMAGE_ID ImageId
,
745 OUT EFI_IMAGE_INPUT
*Image
750 This function updates the image specified by ImageId in the specified PackageListHandle to
751 the image specified by Image.
753 @param This A pointer to the EFI_HII_IMAGE_PROTOCOL instance.
754 @param PackageList The package list containing the images.
755 @param ImageId The image's id,, which is unique within
757 @param Image Points to the image.
759 @retval EFI_SUCCESS The new image was updated successfully.
760 @retval EFI_NOT_FOUND The image specified by ImageId is not in the
761 database. The specified PackageList is not in the database.
762 @retval EFI_INVALID_PARAMETER The Image was NULL.
768 IN CONST EFI_HII_IMAGE_PROTOCOL
*This
,
769 IN EFI_HII_HANDLE PackageList
,
770 IN EFI_IMAGE_ID ImageId
,
771 IN CONST EFI_IMAGE_INPUT
*Image
776 This function renders an image to a bitmap or the screen using the specified
777 color and options. It draws the image on an existing bitmap, allocates a new
778 bitmap or uses the screen. The images can be clipped.
780 @param This A pointer to the EFI_HII_IMAGE_PROTOCOL instance.
781 @param Flags Describes how the image is to be drawn.
782 @param Image Points to the image to be displayed.
783 @param Blt If this points to a non-NULL on entry, this
784 points to the image, which is Width pixels wide
785 and Height pixels high. The image will be drawn
786 onto this image and EFI_HII_DRAW_FLAG_CLIP is
787 implied. If this points to a NULL on entry, then
788 a buffer will be allocated to hold the generated
789 image and the pointer updated on exit. It is the
790 caller's responsibility to free this buffer.
791 @param BltX Specifies the offset from the left and top edge
792 of the output image of the first pixel in the
794 @param BltY Specifies the offset from the left and top edge
795 of the output image of the first pixel in the
798 @retval EFI_SUCCESS The image was successfully drawn.
799 @retval EFI_OUT_OF_RESOURCES Unable to allocate an output buffer for Blt.
800 @retval EFI_INVALID_PARAMETER The Image or Blt was NULL.
801 @retval EFI_INVALID_PARAMETER Any combination of Flags is invalid.
807 IN CONST EFI_HII_IMAGE_PROTOCOL
*This
,
808 IN EFI_HII_DRAW_FLAGS Flags
,
809 IN CONST EFI_IMAGE_INPUT
*Image
,
810 IN OUT EFI_IMAGE_OUTPUT
**Blt
,
817 This function renders an image to a bitmap or the screen using the specified
818 color and options. It draws the image on an existing bitmap, allocates a new
819 bitmap or uses the screen. The images can be clipped.
821 @param This A pointer to the EFI_HII_IMAGE_PROTOCOL instance.
822 @param Flags Describes how the image is to be drawn.
823 @param PackageList The package list in the HII database to search
824 for the specified image.
825 @param ImageId The image's id, which is unique within
827 @param Blt If this points to a non-NULL on entry, this
828 points to the image, which is Width pixels wide
829 and Height pixels high. The image will be drawn
831 EFI_HII_DRAW_FLAG_CLIP is implied. If this points
832 to a NULL on entry, then a buffer will be
833 allocated to hold the generated image and the
834 pointer updated on exit. It is the caller's
835 responsibility to free this buffer.
836 @param BltX Specifies the offset from the left and top edge
837 of the output image of the first pixel in the
839 @param BltY Specifies the offset from the left and top edge
840 of the output image of the first pixel in the
843 @retval EFI_SUCCESS The image was successfully drawn.
844 @retval EFI_OUT_OF_RESOURCES Unable to allocate an output buffer for Blt.
845 @retval EFI_INVALID_PARAMETER The Blt was NULL.
846 @retval EFI_NOT_FOUND The image specified by ImageId is not in the database.
847 The specified PackageList is not in the database.
853 IN CONST EFI_HII_IMAGE_PROTOCOL
*This
,
854 IN EFI_HII_DRAW_FLAGS Flags
,
855 IN EFI_HII_HANDLE PackageList
,
856 IN EFI_IMAGE_ID ImageId
,
857 IN OUT EFI_IMAGE_OUTPUT
**Blt
,
865 // EFI_HII_STRING_PROTOCOL
870 This function adds the string String to the group of strings owned by PackageList, with the
871 specified font information StringFontInfo and returns a new string id.
873 @param This A pointer to the EFI_HII_STRING_PROTOCOL
875 @param PackageList Handle of the package list where this string will
877 @param StringId On return, contains the new strings id, which is
878 unique within PackageList.
879 @param Language Points to the language for the new string.
880 @param LanguageName Points to the printable language name to
881 associate with the passed in Language field.If
882 LanguageName is not NULL and the string package
883 header's LanguageName associated with a given
884 Language is not zero, the LanguageName being
885 passed in will be ignored.
886 @param String Points to the new null-terminated string.
887 @param StringFontInfo Points to the new string's font information or
888 NULL if the string should have the default system
889 font, size and style.
891 @retval EFI_SUCCESS The new string was added successfully.
892 @retval EFI_NOT_FOUND The specified PackageList could not be found in
894 @retval EFI_OUT_OF_RESOURCES Could not add the string due to lack of
896 @retval EFI_INVALID_PARAMETER String is NULL or StringId is NULL or Language is
903 IN CONST EFI_HII_STRING_PROTOCOL
*This
,
904 IN EFI_HII_HANDLE PackageList
,
905 OUT EFI_STRING_ID
*StringId
,
906 IN CONST CHAR8
*Language
,
907 IN CONST CHAR16
*LanguageName
, OPTIONAL
908 IN CONST EFI_STRING String
,
909 IN CONST EFI_FONT_INFO
*StringFontInfo OPTIONAL
914 This function retrieves the string specified by StringId which is associated
915 with the specified PackageList in the language Language and copies it into
916 the buffer specified by String.
918 @param This A pointer to the EFI_HII_STRING_PROTOCOL
920 @param Language Points to the language for the retrieved string.
921 @param PackageList The package list in the HII database to search
922 for the specified string.
923 @param StringId The string's id, which is unique within
925 @param String Points to the new null-terminated string.
926 @param StringSize On entry, points to the size of the buffer
927 pointed to by String, in bytes. On return,
928 points to the length of the string, in bytes.
929 @param StringFontInfo If not NULL, points to the string's font
930 information. It's caller's responsibility to
933 @retval EFI_SUCCESS The string was returned successfully.
934 @retval EFI_NOT_FOUND The string specified by StringId is not
936 @retval EFI_NOT_FOUND The string specified by StringId is available but
937 not in the specified language.
938 The specified PackageList is not in the database.
939 @retval EFI_INVALID_LANGUAGE - The string specified by StringId is available but
940 @retval EFI_BUFFER_TOO_SMALL The buffer specified by StringSize is too small
942 @retval EFI_INVALID_PARAMETER The String or Language or StringSize was NULL.
943 @retval EFI_OUT_OF_RESOURCES There were insufficient resources to complete the
950 IN CONST EFI_HII_STRING_PROTOCOL
*This
,
951 IN CONST CHAR8
*Language
,
952 IN EFI_HII_HANDLE PackageList
,
953 IN EFI_STRING_ID StringId
,
954 OUT EFI_STRING String
,
955 IN OUT UINTN
*StringSize
,
956 OUT EFI_FONT_INFO
**StringFontInfo OPTIONAL
961 This function updates the string specified by StringId in the specified PackageList to the text
962 specified by String and, optionally, the font information specified by StringFontInfo.
964 @param This A pointer to the EFI_HII_STRING_PROTOCOL
966 @param PackageList The package list containing the strings.
967 @param StringId The string's id, which is unique within
969 @param Language Points to the language for the updated string.
970 @param String Points to the new null-terminated string.
971 @param StringFontInfo Points to the string's font information or NULL
972 if the string font information is not changed.
974 @retval EFI_SUCCESS The string was updated successfully.
975 @retval EFI_NOT_FOUND The string specified by StringId is not in the
977 @retval EFI_INVALID_PARAMETER The String or Language was NULL.
978 @retval EFI_OUT_OF_RESOURCES The system is out of resources to accomplish the
985 IN CONST EFI_HII_STRING_PROTOCOL
*This
,
986 IN EFI_HII_HANDLE PackageList
,
987 IN EFI_STRING_ID StringId
,
988 IN CONST CHAR8
*Language
,
989 IN CONST EFI_STRING String
,
990 IN CONST EFI_FONT_INFO
*StringFontInfo OPTIONAL
995 This function returns the list of supported languages, in the format specified
996 in Appendix M of UEFI 2.1 spec.
998 @param This A pointer to the EFI_HII_STRING_PROTOCOL
1000 @param PackageList The package list to examine.
1001 @param Languages Points to the buffer to hold the returned string.
1002 @param LanguagesSize On entry, points to the size of the buffer
1003 pointed to by Languages, in bytes. On return,
1004 points to the length of Languages, in bytes.
1006 @retval EFI_SUCCESS The languages were returned successfully.
1007 @retval EFI_INVALID_PARAMETER The Languages or LanguagesSize was NULL.
1008 @retval EFI_BUFFER_TOO_SMALL The LanguagesSize is too small to hold the list
1009 of supported languages. LanguageSize is updated
1010 to contain the required size.
1011 @retval EFI_NOT_FOUND Could not find string package in specified
1018 IN CONST EFI_HII_STRING_PROTOCOL
*This
,
1019 IN EFI_HII_HANDLE PackageList
,
1020 IN OUT CHAR8
*Languages
,
1021 IN OUT UINTN
*LanguagesSize
1026 Each string package has associated with it a single primary language and zero
1027 or more secondary languages. This routine returns the secondary languages
1028 associated with a package list.
1030 @param This A pointer to the EFI_HII_STRING_PROTOCOL
1032 @param PackageList The package list to examine.
1033 @param FirstLanguage Points to the primary language.
1034 @param SecondaryLanguages Points to the buffer to hold the returned list of
1035 secondary languages for the specified
1036 FirstLanguage. If there are no secondary
1037 languages, the function returns successfully,
1038 but this is set to NULL.
1039 @param SecondaryLanguagesSize On entry, points to the size of the buffer
1040 pointed to by SecondLanguages, in bytes. On
1041 return, points to the length of SecondLanguages
1044 @retval EFI_SUCCESS Secondary languages were correctly returned.
1045 @retval EFI_INVALID_PARAMETER FirstLanguage or SecondLanguages or
1046 SecondLanguagesSize was NULL.
1047 @retval EFI_BUFFER_TOO_SMALL The buffer specified by SecondLanguagesSize is
1048 too small to hold the returned information.
1049 SecondLanguageSize is updated to hold the size of
1050 the buffer required.
1051 @retval EFI_INVALID_LANGUAGE The language specified by FirstLanguage is not
1052 present in the specified package list.
1053 @retval EFI_NOT_FOUND The specified PackageList is not in the Database.
1058 HiiGetSecondaryLanguages (
1059 IN CONST EFI_HII_STRING_PROTOCOL
*This
,
1060 IN EFI_HII_HANDLE PackageList
,
1061 IN CONST CHAR8
*FirstLanguage
,
1062 IN OUT CHAR8
*SecondaryLanguages
,
1063 IN OUT UINTN
*SecondaryLanguagesSize
1067 // EFI_HII_DATABASE_PROTOCOL protocol interfaces
1072 This function adds the packages in the package list to the database and returns a handle. If there is a
1073 EFI_DEVICE_PATH_PROTOCOL associated with the DriverHandle, then this function will
1074 create a package of type EFI_PACKAGE_TYPE_DEVICE_PATH and add it to the package list.
1076 @param This A pointer to the EFI_HII_DATABASE_PROTOCOL
1078 @param PackageList A pointer to an EFI_HII_PACKAGE_LIST_HEADER
1080 @param DriverHandle Associate the package list with this EFI handle.
1081 @param Handle A pointer to the EFI_HII_HANDLE instance.
1083 @retval EFI_SUCCESS The package list associated with the Handle was
1084 added to the HII database.
1085 @retval EFI_OUT_OF_RESOURCES Unable to allocate necessary resources for the
1086 new database contents.
1087 @retval EFI_INVALID_PARAMETER PackageList is NULL or Handle is NULL.
1093 IN CONST EFI_HII_DATABASE_PROTOCOL
*This
,
1094 IN CONST EFI_HII_PACKAGE_LIST_HEADER
*PackageList
,
1095 IN CONST EFI_HANDLE DriverHandle
,
1096 OUT EFI_HII_HANDLE
*Handle
1101 This function removes the package list that is associated with a handle Handle
1102 from the HII database. Before removing the package, any registered functions
1103 with the notification type REMOVE_PACK and the same package type will be called.
1105 @param This A pointer to the EFI_HII_DATABASE_PROTOCOL
1107 @param Handle The handle that was registered to the data that
1108 is requested for removal.
1110 @retval EFI_SUCCESS The data associated with the Handle was removed
1111 from the HII database.
1112 @retval EFI_NOT_FOUND The specified Handle is not in database.
1117 HiiRemovePackageList (
1118 IN CONST EFI_HII_DATABASE_PROTOCOL
*This
,
1119 IN EFI_HII_HANDLE Handle
1124 This function updates the existing package list (which has the specified Handle)
1125 in the HII databases, using the new package list specified by PackageList.
1127 @param This A pointer to the EFI_HII_DATABASE_PROTOCOL
1129 @param Handle The handle that was registered to the data that
1130 is requested to be updated.
1131 @param PackageList A pointer to an EFI_HII_PACKAGE_LIST_HEADER
1134 @retval EFI_SUCCESS The HII database was successfully updated.
1135 @retval EFI_OUT_OF_RESOURCES Unable to allocate enough memory for the updated
1137 @retval EFI_INVALID_PARAMETER PackageList was NULL.
1138 @retval EFI_NOT_FOUND The specified Handle is not in database.
1143 HiiUpdatePackageList (
1144 IN CONST EFI_HII_DATABASE_PROTOCOL
*This
,
1145 IN EFI_HII_HANDLE Handle
,
1146 IN CONST EFI_HII_PACKAGE_LIST_HEADER
*PackageList
1151 This function returns a list of the package handles of the specified type
1152 that are currently active in the database. The pseudo-type
1153 EFI_HII_PACKAGE_TYPE_ALL will cause all package handles to be listed.
1155 @param This A pointer to the EFI_HII_DATABASE_PROTOCOL
1157 @param PackageType Specifies the package type of the packages to
1158 list or EFI_HII_PACKAGE_TYPE_ALL for all packages
1160 @param PackageGuid If PackageType is EFI_HII_PACKAGE_TYPE_GUID, then
1161 this is the pointer to the GUID which must match
1162 the Guid field of EFI_HII_GUID_PACKAGE_GUID_HDR.
1163 Otherwise, it must be NULL.
1164 @param HandleBufferLength On input, a pointer to the length of the handle
1165 buffer. On output, the length of the handle
1166 buffer that is required for the handles found.
1167 @param Handle An array of EFI_HII_HANDLE instances returned.
1169 @retval EFI_SUCCESS The matching handles are outputed successfully.
1170 HandleBufferLength is updated with the actual length.
1171 @retval EFI_BUFFER_TO_SMALL The HandleBufferLength parameter indicates that
1172 Handle is too small to support the number of
1173 handles. HandleBufferLength is updated with a
1174 value that will enable the data to fit.
1175 @retval EFI_NOT_FOUND No matching handle could not be found in
1177 @retval EFI_INVALID_PARAMETER Handle or HandleBufferLength was NULL.
1178 @retval EFI_INVALID_PARAMETER PackageType is not a EFI_HII_PACKAGE_TYPE_GUID but
1179 PackageGuid is not NULL, PackageType is a EFI_HII_
1180 PACKAGE_TYPE_GUID but PackageGuid is NULL.
1186 HiiListPackageLists (
1187 IN CONST EFI_HII_DATABASE_PROTOCOL
*This
,
1188 IN UINT8 PackageType
,
1189 IN CONST EFI_GUID
*PackageGuid
,
1190 IN OUT UINTN
*HandleBufferLength
,
1191 OUT EFI_HII_HANDLE
*Handle
1196 This function will export one or all package lists in the database to a buffer.
1197 For each package list exported, this function will call functions registered
1198 with EXPORT_PACK and then copy the package list to the buffer.
1200 @param This A pointer to the EFI_HII_DATABASE_PROTOCOL
1202 @param Handle An EFI_HII_HANDLE that corresponds to the desired
1203 package list in the HII database to export or
1204 NULL to indicate all package lists should be
1206 @param BufferSize On input, a pointer to the length of the buffer.
1207 On output, the length of the buffer that is
1208 required for the exported data.
1209 @param Buffer A pointer to a buffer that will contain the
1210 results of the export function.
1212 @retval EFI_SUCCESS Package exported.
1213 @retval EFI_BUFFER_TO_SMALL The HandleBufferLength parameter indicates that
1214 Handle is too small to support the number of
1215 handles. HandleBufferLength is updated with
1216 a value that will enable the data to fit.
1217 @retval EFI_NOT_FOUND The specifiecd Handle could not be found in the
1219 @retval EFI_INVALID_PARAMETER Handle or Buffer or BufferSize was NULL.
1224 HiiExportPackageLists (
1225 IN CONST EFI_HII_DATABASE_PROTOCOL
*This
,
1226 IN EFI_HII_HANDLE Handle
,
1227 IN OUT UINTN
*BufferSize
,
1228 OUT EFI_HII_PACKAGE_LIST_HEADER
*Buffer
1233 This function registers a function which will be called when specified actions related to packages of
1234 the specified type occur in the HII database. By registering a function, other HII-related drivers are
1235 notified when specific package types are added, removed or updated in the HII database.
1236 Each driver or application which registers a notification should use
1237 EFI_HII_DATABASE_PROTOCOL.UnregisterPackageNotify() before exiting.
1239 @param This A pointer to the EFI_HII_DATABASE_PROTOCOL
1241 @param PackageType Specifies the package type of the packages to
1242 list or EFI_HII_PACKAGE_TYPE_ALL for all packages
1244 @param PackageGuid If PackageType is EFI_HII_PACKAGE_TYPE_GUID, then
1245 this is the pointer to the GUID which must match
1247 EFI_HII_GUID_PACKAGE_GUID_HDR. Otherwise, it must
1249 @param PackageNotifyFn Points to the function to be called when the
1251 NotificationType occurs.
1252 @param NotifyType Describes the types of notification which this
1253 function will be receiving.
1254 @param NotifyHandle Points to the unique handle assigned to the
1255 registered notification. Can be used in
1256 EFI_HII_DATABASE_PROTOCOL.UnregisterPackageNotify()
1257 to stop notifications.
1259 @retval EFI_SUCCESS Notification registered successfully.
1260 @retval EFI_OUT_OF_RESOURCES Unable to allocate necessary data structures
1261 @retval EFI_INVALID_PARAMETER NotifyHandle is NULL.
1262 @retval EFI_INVALID_PARAMETER PackageGuid is not NULL when PackageType is not
1263 EFI_HII_PACKAGE_TYPE_GUID.
1264 @retval EFI_INVALID_PARAMETER PackageGuid is NULL when PackageType is
1265 EFI_HII_PACKAGE_TYPE_GUID.
1270 HiiRegisterPackageNotify (
1271 IN CONST EFI_HII_DATABASE_PROTOCOL
*This
,
1272 IN UINT8 PackageType
,
1273 IN CONST EFI_GUID
*PackageGuid
,
1274 IN CONST EFI_HII_DATABASE_NOTIFY PackageNotifyFn
,
1275 IN EFI_HII_DATABASE_NOTIFY_TYPE NotifyType
,
1276 OUT EFI_HANDLE
*NotifyHandle
1281 Removes the specified HII database package-related notification.
1283 @param This A pointer to the EFI_HII_DATABASE_PROTOCOL
1285 @param NotificationHandle The handle of the notification function being
1288 @retval EFI_SUCCESS Notification is unregistered successfully.
1289 @retval EFI_NOT_FOUND The incoming notification handle does not exist
1290 in current hii database.
1295 HiiUnregisterPackageNotify (
1296 IN CONST EFI_HII_DATABASE_PROTOCOL
*This
,
1297 IN EFI_HANDLE NotificationHandle
1302 This routine retrieves an array of GUID values for each keyboard layout that
1303 was previously registered in the system.
1305 @param This A pointer to the EFI_HII_DATABASE_PROTOCOL
1307 @param KeyGuidBufferLength On input, a pointer to the length of the keyboard
1308 GUID buffer. On output, the length of the handle
1309 buffer that is required for the handles found.
1310 @param KeyGuidBuffer An array of keyboard layout GUID instances
1313 @retval EFI_SUCCESS KeyGuidBuffer was updated successfully.
1314 @retval EFI_BUFFER_TOO_SMALL The KeyGuidBufferLength parameter indicates
1315 that KeyGuidBuffer is too small to support the
1316 number of GUIDs. KeyGuidBufferLength is
1317 updated with a value that will enable the data to
1319 @retval EFI_INVALID_PARAMETER The KeyGuidBuffer or KeyGuidBufferLength was
1321 @retval EFI_NOT_FOUND There was no keyboard layout.
1326 HiiFindKeyboardLayouts (
1327 IN CONST EFI_HII_DATABASE_PROTOCOL
*This
,
1328 IN OUT UINT16
*KeyGuidBufferLength
,
1329 OUT EFI_GUID
*KeyGuidBuffer
1334 This routine retrieves the requested keyboard layout. The layout is a physical description of the keys
1335 on a keyboard and the character(s) that are associated with a particular set of key strokes.
1337 @param This A pointer to the EFI_HII_DATABASE_PROTOCOL
1339 @param KeyGuid A pointer to the unique ID associated with a
1340 given keyboard layout. If KeyGuid is NULL then
1341 the current layout will be retrieved.
1342 @param KeyboardLayoutLength On input, a pointer to the length of the
1343 KeyboardLayout buffer. On output, the length of
1344 the data placed into KeyboardLayout.
1345 @param KeyboardLayout A pointer to a buffer containing the retrieved
1348 @retval EFI_SUCCESS The keyboard layout was retrieved successfully.
1349 @retval EFI_NOT_FOUND The requested keyboard layout was not found.
1350 @retval EFI_INVALID_PARAMETER The KeyboardLayout or KeyboardLayoutLength was
1356 HiiGetKeyboardLayout (
1357 IN CONST EFI_HII_DATABASE_PROTOCOL
*This
,
1358 IN CONST EFI_GUID
*KeyGuid
,
1359 IN OUT UINT16
*KeyboardLayoutLength
,
1360 OUT EFI_HII_KEYBOARD_LAYOUT
*KeyboardLayout
1365 This routine sets the default keyboard layout to the one referenced by KeyGuid. When this routine
1366 is called, an event will be signaled of the EFI_HII_SET_KEYBOARD_LAYOUT_EVENT_GUID
1367 group type. This is so that agents which are sensitive to the current keyboard layout being changed
1368 can be notified of this change.
1370 @param This A pointer to the EFI_HII_DATABASE_PROTOCOL
1372 @param KeyGuid A pointer to the unique ID associated with a
1373 given keyboard layout.
1375 @retval EFI_SUCCESS The current keyboard layout was successfully set.
1376 @retval EFI_NOT_FOUND The referenced keyboard layout was not found, so
1378 @retval EFI_INVALID_PARAMETER The KeyGuid was NULL.
1383 HiiSetKeyboardLayout (
1384 IN CONST EFI_HII_DATABASE_PROTOCOL
*This
,
1385 IN CONST EFI_GUID
*KeyGuid
1390 Return the EFI handle associated with a package list.
1392 @param This A pointer to the EFI_HII_DATABASE_PROTOCOL
1394 @param PackageListHandle An EFI_HII_HANDLE that corresponds to the desired
1395 package list in the HIIdatabase.
1396 @param DriverHandle On return, contains the EFI_HANDLE which was
1397 registered with the package list in
1400 @retval EFI_SUCCESS The DriverHandle was returned successfully.
1401 @retval EFI_INVALID_PARAMETER The PackageListHandle was not valid or
1402 DriverHandle was NULL.
1407 HiiGetPackageListHandle (
1408 IN CONST EFI_HII_DATABASE_PROTOCOL
*This
,
1409 IN EFI_HII_HANDLE PackageListHandle
,
1410 OUT EFI_HANDLE
*DriverHandle
1414 // EFI_HII_CONFIG_ROUTING_PROTOCOL interfaces
1419 This function allows a caller to extract the current configuration
1420 for one or more named elements from one or more drivers.
1422 @param This A pointer to the EFI_HII_CONFIG_ROUTING_PROTOCOL
1424 @param Request A null-terminated Unicode string in
1425 <MultiConfigRequest> format.
1426 @param Progress On return, points to a character in the Request
1427 string. Points to the string's null terminator if
1428 request was successful. Points to the most recent
1429 & before the first failing name / value pair (or
1430 the beginning of the string if the failure is in
1431 the first name / value pair) if the request was
1433 @param Results Null-terminated Unicode string in
1434 <MultiConfigAltResp> format which has all values
1435 filled in for the names in the Request string.
1436 String to be allocated by the called function.
1438 @retval EFI_SUCCESS The Results string is filled with the values
1439 corresponding to all requested names.
1440 @retval EFI_OUT_OF_RESOURCES Not enough memory to store the parts of the
1441 results that must be stored awaiting possible
1443 @retval EFI_NOT_FOUND Routing data doesn't match any known driver.
1444 Progress set to the "G" in "GUID" of the
1445 routing header that doesn't match. Note: There
1446 is no requirement that all routing data
1447 be validated before any configuration extraction.
1448 @retval EFI_INVALID_PARAMETER For example, passing in a NULL for the Request
1449 parameter would result in this type of error. The
1450 Progress parameter is set to NULL.
1451 @retval EFI_INVALID_PARAMETER Illegal syntax. Progress set to most recent &
1452 before the error or the beginning of the string.
1453 @retval EFI_INVALID_PARAMETER Unknown name. Progress points to the & before the
1459 HiiConfigRoutingExtractConfig (
1460 IN CONST EFI_HII_CONFIG_ROUTING_PROTOCOL
*This
,
1461 IN CONST EFI_STRING Request
,
1462 OUT EFI_STRING
*Progress
,
1463 OUT EFI_STRING
*Results
1468 This function allows the caller to request the current configuration for the
1469 entirety of the current HII database and returns the data in a null-terminated Unicode string.
1471 @param This A pointer to the EFI_HII_CONFIG_ROUTING_PROTOCOL
1473 @param Results Null-terminated Unicode string in
1474 <MultiConfigAltResp> format which has all values
1475 filled in for the names in the Request string.
1476 String to be allocated by the called function.
1477 De-allocation is up to the caller.
1479 @retval EFI_SUCCESS The Results string is filled with the values
1480 corresponding to all requested names.
1481 @retval EFI_OUT_OF_RESOURCES Not enough memory to store the parts of the
1482 results that must be stored awaiting possible
1484 @retval EFI_INVALID_PARAMETER For example, passing in a NULL for the Results
1485 parameter would result in this type of error.
1490 HiiConfigRoutingExportConfig (
1491 IN CONST EFI_HII_CONFIG_ROUTING_PROTOCOL
*This
,
1492 OUT EFI_STRING
*Results
1497 This function processes the results of processing forms and routes it to the
1498 appropriate handlers or storage.
1500 @param This A pointer to the EFI_HII_CONFIG_ROUTING_PROTOCOL
1502 @param Configuration A null-terminated Unicode string in
1503 <MulltiConfigResp> format.
1504 @param Progress A pointer to a string filled in with the offset
1505 of the most recent & before the first failing
1506 name / value pair (or the beginning of the string
1507 if the failure is in the first name / value pair)
1508 or the terminating NULL if all was successful.
1510 @retval EFI_SUCCESS The results have been distributed or are awaiting
1512 @retval EFI_OUT_OF_RESOURCES Not enough memory to store the parts of the
1513 results that must be stored awaiting possible
1515 @retval EFI_INVALID_PARAMETER Passing in a NULL for the Configuration parameter
1516 would result in this type of error.
1517 @retval EFI_NOT_FOUND Target for the specified routing data was not
1523 HiiConfigRoutingRouteConfig (
1524 IN CONST EFI_HII_CONFIG_ROUTING_PROTOCOL
*This
,
1525 IN CONST EFI_STRING Configuration
,
1526 OUT EFI_STRING
*Progress
1532 This helper function is to be called by drivers to map configuration data stored
1533 in byte array ("block") formats such as UEFI Variables into current configuration strings.
1535 @param This A pointer to the EFI_HII_CONFIG_ROUTING_PROTOCOL
1537 @param ConfigRequest A null-terminated Unicode string in
1538 <ConfigRequest> format.
1539 @param Block Array of bytes defining the block's
1541 @param BlockSize Length in bytes of Block.
1542 @param Config Filled-in configuration string. String allocated
1543 by the function. Returned only if call is
1545 @param Progress A pointer to a string filled in with the offset
1546 of the most recent & before the first failing
1547 name/value pair (or the beginning of the string
1548 if the failure is in the first name / value pair)
1549 or the terminating NULL if all was successful.
1551 @retval EFI_SUCCESS The request succeeded. Progress points to the
1552 null terminator at the end of the ConfigRequest
1554 @retval EFI_OUT_OF_RESOURCES Not enough memory to allocate Config.
1555 Progress points to the first character of
1557 @retval EFI_INVALID_PARAMETER Passing in a NULL for the ConfigRequest or
1558 Block parameter would result in this type of
1559 error. Progress points to the first character of
1561 @retval EFI_NOT_FOUND Target for the specified routing data was not
1562 found. Progress points to the "G" in "GUID" of
1563 the errant routing data.
1564 @retval EFI_DEVICE_ERROR Block not large enough. Progress undefined.
1565 @retval EFI_INVALID_PARAMETER Encountered non <BlockName> formatted string.
1566 Block is left updated and Progress points at
1567 the '&' preceding the first non-<BlockName>.
1573 IN CONST EFI_HII_CONFIG_ROUTING_PROTOCOL
*This
,
1574 IN CONST EFI_STRING ConfigRequest
,
1575 IN CONST UINT8
*Block
,
1576 IN CONST UINTN BlockSize
,
1577 OUT EFI_STRING
*Config
,
1578 OUT EFI_STRING
*Progress
1583 This helper function is to be called by drivers to map configuration strings
1584 to configurations stored in byte array ("block") formats such as UEFI Variables.
1586 @param This A pointer to the EFI_HII_CONFIG_ROUTING_PROTOCOL
1588 @param ConfigResp A null-terminated Unicode string in <ConfigResp>
1590 @param Block A possibly null array of bytes representing the
1591 current block. Only bytes referenced in the
1592 ConfigResp string in the block are modified. If
1593 this parameter is null or if the *BlockSize
1594 parameter is (on input) shorter than required by
1595 the Configuration string, only the BlockSize
1596 parameter is updated and an appropriate status
1597 (see below) is returned.
1598 @param BlockSize The length of the Block in units of UINT8. On
1599 input, this is the size of the Block. On output,
1600 if successful, contains the index of the last
1601 modified byte in the Block.
1602 @param Progress On return, points to an element of the ConfigResp
1603 string filled in with the offset of the most
1604 recent '&' before the first failing name / value
1605 pair (or the beginning of the string if the
1606 failure is in the first name / value pair) or
1607 the terminating NULL if all was successful.
1609 @retval EFI_SUCCESS The request succeeded. Progress points to the
1610 null terminator at the end of the ConfigResp
1612 @retval EFI_OUT_OF_RESOURCES Not enough memory to allocate Config.
1613 Progress points to the first character of
1615 @retval EFI_INVALID_PARAMETER Passing in a NULL for the ConfigResp or
1616 Block parameter would result in this type of
1617 error. Progress points to the first character of
1619 @retval EFI_NOT_FOUND Target for the specified routing data was not
1620 found. Progress points to the "G" in "GUID" of
1621 the errant routing data.
1622 @retval EFI_INVALID_PARAMETER Encountered non <BlockName> formatted name /
1623 value pair. Block is left updated and
1624 Progress points at the '&' preceding the first
1631 IN CONST EFI_HII_CONFIG_ROUTING_PROTOCOL
*This
,
1632 IN CONST EFI_STRING ConfigResp
,
1633 IN OUT UINT8
*Block
,
1634 IN OUT UINTN
*BlockSize
,
1635 OUT EFI_STRING
*Progress
1640 This helper function is to be called by drivers to extract portions of
1641 a larger configuration string.
1643 @param This A pointer to the EFI_HII_CONFIG_ROUTING_PROTOCOL
1645 @param Configuration A null-terminated Unicode string in
1646 <MultiConfigAltResp> format.
1647 @param Guid A pointer to the GUID value to search for in the
1648 routing portion of the ConfigResp string when
1649 retrieving the requested data. If Guid is NULL,
1650 then all GUID values will be searched for.
1651 @param Name A pointer to the NAME value to search for in the
1652 routing portion of the ConfigResp string when
1653 retrieving the requested data. If Name is NULL,
1654 then all Name values will be searched for.
1655 @param DevicePath A pointer to the PATH value to search for in the
1656 routing portion of the ConfigResp string when
1657 retrieving the requested data. If DevicePath is
1658 NULL, then all DevicePath values will be
1660 @param AltCfgId A pointer to the ALTCFG value to search for in
1661 the routing portion of the ConfigResp string
1662 when retrieving the requested data. If this
1663 parameter is NULL, then the current setting will
1665 @param AltCfgResp A pointer to a buffer which will be allocated by
1666 the function which contains the retrieved string
1667 as requested. This buffer is only allocated if
1668 the call was successful.
1670 @retval EFI_SUCCESS The request succeeded. The requested data was
1671 extracted and placed in the newly allocated
1673 @retval EFI_OUT_OF_RESOURCES Not enough memory to allocate AltCfgResp.
1674 @retval EFI_INVALID_PARAMETER Any parameter is invalid.
1675 @retval EFI_NOT_FOUND Target for the specified routing data was not
1682 IN CONST EFI_HII_CONFIG_ROUTING_PROTOCOL
*This
,
1683 IN CONST EFI_STRING Configuration
,
1684 IN CONST EFI_GUID
*Guid
,
1685 IN CONST EFI_STRING Name
,
1686 IN CONST EFI_DEVICE_PATH_PROTOCOL
*DevicePath
,
1687 IN CONST UINT16
*AltCfgId
,
1688 OUT EFI_STRING
*AltCfgResp
1693 Compare whether two names of languages are identical.
1695 @param Language1 Name of language 1
1696 @param Language2 Name of language 2
1699 @retval FALSE not same
1703 HiiCompareLanguage (
1704 IN CHAR8
*Language1
,
1712 extern EFI_EVENT gHiiKeyboardLayoutChanged
;