2 Private structures definitions in HiiDatabase.
4 Copyright (c) 2007 - 2011, Intel Corporation. All rights reserved.<BR>
5 This program and the accompanying materials
6 are licensed and made available under the terms and conditions of the BSD License
7 which accompanies this distribution. The full text of the license may be found at
8 http://opensource.org/licenses/bsd-license.php
10 THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
11 WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
15 #ifndef __HII_DATABASE_PRIVATE_H__
16 #define __HII_DATABASE_PRIVATE_H__
20 #include <Protocol/DevicePath.h>
21 #include <Protocol/HiiFont.h>
22 #include <Protocol/HiiImage.h>
23 #include <Protocol/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/UefiLib.h>
41 #include <Library/PcdLib.h>
42 #include <Library/UefiRuntimeServicesTableLib.h>
43 #include <Library/PrintLib.h>
46 #define HII_DATABASE_NOTIFY_GUID \
48 0xc1c76, 0xd79e, 0x42fe, {0x86, 0xb, 0x8b, 0xe8, 0x7b, 0x3e, 0x7a, 0x78} \
51 #define MAX_STRING_LENGTH 1024
52 #define MAX_FONT_NAME_LEN 256
53 #define NARROW_BASELINE 15
54 #define WIDE_BASELINE 14
55 #define SYS_FONT_INFO_MASK 0x37
56 #define REPLACE_UNKNOWN_GLYPH 0xFFFD
57 #define PROPORTIONAL_GLYPH 0x80
58 #define NARROW_GLYPH 0x40
60 #define BITMAP_LEN_1_BIT(Width, Height) (((Width) + 7) / 8 * (Height))
61 #define BITMAP_LEN_4_BIT(Width, Height) (((Width) + 1) / 2 * (Height))
62 #define BITMAP_LEN_8_BIT(Width, Height) ((Width) * (Height))
63 #define BITMAP_LEN_24_BIT(Width, Height) ((Width) * (Height) * 3)
68 // BASE_CR (a, IFR_DEFAULT_VALUE_DATA, Entry) to get the whole structure.
71 LIST_ENTRY Entry
; // Link to VarStorage
74 EFI_VARSTORE_ID VarStoreId
;
76 LIST_ENTRY BlockEntry
; // Link to its Block array
77 } IFR_VARSTORAGE_DATA
;
80 LIST_ENTRY Entry
; // Link to Block array
83 EFI_QUESTION_ID QuestionId
;
86 LIST_ENTRY DefaultValueEntry
; // Link to its default value array
92 EFI_STRING_ID DefaultName
;
100 #define EFI_HII_VARSTORE_BUFFER 0
101 #define EFI_HII_VARSTORE_NAME_VALUE 1
102 #define EFI_HII_VARSTORE_EFI_VARIABLE 2
104 #define HII_FORMSET_STORAGE_SIGNATURE SIGNATURE_32 ('H', 'S', 'T', 'G')
109 EFI_HII_HANDLE HiiHandle
;
110 EFI_HANDLE DriverHandle
;
112 UINT8 Type
; // EFI_HII_VARSTORE_BUFFER, EFI_HII_VARSTORE_NAME_VALUE, EFI_HII_VARSTORE_EFI_VARIABLE
116 } HII_FORMSET_STORAGE
;
120 // String Package definitions
122 #define HII_STRING_PACKAGE_SIGNATURE SIGNATURE_32 ('h','i','s','p')
123 typedef struct _HII_STRING_PACKAGE_INSTANCE
{
125 EFI_HII_STRING_PACKAGE_HDR
*StringPkgHdr
;
127 LIST_ENTRY StringEntry
;
128 LIST_ENTRY FontInfoList
; // local font info list
130 EFI_STRING_ID MaxStringId
; // record StringId
131 } HII_STRING_PACKAGE_INSTANCE
;
134 // Form Package definitions
136 #define HII_IFR_PACKAGE_SIGNATURE SIGNATURE_32 ('h','f','r','p')
137 typedef struct _HII_IFR_PACKAGE_INSTANCE
{
139 EFI_HII_PACKAGE_HEADER FormPkgHdr
;
142 } HII_IFR_PACKAGE_INSTANCE
;
145 // Simple Font Package definitions
147 #define HII_S_FONT_PACKAGE_SIGNATURE SIGNATURE_32 ('h','s','f','p')
148 typedef struct _HII_SIMPLE_FONT_PACKAGE_INSTANCE
{
150 EFI_HII_SIMPLE_FONT_PACKAGE_HDR
*SimpleFontPkgHdr
;
151 LIST_ENTRY SimpleFontEntry
;
152 } HII_SIMPLE_FONT_PACKAGE_INSTANCE
;
155 // Font Package definitions
157 #define HII_FONT_PACKAGE_SIGNATURE SIGNATURE_32 ('h','i','f','p')
158 typedef struct _HII_FONT_PACKAGE_INSTANCE
{
160 EFI_HII_FONT_PACKAGE_HDR
*FontPkgHdr
;
164 LIST_ENTRY FontEntry
;
165 LIST_ENTRY GlyphInfoList
;
166 } HII_FONT_PACKAGE_INSTANCE
;
168 #define HII_GLYPH_INFO_SIGNATURE SIGNATURE_32 ('h','g','i','s')
169 typedef struct _HII_GLYPH_INFO
{
173 EFI_HII_GLYPH_INFO Cell
;
176 #define HII_FONT_INFO_SIGNATURE SIGNATURE_32 ('h','l','f','i')
177 typedef struct _HII_FONT_INFO
{
180 LIST_ENTRY
*GlobalEntry
;
184 #define HII_GLOBAL_FONT_INFO_SIGNATURE SIGNATURE_32 ('h','g','f','i')
185 typedef struct _HII_GLOBAL_FONT_INFO
{
188 HII_FONT_PACKAGE_INSTANCE
*FontPackage
;
190 EFI_FONT_INFO
*FontInfo
;
191 } HII_GLOBAL_FONT_INFO
;
194 // Image Package definitions
197 #define HII_PIXEL_MASK 0x80
199 typedef struct _HII_IMAGE_PACKAGE_INSTANCE
{
200 EFI_HII_IMAGE_PACKAGE_HDR ImagePkgHdr
;
201 UINT32 ImageBlockSize
;
202 UINT32 PaletteInfoSize
;
205 } HII_IMAGE_PACKAGE_INSTANCE
;
208 // Keyboard Layout Pacakge definitions
210 #define HII_KB_LAYOUT_PACKAGE_SIGNATURE SIGNATURE_32 ('h','k','l','p')
211 typedef struct _HII_KEYBOARD_LAYOUT_PACKAGE_INSTANCE
{
214 LIST_ENTRY KeyboardEntry
;
215 } HII_KEYBOARD_LAYOUT_PACKAGE_INSTANCE
;
218 // Guid Package definitions
220 #define HII_GUID_PACKAGE_SIGNATURE SIGNATURE_32 ('h','i','g','p')
221 typedef struct _HII_GUID_PACKAGE_INSTANCE
{
224 LIST_ENTRY GuidEntry
;
225 } HII_GUID_PACKAGE_INSTANCE
;
228 // A package list can contain only one or less than one device path package.
229 // This rule also applies to image package since ImageId can not be duplicate.
231 typedef struct _HII_DATABASE_PACKAGE_LIST_INSTANCE
{
232 EFI_HII_PACKAGE_LIST_HEADER PackageListHdr
;
233 LIST_ENTRY GuidPkgHdr
;
234 LIST_ENTRY FormPkgHdr
;
235 LIST_ENTRY KeyboardLayoutHdr
;
236 LIST_ENTRY StringPkgHdr
;
237 LIST_ENTRY FontPkgHdr
;
238 HII_IMAGE_PACKAGE_INSTANCE
*ImagePkg
;
239 LIST_ENTRY SimpleFontPkgHdr
;
240 UINT8
*DevicePathPkg
;
241 } HII_DATABASE_PACKAGE_LIST_INSTANCE
;
243 #define HII_HANDLE_SIGNATURE SIGNATURE_32 ('h','i','h','l')
251 #define HII_DATABASE_RECORD_SIGNATURE SIGNATURE_32 ('h','i','d','r')
253 typedef struct _HII_DATABASE_RECORD
{
255 HII_DATABASE_PACKAGE_LIST_INSTANCE
*PackageList
;
256 EFI_HANDLE DriverHandle
;
257 EFI_HII_HANDLE Handle
;
258 LIST_ENTRY DatabaseEntry
;
259 } HII_DATABASE_RECORD
;
261 #define HII_DATABASE_NOTIFY_SIGNATURE SIGNATURE_32 ('h','i','d','n')
263 typedef struct _HII_DATABASE_NOTIFY
{
265 EFI_HANDLE NotifyHandle
;
267 EFI_GUID
*PackageGuid
;
268 EFI_HII_DATABASE_NOTIFY PackageNotifyFn
;
269 EFI_HII_DATABASE_NOTIFY_TYPE NotifyType
;
270 LIST_ENTRY DatabaseNotifyEntry
;
271 } HII_DATABASE_NOTIFY
;
273 #define HII_DATABASE_PRIVATE_DATA_SIGNATURE SIGNATURE_32 ('H', 'i', 'D', 'p')
275 typedef struct _HII_DATABASE_PRIVATE_DATA
{
277 LIST_ENTRY DatabaseList
;
278 LIST_ENTRY DatabaseNotifyList
;
279 EFI_HII_FONT_PROTOCOL HiiFont
;
280 EFI_HII_IMAGE_PROTOCOL HiiImage
;
281 EFI_HII_STRING_PROTOCOL HiiString
;
282 EFI_HII_DATABASE_PROTOCOL HiiDatabase
;
283 EFI_HII_CONFIG_ROUTING_PROTOCOL ConfigRouting
;
284 LIST_ENTRY HiiHandleList
;
286 LIST_ENTRY FontInfoList
; // global font info list
287 UINTN Attribute
; // default system color
288 EFI_GUID CurrentLayoutGuid
;
289 EFI_HII_KEYBOARD_LAYOUT
*CurrentLayout
;
290 } HII_DATABASE_PRIVATE_DATA
;
292 #define HII_FONT_DATABASE_PRIVATE_DATA_FROM_THIS(a) \
294 HII_DATABASE_PRIVATE_DATA, \
296 HII_DATABASE_PRIVATE_DATA_SIGNATURE \
299 #define HII_IMAGE_DATABASE_PRIVATE_DATA_FROM_THIS(a) \
301 HII_DATABASE_PRIVATE_DATA, \
303 HII_DATABASE_PRIVATE_DATA_SIGNATURE \
306 #define HII_STRING_DATABASE_PRIVATE_DATA_FROM_THIS(a) \
308 HII_DATABASE_PRIVATE_DATA, \
310 HII_DATABASE_PRIVATE_DATA_SIGNATURE \
313 #define HII_DATABASE_DATABASE_PRIVATE_DATA_FROM_THIS(a) \
315 HII_DATABASE_PRIVATE_DATA, \
317 HII_DATABASE_PRIVATE_DATA_SIGNATURE \
320 #define CONFIG_ROUTING_DATABASE_PRIVATE_DATA_FROM_THIS(a) \
322 HII_DATABASE_PRIVATE_DATA, \
324 HII_DATABASE_PRIVATE_DATA_SIGNATURE \
328 // Internal function prototypes.
332 This function checks whether a handle is a valid EFI_HII_HANDLE.
334 @param Handle Pointer to a EFI_HII_HANDLE
337 @retval FALSE Invalid
342 EFI_HII_HANDLE Handle
347 This function checks whether EFI_FONT_INFO exists in current database. If
348 FontInfoMask is specified, check what options can be used to make a match.
349 Note that the masks relate to where the system default should be supplied
350 are ignored by this function.
352 @param Private Hii database private structure.
353 @param FontInfo Points to EFI_FONT_INFO structure.
354 @param FontInfoMask If not NULL, describes what options can be used
355 to make a match between the font requested and
356 the font available. The caller must guarantee
358 @param FontHandle On entry, Points to the font handle returned by a
359 previous call to GetFontInfo() or NULL to start
361 @param GlobalFontInfo If not NULL, output the corresponding globa font
365 @retval FALSE Not existed
370 IN HII_DATABASE_PRIVATE_DATA
*Private
,
371 IN EFI_FONT_INFO
*FontInfo
,
372 IN EFI_FONT_INFO_MASK
*FontInfoMask
, OPTIONAL
373 IN EFI_FONT_HANDLE FontHandle
, OPTIONAL
374 OUT HII_GLOBAL_FONT_INFO
**GlobalFontInfo OPTIONAL
379 This function invokes the matching registered function.
381 @param Private HII Database driver private structure.
382 @param NotifyType The type of change concerning the database.
383 @param PackageInstance Points to the package referred to by the notification.
384 @param PackageType Package type
385 @param Handle The handle of the package list which contains the specified package.
387 @retval EFI_SUCCESS Already checked all registered function and invoked
389 @retval EFI_INVALID_PARAMETER Any input parameter is not valid.
393 InvokeRegisteredFunction (
394 IN HII_DATABASE_PRIVATE_DATA
*Private
,
395 IN EFI_HII_DATABASE_NOTIFY_TYPE NotifyType
,
396 IN VOID
*PackageInstance
,
397 IN UINT8 PackageType
,
398 IN EFI_HII_HANDLE Handle
403 Retrieve system default font and color.
405 @param Private HII database driver private data.
406 @param FontInfo Points to system default font output-related
407 information. It's caller's responsibility to free
409 @param FontInfoSize If not NULL, output the size of buffer FontInfo.
411 @retval EFI_SUCCESS Cell information is added to the GlyphInfoList.
412 @retval EFI_OUT_OF_RESOURCES The system is out of resources to accomplish the
414 @retval EFI_INVALID_PARAMETER Any input parameter is invalid.
419 IN HII_DATABASE_PRIVATE_DATA
*Private
,
420 OUT EFI_FONT_DISPLAY_INFO
**FontInfo
,
421 OUT UINTN
*FontInfoSize OPTIONAL
426 Parse all string blocks to find a String block specified by StringId.
427 If StringId = (EFI_STRING_ID) (-1), find out all EFI_HII_SIBT_FONT blocks
428 within this string package and backup its information. If LastStringId is
429 specified, the string id of last string block will also be output.
430 If StringId = 0, output the string id of last string block (EFI_HII_SIBT_STRING).
432 @param Private Hii database private structure.
433 @param StringPackage Hii string package instance.
434 @param StringId The string's id, which is unique within
436 @param BlockType Output the block type of found string block.
437 @param StringBlockAddr Output the block address of found string block.
438 @param StringTextOffset Offset, relative to the found block address, of
439 the string text information.
440 @param LastStringId Output the last string id when StringId = 0 or StringId = -1.
441 @param StartStringId The first id in the skip block which StringId in the block.
443 @retval EFI_SUCCESS The string text and font is retrieved
445 @retval EFI_NOT_FOUND The specified text or font info can not be found
447 @retval EFI_OUT_OF_RESOURCES The system is out of resources to accomplish the
453 IN HII_DATABASE_PRIVATE_DATA
*Private
,
454 IN HII_STRING_PACKAGE_INSTANCE
*StringPackage
,
455 IN EFI_STRING_ID StringId
,
456 OUT UINT8
*BlockType
, OPTIONAL
457 OUT UINT8
**StringBlockAddr
, OPTIONAL
458 OUT UINTN
*StringTextOffset
, OPTIONAL
459 OUT EFI_STRING_ID
*LastStringId
, OPTIONAL
460 OUT EFI_STRING_ID
*StartStringId OPTIONAL
465 Parse all glyph blocks to find a glyph block specified by CharValue.
466 If CharValue = (CHAR16) (-1), collect all default character cell information
467 within this font package and backup its information.
469 @param FontPackage Hii string package instance.
470 @param CharValue Unicode character value, which identifies a glyph
472 @param GlyphBuffer Output the corresponding bitmap data of the found
473 block. It is the caller's responsiblity to free
475 @param Cell Output cell information of the encoded bitmap.
476 @param GlyphBufferLen If not NULL, output the length of GlyphBuffer.
478 @retval EFI_SUCCESS The bitmap data is retrieved successfully.
479 @retval EFI_NOT_FOUND The specified CharValue does not exist in current
481 @retval EFI_OUT_OF_RESOURCES The system is out of resources to accomplish the
487 IN HII_FONT_PACKAGE_INSTANCE
*FontPackage
,
489 OUT UINT8
**GlyphBuffer
, OPTIONAL
490 OUT EFI_HII_GLYPH_INFO
*Cell
, OPTIONAL
491 OUT UINTN
*GlyphBufferLen OPTIONAL
495 This function exports Form packages to a buffer.
496 This is a internal function.
498 @param Private Hii database private structure.
499 @param Handle Identification of a package list.
500 @param PackageList Pointer to a package list which will be exported.
501 @param UsedSize The length of buffer be used.
502 @param BufferSize Length of the Buffer.
503 @param Buffer Allocated space for storing exported data.
504 @param ResultSize The size of the already exported content of this
507 @retval EFI_SUCCESS Form Packages are exported successfully.
508 @retval EFI_INVALID_PARAMETER Any input parameter is invalid.
513 IN HII_DATABASE_PRIVATE_DATA
*Private
,
514 IN EFI_HII_HANDLE Handle
,
515 IN HII_DATABASE_PACKAGE_LIST_INSTANCE
*PackageList
,
519 IN OUT UINTN
*ResultSize
523 // EFI_HII_FONT_PROTOCOL protocol interfaces
528 Renders a string to a bitmap or to the display.
530 @param This A pointer to the EFI_HII_FONT_PROTOCOL instance.
531 @param Flags Describes how the string is to be drawn.
532 @param String Points to the null-terminated string to be
534 @param StringInfo Points to the string output information,
535 including the color and font. If NULL, then the
536 string will be output in the default system font
538 @param Blt If this points to a non-NULL on entry, this
539 points to the image, which is Width pixels wide
540 and Height pixels high. The string will be drawn
542 EFI_HII_OUT_FLAG_CLIP is implied. If this points
543 to a NULL on entry, then a buffer
544 will be allocated to hold the generated image and
545 the pointer updated on exit. It is the caller's
546 responsibility to free this buffer.
547 @param BltX Together with BltX, Specifies the offset from the left and top edge
548 of the image of the first character cell in the
550 @param BltY Together with BltY, Specifies the offset from the left and top edge
551 of the image of the first character cell in the
553 @param RowInfoArray If this is non-NULL on entry, then on exit, this
554 will point to an allocated buffer containing
555 row information and RowInfoArraySize will be
556 updated to contain the number of elements.
557 This array describes the characters which were at
558 least partially drawn and the heights of the
559 rows. It is the caller's responsibility to free
561 @param RowInfoArraySize If this is non-NULL on entry, then on exit it
562 contains the number of elements in RowInfoArray.
563 @param ColumnInfoArray If this is non-NULL, then on return it will be
564 filled with the horizontal offset for each
565 character in the string on the row where it is
566 displayed. Non-printing characters will have
567 the offset ~0. The caller is responsible to
568 allocate a buffer large enough so that there
569 is one entry for each character in the string,
570 not including the null-terminator. It is possible
571 when character display is normalized that some
572 character cells overlap.
574 @retval EFI_SUCCESS The string was successfully rendered.
575 @retval EFI_OUT_OF_RESOURCES Unable to allocate an output buffer for
577 @retval EFI_INVALID_PARAMETER The String or Blt.
578 @retval EFI_INVALID_PARAMETER Flags were invalid combination..
584 IN CONST EFI_HII_FONT_PROTOCOL
*This
,
585 IN EFI_HII_OUT_FLAGS Flags
,
586 IN CONST EFI_STRING String
,
587 IN CONST EFI_FONT_DISPLAY_INFO
*StringInfo OPTIONAL
,
588 IN OUT EFI_IMAGE_OUTPUT
**Blt
,
591 OUT EFI_HII_ROW_INFO
**RowInfoArray OPTIONAL
,
592 OUT UINTN
*RowInfoArraySize OPTIONAL
,
593 OUT UINTN
*ColumnInfoArray OPTIONAL
598 Render a string to a bitmap or the screen containing the contents of the specified string.
600 @param This A pointer to the EFI_HII_FONT_PROTOCOL instance.
601 @param Flags Describes how the string is to be drawn.
602 @param PackageList The package list in the HII database to search
603 for the specified string.
604 @param StringId The string's id, which is unique within
606 @param Language Points to the language for the retrieved string.
607 If NULL, then the current system language is
609 @param StringInfo Points to the string output information,
610 including the color and font. If NULL, then the
611 string will be output in the default system font
613 @param Blt If this points to a non-NULL on entry, this
614 points to the image, which is Width pixels wide
615 and Height pixels high. The string will be drawn
617 EFI_HII_OUT_FLAG_CLIP is implied. If this points
618 to a NULL on entry, then a buffer
619 will be allocated to hold the generated image and
620 the pointer updated on exit. It is the caller's
621 responsibility to free this buffer.
622 @param BltX Together with BltX, Specifies the offset from the left and top edge
623 of the image of the first character cell in the
625 @param BltY Together with BltY, Specifies the offset from the left and top edge
626 of the image of the first character cell in the
628 @param RowInfoArray If this is non-NULL on entry, then on exit, this
629 will point to an allocated buffer containing
630 row information and RowInfoArraySize will be
631 updated to contain the number of elements.
632 This array describes the characters which were at
633 least partially drawn and the heights of the
634 rows. It is the caller's responsibility to free
636 @param RowInfoArraySize If this is non-NULL on entry, then on exit it
637 contains the number of elements in RowInfoArray.
638 @param ColumnInfoArray If this is non-NULL, then on return it will be
639 filled with the horizontal offset for each
640 character in the string on the row where it is
641 displayed. Non-printing characters will have
642 the offset ~0. The caller is responsible to
643 allocate a buffer large enough so that there
644 is one entry for each character in the string,
645 not including the null-terminator. It is possible
646 when character display is normalized that some
647 character cells overlap.
649 @retval EFI_SUCCESS The string was successfully rendered.
650 @retval EFI_OUT_OF_RESOURCES Unable to allocate an output buffer for
652 @retval EFI_INVALID_PARAMETER The Blt or PackageList was NULL.
653 @retval EFI_INVALID_PARAMETER Flags were invalid combination.
654 @retval EFI_NOT_FOUND The specified PackageList is not in the Database or the stringid is not
655 in the specified PackageList.
661 IN CONST EFI_HII_FONT_PROTOCOL
*This
,
662 IN EFI_HII_OUT_FLAGS Flags
,
663 IN EFI_HII_HANDLE PackageList
,
664 IN EFI_STRING_ID StringId
,
665 IN CONST CHAR8
* Language
,
666 IN CONST EFI_FONT_DISPLAY_INFO
*StringInfo OPTIONAL
,
667 IN OUT EFI_IMAGE_OUTPUT
**Blt
,
670 OUT EFI_HII_ROW_INFO
**RowInfoArray OPTIONAL
,
671 OUT UINTN
*RowInfoArraySize OPTIONAL
,
672 OUT UINTN
*ColumnInfoArray OPTIONAL
677 Convert the glyph for a single character into a bitmap.
679 @param This A pointer to the EFI_HII_FONT_PROTOCOL instance.
680 @param Char Character to retrieve.
681 @param StringInfo Points to the string font and color information
682 or NULL if the string should use the default
683 system font and color.
684 @param Blt Thus must point to a NULL on entry. A buffer will
685 be allocated to hold the output and the pointer
686 updated on exit. It is the caller's
687 responsibility to free this buffer.
688 @param Baseline Number of pixels from the bottom of the bitmap to
691 @retval EFI_SUCCESS Glyph bitmap created.
692 @retval EFI_OUT_OF_RESOURCES Unable to allocate the output buffer Blt.
693 @retval EFI_WARN_UNKNOWN_GLYPH The glyph was unknown and was replaced with the
694 glyph for Unicode character 0xFFFD.
695 @retval EFI_INVALID_PARAMETER Blt is NULL or *Blt is not NULL.
701 IN CONST EFI_HII_FONT_PROTOCOL
*This
,
703 IN CONST EFI_FONT_DISPLAY_INFO
*StringInfo
,
704 OUT EFI_IMAGE_OUTPUT
**Blt
,
705 OUT UINTN
*Baseline OPTIONAL
710 This function iterates through fonts which match the specified font, using
711 the specified criteria. If String is non-NULL, then all of the characters in
712 the string must exist in order for a candidate font to be returned.
714 @param This A pointer to the EFI_HII_FONT_PROTOCOL instance.
715 @param FontHandle On entry, points to the font handle returned by a
716 previous call to GetFontInfo() or NULL to start
717 with the first font. On return, points to the
718 returned font handle or points to NULL if there
719 are no more matching fonts.
720 @param StringInfoIn Upon entry, points to the font to return
721 information about. If NULL, then the information about the system default
722 font will be returned.
723 @param StringInfoOut Upon return, contains the matching font's
724 information. If NULL, then no information is
725 returned. It's caller's responsibility to free
727 @param String Points to the string which will be tested to
728 determine if all characters are available. If
729 NULL, then any font is acceptable.
731 @retval EFI_SUCCESS Matching font returned successfully.
732 @retval EFI_NOT_FOUND No matching font was found.
733 @retval EFI_INVALID_PARAMETER StringInfoIn is NULL.
734 @retval EFI_INVALID_PARAMETER StringInfoIn->FontInfoMask is an invalid combination.
735 @retval EFI_OUT_OF_RESOURCES There were insufficient resources to complete the
741 IN CONST EFI_HII_FONT_PROTOCOL
*This
,
742 IN OUT EFI_FONT_HANDLE
*FontHandle
,
743 IN CONST EFI_FONT_DISPLAY_INFO
*StringInfoIn
, OPTIONAL
744 OUT EFI_FONT_DISPLAY_INFO
**StringInfoOut
,
745 IN CONST EFI_STRING String OPTIONAL
749 // EFI_HII_IMAGE_PROTOCOL interfaces
754 This function adds the image Image to the group of images owned by PackageList, and returns
755 a new image identifier (ImageId).
757 @param This A pointer to the EFI_HII_IMAGE_PROTOCOL instance.
758 @param PackageList Handle of the package list where this image will
760 @param ImageId On return, contains the new image id, which is
761 unique within PackageList.
762 @param Image Points to the image.
764 @retval EFI_SUCCESS The new image was added successfully.
765 @retval EFI_NOT_FOUND The specified PackageList could not be found in
767 @retval EFI_OUT_OF_RESOURCES Could not add the image due to lack of resources.
768 @retval EFI_INVALID_PARAMETER Image is NULL or ImageId is NULL.
774 IN CONST EFI_HII_IMAGE_PROTOCOL
*This
,
775 IN EFI_HII_HANDLE PackageList
,
776 OUT EFI_IMAGE_ID
*ImageId
,
777 IN CONST EFI_IMAGE_INPUT
*Image
782 This function retrieves the image specified by ImageId which is associated with
783 the specified PackageList and copies it into the buffer specified by Image.
785 @param This A pointer to the EFI_HII_IMAGE_PROTOCOL instance.
786 @param PackageList Handle of the package list where this image will
788 @param ImageId The image's id,, which is unique within
790 @param Image Points to the image.
792 @retval EFI_SUCCESS The new image was returned successfully.
793 @retval EFI_NOT_FOUND The image specified by ImageId is not available.
794 The specified PackageList is not in the database.
795 @retval EFI_BUFFER_TOO_SMALL The buffer specified by ImageSize is too small to
797 @retval EFI_INVALID_PARAMETER The Image or ImageSize was NULL.
798 @retval EFI_OUT_OF_RESOURCES The bitmap could not be retrieved because there was not
805 IN CONST EFI_HII_IMAGE_PROTOCOL
*This
,
806 IN EFI_HII_HANDLE PackageList
,
807 IN EFI_IMAGE_ID ImageId
,
808 OUT EFI_IMAGE_INPUT
*Image
813 This function updates the image specified by ImageId in the specified PackageListHandle to
814 the image specified by Image.
816 @param This A pointer to the EFI_HII_IMAGE_PROTOCOL instance.
817 @param PackageList The package list containing the images.
818 @param ImageId The image's id,, which is unique within
820 @param Image Points to the image.
822 @retval EFI_SUCCESS The new image was updated successfully.
823 @retval EFI_NOT_FOUND The image specified by ImageId is not in the
824 database. The specified PackageList is not in the database.
825 @retval EFI_INVALID_PARAMETER The Image was NULL.
831 IN CONST EFI_HII_IMAGE_PROTOCOL
*This
,
832 IN EFI_HII_HANDLE PackageList
,
833 IN EFI_IMAGE_ID ImageId
,
834 IN CONST EFI_IMAGE_INPUT
*Image
839 This function renders an image to a bitmap or the screen using the specified
840 color and options. It draws the image on an existing bitmap, allocates a new
841 bitmap or uses the screen. The images can be clipped.
843 @param This A pointer to the EFI_HII_IMAGE_PROTOCOL instance.
844 @param Flags Describes how the image is to be drawn.
845 @param Image Points to the image to be displayed.
846 @param Blt If this points to a non-NULL on entry, this
847 points to the image, which is Width pixels wide
848 and Height pixels high. The image will be drawn
849 onto this image and EFI_HII_DRAW_FLAG_CLIP is
850 implied. If this points to a NULL on entry, then
851 a buffer will be allocated to hold the generated
852 image and the pointer updated on exit. It is the
853 caller's responsibility to free this buffer.
854 @param BltX Specifies the offset from the left and top edge
855 of the output image of the first pixel in the
857 @param BltY Specifies the offset from the left and top edge
858 of the output image of the first pixel in the
861 @retval EFI_SUCCESS The image was successfully drawn.
862 @retval EFI_OUT_OF_RESOURCES Unable to allocate an output buffer for Blt.
863 @retval EFI_INVALID_PARAMETER The Image or Blt was NULL.
864 @retval EFI_INVALID_PARAMETER Any combination of Flags is invalid.
870 IN CONST EFI_HII_IMAGE_PROTOCOL
*This
,
871 IN EFI_HII_DRAW_FLAGS Flags
,
872 IN CONST EFI_IMAGE_INPUT
*Image
,
873 IN OUT EFI_IMAGE_OUTPUT
**Blt
,
880 This function renders an image to a bitmap or the screen using the specified
881 color and options. It draws the image on an existing bitmap, allocates a new
882 bitmap or uses the screen. The images can be clipped.
884 @param This A pointer to the EFI_HII_IMAGE_PROTOCOL instance.
885 @param Flags Describes how the image is to be drawn.
886 @param PackageList The package list in the HII database to search
887 for the specified image.
888 @param ImageId The image's id, which is unique within
890 @param Blt If this points to a non-NULL on entry, this
891 points to the image, which is Width pixels wide
892 and Height pixels high. The image will be drawn
894 EFI_HII_DRAW_FLAG_CLIP is implied. If this points
895 to a NULL on entry, then a buffer will be
896 allocated to hold the generated image and the
897 pointer updated on exit. It is the caller's
898 responsibility to free this buffer.
899 @param BltX Specifies the offset from the left and top edge
900 of the output image of the first pixel in the
902 @param BltY Specifies the offset from the left and top edge
903 of the output image of the first pixel in the
906 @retval EFI_SUCCESS The image was successfully drawn.
907 @retval EFI_OUT_OF_RESOURCES Unable to allocate an output buffer for Blt.
908 @retval EFI_INVALID_PARAMETER The Blt was NULL.
909 @retval EFI_NOT_FOUND The image specified by ImageId is not in the database.
910 The specified PackageList is not in the database.
916 IN CONST EFI_HII_IMAGE_PROTOCOL
*This
,
917 IN EFI_HII_DRAW_FLAGS Flags
,
918 IN EFI_HII_HANDLE PackageList
,
919 IN EFI_IMAGE_ID ImageId
,
920 IN OUT EFI_IMAGE_OUTPUT
**Blt
,
928 // EFI_HII_STRING_PROTOCOL
933 This function adds the string String to the group of strings owned by PackageList, with the
934 specified font information StringFontInfo and returns a new string id.
936 @param This A pointer to the EFI_HII_STRING_PROTOCOL
938 @param PackageList Handle of the package list where this string will
940 @param StringId On return, contains the new strings id, which is
941 unique within PackageList.
942 @param Language Points to the language for the new string.
943 @param LanguageName Points to the printable language name to
944 associate with the passed in Language field.If
945 LanguageName is not NULL and the string package
946 header's LanguageName associated with a given
947 Language is not zero, the LanguageName being
948 passed in will be ignored.
949 @param String Points to the new null-terminated string.
950 @param StringFontInfo Points to the new string's font information or
951 NULL if the string should have the default system
952 font, size and style.
954 @retval EFI_SUCCESS The new string was added successfully.
955 @retval EFI_NOT_FOUND The specified PackageList could not be found in
957 @retval EFI_OUT_OF_RESOURCES Could not add the string due to lack of
959 @retval EFI_INVALID_PARAMETER String is NULL or StringId is NULL or Language is
966 IN CONST EFI_HII_STRING_PROTOCOL
*This
,
967 IN EFI_HII_HANDLE PackageList
,
968 OUT EFI_STRING_ID
*StringId
,
969 IN CONST CHAR8
*Language
,
970 IN CONST CHAR16
*LanguageName
, OPTIONAL
971 IN CONST EFI_STRING String
,
972 IN CONST EFI_FONT_INFO
*StringFontInfo OPTIONAL
977 This function retrieves the string specified by StringId which is associated
978 with the specified PackageList in the language Language and copies it into
979 the buffer specified by String.
981 @param This A pointer to the EFI_HII_STRING_PROTOCOL
983 @param Language Points to the language for the retrieved string.
984 @param PackageList The package list in the HII database to search
985 for the specified string.
986 @param StringId The string's id, which is unique within
988 @param String Points to the new null-terminated string.
989 @param StringSize On entry, points to the size of the buffer
990 pointed to by String, in bytes. On return,
991 points to the length of the string, in bytes.
992 @param StringFontInfo If not NULL, points to the string's font
993 information. It's caller's responsibility to
996 @retval EFI_SUCCESS The string was returned successfully.
997 @retval EFI_NOT_FOUND The string specified by StringId is not
999 @retval EFI_NOT_FOUND The string specified by StringId is available but
1000 not in the specified language.
1001 The specified PackageList is not in the database.
1002 @retval EFI_INVALID_LANGUAGE - The string specified by StringId is available but
1003 @retval EFI_BUFFER_TOO_SMALL The buffer specified by StringSize is too small
1005 @retval EFI_INVALID_PARAMETER The String or Language or StringSize was NULL.
1006 @retval EFI_OUT_OF_RESOURCES There were insufficient resources to complete the
1013 IN CONST EFI_HII_STRING_PROTOCOL
*This
,
1014 IN CONST CHAR8
*Language
,
1015 IN EFI_HII_HANDLE PackageList
,
1016 IN EFI_STRING_ID StringId
,
1017 OUT EFI_STRING String
,
1018 IN OUT UINTN
*StringSize
,
1019 OUT EFI_FONT_INFO
**StringFontInfo OPTIONAL
1024 This function updates the string specified by StringId in the specified PackageList to the text
1025 specified by String and, optionally, the font information specified by StringFontInfo.
1027 @param This A pointer to the EFI_HII_STRING_PROTOCOL
1029 @param PackageList The package list containing the strings.
1030 @param StringId The string's id, which is unique within
1032 @param Language Points to the language for the updated string.
1033 @param String Points to the new null-terminated string.
1034 @param StringFontInfo Points to the string's font information or NULL
1035 if the string font information is not changed.
1037 @retval EFI_SUCCESS The string was updated successfully.
1038 @retval EFI_NOT_FOUND The string specified by StringId is not in the
1040 @retval EFI_INVALID_PARAMETER The String or Language was NULL.
1041 @retval EFI_OUT_OF_RESOURCES The system is out of resources to accomplish the
1048 IN CONST EFI_HII_STRING_PROTOCOL
*This
,
1049 IN EFI_HII_HANDLE PackageList
,
1050 IN EFI_STRING_ID StringId
,
1051 IN CONST CHAR8
*Language
,
1052 IN CONST EFI_STRING String
,
1053 IN CONST EFI_FONT_INFO
*StringFontInfo OPTIONAL
1058 This function returns the list of supported languages, in the format specified
1059 in Appendix M of UEFI 2.1 spec.
1061 @param This A pointer to the EFI_HII_STRING_PROTOCOL
1063 @param PackageList The package list to examine.
1064 @param Languages Points to the buffer to hold the returned string.
1065 @param LanguagesSize On entry, points to the size of the buffer
1066 pointed to by Languages, in bytes. On return,
1067 points to the length of Languages, in bytes.
1069 @retval EFI_SUCCESS The languages were returned successfully.
1070 @retval EFI_INVALID_PARAMETER The Languages or LanguagesSize was NULL.
1071 @retval EFI_BUFFER_TOO_SMALL The LanguagesSize is too small to hold the list
1072 of supported languages. LanguageSize is updated
1073 to contain the required size.
1074 @retval EFI_NOT_FOUND Could not find string package in specified
1081 IN CONST EFI_HII_STRING_PROTOCOL
*This
,
1082 IN EFI_HII_HANDLE PackageList
,
1083 IN OUT CHAR8
*Languages
,
1084 IN OUT UINTN
*LanguagesSize
1089 Each string package has associated with it a single primary language and zero
1090 or more secondary languages. This routine returns the secondary languages
1091 associated with a package list.
1093 @param This A pointer to the EFI_HII_STRING_PROTOCOL
1095 @param PackageList The package list to examine.
1096 @param FirstLanguage Points to the primary language.
1097 @param SecondaryLanguages Points to the buffer to hold the returned list of
1098 secondary languages for the specified
1099 FirstLanguage. If there are no secondary
1100 languages, the function returns successfully,
1101 but this is set to NULL.
1102 @param SecondaryLanguagesSize On entry, points to the size of the buffer
1103 pointed to by SecondLanguages, in bytes. On
1104 return, points to the length of SecondLanguages
1107 @retval EFI_SUCCESS Secondary languages were correctly returned.
1108 @retval EFI_INVALID_PARAMETER FirstLanguage or SecondLanguages or
1109 SecondLanguagesSize was NULL.
1110 @retval EFI_BUFFER_TOO_SMALL The buffer specified by SecondLanguagesSize is
1111 too small to hold the returned information.
1112 SecondLanguageSize is updated to hold the size of
1113 the buffer required.
1114 @retval EFI_INVALID_LANGUAGE The language specified by FirstLanguage is not
1115 present in the specified package list.
1116 @retval EFI_NOT_FOUND The specified PackageList is not in the Database.
1121 HiiGetSecondaryLanguages (
1122 IN CONST EFI_HII_STRING_PROTOCOL
*This
,
1123 IN EFI_HII_HANDLE PackageList
,
1124 IN CONST CHAR8
*FirstLanguage
,
1125 IN OUT CHAR8
*SecondaryLanguages
,
1126 IN OUT UINTN
*SecondaryLanguagesSize
1130 // EFI_HII_DATABASE_PROTOCOL protocol interfaces
1135 This function adds the packages in the package list to the database and returns a handle. If there is a
1136 EFI_DEVICE_PATH_PROTOCOL associated with the DriverHandle, then this function will
1137 create a package of type EFI_PACKAGE_TYPE_DEVICE_PATH and add it to the package list.
1139 @param This A pointer to the EFI_HII_DATABASE_PROTOCOL
1141 @param PackageList A pointer to an EFI_HII_PACKAGE_LIST_HEADER
1143 @param DriverHandle Associate the package list with this EFI handle.
1144 If a NULL is specified, this data will not be associate
1145 with any drivers and cannot have a callback induced.
1146 @param Handle A pointer to the EFI_HII_HANDLE instance.
1148 @retval EFI_SUCCESS The package list associated with the Handle was
1149 added to the HII database.
1150 @retval EFI_OUT_OF_RESOURCES Unable to allocate necessary resources for the
1151 new database contents.
1152 @retval EFI_INVALID_PARAMETER PackageList is NULL or Handle is NULL.
1158 IN CONST EFI_HII_DATABASE_PROTOCOL
*This
,
1159 IN CONST EFI_HII_PACKAGE_LIST_HEADER
*PackageList
,
1160 IN CONST EFI_HANDLE DriverHandle
, OPTIONAL
1161 OUT EFI_HII_HANDLE
*Handle
1166 This function removes the package list that is associated with a handle Handle
1167 from the HII database. Before removing the package, any registered functions
1168 with the notification type REMOVE_PACK and the same package type will be called.
1170 @param This A pointer to the EFI_HII_DATABASE_PROTOCOL
1172 @param Handle The handle that was registered to the data that
1173 is requested for removal.
1175 @retval EFI_SUCCESS The data associated with the Handle was removed
1176 from the HII database.
1177 @retval EFI_NOT_FOUND The specified Handle is not in database.
1182 HiiRemovePackageList (
1183 IN CONST EFI_HII_DATABASE_PROTOCOL
*This
,
1184 IN EFI_HII_HANDLE Handle
1189 This function updates the existing package list (which has the specified Handle)
1190 in the HII databases, using the new package list specified by PackageList.
1192 @param This A pointer to the EFI_HII_DATABASE_PROTOCOL
1194 @param Handle The handle that was registered to the data that
1195 is requested to be updated.
1196 @param PackageList A pointer to an EFI_HII_PACKAGE_LIST_HEADER
1199 @retval EFI_SUCCESS The HII database was successfully updated.
1200 @retval EFI_OUT_OF_RESOURCES Unable to allocate enough memory for the updated
1202 @retval EFI_INVALID_PARAMETER PackageList was NULL.
1203 @retval EFI_NOT_FOUND The specified Handle is not in database.
1208 HiiUpdatePackageList (
1209 IN CONST EFI_HII_DATABASE_PROTOCOL
*This
,
1210 IN EFI_HII_HANDLE Handle
,
1211 IN CONST EFI_HII_PACKAGE_LIST_HEADER
*PackageList
1216 This function returns a list of the package handles of the specified type
1217 that are currently active in the database. The pseudo-type
1218 EFI_HII_PACKAGE_TYPE_ALL will cause all package handles to be listed.
1220 @param This A pointer to the EFI_HII_DATABASE_PROTOCOL
1222 @param PackageType Specifies the package type of the packages to
1223 list or EFI_HII_PACKAGE_TYPE_ALL for all packages
1225 @param PackageGuid If PackageType is EFI_HII_PACKAGE_TYPE_GUID, then
1226 this is the pointer to the GUID which must match
1227 the Guid field of EFI_HII_GUID_PACKAGE_GUID_HDR.
1228 Otherwise, it must be NULL.
1229 @param HandleBufferLength On input, a pointer to the length of the handle
1230 buffer. On output, the length of the handle
1231 buffer that is required for the handles found.
1232 @param Handle An array of EFI_HII_HANDLE instances returned.
1234 @retval EFI_SUCCESS The matching handles are outputed successfully.
1235 HandleBufferLength is updated with the actual length.
1236 @retval EFI_BUFFER_TO_SMALL The HandleBufferLength parameter indicates that
1237 Handle is too small to support the number of
1238 handles. HandleBufferLength is updated with a
1239 value that will enable the data to fit.
1240 @retval EFI_NOT_FOUND No matching handle could not be found in
1242 @retval EFI_INVALID_PARAMETER Handle or HandleBufferLength was NULL.
1243 @retval EFI_INVALID_PARAMETER PackageType is not a EFI_HII_PACKAGE_TYPE_GUID but
1244 PackageGuid is not NULL, PackageType is a EFI_HII_
1245 PACKAGE_TYPE_GUID but PackageGuid is NULL.
1251 HiiListPackageLists (
1252 IN CONST EFI_HII_DATABASE_PROTOCOL
*This
,
1253 IN UINT8 PackageType
,
1254 IN CONST EFI_GUID
*PackageGuid
,
1255 IN OUT UINTN
*HandleBufferLength
,
1256 OUT EFI_HII_HANDLE
*Handle
1261 This function will export one or all package lists in the database to a buffer.
1262 For each package list exported, this function will call functions registered
1263 with EXPORT_PACK and then copy the package list to the buffer.
1265 @param This A pointer to the EFI_HII_DATABASE_PROTOCOL
1267 @param Handle An EFI_HII_HANDLE that corresponds to the desired
1268 package list in the HII database to export or
1269 NULL to indicate all package lists should be
1271 @param BufferSize On input, a pointer to the length of the buffer.
1272 On output, the length of the buffer that is
1273 required for the exported data.
1274 @param Buffer A pointer to a buffer that will contain the
1275 results of the export function.
1277 @retval EFI_SUCCESS Package exported.
1278 @retval EFI_BUFFER_TO_SMALL The HandleBufferLength parameter indicates that
1279 Handle is too small to support the number of
1280 handles. HandleBufferLength is updated with
1281 a value that will enable the data to fit.
1282 @retval EFI_NOT_FOUND The specifiecd Handle could not be found in the
1284 @retval EFI_INVALID_PARAMETER Handle or Buffer or BufferSize was NULL.
1289 HiiExportPackageLists (
1290 IN CONST EFI_HII_DATABASE_PROTOCOL
*This
,
1291 IN EFI_HII_HANDLE Handle
,
1292 IN OUT UINTN
*BufferSize
,
1293 OUT EFI_HII_PACKAGE_LIST_HEADER
*Buffer
1298 This function registers a function which will be called when specified actions related to packages of
1299 the specified type occur in the HII database. By registering a function, other HII-related drivers are
1300 notified when specific package types are added, removed or updated in the HII database.
1301 Each driver or application which registers a notification should use
1302 EFI_HII_DATABASE_PROTOCOL.UnregisterPackageNotify() before exiting.
1304 @param This A pointer to the EFI_HII_DATABASE_PROTOCOL
1306 @param PackageType Specifies the package type of the packages to
1307 list or EFI_HII_PACKAGE_TYPE_ALL for all packages
1309 @param PackageGuid If PackageType is EFI_HII_PACKAGE_TYPE_GUID, then
1310 this is the pointer to the GUID which must match
1312 EFI_HII_GUID_PACKAGE_GUID_HDR. Otherwise, it must
1314 @param PackageNotifyFn Points to the function to be called when the
1316 NotificationType occurs.
1317 @param NotifyType Describes the types of notification which this
1318 function will be receiving.
1319 @param NotifyHandle Points to the unique handle assigned to the
1320 registered notification. Can be used in
1321 EFI_HII_DATABASE_PROTOCOL.UnregisterPackageNotify()
1322 to stop notifications.
1324 @retval EFI_SUCCESS Notification registered successfully.
1325 @retval EFI_OUT_OF_RESOURCES Unable to allocate necessary data structures
1326 @retval EFI_INVALID_PARAMETER NotifyHandle is NULL.
1327 @retval EFI_INVALID_PARAMETER PackageGuid is not NULL when PackageType is not
1328 EFI_HII_PACKAGE_TYPE_GUID.
1329 @retval EFI_INVALID_PARAMETER PackageGuid is NULL when PackageType is
1330 EFI_HII_PACKAGE_TYPE_GUID.
1335 HiiRegisterPackageNotify (
1336 IN CONST EFI_HII_DATABASE_PROTOCOL
*This
,
1337 IN UINT8 PackageType
,
1338 IN CONST EFI_GUID
*PackageGuid
,
1339 IN CONST EFI_HII_DATABASE_NOTIFY PackageNotifyFn
,
1340 IN EFI_HII_DATABASE_NOTIFY_TYPE NotifyType
,
1341 OUT EFI_HANDLE
*NotifyHandle
1346 Removes the specified HII database package-related notification.
1348 @param This A pointer to the EFI_HII_DATABASE_PROTOCOL
1350 @param NotificationHandle The handle of the notification function being
1353 @retval EFI_SUCCESS Notification is unregistered successfully.
1354 @retval EFI_NOT_FOUND The incoming notification handle does not exist
1355 in current hii database.
1360 HiiUnregisterPackageNotify (
1361 IN CONST EFI_HII_DATABASE_PROTOCOL
*This
,
1362 IN EFI_HANDLE NotificationHandle
1367 This routine retrieves an array of GUID values for each keyboard layout that
1368 was previously registered in the system.
1370 @param This A pointer to the EFI_HII_DATABASE_PROTOCOL
1372 @param KeyGuidBufferLength On input, a pointer to the length of the keyboard
1373 GUID buffer. On output, the length of the handle
1374 buffer that is required for the handles found.
1375 @param KeyGuidBuffer An array of keyboard layout GUID instances
1378 @retval EFI_SUCCESS KeyGuidBuffer was updated successfully.
1379 @retval EFI_BUFFER_TOO_SMALL The KeyGuidBufferLength parameter indicates
1380 that KeyGuidBuffer is too small to support the
1381 number of GUIDs. KeyGuidBufferLength is
1382 updated with a value that will enable the data to
1384 @retval EFI_INVALID_PARAMETER The KeyGuidBuffer or KeyGuidBufferLength was
1386 @retval EFI_NOT_FOUND There was no keyboard layout.
1391 HiiFindKeyboardLayouts (
1392 IN CONST EFI_HII_DATABASE_PROTOCOL
*This
,
1393 IN OUT UINT16
*KeyGuidBufferLength
,
1394 OUT EFI_GUID
*KeyGuidBuffer
1399 This routine retrieves the requested keyboard layout. The layout is a physical description of the keys
1400 on a keyboard and the character(s) that are associated with a particular set of key strokes.
1402 @param This A pointer to the EFI_HII_DATABASE_PROTOCOL
1404 @param KeyGuid A pointer to the unique ID associated with a
1405 given keyboard layout. If KeyGuid is NULL then
1406 the current layout will be retrieved.
1407 @param KeyboardLayoutLength On input, a pointer to the length of the
1408 KeyboardLayout buffer. On output, the length of
1409 the data placed into KeyboardLayout.
1410 @param KeyboardLayout A pointer to a buffer containing the retrieved
1413 @retval EFI_SUCCESS The keyboard layout was retrieved successfully.
1414 @retval EFI_NOT_FOUND The requested keyboard layout was not found.
1415 @retval EFI_INVALID_PARAMETER The KeyboardLayout or KeyboardLayoutLength was
1421 HiiGetKeyboardLayout (
1422 IN CONST EFI_HII_DATABASE_PROTOCOL
*This
,
1423 IN CONST EFI_GUID
*KeyGuid
,
1424 IN OUT UINT16
*KeyboardLayoutLength
,
1425 OUT EFI_HII_KEYBOARD_LAYOUT
*KeyboardLayout
1430 This routine sets the default keyboard layout to the one referenced by KeyGuid. When this routine
1431 is called, an event will be signaled of the EFI_HII_SET_KEYBOARD_LAYOUT_EVENT_GUID
1432 group type. This is so that agents which are sensitive to the current keyboard layout being changed
1433 can be notified of this change.
1435 @param This A pointer to the EFI_HII_DATABASE_PROTOCOL
1437 @param KeyGuid A pointer to the unique ID associated with a
1438 given keyboard layout.
1440 @retval EFI_SUCCESS The current keyboard layout was successfully set.
1441 @retval EFI_NOT_FOUND The referenced keyboard layout was not found, so
1443 @retval EFI_INVALID_PARAMETER The KeyGuid was NULL.
1448 HiiSetKeyboardLayout (
1449 IN CONST EFI_HII_DATABASE_PROTOCOL
*This
,
1450 IN CONST EFI_GUID
*KeyGuid
1455 Return the EFI handle associated with a package list.
1457 @param This A pointer to the EFI_HII_DATABASE_PROTOCOL
1459 @param PackageListHandle An EFI_HII_HANDLE that corresponds to the desired
1460 package list in the HIIdatabase.
1461 @param DriverHandle On return, contains the EFI_HANDLE which was
1462 registered with the package list in
1465 @retval EFI_SUCCESS The DriverHandle was returned successfully.
1466 @retval EFI_INVALID_PARAMETER The PackageListHandle was not valid or
1467 DriverHandle was NULL.
1472 HiiGetPackageListHandle (
1473 IN CONST EFI_HII_DATABASE_PROTOCOL
*This
,
1474 IN EFI_HII_HANDLE PackageListHandle
,
1475 OUT EFI_HANDLE
*DriverHandle
1479 // EFI_HII_CONFIG_ROUTING_PROTOCOL interfaces
1484 This function allows a caller to extract the current configuration
1485 for one or more named elements from one or more drivers.
1487 @param This A pointer to the EFI_HII_CONFIG_ROUTING_PROTOCOL
1489 @param Request A null-terminated Unicode string in
1490 <MultiConfigRequest> format.
1491 @param Progress On return, points to a character in the Request
1492 string. Points to the string's null terminator if
1493 request was successful. Points to the most recent
1494 & before the first failing name / value pair (or
1495 the beginning of the string if the failure is in
1496 the first name / value pair) if the request was
1498 @param Results Null-terminated Unicode string in
1499 <MultiConfigAltResp> format which has all values
1500 filled in for the names in the Request string.
1501 String to be allocated by the called function.
1503 @retval EFI_SUCCESS The Results string is filled with the values
1504 corresponding to all requested names.
1505 @retval EFI_OUT_OF_RESOURCES Not enough memory to store the parts of the
1506 results that must be stored awaiting possible
1508 @retval EFI_NOT_FOUND Routing data doesn't match any known driver.
1509 Progress set to the "G" in "GUID" of the
1510 routing header that doesn't match. Note: There
1511 is no requirement that all routing data
1512 be validated before any configuration extraction.
1513 @retval EFI_INVALID_PARAMETER For example, passing in a NULL for the Request
1514 parameter would result in this type of error. The
1515 Progress parameter is set to NULL.
1516 @retval EFI_INVALID_PARAMETER Illegal syntax. Progress set to most recent &
1517 before the error or the beginning of the string.
1518 @retval EFI_INVALID_PARAMETER Unknown name. Progress points to the & before the
1524 HiiConfigRoutingExtractConfig (
1525 IN CONST EFI_HII_CONFIG_ROUTING_PROTOCOL
*This
,
1526 IN CONST EFI_STRING Request
,
1527 OUT EFI_STRING
*Progress
,
1528 OUT EFI_STRING
*Results
1533 This function allows the caller to request the current configuration for the
1534 entirety of the current HII database and returns the data in a null-terminated Unicode string.
1536 @param This A pointer to the EFI_HII_CONFIG_ROUTING_PROTOCOL
1538 @param Results Null-terminated Unicode string in
1539 <MultiConfigAltResp> format which has all values
1540 filled in for the names in the Request string.
1541 String to be allocated by the called function.
1542 De-allocation is up to the caller.
1544 @retval EFI_SUCCESS The Results string is filled with the values
1545 corresponding to all requested names.
1546 @retval EFI_OUT_OF_RESOURCES Not enough memory to store the parts of the
1547 results that must be stored awaiting possible
1549 @retval EFI_INVALID_PARAMETER For example, passing in a NULL for the Results
1550 parameter would result in this type of error.
1555 HiiConfigRoutingExportConfig (
1556 IN CONST EFI_HII_CONFIG_ROUTING_PROTOCOL
*This
,
1557 OUT EFI_STRING
*Results
1562 This function processes the results of processing forms and routes it to the
1563 appropriate handlers or storage.
1565 @param This A pointer to the EFI_HII_CONFIG_ROUTING_PROTOCOL
1567 @param Configuration A null-terminated Unicode string in
1568 <MulltiConfigResp> format.
1569 @param Progress A pointer to a string filled in with the offset
1570 of the most recent & before the first failing
1571 name / value pair (or the beginning of the string
1572 if the failure is in the first name / value pair)
1573 or the terminating NULL if all was successful.
1575 @retval EFI_SUCCESS The results have been distributed or are awaiting
1577 @retval EFI_OUT_OF_RESOURCES Not enough memory to store the parts of the
1578 results that must be stored awaiting possible
1580 @retval EFI_INVALID_PARAMETER Passing in a NULL for the Configuration parameter
1581 would result in this type of error.
1582 @retval EFI_NOT_FOUND Target for the specified routing data was not
1588 HiiConfigRoutingRouteConfig (
1589 IN CONST EFI_HII_CONFIG_ROUTING_PROTOCOL
*This
,
1590 IN CONST EFI_STRING Configuration
,
1591 OUT EFI_STRING
*Progress
1597 This helper function is to be called by drivers to map configuration data stored
1598 in byte array ("block") formats such as UEFI Variables into current configuration strings.
1600 @param This A pointer to the EFI_HII_CONFIG_ROUTING_PROTOCOL
1602 @param ConfigRequest A null-terminated Unicode string in
1603 <ConfigRequest> format.
1604 @param Block Array of bytes defining the block's
1606 @param BlockSize Length in bytes of Block.
1607 @param Config Filled-in configuration string. String allocated
1608 by the function. Returned only if call is
1610 @param Progress A pointer to a string filled in with the offset
1611 of the most recent & before the first failing
1612 name/value pair (or the beginning of the string
1613 if the failure is in the first name / value pair)
1614 or the terminating NULL if all was successful.
1616 @retval EFI_SUCCESS The request succeeded. Progress points to the
1617 null terminator at the end of the ConfigRequest
1619 @retval EFI_OUT_OF_RESOURCES Not enough memory to allocate Config.
1620 Progress points to the first character of
1622 @retval EFI_INVALID_PARAMETER Passing in a NULL for the ConfigRequest or
1623 Block parameter would result in this type of
1624 error. Progress points to the first character of
1626 @retval EFI_NOT_FOUND Target for the specified routing data was not
1627 found. Progress points to the "G" in "GUID" of
1628 the errant routing data.
1629 @retval EFI_DEVICE_ERROR Block not large enough. Progress undefined.
1630 @retval EFI_INVALID_PARAMETER Encountered non <BlockName> formatted string.
1631 Block is left updated and Progress points at
1632 the '&' preceding the first non-<BlockName>.
1638 IN CONST EFI_HII_CONFIG_ROUTING_PROTOCOL
*This
,
1639 IN CONST EFI_STRING ConfigRequest
,
1640 IN CONST UINT8
*Block
,
1641 IN CONST UINTN BlockSize
,
1642 OUT EFI_STRING
*Config
,
1643 OUT EFI_STRING
*Progress
1648 This helper function is to be called by drivers to map configuration strings
1649 to configurations stored in byte array ("block") formats such as UEFI Variables.
1651 @param This A pointer to the EFI_HII_CONFIG_ROUTING_PROTOCOL
1653 @param ConfigResp A null-terminated Unicode string in <ConfigResp>
1655 @param Block A possibly null array of bytes representing the
1656 current block. Only bytes referenced in the
1657 ConfigResp string in the block are modified. If
1658 this parameter is null or if the *BlockSize
1659 parameter is (on input) shorter than required by
1660 the Configuration string, only the BlockSize
1661 parameter is updated and an appropriate status
1662 (see below) is returned.
1663 @param BlockSize The length of the Block in units of UINT8. On
1664 input, this is the size of the Block. On output,
1665 if successful, contains the index of the last
1666 modified byte in the Block.
1667 @param Progress On return, points to an element of the ConfigResp
1668 string filled in with the offset of the most
1669 recent '&' before the first failing name / value
1670 pair (or the beginning of the string if the
1671 failure is in the first name / value pair) or
1672 the terminating NULL if all was successful.
1674 @retval EFI_SUCCESS The request succeeded. Progress points to the
1675 null terminator at the end of the ConfigResp
1677 @retval EFI_OUT_OF_RESOURCES Not enough memory to allocate Config.
1678 Progress points to the first character of
1680 @retval EFI_INVALID_PARAMETER Passing in a NULL for the ConfigResp or
1681 Block parameter would result in this type of
1682 error. Progress points to the first character of
1684 @retval EFI_NOT_FOUND Target for the specified routing data was not
1685 found. Progress points to the "G" in "GUID" of
1686 the errant routing data.
1687 @retval EFI_INVALID_PARAMETER Encountered non <BlockName> formatted name /
1688 value pair. Block is left updated and
1689 Progress points at the '&' preceding the first
1696 IN CONST EFI_HII_CONFIG_ROUTING_PROTOCOL
*This
,
1697 IN CONST EFI_STRING ConfigResp
,
1698 IN OUT UINT8
*Block
,
1699 IN OUT UINTN
*BlockSize
,
1700 OUT EFI_STRING
*Progress
1705 This helper function is to be called by drivers to extract portions of
1706 a larger configuration string.
1708 @param This A pointer to the EFI_HII_CONFIG_ROUTING_PROTOCOL
1710 @param Configuration A null-terminated Unicode string in
1711 <MultiConfigAltResp> format.
1712 @param Guid A pointer to the GUID value to search for in the
1713 routing portion of the ConfigResp string when
1714 retrieving the requested data. If Guid is NULL,
1715 then all GUID values will be searched for.
1716 @param Name A pointer to the NAME value to search for in the
1717 routing portion of the ConfigResp string when
1718 retrieving the requested data. If Name is NULL,
1719 then all Name values will be searched for.
1720 @param DevicePath A pointer to the PATH value to search for in the
1721 routing portion of the ConfigResp string when
1722 retrieving the requested data. If DevicePath is
1723 NULL, then all DevicePath values will be
1725 @param AltCfgId A pointer to the ALTCFG value to search for in
1726 the routing portion of the ConfigResp string
1727 when retrieving the requested data. If this
1728 parameter is NULL, then the current setting will
1730 @param AltCfgResp A pointer to a buffer which will be allocated by
1731 the function which contains the retrieved string
1732 as requested. This buffer is only allocated if
1733 the call was successful.
1735 @retval EFI_SUCCESS The request succeeded. The requested data was
1736 extracted and placed in the newly allocated
1738 @retval EFI_OUT_OF_RESOURCES Not enough memory to allocate AltCfgResp.
1739 @retval EFI_INVALID_PARAMETER Any parameter is invalid.
1740 @retval EFI_NOT_FOUND Target for the specified routing data was not
1747 IN CONST EFI_HII_CONFIG_ROUTING_PROTOCOL
*This
,
1748 IN CONST EFI_STRING Configuration
,
1749 IN CONST EFI_GUID
*Guid
,
1750 IN CONST EFI_STRING Name
,
1751 IN CONST EFI_DEVICE_PATH_PROTOCOL
*DevicePath
,
1752 IN CONST UINT16
*AltCfgId
,
1753 OUT EFI_STRING
*AltCfgResp
1758 Compare whether two names of languages are identical.
1760 @param Language1 Name of language 1 from StringPackage
1761 @param Language2 Name of language 2 to be compared with language 1.
1764 @retval FALSE not same
1768 HiiCompareLanguage (
1769 IN CHAR8
*Language1
,
1777 extern EFI_EVENT gHiiKeyboardLayoutChanged
;