3 Copyright (c) 2007, Intel Corporation
4 All rights reserved. This program and the accompanying materials
5 are licensed and made available under the terms and conditions of the BSD License
6 which accompanies this distribution. The full text of the license may be found at
7 http://opensource.org/licenses/bsd-license.php
9 THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
10 WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
18 Private structures definitions in HiiDatabase.
25 #ifndef __HII_DATABASE_PRIVATE_H__
26 #define __HII_DATABASE_PRIVATE_H__
30 #include <Protocol/ConsoleControl.h>
31 #include <Protocol/DevicePath.h>
32 #include <Protocol/HiiFont.h>
33 #include <Protocol/HiiImage.h>
34 #include <Protocol/HiiString.h>
35 #include <Protocol/HiiDatabase.h>
36 #include <Protocol/HiiConfigRouting.h>
37 #include <Protocol/HiiConfigAccess.h>
38 #include <Protocol/SimpleTextOut.h>
40 #include <Guid/HiiKeyBoardLayout.h>
43 #include <Library/DebugLib.h>
44 #include <Library/BaseMemoryLib.h>
45 #include <Library/UefiDriverEntryPoint.h>
46 #include <Library/UefiBootServicesTableLib.h>
47 #include <Library/BaseLib.h>
48 #include <Library/DevicePathLib.h>
49 #include <Library/MemoryAllocationLib.h>
51 #define HII_DATABASE_NOTIFY_GUID \
53 0xc1c76, 0xd79e, 0x42fe, {0x86, 0xb, 0x8b, 0xe8, 0x7b, 0x3e, 0x7a, 0x78} \
56 #define MAX_STRING_LENGTH 1024
57 #define MAX_FONT_NAME_LEN 256
58 #define NARROW_BASELINE 15
59 #define WIDE_BASELINE 14
60 #define SYS_FONT_INFO_MASK 0x37
61 #define REPLACE_UNKNOWN_GLYPH 0xFFFD
62 #define PROPORTIONAL_GLYPH 0x80
63 #define NARROW_GLYPH 0x40
65 #define BITMAP_LEN_1_BIT(Width, Height) (((Width) + 7) / 8 * (Height))
66 #define BITMAP_LEN_4_BIT(Width, Height) (((Width) + 1) / 2 * (Height))
67 #define BITMAP_LEN_8_BIT(Width, Height) ((Width) * (Height))
68 #define BITMAP_LEN_24_BIT(Width, Height) ((Width) * (Height) * 3)
73 #define EFI_HII_VARSTORE_BUFFER 0
74 #define EFI_HII_VARSTORE_NAME_VALUE 1
75 #define EFI_HII_VARSTORE_EFI_VARIABLE 2
77 #define HII_FORMSET_STORAGE_SIGNATURE EFI_SIGNATURE_32 ('H', 'S', 'T', 'G')
82 EFI_HII_HANDLE HiiHandle
;
83 EFI_HANDLE DriverHandle
;
85 UINT8 Type
; // EFI_HII_VARSTORE_BUFFER, EFI_HII_VARSTORE_NAME_VALUE, EFI_HII_VARSTORE_EFI_VARIABLE
89 } HII_FORMSET_STORAGE
;
91 #define HII_FORMSET_STORAGE_FROM_LINK(a) CR (a, HII_FORMSET_STORAGE, Link, HII_FORMSET_STORAGE_SIGNATURE)
95 // String Package definitions
97 #define HII_STRING_PACKAGE_SIGNATURE EFI_SIGNATURE_32 ('h','i','s','p')
98 typedef struct _HII_STRING_PACKAGE_INSTANCE
{
100 EFI_HII_STRING_PACKAGE_HDR
*StringPkgHdr
;
102 LIST_ENTRY StringEntry
;
103 LIST_ENTRY FontInfoList
; // local font info list
105 } HII_STRING_PACKAGE_INSTANCE
;
108 // Form Package definitions
110 #define HII_IFR_PACKAGE_SIGNATURE EFI_SIGNATURE_32 ('h','f','r','p')
111 typedef struct _HII_IFR_PACKAGE_INSTANCE
{
113 EFI_HII_PACKAGE_HEADER FormPkgHdr
;
116 } HII_IFR_PACKAGE_INSTANCE
;
119 // Simple Font Package definitions
121 #define HII_S_FONT_PACKAGE_SIGNATURE EFI_SIGNATURE_32 ('h','s','f','p')
122 typedef struct _HII_SIMPLE_FONT_PACKAGE_INSTANCE
{
124 EFI_HII_SIMPLE_FONT_PACKAGE_HDR
*SimpleFontPkgHdr
;
125 LIST_ENTRY SimpleFontEntry
;
126 } HII_SIMPLE_FONT_PACKAGE_INSTANCE
;
129 // Font Package definitions
131 #define HII_FONT_PACKAGE_SIGNATURE EFI_SIGNATURE_32 ('h','i','f','p')
132 typedef struct _HII_FONT_PACKAGE_INSTANCE
{
134 EFI_HII_FONT_PACKAGE_HDR
*FontPkgHdr
;
136 LIST_ENTRY FontEntry
;
137 LIST_ENTRY GlyphInfoList
;
138 } HII_FONT_PACKAGE_INSTANCE
;
140 #define HII_GLYPH_INFO_SIGNATURE EFI_SIGNATURE_32 ('h','g','i','s')
141 typedef struct _HII_GLYPH_INFO
{
145 EFI_HII_GLYPH_INFO Cell
;
148 #define HII_FONT_INFO_SIGNATURE EFI_SIGNATURE_32 ('h','l','f','i')
149 typedef struct _HII_FONT_INFO
{
152 LIST_ENTRY
*GlobalEntry
;
156 #define HII_GLOBAL_FONT_INFO_SIGNATURE EFI_SIGNATURE_32 ('h','g','f','i')
157 typedef struct _HII_GLOBAL_FONT_INFO
{
160 HII_FONT_PACKAGE_INSTANCE
*FontPackage
;
162 EFI_FONT_INFO
*FontInfo
;
163 } HII_GLOBAL_FONT_INFO
;
166 // Image Package definitions
169 #define HII_PIXEL_MASK 0x80
171 typedef struct _HII_IMAGE_PACKAGE_INSTANCE
{
172 EFI_HII_IMAGE_PACKAGE_HDR ImagePkgHdr
;
173 UINT32 ImageBlockSize
;
174 UINT32 PaletteInfoSize
;
177 } HII_IMAGE_PACKAGE_INSTANCE
;
180 // Keyboard Layout Pacakge definitions
182 #define HII_KB_LAYOUT_PACKAGE_SIGNATURE EFI_SIGNATURE_32 ('h','k','l','p')
183 typedef struct _HII_KEYBOARD_LAYOUT_PACKAGE_INSTANCE
{
186 LIST_ENTRY KeyboardEntry
;
187 } HII_KEYBOARD_LAYOUT_PACKAGE_INSTANCE
;
190 // Guid Package definitions
192 #define HII_GUID_PACKAGE_SIGNATURE EFI_SIGNATURE_32 ('h','i','g','p')
193 typedef struct _HII_GUID_PACKAGE_INSTANCE
{
196 LIST_ENTRY GuidEntry
;
197 } HII_GUID_PACKAGE_INSTANCE
;
200 // A package list can contain only one or less than one device path package.
201 // This rule also applies to image package since ImageId can not be duplicate.
203 typedef struct _HII_DATABASE_PACKAGE_LIST_INSTANCE
{
204 EFI_HII_PACKAGE_LIST_HEADER PackageListHdr
;
205 LIST_ENTRY GuidPkgHdr
;
206 LIST_ENTRY FormPkgHdr
;
207 LIST_ENTRY KeyboardLayoutHdr
;
208 LIST_ENTRY StringPkgHdr
;
209 LIST_ENTRY FontPkgHdr
;
210 HII_IMAGE_PACKAGE_INSTANCE
*ImagePkg
;
211 LIST_ENTRY SimpleFontPkgHdr
;
212 UINT8
*DevicePathPkg
;
213 } HII_DATABASE_PACKAGE_LIST_INSTANCE
;
215 #define HII_HANDLE_SIGNATURE EFI_SIGNATURE_32 ('h','i','h','l')
223 #define HII_DATABASE_RECORD_SIGNATURE EFI_SIGNATURE_32 ('h','i','d','r')
225 typedef struct _HII_DATABASE_RECORD
{
227 HII_DATABASE_PACKAGE_LIST_INSTANCE
*PackageList
;
228 EFI_HANDLE DriverHandle
;
229 EFI_HII_HANDLE Handle
;
230 LIST_ENTRY DatabaseEntry
;
231 } HII_DATABASE_RECORD
;
233 #define HII_DATABASE_NOTIFY_SIGNATURE EFI_SIGNATURE_32 ('h','i','d','n')
235 typedef struct _HII_DATABASE_NOTIFY
{
237 EFI_HANDLE NotifyHandle
;
239 EFI_GUID
*PackageGuid
;
240 EFI_HII_DATABASE_NOTIFY PackageNotifyFn
;
241 EFI_HII_DATABASE_NOTIFY_TYPE NotifyType
;
242 LIST_ENTRY DatabaseNotifyEntry
;
243 } HII_DATABASE_NOTIFY
;
245 #define HII_DATABASE_PRIVATE_DATA_SIGNATURE EFI_SIGNATURE_32 ('H', 'i', 'D', 'p')
247 typedef struct _HII_DATABASE_PRIVATE_DATA
{
249 LIST_ENTRY DatabaseList
;
250 LIST_ENTRY DatabaseNotifyList
;
251 EFI_HII_FONT_PROTOCOL HiiFont
;
252 #ifndef DISABLE_UNUSED_HII_PROTOCOLS
253 EFI_HII_IMAGE_PROTOCOL HiiImage
;
255 EFI_HII_STRING_PROTOCOL HiiString
;
256 EFI_HII_DATABASE_PROTOCOL HiiDatabase
;
257 EFI_HII_CONFIG_ROUTING_PROTOCOL ConfigRouting
;
258 LIST_ENTRY HiiHandleList
;
260 LIST_ENTRY FontInfoList
; // global font info list
261 UINTN Attribute
; // default system color
262 EFI_GUID CurrentLayoutGuid
;
263 EFI_HII_KEYBOARD_LAYOUT
*CurrentLayout
;
264 } HII_DATABASE_PRIVATE_DATA
;
266 #define HII_FONT_DATABASE_PRIVATE_DATA_FROM_THIS(a) \
268 HII_DATABASE_PRIVATE_DATA, \
270 HII_DATABASE_PRIVATE_DATA_SIGNATURE \
273 #define HII_IMAGE_DATABASE_PRIVATE_DATA_FROM_THIS(a) \
275 HII_DATABASE_PRIVATE_DATA, \
277 HII_DATABASE_PRIVATE_DATA_SIGNATURE \
280 #define HII_STRING_DATABASE_PRIVATE_DATA_FROM_THIS(a) \
282 HII_DATABASE_PRIVATE_DATA, \
284 HII_DATABASE_PRIVATE_DATA_SIGNATURE \
287 #define HII_DATABASE_DATABASE_PRIVATE_DATA_FROM_THIS(a) \
289 HII_DATABASE_PRIVATE_DATA, \
291 HII_DATABASE_PRIVATE_DATA_SIGNATURE \
294 #define CONFIG_ROUTING_DATABASE_PRIVATE_DATA_FROM_THIS(a) \
296 HII_DATABASE_PRIVATE_DATA, \
298 HII_DATABASE_PRIVATE_DATA_SIGNATURE \
302 // Internal function prototypes.
306 This function checks whether a handle is a valid EFI_HII_HANDLE
308 @param Handle Pointer to a EFI_HII_HANDLE
311 @retval FALSE Invalid
316 EFI_HII_HANDLE Handle
322 This function checks whether EFI_FONT_INFO exists in current database. If
323 FontInfoMask is specified, check what options can be used to make a match.
324 Note that the masks relate to where the system default should be supplied
325 are ignored by this function.
327 @param Private Hii database private structure.
328 @param FontInfo Points to EFI_FONT_INFO structure.
329 @param FontInfoMask If not NULL, describes what options can be used
330 to make a match between the font requested and
331 the font available. The caller must guarantee
333 @param FontHandle On entry, Points to the font handle returned by a
334 previous call to GetFontInfo() or NULL to start
336 @param GlobalFontInfo If not NULL, output the corresponding globa font
340 @retval FALSE Not existed
345 IN HII_DATABASE_PRIVATE_DATA
*Private
,
346 IN EFI_FONT_INFO
*FontInfo
,
347 IN EFI_FONT_INFO_MASK
*FontInfoMask
, OPTIONAL
348 IN EFI_FONT_HANDLE FontHandle
, OPTIONAL
349 OUT HII_GLOBAL_FONT_INFO
**GlobalFontInfo OPTIONAL
355 Retrieve system default font and color.
357 @param Private HII database driver private data.
358 @param FontInfo Points to system default font output-related
359 information. It's caller's responsibility to free
361 @param FontInfoSize If not NULL, output the size of buffer FontInfo.
363 @retval EFI_SUCCESS Cell information is added to the GlyphInfoList.
364 @retval EFI_OUT_OF_RESOURCES The system is out of resources to accomplish the
366 @retval EFI_INVALID_PARAMETER Any input parameter is invalid.
371 IN HII_DATABASE_PRIVATE_DATA
*Private
,
372 OUT EFI_FONT_DISPLAY_INFO
**FontInfo
,
373 OUT UINTN
*FontInfoSize OPTIONAL
379 Parse all string blocks to find a String block specified by StringId.
380 If StringId = (EFI_STRING_ID) (-1), find out all EFI_HII_SIBT_FONT blocks
381 within this string package and backup its information.
382 If StringId = 0, output the string id of last string block (EFI_HII_SIBT_END).
384 @param Private Hii database private structure.
385 @param StringPackage Hii string package instance.
386 @param StringId The string's id, which is unique within
388 @param BlockType Output the block type of found string block.
389 @param StringBlockAddr Output the block address of found string block.
390 @param StringTextOffset Offset, relative to the found block address, of
391 the string text information.
392 @param LastStringId Output the last string id when StringId = 0.
394 @retval EFI_SUCCESS The string text and font is retrieved
396 @retval EFI_NOT_FOUND The specified text or font info can not be found
398 @retval EFI_OUT_OF_RESOURCES The system is out of resources to accomplish the
404 IN HII_DATABASE_PRIVATE_DATA
*Private
,
405 IN HII_STRING_PACKAGE_INSTANCE
*StringPackage
,
406 IN EFI_STRING_ID StringId
,
407 OUT UINT8
*BlockType
, OPTIONAL
408 OUT UINT8
**StringBlockAddr
, OPTIONAL
409 OUT UINTN
*StringTextOffset
, OPTIONAL
410 OUT EFI_STRING_ID
*LastStringId OPTIONAL
416 Parse all glyph blocks to find a glyph block specified by CharValue.
417 If CharValue = (CHAR16) (-1), collect all default character cell information
418 within this font package and backup its information.
420 @param FontPackage Hii string package instance.
421 @param CharValue Unicode character value, which identifies a glyph
423 @param GlyphBuffer Output the corresponding bitmap data of the found
424 block. It is the caller's responsiblity to free
426 @param Cell Output cell information of the encoded bitmap.
427 @param GlyphBufferLen If not NULL, output the length of GlyphBuffer.
429 @retval EFI_SUCCESS The bitmap data is retrieved successfully.
430 @retval EFI_NOT_FOUND The specified CharValue does not exist in current
432 @retval EFI_OUT_OF_RESOURCES The system is out of resources to accomplish the
438 IN HII_FONT_PACKAGE_INSTANCE
*FontPackage
,
440 OUT UINT8
**GlyphBuffer
, OPTIONAL
441 OUT EFI_HII_GLYPH_INFO
*Cell
, OPTIONAL
442 OUT UINTN
*GlyphBufferLen OPTIONAL
447 // EFI_HII_FONT_PROTOCOL protocol interfaces
452 Renders a string to a bitmap or to the display.
454 @param This A pointer to the EFI_HII_FONT_PROTOCOL instance.
455 @param Flags Describes how the string is to be drawn.
456 @param String Points to the null-terminated string to be
458 @param StringInfo Points to the string output information,
459 including the color and font. If NULL, then the
460 string will be output in the default system font
462 @param Blt If this points to a non-NULL on entry, this
463 points to the image, which is Width pixels wide
464 and Height pixels high. The string will be drawn
466 EFI_HII_OUT_FLAG_CLIP is implied. If this points
467 to a NULL on entry, then a buffer
468 will be allocated to hold the generated image and
469 the pointer updated on exit. It is the caller's
470 responsibility to free this buffer.
471 @param BltX,BLTY Specifies the offset from the left and top edge
472 of the image of the first character cell in the
474 @param RowInfoArray If this is non-NULL on entry, then on exit, this
475 will point to an allocated buffer containing
476 row information and RowInfoArraySize will be
477 updated to contain the number of elements.
478 This array describes the characters which were at
479 least partially drawn and the heights of the
480 rows. It is the caller's responsibility to free
482 @param RowInfoArraySize If this is non-NULL on entry, then on exit it
483 contains the number of elements in RowInfoArray.
484 @param ColumnInfoArray If this is non-NULL, then on return it will be
485 filled with the horizontal offset for each
486 character in the string on the row where it is
487 displayed. Non-printing characters will have
488 the offset ~0. The caller is responsible to
489 allocate a buffer large enough so that there
490 is one entry for each character in the string,
491 not including the null-terminator. It is possible
492 when character display is normalized that some
493 character cells overlap.
495 @retval EFI_SUCCESS The string was successfully rendered.
496 @retval EFI_OUT_OF_RESOURCES Unable to allocate an output buffer for
498 @retval EFI_INVALID_PARAMETER The String was NULL.
504 IN CONST EFI_HII_FONT_PROTOCOL
*This
,
505 IN EFI_HII_OUT_FLAGS Flags
,
506 IN CONST EFI_STRING String
,
507 IN CONST EFI_FONT_DISPLAY_INFO
*StringInfo OPTIONAL
,
508 IN OUT EFI_IMAGE_OUTPUT
**Blt
,
511 OUT EFI_HII_ROW_INFO
**RowInfoArray OPTIONAL
,
512 OUT UINTN
*RowInfoArraySize OPTIONAL
,
513 OUT UINTN
*ColumnInfoArray OPTIONAL
519 Render a string to a bitmap or the screen containing the contents of the specified string.
521 @param This A pointer to the EFI_HII_FONT_PROTOCOL instance.
522 @param Flags Describes how the string is to be drawn.
523 @param PackageList The package list in the HII database to search
524 for the specified string.
525 @param StringId The string's id, which is unique within
527 @param Language Points to the language for the retrieved string.
528 If NULL, then the current system language is
530 @param StringInfo Points to the string output information,
531 including the color and font. If NULL, then the
532 string will be output in the default system font
534 @param Blt If this points to a non-NULL on entry, this
535 points to the image, which is Width pixels wide
536 and Height pixels high. The string will be drawn
538 EFI_HII_OUT_FLAG_CLIP is implied. If this points
539 to a NULL on entry, then a buffer
540 will be allocated to hold the generated image and
541 the pointer updated on exit. It is the caller's
542 responsibility to free this buffer.
543 @param BltX,BLTY Specifies the offset from the left and top edge
544 of the image of the first character cell in the
546 @param RowInfoArray If this is non-NULL on entry, then on exit, this
547 will point to an allocated buffer containing
548 row information and RowInfoArraySize will be
549 updated to contain the number of elements.
550 This array describes the characters which were at
551 least partially drawn and the heights of the
552 rows. It is the caller's responsibility to free
554 @param RowInfoArraySize If this is non-NULL on entry, then on exit it
555 contains the number of elements in RowInfoArray.
556 @param ColumnInfoArray If this is non-NULL, then on return it will be
557 filled with the horizontal offset for each
558 character in the string on the row where it is
559 displayed. Non-printing characters will have
560 the offset ~0. The caller is responsible to
561 allocate a buffer large enough so that there
562 is one entry for each character in the string,
563 not including the null-terminator. It is possible
564 when character display is normalized that some
565 character cells overlap.
567 @retval EFI_SUCCESS The string was successfully rendered.
568 @retval EFI_OUT_OF_RESOURCES Unable to allocate an output buffer for
570 @retval EFI_INVALID_PARAMETER The String was NULL.
576 IN CONST EFI_HII_FONT_PROTOCOL
*This
,
577 IN EFI_HII_OUT_FLAGS Flags
,
578 IN EFI_HII_HANDLE PackageList
,
579 IN EFI_STRING_ID StringId
,
580 IN CONST CHAR8
* Language
,
581 IN CONST EFI_FONT_DISPLAY_INFO
*StringInfo OPTIONAL
,
582 IN OUT EFI_IMAGE_OUTPUT
**Blt
,
585 OUT EFI_HII_ROW_INFO
**RowInfoArray OPTIONAL
,
586 OUT UINTN
*RowInfoArraySize OPTIONAL
,
587 OUT UINTN
*ColumnInfoArray OPTIONAL
593 Convert the glyph for a single character into a bitmap.
595 @param This A pointer to the EFI_HII_FONT_PROTOCOL instance.
596 @param Char Character to retrieve.
597 @param StringInfo Points to the string font and color information
598 or NULL if the string should use the default
599 system font and color.
600 @param Blt Thus must point to a NULL on entry. A buffer will
601 be allocated to hold the output and the pointer
602 updated on exit. It is the caller's
603 responsibility to free this buffer.
604 @param Baseline Number of pixels from the bottom of the bitmap to
607 @retval EFI_SUCCESS Glyph bitmap created.
608 @retval EFI_OUT_OF_RESOURCES Unable to allocate the output buffer Blt.
609 @retval EFI_WARN_UNKNOWN_GLYPH The glyph was unknown and was replaced with the
610 glyph for Unicode character 0xFFFD.
611 @retval EFI_INVALID_PARAMETER Blt is NULL or *Blt is not NULL.
617 IN CONST EFI_HII_FONT_PROTOCOL
*This
,
619 IN CONST EFI_FONT_DISPLAY_INFO
*StringInfo
,
620 OUT EFI_IMAGE_OUTPUT
**Blt
,
621 OUT UINTN
*Baseline OPTIONAL
627 This function iterates through fonts which match the specified font, using
628 the specified criteria. If String is non-NULL, then all of the characters in
629 the string must exist in order for a candidate font to be returned.
631 @param This A pointer to the EFI_HII_FONT_PROTOCOL instance.
632 @param FontHandle On entry, points to the font handle returned by a
633 previous call to GetFontInfo() or NULL to start
634 with the first font. On return, points to the
635 returned font handle or points to NULL if there
636 are no more matching fonts.
637 @param StringInfoIn Upon entry, points to the font to return
639 @param StringInfoOut Upon return, contains the matching font's
640 information. If NULL, then no information is
641 returned. It's caller's responsibility to free
643 @param String Points to the string which will be tested to
644 determine if all characters are available. If
645 NULL, then any font is acceptable.
647 @retval EFI_SUCCESS Matching font returned successfully.
648 @retval EFI_NOT_FOUND No matching font was found.
649 @retval EFI_INVALID_PARAMETER StringInfoIn is NULL.
650 @retval EFI_OUT_OF_RESOURCES There were insufficient resources to complete the
657 IN CONST EFI_HII_FONT_PROTOCOL
*This
,
658 IN OUT EFI_FONT_HANDLE
*FontHandle
,
659 IN CONST EFI_FONT_DISPLAY_INFO
*StringInfoIn
,
660 OUT EFI_FONT_DISPLAY_INFO
**StringInfoOut
,
661 IN CONST EFI_STRING String OPTIONAL
666 // EFI_HII_IMAGE_PROTOCOL interfaces
671 This function adds the image Image to the group of images owned by PackageList, and returns
672 a new image identifier (ImageId).
674 @param This A pointer to the EFI_HII_IMAGE_PROTOCOL instance.
675 @param PackageList Handle of the package list where this image will
677 @param ImageId On return, contains the new image id, which is
678 unique within PackageList.
679 @param Image Points to the image.
681 @retval EFI_SUCCESS The new image was added successfully.
682 @retval EFI_NOT_FOUND The specified PackageList could not be found in
684 @retval EFI_OUT_OF_RESOURCES Could not add the image due to lack of resources.
685 @retval EFI_INVALID_PARAMETER Image is NULL or ImageId is NULL.
691 IN CONST EFI_HII_IMAGE_PROTOCOL
*This
,
692 IN EFI_HII_HANDLE PackageList
,
693 OUT EFI_IMAGE_ID
*ImageId
,
694 IN CONST EFI_IMAGE_INPUT
*Image
700 This function retrieves the image specified by ImageId which is associated with
701 the specified PackageList and copies it into the buffer specified by Image.
703 @param This A pointer to the EFI_HII_IMAGE_PROTOCOL instance.
704 @param PackageList Handle of the package list where this image will
706 @param ImageId The image's id,, which is unique within
708 @param Image Points to the image.
709 @param ImageSize On entry, points to the size of the buffer
710 pointed to by Image, in bytes. On return, points
711 to the length of the image, in bytes.
713 @retval EFI_SUCCESS The new image was returned successfully.
714 @retval EFI_NOT_FOUND The image specified by ImageId is not available.
715 @retval EFI_BUFFER_TOO_SMALL The buffer specified by ImageSize is too small to
717 @retval EFI_INVALID_PARAMETER The Image or ImageSize was NULL.
723 IN CONST EFI_HII_IMAGE_PROTOCOL
*This
,
724 IN EFI_HII_HANDLE PackageList
,
725 IN EFI_IMAGE_ID ImageId
,
726 OUT EFI_IMAGE_INPUT
*Image
,
733 This function updates the image specified by ImageId in the specified PackageListHandle to
734 the image specified by Image.
736 @param This A pointer to the EFI_HII_IMAGE_PROTOCOL instance.
737 @param PackageList The package list containing the images.
738 @param ImageId The image's id,, which is unique within
740 @param Image Points to the image.
742 @retval EFI_SUCCESS The new image was updated successfully.
743 @retval EFI_NOT_FOUND The image specified by ImageId is not in the
745 @retval EFI_INVALID_PARAMETER The Image was NULL.
751 IN CONST EFI_HII_IMAGE_PROTOCOL
*This
,
752 IN EFI_HII_HANDLE PackageList
,
753 IN EFI_IMAGE_ID ImageId
,
754 IN CONST EFI_IMAGE_INPUT
*Image
760 This function renders an image to a bitmap or the screen using the specified
761 color and options. It draws the image on an existing bitmap, allocates a new
762 bitmap or uses the screen. The images can be clipped.
764 @param This A pointer to the EFI_HII_IMAGE_PROTOCOL instance.
765 @param Flags Describes how the image is to be drawn.
766 @param Image Points to the image to be displayed.
767 @param Blt If this points to a non-NULL on entry, this
768 points to the image, which is Width pixels wide
769 and Height pixels high. The image will be drawn
770 onto this image and EFI_HII_DRAW_FLAG_CLIP is
771 implied. If this points to a NULL on entry, then
772 a buffer will be allocated to hold the generated
773 image and the pointer updated on exit. It is the
774 caller's responsibility to free this buffer.
775 @param BltY Specifies the offset from the left and top edge
776 of the output image of the first pixel in the
779 @retval EFI_SUCCESS The image was successfully drawn.
780 @retval EFI_OUT_OF_RESOURCES Unable to allocate an output buffer for Blt.
781 @retval EFI_INVALID_PARAMETER The Image or Blt was NULL.
782 @retval EFI_INVALID_PARAMETER Any combination of Flags is invalid.
788 IN CONST EFI_HII_IMAGE_PROTOCOL
*This
,
789 IN EFI_HII_DRAW_FLAGS Flags
,
790 IN CONST EFI_IMAGE_INPUT
*Image
,
791 IN OUT EFI_IMAGE_OUTPUT
**Blt
,
799 This function renders an image to a bitmap or the screen using the specified
800 color and options. It draws the image on an existing bitmap, allocates a new
801 bitmap or uses the screen. The images can be clipped.
803 @param This A pointer to the EFI_HII_IMAGE_PROTOCOL instance.
804 @param Flags Describes how the image is to be drawn.
805 @param PackageList The package list in the HII database to search
806 for the specified image.
807 @param ImageId The image's id, which is unique within
809 @param Blt If this points to a non-NULL on entry, this
810 points to the image, which is Width pixels wide
811 and Height pixels high. The image will be drawn
813 EFI_HII_DRAW_FLAG_CLIP is implied. If this points
814 to a NULL on entry, then a buffer will be
815 allocated to hold the generated image and the
816 pointer updated on exit. It is the caller's
817 responsibility to free this buffer.
818 @param BltY Specifies the offset from the left and top edge
819 of the output image of the first pixel in the
822 @retval EFI_SUCCESS The image was successfully drawn.
823 @retval EFI_OUT_OF_RESOURCES Unable to allocate an output buffer for Blt.
824 @retval EFI_INVALID_PARAMETER The Image was NULL.
825 @retval EFI_NOT_FOUND The specified packagelist could not be found in
832 IN CONST EFI_HII_IMAGE_PROTOCOL
*This
,
833 IN EFI_HII_DRAW_FLAGS Flags
,
834 IN EFI_HII_HANDLE PackageList
,
835 IN EFI_IMAGE_ID ImageId
,
836 IN OUT EFI_IMAGE_OUTPUT
**Blt
,
844 // EFI_HII_STRING_PROTOCOL
849 This function adds the string String to the group of strings owned by PackageList, with the
850 specified font information StringFontInfo and returns a new string id.
852 @param This A pointer to the EFI_HII_STRING_PROTOCOL
854 @param PackageList Handle of the package list where this string will
856 @param StringId On return, contains the new strings id, which is
857 unique within PackageList.
858 @param Language Points to the language for the new string.
859 @param LanguageName Points to the printable language name to
860 associate with the passed in Language field.If
861 LanguageName is not NULL and the string package
862 header's LanguageName associated with a given
863 Language is not zero, the LanguageName being
864 passed in will be ignored.
865 @param String Points to the new null-terminated string.
866 @param StringFontInfo Points to the new string's font information or
867 NULL if the string should have the default system
868 font, size and style.
870 @retval EFI_SUCCESS The new string was added successfully.
871 @retval EFI_NOT_FOUND The specified PackageList could not be found in
873 @retval EFI_OUT_OF_RESOURCES Could not add the string due to lack of
875 @retval EFI_INVALID_PARAMETER String is NULL or StringId is NULL or Language is
882 IN CONST EFI_HII_STRING_PROTOCOL
*This
,
883 IN EFI_HII_HANDLE PackageList
,
884 OUT EFI_STRING_ID
*StringId
,
885 IN CONST CHAR8
*Language
,
886 IN CONST CHAR16
*LanguageName
, OPTIONAL
887 IN CONST EFI_STRING String
,
888 IN CONST EFI_FONT_INFO
*StringFontInfo OPTIONAL
894 This function retrieves the string specified by StringId which is associated
895 with the specified PackageList in the language Language and copies it into
896 the buffer specified by String.
898 @param This A pointer to the EFI_HII_STRING_PROTOCOL
900 @param Language Points to the language for the retrieved string.
901 @param PackageList The package list in the HII database to search
902 for the specified string.
903 @param StringId The string's id, which is unique within
905 @param String Points to the new null-terminated string.
906 @param StringSize On entry, points to the size of the buffer
907 pointed to by String, in bytes. On return,
908 points to the length of the string, in bytes.
909 @param StringFontInfo If not NULL, points to the string's font
910 information. It's caller's responsibility to
913 @retval EFI_SUCCESS The string was returned successfully.
914 @retval EFI_NOT_FOUND The string specified by StringId is not
916 @retval EFI_NOT_FOUND The string specified by StringId is available but
917 not in the specified language.
918 @retval EFI_BUFFER_TOO_SMALL The buffer specified by StringSize is too small
920 @retval EFI_INVALID_PARAMETER The String or Language or StringSize was NULL.
921 @retval EFI_OUT_OF_RESOURCES There were insufficient resources to complete the
928 IN CONST EFI_HII_STRING_PROTOCOL
*This
,
929 IN CONST CHAR8
*Language
,
930 IN EFI_HII_HANDLE PackageList
,
931 IN EFI_STRING_ID StringId
,
932 OUT EFI_STRING String
,
933 IN OUT UINTN
*StringSize
,
934 OUT EFI_FONT_INFO
**StringFontInfo OPTIONAL
940 This function updates the string specified by StringId in the specified PackageList to the text
941 specified by String and, optionally, the font information specified by StringFontInfo.
943 @param This A pointer to the EFI_HII_STRING_PROTOCOL
945 @param PackageList The package list containing the strings.
946 @param StringId The string's id, which is unique within
948 @param Language Points to the language for the updated string.
949 @param String Points to the new null-terminated string.
950 @param StringFontInfo Points to the string's font information or NULL
951 if the string font information is not changed.
953 @retval EFI_SUCCESS The string was updated successfully.
954 @retval EFI_NOT_FOUND The string specified by StringId is not in the
956 @retval EFI_INVALID_PARAMETER The String or Language was NULL.
957 @retval EFI_OUT_OF_RESOURCES The system is out of resources to accomplish the
964 IN CONST EFI_HII_STRING_PROTOCOL
*This
,
965 IN EFI_HII_HANDLE PackageList
,
966 IN EFI_STRING_ID StringId
,
967 IN CONST CHAR8
*Language
,
968 IN CONST EFI_STRING String
,
969 IN CONST EFI_FONT_INFO
*StringFontInfo OPTIONAL
975 This function returns the list of supported languages, in the format specified
976 in Appendix M of UEFI 2.1 spec.
978 @param This A pointer to the EFI_HII_STRING_PROTOCOL
980 @param PackageList The package list to examine.
981 @param Languages Points to the buffer to hold the returned string.
982 @param LanguagesSize On entry, points to the size of the buffer
983 pointed to by Languages, in bytes. On return,
984 points to the length of Languages, in bytes.
986 @retval EFI_SUCCESS The languages were returned successfully.
987 @retval EFI_INVALID_PARAMETER The Languages or LanguagesSize was NULL.
988 @retval EFI_BUFFER_TOO_SMALL The LanguagesSize is too small to hold the list
989 of supported languages. LanguageSize is updated
990 to contain the required size.
991 @retval EFI_NOT_FOUND Could not find string package in specified
998 IN CONST EFI_HII_STRING_PROTOCOL
*This
,
999 IN EFI_HII_HANDLE PackageList
,
1000 IN OUT CHAR8
*Languages
,
1001 IN OUT UINTN
*LanguagesSize
1007 Each string package has associated with it a single primary language and zero
1008 or more secondary languages. This routine returns the secondary languages
1009 associated with a package list.
1011 @param This A pointer to the EFI_HII_STRING_PROTOCOL
1013 @param PackageList The package list to examine.
1014 @param FirstLanguage Points to the primary language.
1015 @param SecondaryLanguages Points to the buffer to hold the returned list of
1016 secondary languages for the specified
1017 FirstLanguage. If there are no secondary
1018 languages, the function returns successfully,
1019 but this is set to NULL.
1020 @param SecondaryLanguageSize On entry, points to the size of the buffer
1021 pointed to by SecondLanguages, in bytes. On
1022 return, points to the length of SecondLanguages
1025 @retval EFI_SUCCESS Secondary languages were correctly returned.
1026 @retval EFI_INVALID_PARAMETER FirstLanguage or SecondLanguages or
1027 SecondLanguagesSize was NULL.
1028 @retval EFI_BUFFER_TOO_SMALL The buffer specified by SecondLanguagesSize is
1029 too small to hold the returned information.
1030 SecondLanguageSize is updated to hold the size of
1031 the buffer required.
1032 @retval EFI_NOT_FOUND The language specified by FirstLanguage is not
1033 present in the specified package list.
1038 HiiGetSecondaryLanguages (
1039 IN CONST EFI_HII_STRING_PROTOCOL
*This
,
1040 IN EFI_HII_HANDLE PackageList
,
1041 IN CONST CHAR8
*FirstLanguage
,
1042 IN OUT CHAR8
*SecondLanguages
,
1043 IN OUT UINTN
*SecondLanguagesSize
1048 // EFI_HII_DATABASE_PROTOCOL protocol interfaces
1053 This function adds the packages in the package list to the database and returns a handle. If there is a
1054 EFI_DEVICE_PATH_PROTOCOL associated with the DriverHandle, then this function will
1055 create a package of type EFI_PACKAGE_TYPE_DEVICE_PATH and add it to the package list.
1057 @param This A pointer to the EFI_HII_DATABASE_PROTOCOL
1059 @param PackageList A pointer to an EFI_HII_PACKAGE_LIST_HEADER
1061 @param DriverHandle Associate the package list with this EFI handle.
1062 @param Handle A pointer to the EFI_HII_HANDLE instance.
1064 @retval EFI_SUCCESS The package list associated with the Handle was
1065 added to the HII database.
1066 @retval EFI_OUT_OF_RESOURCES Unable to allocate necessary resources for the
1067 new database contents.
1068 @retval EFI_INVALID_PARAMETER PackageList is NULL or Handle is NULL.
1074 IN CONST EFI_HII_DATABASE_PROTOCOL
*This
,
1075 IN CONST EFI_HII_PACKAGE_LIST_HEADER
*PackageList
,
1076 IN CONST EFI_HANDLE DriverHandle
,
1077 OUT EFI_HII_HANDLE
*Handle
1083 This function removes the package list that is associated with a handle Handle
1084 from the HII database. Before removing the package, any registered functions
1085 with the notification type REMOVE_PACK and the same package type will be called.
1087 @param This A pointer to the EFI_HII_DATABASE_PROTOCOL
1089 @param Handle The handle that was registered to the data that
1090 is requested for removal.
1092 @retval EFI_SUCCESS The data associated with the Handle was removed
1093 from the HII database.
1094 @retval EFI_NOT_FOUND The specified PackageList could not be found in
1096 @retval EFI_INVALID_PARAMETER The Handle was not valid.
1101 HiiRemovePackageList (
1102 IN CONST EFI_HII_DATABASE_PROTOCOL
*This
,
1103 IN EFI_HII_HANDLE Handle
1109 This function updates the existing package list (which has the specified Handle)
1110 in the HII databases, using the new package list specified by PackageList.
1112 @param This A pointer to the EFI_HII_DATABASE_PROTOCOL
1114 @param Handle The handle that was registered to the data that
1115 is requested to be updated.
1116 @param PackageList A pointer to an EFI_HII_PACKAGE_LIST_HEADER
1119 @retval EFI_SUCCESS The HII database was successfully updated.
1120 @retval EFI_OUT_OF_RESOURCES Unable to allocate enough memory for the updated
1122 @retval EFI_INVALID_PARAMETER Handle or PackageList was NULL.
1123 @retval EFI_NOT_FOUND The Handle was not valid or could not be found in
1129 HiiUpdatePackageList (
1130 IN CONST EFI_HII_DATABASE_PROTOCOL
*This
,
1131 IN EFI_HII_HANDLE Handle
,
1132 IN CONST EFI_HII_PACKAGE_LIST_HEADER
*PackageList
1138 This function returns a list of the package handles of the specified type
1139 that are currently active in the database. The pseudo-type
1140 EFI_HII_PACKAGE_TYPE_ALL will cause all package handles to be listed.
1142 @param This A pointer to the EFI_HII_DATABASE_PROTOCOL
1144 @param PackageType Specifies the package type of the packages to
1145 list or EFI_HII_PACKAGE_TYPE_ALL for all packages
1147 @param PackageGuid If PackageType is EFI_HII_PACKAGE_TYPE_GUID, then
1148 this is the pointer to the GUID which must match
1149 the Guid field of EFI_HII_GUID_PACKAGE_GUID_HDR.
1150 Otherwise, it must be NULL.
1151 @param HandleBufferLength On input, a pointer to the length of the handle
1152 buffer. On output, the length of the handle
1153 buffer that is required for the handles found.
1154 @param Handle An array of EFI_HII_HANDLE instances returned.
1156 @retval EFI_SUCCESS The matching handles are outputed successfully.
1157 @retval EFI_BUFFER_TO_SMALL The HandleBufferLength parameter indicates that
1158 Handle is too small to support the number of
1159 handles. HandleBufferLength is updated with a
1160 value that will enable the data to fit.
1161 @retval EFI_NOT_FOUND No matching handle could not be found in
1163 @retval EFI_INVALID_PARAMETER Handle or HandleBufferLength was NULL.
1168 HiiListPackageLists (
1169 IN CONST EFI_HII_DATABASE_PROTOCOL
*This
,
1170 IN UINT8 PackageType
,
1171 IN CONST EFI_GUID
*PackageGuid
,
1172 IN OUT UINTN
*HandleBufferLength
,
1173 OUT EFI_HII_HANDLE
*Handle
1179 This function will export one or all package lists in the database to a buffer.
1180 For each package list exported, this function will call functions registered
1181 with EXPORT_PACK and then copy the package list to the buffer.
1183 @param This A pointer to the EFI_HII_DATABASE_PROTOCOL
1185 @param Handle An EFI_HII_HANDLE that corresponds to the desired
1186 package list in the HII database to export or
1187 NULL to indicate all package lists should be
1189 @param BufferSize On input, a pointer to the length of the buffer.
1190 On output, the length of the buffer that is
1191 required for the exported data.
1192 @param Buffer A pointer to a buffer that will contain the
1193 results of the export function.
1195 @retval EFI_SUCCESS Package exported.
1196 @retval EFI_BUFFER_TO_SMALL The HandleBufferLength parameter indicates that
1197 Handle is too small to support the number of
1198 handles. HandleBufferLength is updated with
1199 a value that will enable the data to fit.
1200 @retval EFI_NOT_FOUND The specifiecd Handle could not be found in the
1202 @retval EFI_INVALID_PARAMETER Handle or Buffer or BufferSize was NULL.
1207 HiiExportPackageLists (
1208 IN CONST EFI_HII_DATABASE_PROTOCOL
*This
,
1209 IN EFI_HII_HANDLE Handle
,
1210 IN OUT UINTN
*BufferSize
,
1211 OUT EFI_HII_PACKAGE_LIST_HEADER
*Buffer
1217 This function registers a function which will be called when specified actions related to packages of
1218 the specified type occur in the HII database. By registering a function, other HII-related drivers are
1219 notified when specific package types are added, removed or updated in the HII database.
1220 Each driver or application which registers a notification should use
1221 EFI_HII_DATABASE_PROTOCOL.UnregisterPackageNotify() before exiting.
1223 @param This A pointer to the EFI_HII_DATABASE_PROTOCOL
1225 @param PackageType Specifies the package type of the packages to
1226 list or EFI_HII_PACKAGE_TYPE_ALL for all packages
1228 @param PackageGuid If PackageType is EFI_HII_PACKAGE_TYPE_GUID, then
1229 this is the pointer to the GUID which must match
1231 EFI_HII_GUID_PACKAGE_GUID_HDR. Otherwise, it must
1233 @param PackageNotifyFn Points to the function to be called when the
1235 NotificationType occurs.
1236 @param NotifyType Describes the types of notification which this
1237 function will be receiving.
1238 @param NotifyHandle Points to the unique handle assigned to the
1239 registered notification. Can be used in
1240 EFI_HII_DATABASE_PROTOCOL.UnregisterPackageNotify()
1241 to stop notifications.
1243 @retval EFI_SUCCESS Notification registered successfully.
1244 @retval EFI_OUT_OF_RESOURCES Unable to allocate necessary data structures
1245 @retval EFI_INVALID_PARAMETER NotifyHandle is NULL.
1246 @retval EFI_INVALID_PARAMETER PackageGuid is not NULL when PackageType is not
1247 EFI_HII_PACKAGE_TYPE_GUID.
1248 @retval EFI_INVALID_PARAMETER PackageGuid is NULL when PackageType is
1249 EFI_HII_PACKAGE_TYPE_GUID.
1254 HiiRegisterPackageNotify (
1255 IN CONST EFI_HII_DATABASE_PROTOCOL
*This
,
1256 IN UINT8 PackageType
,
1257 IN CONST EFI_GUID
*PackageGuid
,
1258 IN CONST EFI_HII_DATABASE_NOTIFY PackageNotifyFn
,
1259 IN EFI_HII_DATABASE_NOTIFY_TYPE NotifyType
,
1260 OUT EFI_HANDLE
*NotifyHandle
1266 Removes the specified HII database package-related notification.
1268 @param This A pointer to the EFI_HII_DATABASE_PROTOCOL
1270 @param NotifyHandle The handle of the notification function being
1273 @retval EFI_SUCCESS Notification is unregistered successfully.
1274 @retval EFI_INVALID_PARAMETER The Handle is invalid.
1279 HiiUnregisterPackageNotify (
1280 IN CONST EFI_HII_DATABASE_PROTOCOL
*This
,
1281 IN EFI_HANDLE NotificationHandle
1287 This routine retrieves an array of GUID values for each keyboard layout that
1288 was previously registered in the system.
1290 @param This A pointer to the EFI_HII_DATABASE_PROTOCOL
1292 @param KeyGuidBufferLength On input, a pointer to the length of the keyboard
1293 GUID buffer. On output, the length of the handle
1294 buffer that is required for the handles found.
1295 @param KeyGuidBuffer An array of keyboard layout GUID instances
1298 @retval EFI_SUCCESS KeyGuidBuffer was updated successfully.
1299 @retval EFI_BUFFER_TOO_SMALL The KeyGuidBufferLength parameter indicates
1300 that KeyGuidBuffer is too small to support the
1301 number of GUIDs. KeyGuidBufferLength is
1302 updated with a value that will enable the data to
1304 @retval EFI_INVALID_PARAMETER The KeyGuidBuffer or KeyGuidBufferLength was
1306 @retval EFI_NOT_FOUND There was no keyboard layout.
1311 HiiFindKeyboardLayouts (
1312 IN CONST EFI_HII_DATABASE_PROTOCOL
*This
,
1313 IN OUT UINT16
*KeyGuidBufferLength
,
1314 OUT EFI_GUID
*KeyGuidBuffer
1320 This routine retrieves the requested keyboard layout. The layout is a physical description of the keys
1321 on a keyboard and the character(s) that are associated with a particular set of key strokes.
1323 @param This A pointer to the EFI_HII_DATABASE_PROTOCOL
1325 @param KeyGuid A pointer to the unique ID associated with a
1326 given keyboard layout. If KeyGuid is NULL then
1327 the current layout will be retrieved.
1328 @param KeyboardLayoutLength On input, a pointer to the length of the
1329 KeyboardLayout buffer. On output, the length of
1330 the data placed into KeyboardLayout.
1331 @param KeyboardLayout A pointer to a buffer containing the retrieved
1334 @retval EFI_SUCCESS The keyboard layout was retrieved successfully.
1335 @retval EFI_NOT_FOUND The requested keyboard layout was not found.
1336 @retval EFI_INVALID_PARAMETER The KeyboardLayout or KeyboardLayoutLength was
1342 HiiGetKeyboardLayout (
1343 IN CONST EFI_HII_DATABASE_PROTOCOL
*This
,
1344 IN CONST EFI_GUID
*KeyGuid
,
1345 IN OUT UINT16
*KeyboardLayoutLength
,
1346 OUT EFI_HII_KEYBOARD_LAYOUT
*KeyboardLayout
1352 This routine sets the default keyboard layout to the one referenced by KeyGuid. When this routine
1353 is called, an event will be signaled of the EFI_HII_SET_KEYBOARD_LAYOUT_EVENT_GUID
1354 group type. This is so that agents which are sensitive to the current keyboard layout being changed
1355 can be notified of this change.
1357 @param This A pointer to the EFI_HII_DATABASE_PROTOCOL
1359 @param KeyGuid A pointer to the unique ID associated with a
1360 given keyboard layout.
1362 @retval EFI_SUCCESS The current keyboard layout was successfully set.
1363 @retval EFI_NOT_FOUND The referenced keyboard layout was not found, so
1365 @retval EFI_INVALID_PARAMETER The KeyGuid was NULL.
1370 HiiSetKeyboardLayout (
1371 IN CONST EFI_HII_DATABASE_PROTOCOL
*This
,
1372 IN CONST EFI_GUID
*KeyGuid
1378 Return the EFI handle associated with a package list.
1380 @param This A pointer to the EFI_HII_DATABASE_PROTOCOL
1382 @param PackageListHandle An EFI_HII_HANDLE that corresponds to the desired
1383 package list in the HIIdatabase.
1384 @param DriverHandle On return, contains the EFI_HANDLE which was
1385 registered with the package list in
1388 @retval EFI_SUCCESS The DriverHandle was returned successfully.
1389 @retval EFI_INVALID_PARAMETER The PackageListHandle was not valid or
1390 DriverHandle was NULL.
1395 HiiGetPackageListHandle (
1396 IN CONST EFI_HII_DATABASE_PROTOCOL
*This
,
1397 IN EFI_HII_HANDLE PackageListHandle
,
1398 OUT EFI_HANDLE
*DriverHandle
1403 // EFI_HII_CONFIG_ROUTING_PROTOCOL interfaces
1408 This function allows a caller to extract the current configuration
1409 for one or more named elements from one or more drivers.
1411 @param This A pointer to the EFI_HII_CONFIG_ROUTING_PROTOCOL
1413 @param Request A null-terminated Unicode string in
1414 <MultiConfigRequest> format.
1415 @param Progress On return, points to a character in the Request
1416 string. Points to the string's null terminator if
1417 request was successful. Points to the most recent
1418 & before the first failing name / value pair (or
1419 the beginning of the string if the failure is in
1420 the first name / value pair) if the request was
1422 @param Results Null-terminated Unicode string in
1423 <MultiConfigAltResp> format which has all values
1424 filled in for the names in the Request string.
1425 String to be allocated by the called function.
1427 @retval EFI_SUCCESS The Results string is filled with the values
1428 corresponding to all requested names.
1429 @retval EFI_OUT_OF_RESOURCES Not enough memory to store the parts of the
1430 results that must be stored awaiting possible
1432 @retval EFI_NOT_FOUND Routing data doesn't match any known driver.
1433 Progress set to the "G" in "GUID" of the
1434 routing header that doesn't match. Note: There
1435 is no requirement that all routing data
1436 be validated before any configuration extraction.
1437 @retval EFI_INVALID_PARAMETER For example, passing in a NULL for the Request
1438 parameter would result in this type of error. The
1439 Progress parameter is set to NULL.
1440 @retval EFI_INVALID_PARAMETER Illegal syntax. Progress set to most recent &
1441 before the error or the beginning of the string.
1442 @retval EFI_INVALID_PARAMETER Unknown name. Progress points to the & before the
1448 HiiConfigRoutingExtractConfig (
1449 IN CONST EFI_HII_CONFIG_ROUTING_PROTOCOL
*This
,
1450 IN CONST EFI_STRING Request
,
1451 OUT EFI_STRING
*Progress
,
1452 OUT EFI_STRING
*Results
1458 This function allows the caller to request the current configuration for the
1459 entirety of the current HII database and returns the data in a null-terminated Unicode string.
1461 @param This A pointer to the EFI_HII_CONFIG_ROUTING_PROTOCOL
1463 @param Results Null-terminated Unicode string in
1464 <MultiConfigAltResp> format which has all values
1465 filled in for the names in the Request string.
1466 String to be allocated by the called function.
1467 De-allocation is up to the caller.
1469 @retval EFI_SUCCESS The Results string is filled with the values
1470 corresponding to all requested names.
1471 @retval EFI_OUT_OF_RESOURCES Not enough memory to store the parts of the
1472 results that must be stored awaiting possible
1474 @retval EFI_INVALID_PARAMETER For example, passing in a NULL for the Results
1475 parameter would result in this type of error.
1480 HiiConfigRoutingExportConfig (
1481 IN CONST EFI_HII_CONFIG_ROUTING_PROTOCOL
*This
,
1482 OUT EFI_STRING
*Results
1488 This function processes the results of processing forms and routes it to the
1489 appropriate handlers or storage.
1491 @param This A pointer to the EFI_HII_CONFIG_ROUTING_PROTOCOL
1493 @param Configuration A null-terminated Unicode string in
1494 <MulltiConfigResp> format.
1495 @param Progress A pointer to a string filled in with the offset
1496 of the most recent & before the first failing
1497 name / value pair (or the beginning of the string
1498 if the failure is in the first name / value pair)
1499 or the terminating NULL if all was successful.
1501 @retval EFI_SUCCESS The results have been distributed or are awaiting
1503 @retval EFI_OUT_OF_RESOURCES Not enough memory to store the parts of the
1504 results that must be stored awaiting possible
1506 @retval EFI_INVALID_PARAMETER Passing in a NULL for the Configuration parameter
1507 would result in this type of error.
1508 @retval EFI_NOT_FOUND Target for the specified routing data was not
1514 HiiConfigRoutingRoutConfig (
1515 IN CONST EFI_HII_CONFIG_ROUTING_PROTOCOL
*This
,
1516 IN CONST EFI_STRING Configuration
,
1517 OUT EFI_STRING
*Progress
1524 This helper function is to be called by drivers to map configuration data stored
1525 in byte array ("block") formats such as UEFI Variables into current configuration strings.
1527 @param This A pointer to the EFI_HII_CONFIG_ROUTING_PROTOCOL
1529 @param ConfigRequest A null-terminated Unicode string in
1530 <ConfigRequest> format.
1531 @param Block Array of bytes defining the block's
1533 @param BlockSize Length in bytes of Block.
1534 @param Config Filled-in configuration string. String allocated
1535 by the function. Returned only if call is
1537 @param Progress A pointer to a string filled in with the offset
1538 of the most recent & before the first failing
1539 name/value pair (or the beginning of the string
1540 if the failure is in the first name / value pair)
1541 or the terminating NULL if all was successful.
1543 @retval EFI_SUCCESS The request succeeded. Progress points to the
1544 null terminator at the end of the ConfigRequest
1546 @retval EFI_OUT_OF_RESOURCES Not enough memory to allocate Config.
1547 Progress points to the first character of
1549 @retval EFI_INVALID_PARAMETER Passing in a NULL for the ConfigRequest or
1550 Block parameter would result in this type of
1551 error. Progress points to the first character of
1553 @retval EFI_NOT_FOUND Target for the specified routing data was not
1554 found. Progress points to the "G" in "GUID" of
1555 the errant routing data.
1556 @retval EFI_DEVICE_ERROR Block not large enough. Progress undefined.
1557 @retval EFI_INVALID_PARAMETER Encountered non <BlockName> formatted string.
1558 Block is left updated and Progress points at
1559 the '&' preceding the first non-<BlockName>.
1565 IN CONST EFI_HII_CONFIG_ROUTING_PROTOCOL
*This
,
1566 IN CONST EFI_STRING ConfigRequest
,
1567 IN CONST UINT8
*Block
,
1568 IN CONST UINTN BlockSize
,
1569 OUT EFI_STRING
*Config
,
1570 OUT EFI_STRING
*Progress
1576 This helper function is to be called by drivers to map configuration strings
1577 to configurations stored in byte array ("block") formats such as UEFI Variables.
1579 @param This A pointer to the EFI_HII_CONFIG_ROUTING_PROTOCOL
1581 @param ConfigResp A null-terminated Unicode string in <ConfigResp>
1583 @param Block A possibly null array of bytes representing the
1584 current block. Only bytes referenced in the
1585 ConfigResp string in the block are modified. If
1586 this parameter is null or if the *BlockSize
1587 parameter is (on input) shorter than required by
1588 the Configuration string, only the BlockSize
1589 parameter is updated and an appropriate status
1590 (see below) is returned.
1591 @param BlockSize The length of the Block in units of UINT8. On
1592 input, this is the size of the Block. On output,
1593 if successful, contains the index of the last
1594 modified byte in the Block.
1595 @param Progress On return, points to an element of the ConfigResp
1596 string filled in with the offset of the most
1597 recent '&' before the first failing name / value
1598 pair (or the beginning of the string if the
1599 failure is in the first name / value pair) or
1600 the terminating NULL if all was successful.
1602 @retval EFI_SUCCESS The request succeeded. Progress points to the
1603 null terminator at the end of the ConfigResp
1605 @retval EFI_OUT_OF_RESOURCES Not enough memory to allocate Config.
1606 Progress points to the first character of
1608 @retval EFI_INVALID_PARAMETER Passing in a NULL for the ConfigResp or
1609 Block parameter would result in this type of
1610 error. Progress points to the first character of
1612 @retval EFI_NOT_FOUND Target for the specified routing data was not
1613 found. Progress points to the "G" in "GUID" of
1614 the errant routing data.
1615 @retval EFI_INVALID_PARAMETER Encountered non <BlockName> formatted name /
1616 value pair. Block is left updated and
1617 Progress points at the '&' preceding the first
1624 IN CONST EFI_HII_CONFIG_ROUTING_PROTOCOL
*This
,
1625 IN CONST EFI_STRING ConfigResp
,
1626 IN OUT UINT8
*Block
,
1627 IN OUT UINTN
*BlockSize
,
1628 OUT EFI_STRING
*Progress
1634 This helper function is to be called by drivers to extract portions of
1635 a larger configuration string.
1637 @param This A pointer to the EFI_HII_CONFIG_ROUTING_PROTOCOL
1639 @param Configuration A null-terminated Unicode string in
1640 <MultiConfigAltResp> format.
1641 @param Guid A pointer to the GUID value to search for in the
1642 routing portion of the ConfigResp string when
1643 retrieving the requested data. If Guid is NULL,
1644 then all GUID values will be searched for.
1645 @param Name A pointer to the NAME value to search for in the
1646 routing portion of the ConfigResp string when
1647 retrieving the requested data. If Name is NULL,
1648 then all Name values will be searched for.
1649 @param DevicePath A pointer to the PATH value to search for in the
1650 routing portion of the ConfigResp string when
1651 retrieving the requested data. If DevicePath is
1652 NULL, then all DevicePath values will be
1654 @param AltCfgId A pointer to the ALTCFG value to search for in
1655 the routing portion of the ConfigResp string
1656 when retrieving the requested data. If this
1657 parameter is NULL, then the current setting will
1659 @param AltCfgResp A pointer to a buffer which will be allocated by
1660 the function which contains the retrieved string
1661 as requested. This buffer is only allocated if
1662 the call was successful.
1664 @retval EFI_SUCCESS The request succeeded. The requested data was
1665 extracted and placed in the newly allocated
1667 @retval EFI_OUT_OF_RESOURCES Not enough memory to allocate AltCfgResp.
1668 @retval EFI_INVALID_PARAMETER Any parameter is invalid.
1669 @retval EFI_NOT_FOUND Target for the specified routing data was not
1676 IN CONST EFI_HII_CONFIG_ROUTING_PROTOCOL
*This
,
1677 IN CONST EFI_STRING Configuration
,
1678 IN CONST EFI_GUID
*Guid
,
1679 IN CONST EFI_STRING Name
,
1680 IN CONST EFI_DEVICE_PATH_PROTOCOL
*DevicePath
,
1681 IN CONST UINT16
*AltCfgId
,
1682 OUT EFI_STRING
*AltCfgResp
1690 extern EFI_EVENT gHiiKeyboardLayoutChanged
;