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>
45 #define MAX_STRING_LENGTH 1024
46 #define MAX_FONT_NAME_LEN 256
47 #define NARROW_BASELINE 15
48 #define WIDE_BASELINE 14
49 #define SYS_FONT_INFO_MASK 0x37
50 #define REPLACE_UNKNOWN_GLYPH 0xFFFD
51 #define PROPORTIONAL_GLYPH 0x80
52 #define NARROW_GLYPH 0x40
54 #define BITMAP_LEN_1_BIT(Width, Height) (((Width) + 7) / 8 * (Height))
55 #define BITMAP_LEN_4_BIT(Width, Height) (((Width) + 1) / 2 * (Height))
56 #define BITMAP_LEN_8_BIT(Width, Height) ((Width) * (Height))
57 #define BITMAP_LEN_24_BIT(Width, Height) ((Width) * (Height) * 3)
62 // BASE_CR (a, IFR_DEFAULT_VALUE_DATA, Entry) to get the whole structure.
65 LIST_ENTRY Entry
; // Link to VarStorage
68 EFI_VARSTORE_ID VarStoreId
;
71 LIST_ENTRY BlockEntry
; // Link to its Block array
72 } IFR_VARSTORAGE_DATA
;
75 LIST_ENTRY Entry
; // Link to Block array
78 EFI_QUESTION_ID QuestionId
;
81 LIST_ENTRY DefaultValueEntry
; // Link to its default value array
86 // Get default value from IFR data.
89 DefaultValueFromDefault
= 0, // Get from the minimum or first one when not set default value.
90 DefaultValueFromFlag
, // Get default value from the defalut flag.
91 DefaultValueFromOpcode
// Get default value from default opcode, highest priority.
96 DEFAULT_VALUE_TYPE Type
;
97 BOOLEAN Cleaned
; // Whether this value is cleaned
98 // TRUE Cleaned, the value can't be used
99 // FALSE Not cleaned, the value can be used.
101 EFI_IFR_TYPE_VALUE Value
;
107 #define EFI_HII_VARSTORE_BUFFER 0
108 #define EFI_HII_VARSTORE_NAME_VALUE 1
109 #define EFI_HII_VARSTORE_EFI_VARIABLE 2
110 #define EFI_HII_VARSTORE_EFI_VARIABLE_BUFFER 3
112 #define HII_FORMSET_STORAGE_SIGNATURE SIGNATURE_32 ('H', 'S', 'T', 'G')
117 EFI_HII_HANDLE HiiHandle
;
118 EFI_HANDLE DriverHandle
;
120 UINT8 Type
; // EFI_HII_VARSTORE_BUFFER, EFI_HII_VARSTORE_NAME_VALUE, EFI_HII_VARSTORE_EFI_VARIABLE
124 } HII_FORMSET_STORAGE
;
128 // String Package definitions
130 #define HII_STRING_PACKAGE_SIGNATURE SIGNATURE_32 ('h','i','s','p')
131 typedef struct _HII_STRING_PACKAGE_INSTANCE
{
133 EFI_HII_STRING_PACKAGE_HDR
*StringPkgHdr
;
135 LIST_ENTRY StringEntry
;
136 LIST_ENTRY FontInfoList
; // local font info list
138 EFI_STRING_ID MaxStringId
; // record StringId
139 } HII_STRING_PACKAGE_INSTANCE
;
142 // Form Package definitions
144 #define HII_IFR_PACKAGE_SIGNATURE SIGNATURE_32 ('h','f','r','p')
145 typedef struct _HII_IFR_PACKAGE_INSTANCE
{
147 EFI_HII_PACKAGE_HEADER FormPkgHdr
;
150 } HII_IFR_PACKAGE_INSTANCE
;
153 // Simple Font Package definitions
155 #define HII_S_FONT_PACKAGE_SIGNATURE SIGNATURE_32 ('h','s','f','p')
156 typedef struct _HII_SIMPLE_FONT_PACKAGE_INSTANCE
{
158 EFI_HII_SIMPLE_FONT_PACKAGE_HDR
*SimpleFontPkgHdr
;
159 LIST_ENTRY SimpleFontEntry
;
160 } HII_SIMPLE_FONT_PACKAGE_INSTANCE
;
163 // Font Package definitions
165 #define HII_FONT_PACKAGE_SIGNATURE SIGNATURE_32 ('h','i','f','p')
166 typedef struct _HII_FONT_PACKAGE_INSTANCE
{
168 EFI_HII_FONT_PACKAGE_HDR
*FontPkgHdr
;
172 LIST_ENTRY FontEntry
;
173 LIST_ENTRY GlyphInfoList
;
174 } HII_FONT_PACKAGE_INSTANCE
;
176 #define HII_GLYPH_INFO_SIGNATURE SIGNATURE_32 ('h','g','i','s')
177 typedef struct _HII_GLYPH_INFO
{
181 EFI_HII_GLYPH_INFO Cell
;
184 #define HII_FONT_INFO_SIGNATURE SIGNATURE_32 ('h','l','f','i')
185 typedef struct _HII_FONT_INFO
{
188 LIST_ENTRY
*GlobalEntry
;
192 #define HII_GLOBAL_FONT_INFO_SIGNATURE SIGNATURE_32 ('h','g','f','i')
193 typedef struct _HII_GLOBAL_FONT_INFO
{
196 HII_FONT_PACKAGE_INSTANCE
*FontPackage
;
198 EFI_FONT_INFO
*FontInfo
;
199 } HII_GLOBAL_FONT_INFO
;
202 // Image Package definitions
205 #define HII_PIXEL_MASK 0x80
207 typedef struct _HII_IMAGE_PACKAGE_INSTANCE
{
208 EFI_HII_IMAGE_PACKAGE_HDR ImagePkgHdr
;
209 UINT32 ImageBlockSize
;
210 UINT32 PaletteInfoSize
;
213 } HII_IMAGE_PACKAGE_INSTANCE
;
216 // Keyboard Layout Pacakge definitions
218 #define HII_KB_LAYOUT_PACKAGE_SIGNATURE SIGNATURE_32 ('h','k','l','p')
219 typedef struct _HII_KEYBOARD_LAYOUT_PACKAGE_INSTANCE
{
222 LIST_ENTRY KeyboardEntry
;
223 } HII_KEYBOARD_LAYOUT_PACKAGE_INSTANCE
;
226 // Guid Package definitions
228 #define HII_GUID_PACKAGE_SIGNATURE SIGNATURE_32 ('h','i','g','p')
229 typedef struct _HII_GUID_PACKAGE_INSTANCE
{
232 LIST_ENTRY GuidEntry
;
233 } HII_GUID_PACKAGE_INSTANCE
;
236 // A package list can contain only one or less than one device path package.
237 // This rule also applies to image package since ImageId can not be duplicate.
239 typedef struct _HII_DATABASE_PACKAGE_LIST_INSTANCE
{
240 EFI_HII_PACKAGE_LIST_HEADER PackageListHdr
;
241 LIST_ENTRY GuidPkgHdr
;
242 LIST_ENTRY FormPkgHdr
;
243 LIST_ENTRY KeyboardLayoutHdr
;
244 LIST_ENTRY StringPkgHdr
;
245 LIST_ENTRY FontPkgHdr
;
246 HII_IMAGE_PACKAGE_INSTANCE
*ImagePkg
;
247 LIST_ENTRY SimpleFontPkgHdr
;
248 UINT8
*DevicePathPkg
;
249 } HII_DATABASE_PACKAGE_LIST_INSTANCE
;
251 #define HII_HANDLE_SIGNATURE SIGNATURE_32 ('h','i','h','l')
259 #define HII_DATABASE_RECORD_SIGNATURE SIGNATURE_32 ('h','i','d','r')
261 typedef struct _HII_DATABASE_RECORD
{
263 HII_DATABASE_PACKAGE_LIST_INSTANCE
*PackageList
;
264 EFI_HANDLE DriverHandle
;
265 EFI_HII_HANDLE Handle
;
266 LIST_ENTRY DatabaseEntry
;
267 } HII_DATABASE_RECORD
;
269 #define HII_DATABASE_NOTIFY_SIGNATURE SIGNATURE_32 ('h','i','d','n')
271 typedef struct _HII_DATABASE_NOTIFY
{
273 EFI_HANDLE NotifyHandle
;
275 EFI_GUID
*PackageGuid
;
276 EFI_HII_DATABASE_NOTIFY PackageNotifyFn
;
277 EFI_HII_DATABASE_NOTIFY_TYPE NotifyType
;
278 LIST_ENTRY DatabaseNotifyEntry
;
279 } HII_DATABASE_NOTIFY
;
281 #define HII_DATABASE_PRIVATE_DATA_SIGNATURE SIGNATURE_32 ('H', 'i', 'D', 'p')
283 typedef struct _HII_DATABASE_PRIVATE_DATA
{
285 LIST_ENTRY DatabaseList
;
286 LIST_ENTRY DatabaseNotifyList
;
287 EFI_HII_FONT_PROTOCOL HiiFont
;
288 EFI_HII_IMAGE_PROTOCOL HiiImage
;
289 EFI_HII_STRING_PROTOCOL HiiString
;
290 EFI_HII_DATABASE_PROTOCOL HiiDatabase
;
291 EFI_HII_CONFIG_ROUTING_PROTOCOL ConfigRouting
;
292 LIST_ENTRY HiiHandleList
;
294 LIST_ENTRY FontInfoList
; // global font info list
295 UINTN Attribute
; // default system color
296 EFI_GUID CurrentLayoutGuid
;
297 EFI_HII_KEYBOARD_LAYOUT
*CurrentLayout
;
298 } HII_DATABASE_PRIVATE_DATA
;
300 #define HII_FONT_DATABASE_PRIVATE_DATA_FROM_THIS(a) \
302 HII_DATABASE_PRIVATE_DATA, \
304 HII_DATABASE_PRIVATE_DATA_SIGNATURE \
307 #define HII_IMAGE_DATABASE_PRIVATE_DATA_FROM_THIS(a) \
309 HII_DATABASE_PRIVATE_DATA, \
311 HII_DATABASE_PRIVATE_DATA_SIGNATURE \
314 #define HII_STRING_DATABASE_PRIVATE_DATA_FROM_THIS(a) \
316 HII_DATABASE_PRIVATE_DATA, \
318 HII_DATABASE_PRIVATE_DATA_SIGNATURE \
321 #define HII_DATABASE_DATABASE_PRIVATE_DATA_FROM_THIS(a) \
323 HII_DATABASE_PRIVATE_DATA, \
325 HII_DATABASE_PRIVATE_DATA_SIGNATURE \
328 #define CONFIG_ROUTING_DATABASE_PRIVATE_DATA_FROM_THIS(a) \
330 HII_DATABASE_PRIVATE_DATA, \
332 HII_DATABASE_PRIVATE_DATA_SIGNATURE \
336 // Internal function prototypes.
340 This function checks whether a handle is a valid EFI_HII_HANDLE.
342 @param Handle Pointer to a EFI_HII_HANDLE
345 @retval FALSE Invalid
350 EFI_HII_HANDLE Handle
355 This function checks whether EFI_FONT_INFO exists in current database. If
356 FontInfoMask is specified, check what options can be used to make a match.
357 Note that the masks relate to where the system default should be supplied
358 are ignored by this function.
360 @param Private Hii database private structure.
361 @param FontInfo Points to EFI_FONT_INFO structure.
362 @param FontInfoMask If not NULL, describes what options can be used
363 to make a match between the font requested and
364 the font available. The caller must guarantee
366 @param FontHandle On entry, Points to the font handle returned by a
367 previous call to GetFontInfo() or NULL to start
369 @param GlobalFontInfo If not NULL, output the corresponding globa font
373 @retval FALSE Not existed
378 IN HII_DATABASE_PRIVATE_DATA
*Private
,
379 IN EFI_FONT_INFO
*FontInfo
,
380 IN EFI_FONT_INFO_MASK
*FontInfoMask
, OPTIONAL
381 IN EFI_FONT_HANDLE FontHandle
, OPTIONAL
382 OUT HII_GLOBAL_FONT_INFO
**GlobalFontInfo OPTIONAL
387 This function invokes the matching registered function.
389 @param Private HII Database driver private structure.
390 @param NotifyType The type of change concerning the database.
391 @param PackageInstance Points to the package referred to by the notification.
392 @param PackageType Package type
393 @param Handle The handle of the package list which contains the specified package.
395 @retval EFI_SUCCESS Already checked all registered function and invoked
397 @retval EFI_INVALID_PARAMETER Any input parameter is not valid.
401 InvokeRegisteredFunction (
402 IN HII_DATABASE_PRIVATE_DATA
*Private
,
403 IN EFI_HII_DATABASE_NOTIFY_TYPE NotifyType
,
404 IN VOID
*PackageInstance
,
405 IN UINT8 PackageType
,
406 IN EFI_HII_HANDLE Handle
411 Retrieve system default font and color.
413 @param Private HII database driver private data.
414 @param FontInfo Points to system default font output-related
415 information. It's caller's responsibility to free
417 @param FontInfoSize If not NULL, output the size of buffer FontInfo.
419 @retval EFI_SUCCESS Cell information is added to the GlyphInfoList.
420 @retval EFI_OUT_OF_RESOURCES The system is out of resources to accomplish the
422 @retval EFI_INVALID_PARAMETER Any input parameter is invalid.
427 IN HII_DATABASE_PRIVATE_DATA
*Private
,
428 OUT EFI_FONT_DISPLAY_INFO
**FontInfo
,
429 OUT UINTN
*FontInfoSize OPTIONAL
434 Parse all string blocks to find a String block specified by StringId.
435 If StringId = (EFI_STRING_ID) (-1), find out all EFI_HII_SIBT_FONT blocks
436 within this string package and backup its information. If LastStringId is
437 specified, the string id of last string block will also be output.
438 If StringId = 0, output the string id of last string block (EFI_HII_SIBT_STRING).
440 @param Private Hii database private structure.
441 @param StringPackage Hii string package instance.
442 @param StringId The string's id, which is unique within
444 @param BlockType Output the block type of found string block.
445 @param StringBlockAddr Output the block address of found string block.
446 @param StringTextOffset Offset, relative to the found block address, of
447 the string text information.
448 @param LastStringId Output the last string id when StringId = 0 or StringId = -1.
449 @param StartStringId The first id in the skip block which StringId in the block.
451 @retval EFI_SUCCESS The string text and font is retrieved
453 @retval EFI_NOT_FOUND The specified text or font info can not be found
455 @retval EFI_OUT_OF_RESOURCES The system is out of resources to accomplish the
461 IN HII_DATABASE_PRIVATE_DATA
*Private
,
462 IN HII_STRING_PACKAGE_INSTANCE
*StringPackage
,
463 IN EFI_STRING_ID StringId
,
464 OUT UINT8
*BlockType
, OPTIONAL
465 OUT UINT8
**StringBlockAddr
, OPTIONAL
466 OUT UINTN
*StringTextOffset
, OPTIONAL
467 OUT EFI_STRING_ID
*LastStringId
, OPTIONAL
468 OUT EFI_STRING_ID
*StartStringId OPTIONAL
473 Parse all glyph blocks to find a glyph block specified by CharValue.
474 If CharValue = (CHAR16) (-1), collect all default character cell information
475 within this font package and backup its information.
477 @param FontPackage Hii string package instance.
478 @param CharValue Unicode character value, which identifies a glyph
480 @param GlyphBuffer Output the corresponding bitmap data of the found
481 block. It is the caller's responsiblity to free
483 @param Cell Output cell information of the encoded bitmap.
484 @param GlyphBufferLen If not NULL, output the length of GlyphBuffer.
486 @retval EFI_SUCCESS The bitmap data is retrieved successfully.
487 @retval EFI_NOT_FOUND The specified CharValue does not exist in current
489 @retval EFI_OUT_OF_RESOURCES The system is out of resources to accomplish the
495 IN HII_FONT_PACKAGE_INSTANCE
*FontPackage
,
497 OUT UINT8
**GlyphBuffer
, OPTIONAL
498 OUT EFI_HII_GLYPH_INFO
*Cell
, OPTIONAL
499 OUT UINTN
*GlyphBufferLen OPTIONAL
503 This function exports Form packages to a buffer.
504 This is a internal function.
506 @param Private Hii database private structure.
507 @param Handle Identification of a package list.
508 @param PackageList Pointer to a package list which will be exported.
509 @param UsedSize The length of buffer be used.
510 @param BufferSize Length of the Buffer.
511 @param Buffer Allocated space for storing exported data.
512 @param ResultSize The size of the already exported content of this
515 @retval EFI_SUCCESS Form Packages are exported successfully.
516 @retval EFI_INVALID_PARAMETER Any input parameter is invalid.
521 IN HII_DATABASE_PRIVATE_DATA
*Private
,
522 IN EFI_HII_HANDLE Handle
,
523 IN HII_DATABASE_PACKAGE_LIST_INSTANCE
*PackageList
,
527 IN OUT UINTN
*ResultSize
531 // EFI_HII_FONT_PROTOCOL protocol interfaces
536 Renders a string to a bitmap or to the display.
538 @param This A pointer to the EFI_HII_FONT_PROTOCOL instance.
539 @param Flags Describes how the string is to be drawn.
540 @param String Points to the null-terminated string to be
542 @param StringInfo Points to the string output information,
543 including the color and font. If NULL, then the
544 string will be output in the default system font
546 @param Blt If this points to a non-NULL on entry, this
547 points to the image, which is Width pixels wide
548 and Height pixels high. The string will be drawn
550 EFI_HII_OUT_FLAG_CLIP is implied. If this points
551 to a NULL on entry, then a buffer
552 will be allocated to hold the generated image and
553 the pointer updated on exit. It is the caller's
554 responsibility to free this buffer.
555 @param BltX Together with BltX, Specifies the offset from the left and top edge
556 of the image of the first character cell in the
558 @param BltY Together with BltY, Specifies the offset from the left and top edge
559 of the image of the first character cell in the
561 @param RowInfoArray If this is non-NULL on entry, then on exit, this
562 will point to an allocated buffer containing
563 row information and RowInfoArraySize will be
564 updated to contain the number of elements.
565 This array describes the characters which were at
566 least partially drawn and the heights of the
567 rows. It is the caller's responsibility to free
569 @param RowInfoArraySize If this is non-NULL on entry, then on exit it
570 contains the number of elements in RowInfoArray.
571 @param ColumnInfoArray If this is non-NULL, then on return it will be
572 filled with the horizontal offset for each
573 character in the string on the row where it is
574 displayed. Non-printing characters will have
575 the offset ~0. The caller is responsible to
576 allocate a buffer large enough so that there
577 is one entry for each character in the string,
578 not including the null-terminator. It is possible
579 when character display is normalized that some
580 character cells overlap.
582 @retval EFI_SUCCESS The string was successfully rendered.
583 @retval EFI_OUT_OF_RESOURCES Unable to allocate an output buffer for
585 @retval EFI_INVALID_PARAMETER The String or Blt.
586 @retval EFI_INVALID_PARAMETER Flags were invalid combination..
592 IN CONST EFI_HII_FONT_PROTOCOL
*This
,
593 IN EFI_HII_OUT_FLAGS Flags
,
594 IN CONST EFI_STRING String
,
595 IN CONST EFI_FONT_DISPLAY_INFO
*StringInfo OPTIONAL
,
596 IN OUT EFI_IMAGE_OUTPUT
**Blt
,
599 OUT EFI_HII_ROW_INFO
**RowInfoArray OPTIONAL
,
600 OUT UINTN
*RowInfoArraySize OPTIONAL
,
601 OUT UINTN
*ColumnInfoArray OPTIONAL
606 Render a string to a bitmap or the screen containing the contents of the specified string.
608 @param This A pointer to the EFI_HII_FONT_PROTOCOL instance.
609 @param Flags Describes how the string is to be drawn.
610 @param PackageList The package list in the HII database to search
611 for the specified string.
612 @param StringId The string's id, which is unique within
614 @param Language Points to the language for the retrieved string.
615 If NULL, then the current system language is
617 @param StringInfo Points to the string output information,
618 including the color and font. If NULL, then the
619 string will be output in the default system font
621 @param Blt If this points to a non-NULL on entry, this
622 points to the image, which is Width pixels wide
623 and Height pixels high. The string will be drawn
625 EFI_HII_OUT_FLAG_CLIP is implied. If this points
626 to a NULL on entry, then a buffer
627 will be allocated to hold the generated image and
628 the pointer updated on exit. It is the caller's
629 responsibility to free this buffer.
630 @param BltX Together with BltX, Specifies the offset from the left and top edge
631 of the image of the first character cell in the
633 @param BltY Together with BltY, Specifies the offset from the left and top edge
634 of the image of the first character cell in the
636 @param RowInfoArray If this is non-NULL on entry, then on exit, this
637 will point to an allocated buffer containing
638 row information and RowInfoArraySize will be
639 updated to contain the number of elements.
640 This array describes the characters which were at
641 least partially drawn and the heights of the
642 rows. It is the caller's responsibility to free
644 @param RowInfoArraySize If this is non-NULL on entry, then on exit it
645 contains the number of elements in RowInfoArray.
646 @param ColumnInfoArray If this is non-NULL, then on return it will be
647 filled with the horizontal offset for each
648 character in the string on the row where it is
649 displayed. Non-printing characters will have
650 the offset ~0. The caller is responsible to
651 allocate a buffer large enough so that there
652 is one entry for each character in the string,
653 not including the null-terminator. It is possible
654 when character display is normalized that some
655 character cells overlap.
657 @retval EFI_SUCCESS The string was successfully rendered.
658 @retval EFI_OUT_OF_RESOURCES Unable to allocate an output buffer for
660 @retval EFI_INVALID_PARAMETER The Blt or PackageList was NULL.
661 @retval EFI_INVALID_PARAMETER Flags were invalid combination.
662 @retval EFI_NOT_FOUND The specified PackageList is not in the Database or the stringid is not
663 in the specified PackageList.
669 IN CONST EFI_HII_FONT_PROTOCOL
*This
,
670 IN EFI_HII_OUT_FLAGS Flags
,
671 IN EFI_HII_HANDLE PackageList
,
672 IN EFI_STRING_ID StringId
,
673 IN CONST CHAR8
* Language
,
674 IN CONST EFI_FONT_DISPLAY_INFO
*StringInfo OPTIONAL
,
675 IN OUT EFI_IMAGE_OUTPUT
**Blt
,
678 OUT EFI_HII_ROW_INFO
**RowInfoArray OPTIONAL
,
679 OUT UINTN
*RowInfoArraySize OPTIONAL
,
680 OUT UINTN
*ColumnInfoArray OPTIONAL
685 Convert the glyph for a single character into a bitmap.
687 @param This A pointer to the EFI_HII_FONT_PROTOCOL instance.
688 @param Char Character to retrieve.
689 @param StringInfo Points to the string font and color information
690 or NULL if the string should use the default
691 system font and color.
692 @param Blt Thus must point to a NULL on entry. A buffer will
693 be allocated to hold the output and the pointer
694 updated on exit. It is the caller's
695 responsibility to free this buffer.
696 @param Baseline Number of pixels from the bottom of the bitmap to
699 @retval EFI_SUCCESS Glyph bitmap created.
700 @retval EFI_OUT_OF_RESOURCES Unable to allocate the output buffer Blt.
701 @retval EFI_WARN_UNKNOWN_GLYPH The glyph was unknown and was replaced with the
702 glyph for Unicode character 0xFFFD.
703 @retval EFI_INVALID_PARAMETER Blt is NULL or *Blt is not NULL.
709 IN CONST EFI_HII_FONT_PROTOCOL
*This
,
711 IN CONST EFI_FONT_DISPLAY_INFO
*StringInfo
,
712 OUT EFI_IMAGE_OUTPUT
**Blt
,
713 OUT UINTN
*Baseline OPTIONAL
718 This function iterates through fonts which match the specified font, using
719 the specified criteria. If String is non-NULL, then all of the characters in
720 the string must exist in order for a candidate font to be returned.
722 @param This A pointer to the EFI_HII_FONT_PROTOCOL instance.
723 @param FontHandle On entry, points to the font handle returned by a
724 previous call to GetFontInfo() or NULL to start
725 with the first font. On return, points to the
726 returned font handle or points to NULL if there
727 are no more matching fonts.
728 @param StringInfoIn Upon entry, points to the font to return information
729 about. If NULL, then the information about the system
730 default font will be returned.
731 @param StringInfoOut Upon return, contains the matching font's information.
732 If NULL, then no information is returned. This buffer
733 is allocated with a call to the Boot Service AllocatePool().
734 It is the caller's responsibility to call the Boot
735 Service FreePool() when the caller no longer requires
736 the contents of StringInfoOut.
737 @param String Points to the string which will be tested to
738 determine if all characters are available. If
739 NULL, then any font is acceptable.
741 @retval EFI_SUCCESS Matching font returned successfully.
742 @retval EFI_NOT_FOUND No matching font was found.
743 @retval EFI_INVALID_PARAMETER StringInfoIn is NULL.
744 @retval EFI_INVALID_PARAMETER StringInfoIn->FontInfoMask is an invalid combination.
745 @retval EFI_OUT_OF_RESOURCES There were insufficient resources to complete the
751 IN CONST EFI_HII_FONT_PROTOCOL
*This
,
752 IN OUT EFI_FONT_HANDLE
*FontHandle
,
753 IN CONST EFI_FONT_DISPLAY_INFO
*StringInfoIn
, OPTIONAL
754 OUT EFI_FONT_DISPLAY_INFO
**StringInfoOut
,
755 IN CONST EFI_STRING String OPTIONAL
759 // EFI_HII_IMAGE_PROTOCOL interfaces
764 This function adds the image Image to the group of images owned by PackageList, and returns
765 a new image identifier (ImageId).
767 @param This A pointer to the EFI_HII_IMAGE_PROTOCOL instance.
768 @param PackageList Handle of the package list where this image will
770 @param ImageId On return, contains the new image id, which is
771 unique within PackageList.
772 @param Image Points to the image.
774 @retval EFI_SUCCESS The new image was added successfully.
775 @retval EFI_NOT_FOUND The specified PackageList could not be found in
777 @retval EFI_OUT_OF_RESOURCES Could not add the image due to lack of resources.
778 @retval EFI_INVALID_PARAMETER Image is NULL or ImageId is NULL.
784 IN CONST EFI_HII_IMAGE_PROTOCOL
*This
,
785 IN EFI_HII_HANDLE PackageList
,
786 OUT EFI_IMAGE_ID
*ImageId
,
787 IN CONST EFI_IMAGE_INPUT
*Image
792 This function retrieves the image specified by ImageId which is associated with
793 the specified PackageList and copies it into the buffer specified by Image.
795 @param This A pointer to the EFI_HII_IMAGE_PROTOCOL instance.
796 @param PackageList Handle of the package list where this image will
798 @param ImageId The image's id,, which is unique within
800 @param Image Points to the image.
802 @retval EFI_SUCCESS The new image was returned successfully.
803 @retval EFI_NOT_FOUND The image specified by ImageId is not available.
804 The specified PackageList is not in the database.
805 @retval EFI_BUFFER_TOO_SMALL The buffer specified by ImageSize is too small to
807 @retval EFI_INVALID_PARAMETER The Image or ImageSize was NULL.
808 @retval EFI_OUT_OF_RESOURCES The bitmap could not be retrieved because there was not
815 IN CONST EFI_HII_IMAGE_PROTOCOL
*This
,
816 IN EFI_HII_HANDLE PackageList
,
817 IN EFI_IMAGE_ID ImageId
,
818 OUT EFI_IMAGE_INPUT
*Image
823 This function updates the image specified by ImageId in the specified PackageListHandle to
824 the image specified by Image.
826 @param This A pointer to the EFI_HII_IMAGE_PROTOCOL instance.
827 @param PackageList The package list containing the images.
828 @param ImageId The image's id,, which is unique within
830 @param Image Points to the image.
832 @retval EFI_SUCCESS The new image was updated successfully.
833 @retval EFI_NOT_FOUND The image specified by ImageId is not in the
834 database. The specified PackageList is not in the database.
835 @retval EFI_INVALID_PARAMETER The Image was NULL.
841 IN CONST EFI_HII_IMAGE_PROTOCOL
*This
,
842 IN EFI_HII_HANDLE PackageList
,
843 IN EFI_IMAGE_ID ImageId
,
844 IN CONST EFI_IMAGE_INPUT
*Image
849 This function renders an image to a bitmap or the screen using the specified
850 color and options. It draws the image on an existing bitmap, allocates a new
851 bitmap or uses the screen. The images can be clipped.
853 @param This A pointer to the EFI_HII_IMAGE_PROTOCOL instance.
854 @param Flags Describes how the image is to be drawn.
855 @param Image Points to the image to be displayed.
856 @param Blt If this points to a non-NULL on entry, this
857 points to the image, which is Width pixels wide
858 and Height pixels high. The image will be drawn
859 onto this image and EFI_HII_DRAW_FLAG_CLIP is
860 implied. If this points to a NULL on entry, then
861 a buffer will be allocated to hold the generated
862 image and the pointer updated on exit. It is the
863 caller's responsibility to free this buffer.
864 @param BltX Specifies the offset from the left and top edge
865 of the output image of the first pixel in the
867 @param BltY Specifies the offset from the left and top edge
868 of the output image of the first pixel in the
871 @retval EFI_SUCCESS The image was successfully drawn.
872 @retval EFI_OUT_OF_RESOURCES Unable to allocate an output buffer for Blt.
873 @retval EFI_INVALID_PARAMETER The Image or Blt was NULL.
874 @retval EFI_INVALID_PARAMETER Any combination of Flags is invalid.
880 IN CONST EFI_HII_IMAGE_PROTOCOL
*This
,
881 IN EFI_HII_DRAW_FLAGS Flags
,
882 IN CONST EFI_IMAGE_INPUT
*Image
,
883 IN OUT EFI_IMAGE_OUTPUT
**Blt
,
890 This function renders an image to a bitmap or the screen using the specified
891 color and options. It draws the image on an existing bitmap, allocates a new
892 bitmap or uses the screen. The images can be clipped.
894 @param This A pointer to the EFI_HII_IMAGE_PROTOCOL instance.
895 @param Flags Describes how the image is to be drawn.
896 @param PackageList The package list in the HII database to search
897 for the specified image.
898 @param ImageId The image's id, which is unique within
900 @param Blt If this points to a non-NULL on entry, this
901 points to the image, which is Width pixels wide
902 and Height pixels high. The image will be drawn
904 EFI_HII_DRAW_FLAG_CLIP is implied. If this points
905 to a NULL on entry, then a buffer will be
906 allocated to hold the generated image and the
907 pointer updated on exit. It is the caller's
908 responsibility to free this buffer.
909 @param BltX Specifies the offset from the left and top edge
910 of the output image of the first pixel in the
912 @param BltY Specifies the offset from the left and top edge
913 of the output image of the first pixel in the
916 @retval EFI_SUCCESS The image was successfully drawn.
917 @retval EFI_OUT_OF_RESOURCES Unable to allocate an output buffer for Blt.
918 @retval EFI_INVALID_PARAMETER The Blt was NULL.
919 @retval EFI_NOT_FOUND The image specified by ImageId is not in the database.
920 The specified PackageList is not in the database.
926 IN CONST EFI_HII_IMAGE_PROTOCOL
*This
,
927 IN EFI_HII_DRAW_FLAGS Flags
,
928 IN EFI_HII_HANDLE PackageList
,
929 IN EFI_IMAGE_ID ImageId
,
930 IN OUT EFI_IMAGE_OUTPUT
**Blt
,
938 // EFI_HII_STRING_PROTOCOL
943 This function adds the string String to the group of strings owned by PackageList, with the
944 specified font information StringFontInfo and returns a new string id.
946 @param This A pointer to the EFI_HII_STRING_PROTOCOL
948 @param PackageList Handle of the package list where this string will
950 @param StringId On return, contains the new strings id, which is
951 unique within PackageList.
952 @param Language Points to the language for the new string.
953 @param LanguageName Points to the printable language name to
954 associate with the passed in Language field.If
955 LanguageName is not NULL and the string package
956 header's LanguageName associated with a given
957 Language is not zero, the LanguageName being
958 passed in will be ignored.
959 @param String Points to the new null-terminated string.
960 @param StringFontInfo Points to the new string's font information or
961 NULL if the string should have the default system
962 font, size and style.
964 @retval EFI_SUCCESS The new string was added successfully.
965 @retval EFI_NOT_FOUND The specified PackageList could not be found in
967 @retval EFI_OUT_OF_RESOURCES Could not add the string due to lack of
969 @retval EFI_INVALID_PARAMETER String is NULL or StringId is NULL or Language is
976 IN CONST EFI_HII_STRING_PROTOCOL
*This
,
977 IN EFI_HII_HANDLE PackageList
,
978 OUT EFI_STRING_ID
*StringId
,
979 IN CONST CHAR8
*Language
,
980 IN CONST CHAR16
*LanguageName
, OPTIONAL
981 IN CONST EFI_STRING String
,
982 IN CONST EFI_FONT_INFO
*StringFontInfo OPTIONAL
987 This function retrieves the string specified by StringId which is associated
988 with the specified PackageList in the language Language and copies it into
989 the buffer specified by String.
991 @param This A pointer to the EFI_HII_STRING_PROTOCOL
993 @param Language Points to the language for the retrieved string.
994 @param PackageList The package list in the HII database to search
995 for the specified string.
996 @param StringId The string's id, which is unique within
998 @param String Points to the new null-terminated string.
999 @param StringSize On entry, points to the size of the buffer
1000 pointed to by String, in bytes. On return,
1001 points to the length of the string, in bytes.
1002 @param StringFontInfo If not NULL, points to the string's font
1003 information. It's caller's responsibility to
1006 @retval EFI_SUCCESS The string was returned successfully.
1007 @retval EFI_NOT_FOUND The string specified by StringId is not
1009 The specified PackageList is not in the database.
1010 @retval EFI_INVALID_LANGUAGE The string specified by StringId is available but
1011 not in the specified language.
1012 @retval EFI_BUFFER_TOO_SMALL The buffer specified by StringSize is too small
1014 @retval EFI_INVALID_PARAMETER The Language or StringSize was NULL.
1015 @retval EFI_INVALID_PARAMETER The value referenced by StringSize was not zero
1016 and String was NULL.
1017 @retval EFI_OUT_OF_RESOURCES There were insufficient resources to complete the
1024 IN CONST EFI_HII_STRING_PROTOCOL
*This
,
1025 IN CONST CHAR8
*Language
,
1026 IN EFI_HII_HANDLE PackageList
,
1027 IN EFI_STRING_ID StringId
,
1028 OUT EFI_STRING String
,
1029 IN OUT UINTN
*StringSize
,
1030 OUT EFI_FONT_INFO
**StringFontInfo OPTIONAL
1035 This function updates the string specified by StringId in the specified PackageList to the text
1036 specified by String and, optionally, the font information specified by StringFontInfo.
1038 @param This A pointer to the EFI_HII_STRING_PROTOCOL
1040 @param PackageList The package list containing the strings.
1041 @param StringId The string's id, which is unique within
1043 @param Language Points to the language for the updated string.
1044 @param String Points to the new null-terminated string.
1045 @param StringFontInfo Points to the string's font information or NULL
1046 if the string font information is not changed.
1048 @retval EFI_SUCCESS The string was updated successfully.
1049 @retval EFI_NOT_FOUND The string specified by StringId is not in the
1051 @retval EFI_INVALID_PARAMETER The String or Language was NULL.
1052 @retval EFI_OUT_OF_RESOURCES The system is out of resources to accomplish the
1059 IN CONST EFI_HII_STRING_PROTOCOL
*This
,
1060 IN EFI_HII_HANDLE PackageList
,
1061 IN EFI_STRING_ID StringId
,
1062 IN CONST CHAR8
*Language
,
1063 IN CONST EFI_STRING String
,
1064 IN CONST EFI_FONT_INFO
*StringFontInfo OPTIONAL
1069 This function returns the list of supported languages, in the format specified
1070 in Appendix M of UEFI 2.1 spec.
1072 @param This A pointer to the EFI_HII_STRING_PROTOCOL
1074 @param PackageList The package list to examine.
1075 @param Languages Points to the buffer to hold the returned
1076 null-terminated ASCII string.
1077 @param LanguagesSize On entry, points to the size of the buffer
1078 pointed to by Languages, in bytes. On return,
1079 points to the length of Languages, in bytes.
1081 @retval EFI_SUCCESS The languages were returned successfully.
1082 @retval EFI_INVALID_PARAMETER The LanguagesSize was NULL.
1083 @retval EFI_INVALID_PARAMETER The value referenced by LanguagesSize is not zero and Languages is NULL.
1084 @retval EFI_BUFFER_TOO_SMALL The LanguagesSize is too small to hold the list
1085 of supported languages. LanguageSize is updated
1086 to contain the required size.
1087 @retval EFI_NOT_FOUND Could not find string package in specified
1094 IN CONST EFI_HII_STRING_PROTOCOL
*This
,
1095 IN EFI_HII_HANDLE PackageList
,
1096 IN OUT CHAR8
*Languages
,
1097 IN OUT UINTN
*LanguagesSize
1102 Each string package has associated with it a single primary language and zero
1103 or more secondary languages. This routine returns the secondary languages
1104 associated with a package list.
1106 @param This A pointer to the EFI_HII_STRING_PROTOCOL
1108 @param PackageList The package list to examine.
1109 @param PrimaryLanguage Points to the null-terminated ASCII string that specifies
1110 the primary language. Languages are specified in the
1111 format specified in Appendix M of the UEFI 2.0 specification.
1112 @param SecondaryLanguages Points to the buffer to hold the returned null-terminated
1113 ASCII string that describes the list of
1114 secondary languages for the specified
1115 PrimaryLanguage. If there are no secondary
1116 languages, the function returns successfully,
1117 but this is set to NULL.
1118 @param SecondaryLanguagesSize On entry, points to the size of the buffer
1119 pointed to by SecondaryLanguages, in bytes. On
1120 return, points to the length of SecondaryLanguages
1123 @retval EFI_SUCCESS Secondary languages were correctly returned.
1124 @retval EFI_INVALID_PARAMETER PrimaryLanguage or SecondaryLanguagesSize was NULL.
1125 @retval EFI_INVALID_PARAMETER The value referenced by SecondaryLanguagesSize is not
1126 zero and SecondaryLanguages is NULL.
1127 @retval EFI_BUFFER_TOO_SMALL The buffer specified by SecondaryLanguagesSize is
1128 too small to hold the returned information.
1129 SecondaryLanguageSize is updated to hold the size of
1130 the buffer required.
1131 @retval EFI_INVALID_LANGUAGE The language specified by PrimaryLanguage is not
1132 present in the specified package list.
1133 @retval EFI_NOT_FOUND The specified PackageList is not in the Database.
1138 HiiGetSecondaryLanguages (
1139 IN CONST EFI_HII_STRING_PROTOCOL
*This
,
1140 IN EFI_HII_HANDLE PackageList
,
1141 IN CONST CHAR8
*PrimaryLanguage
,
1142 IN OUT CHAR8
*SecondaryLanguages
,
1143 IN OUT UINTN
*SecondaryLanguagesSize
1147 // EFI_HII_DATABASE_PROTOCOL protocol interfaces
1152 This function adds the packages in the package list to the database and returns a handle. If there is a
1153 EFI_DEVICE_PATH_PROTOCOL associated with the DriverHandle, then this function will
1154 create a package of type EFI_PACKAGE_TYPE_DEVICE_PATH and add it to the package list.
1156 @param This A pointer to the EFI_HII_DATABASE_PROTOCOL
1158 @param PackageList A pointer to an EFI_HII_PACKAGE_LIST_HEADER
1160 @param DriverHandle Associate the package list with this EFI handle.
1161 If a NULL is specified, this data will not be associate
1162 with any drivers and cannot have a callback induced.
1163 @param Handle A pointer to the EFI_HII_HANDLE instance.
1165 @retval EFI_SUCCESS The package list associated with the Handle was
1166 added to the HII database.
1167 @retval EFI_OUT_OF_RESOURCES Unable to allocate necessary resources for the
1168 new database contents.
1169 @retval EFI_INVALID_PARAMETER PackageList is NULL or Handle is NULL.
1175 IN CONST EFI_HII_DATABASE_PROTOCOL
*This
,
1176 IN CONST EFI_HII_PACKAGE_LIST_HEADER
*PackageList
,
1177 IN CONST EFI_HANDLE DriverHandle
, OPTIONAL
1178 OUT EFI_HII_HANDLE
*Handle
1183 This function removes the package list that is associated with a handle Handle
1184 from the HII database. Before removing the package, any registered functions
1185 with the notification type REMOVE_PACK and the same package type will be called.
1187 @param This A pointer to the EFI_HII_DATABASE_PROTOCOL
1189 @param Handle The handle that was registered to the data that
1190 is requested for removal.
1192 @retval EFI_SUCCESS The data associated with the Handle was removed
1193 from the HII database.
1194 @retval EFI_NOT_FOUND The specified Handle is not in database.
1199 HiiRemovePackageList (
1200 IN CONST EFI_HII_DATABASE_PROTOCOL
*This
,
1201 IN EFI_HII_HANDLE Handle
1206 This function updates the existing package list (which has the specified Handle)
1207 in the HII databases, using the new package list specified by PackageList.
1209 @param This A pointer to the EFI_HII_DATABASE_PROTOCOL
1211 @param Handle The handle that was registered to the data that
1212 is requested to be updated.
1213 @param PackageList A pointer to an EFI_HII_PACKAGE_LIST_HEADER
1216 @retval EFI_SUCCESS The HII database was successfully updated.
1217 @retval EFI_OUT_OF_RESOURCES Unable to allocate enough memory for the updated
1219 @retval EFI_INVALID_PARAMETER PackageList was NULL.
1220 @retval EFI_NOT_FOUND The specified Handle is not in database.
1225 HiiUpdatePackageList (
1226 IN CONST EFI_HII_DATABASE_PROTOCOL
*This
,
1227 IN EFI_HII_HANDLE Handle
,
1228 IN CONST EFI_HII_PACKAGE_LIST_HEADER
*PackageList
1233 This function returns a list of the package handles of the specified type
1234 that are currently active in the database. The pseudo-type
1235 EFI_HII_PACKAGE_TYPE_ALL will cause all package handles to be listed.
1237 @param This A pointer to the EFI_HII_DATABASE_PROTOCOL
1239 @param PackageType Specifies the package type of the packages to
1240 list or EFI_HII_PACKAGE_TYPE_ALL for all packages
1242 @param PackageGuid If PackageType is EFI_HII_PACKAGE_TYPE_GUID, then
1243 this is the pointer to the GUID which must match
1244 the Guid field of EFI_HII_GUID_PACKAGE_GUID_HDR.
1245 Otherwise, it must be NULL.
1246 @param HandleBufferLength On input, a pointer to the length of the handle
1247 buffer. On output, the length of the handle
1248 buffer that is required for the handles found.
1249 @param Handle An array of EFI_HII_HANDLE instances returned.
1251 @retval EFI_SUCCESS The matching handles are outputed successfully.
1252 HandleBufferLength is updated with the actual length.
1253 @retval EFI_BUFFER_TO_SMALL The HandleBufferLength parameter indicates that
1254 Handle is too small to support the number of
1255 handles. HandleBufferLength is updated with a
1256 value that will enable the data to fit.
1257 @retval EFI_NOT_FOUND No matching handle could not be found in
1259 @retval EFI_INVALID_PARAMETER HandleBufferLength was NULL.
1260 @retval EFI_INVALID_PARAMETER The value referenced by HandleBufferLength was not
1261 zero and Handle was NULL.
1262 @retval EFI_INVALID_PARAMETER PackageType is not a EFI_HII_PACKAGE_TYPE_GUID but
1263 PackageGuid is not NULL, PackageType is a EFI_HII_
1264 PACKAGE_TYPE_GUID but PackageGuid is NULL.
1269 HiiListPackageLists (
1270 IN CONST EFI_HII_DATABASE_PROTOCOL
*This
,
1271 IN UINT8 PackageType
,
1272 IN CONST EFI_GUID
*PackageGuid
,
1273 IN OUT UINTN
*HandleBufferLength
,
1274 OUT EFI_HII_HANDLE
*Handle
1279 This function will export one or all package lists in the database to a buffer.
1280 For each package list exported, this function will call functions registered
1281 with EXPORT_PACK and then copy the package list to the buffer.
1283 @param This A pointer to the EFI_HII_DATABASE_PROTOCOL
1285 @param Handle An EFI_HII_HANDLE that corresponds to the desired
1286 package list in the HII database to export or
1287 NULL to indicate all package lists should be
1289 @param BufferSize On input, a pointer to the length of the buffer.
1290 On output, the length of the buffer that is
1291 required for the exported data.
1292 @param Buffer A pointer to a buffer that will contain the
1293 results of the export function.
1295 @retval EFI_SUCCESS Package exported.
1296 @retval EFI_BUFFER_TO_SMALL The HandleBufferLength parameter indicates that
1297 Handle is too small to support the number of
1298 handles. HandleBufferLength is updated with
1299 a value that will enable the data to fit.
1300 @retval EFI_NOT_FOUND The specifiecd Handle could not be found in the
1302 @retval EFI_INVALID_PARAMETER BufferSize was NULL.
1303 @retval EFI_INVALID_PARAMETER The value referenced by BufferSize was not zero
1304 and Buffer was NULL.
1309 HiiExportPackageLists (
1310 IN CONST EFI_HII_DATABASE_PROTOCOL
*This
,
1311 IN EFI_HII_HANDLE Handle
,
1312 IN OUT UINTN
*BufferSize
,
1313 OUT EFI_HII_PACKAGE_LIST_HEADER
*Buffer
1318 This function registers a function which will be called when specified actions related to packages of
1319 the specified type occur in the HII database. By registering a function, other HII-related drivers are
1320 notified when specific package types are added, removed or updated in the HII database.
1321 Each driver or application which registers a notification should use
1322 EFI_HII_DATABASE_PROTOCOL.UnregisterPackageNotify() before exiting.
1324 @param This A pointer to the EFI_HII_DATABASE_PROTOCOL
1326 @param PackageType Specifies the package type of the packages to
1327 list or EFI_HII_PACKAGE_TYPE_ALL for all packages
1329 @param PackageGuid If PackageType is EFI_HII_PACKAGE_TYPE_GUID, then
1330 this is the pointer to the GUID which must match
1332 EFI_HII_GUID_PACKAGE_GUID_HDR. Otherwise, it must
1334 @param PackageNotifyFn Points to the function to be called when the
1336 NotificationType occurs.
1337 @param NotifyType Describes the types of notification which this
1338 function will be receiving.
1339 @param NotifyHandle Points to the unique handle assigned to the
1340 registered notification. Can be used in
1341 EFI_HII_DATABASE_PROTOCOL.UnregisterPackageNotify()
1342 to stop notifications.
1344 @retval EFI_SUCCESS Notification registered successfully.
1345 @retval EFI_OUT_OF_RESOURCES Unable to allocate necessary data structures
1346 @retval EFI_INVALID_PARAMETER NotifyHandle is NULL.
1347 @retval EFI_INVALID_PARAMETER PackageGuid is not NULL when PackageType is not
1348 EFI_HII_PACKAGE_TYPE_GUID.
1349 @retval EFI_INVALID_PARAMETER PackageGuid is NULL when PackageType is
1350 EFI_HII_PACKAGE_TYPE_GUID.
1355 HiiRegisterPackageNotify (
1356 IN CONST EFI_HII_DATABASE_PROTOCOL
*This
,
1357 IN UINT8 PackageType
,
1358 IN CONST EFI_GUID
*PackageGuid
,
1359 IN CONST EFI_HII_DATABASE_NOTIFY PackageNotifyFn
,
1360 IN EFI_HII_DATABASE_NOTIFY_TYPE NotifyType
,
1361 OUT EFI_HANDLE
*NotifyHandle
1366 Removes the specified HII database package-related notification.
1368 @param This A pointer to the EFI_HII_DATABASE_PROTOCOL
1370 @param NotificationHandle The handle of the notification function being
1373 @retval EFI_SUCCESS Notification is unregistered successfully.
1374 @retval EFI_NOT_FOUND The incoming notification handle does not exist
1375 in current hii database.
1380 HiiUnregisterPackageNotify (
1381 IN CONST EFI_HII_DATABASE_PROTOCOL
*This
,
1382 IN EFI_HANDLE NotificationHandle
1387 This routine retrieves an array of GUID values for each keyboard layout that
1388 was previously registered in the system.
1390 @param This A pointer to the EFI_HII_DATABASE_PROTOCOL
1392 @param KeyGuidBufferLength On input, a pointer to the length of the keyboard
1393 GUID buffer. On output, the length of the handle
1394 buffer that is required for the handles found.
1395 @param KeyGuidBuffer An array of keyboard layout GUID instances
1398 @retval EFI_SUCCESS KeyGuidBuffer was updated successfully.
1399 @retval EFI_BUFFER_TOO_SMALL The KeyGuidBufferLength parameter indicates
1400 that KeyGuidBuffer is too small to support the
1401 number of GUIDs. KeyGuidBufferLength is
1402 updated with a value that will enable the data to
1404 @retval EFI_INVALID_PARAMETER The KeyGuidBufferLength is NULL.
1405 @retval EFI_INVALID_PARAMETER The value referenced by KeyGuidBufferLength is not
1406 zero and KeyGuidBuffer is NULL.
1407 @retval EFI_NOT_FOUND There was no keyboard layout.
1412 HiiFindKeyboardLayouts (
1413 IN CONST EFI_HII_DATABASE_PROTOCOL
*This
,
1414 IN OUT UINT16
*KeyGuidBufferLength
,
1415 OUT EFI_GUID
*KeyGuidBuffer
1420 This routine retrieves the requested keyboard layout. The layout is a physical description of the keys
1421 on a keyboard and the character(s) that are associated with a particular set of key strokes.
1423 @param This A pointer to the EFI_HII_DATABASE_PROTOCOL
1425 @param KeyGuid A pointer to the unique ID associated with a
1426 given keyboard layout. If KeyGuid is NULL then
1427 the current layout will be retrieved.
1428 @param KeyboardLayoutLength On input, a pointer to the length of the
1429 KeyboardLayout buffer. On output, the length of
1430 the data placed into KeyboardLayout.
1431 @param KeyboardLayout A pointer to a buffer containing the retrieved
1434 @retval EFI_SUCCESS The keyboard layout was retrieved successfully.
1435 @retval EFI_NOT_FOUND The requested keyboard layout was not found.
1436 @retval EFI_INVALID_PARAMETER The KeyboardLayout or KeyboardLayoutLength was
1442 HiiGetKeyboardLayout (
1443 IN CONST EFI_HII_DATABASE_PROTOCOL
*This
,
1444 IN CONST EFI_GUID
*KeyGuid
,
1445 IN OUT UINT16
*KeyboardLayoutLength
,
1446 OUT EFI_HII_KEYBOARD_LAYOUT
*KeyboardLayout
1451 This routine sets the default keyboard layout to the one referenced by KeyGuid. When this routine
1452 is called, an event will be signaled of the EFI_HII_SET_KEYBOARD_LAYOUT_EVENT_GUID
1453 group type. This is so that agents which are sensitive to the current keyboard layout being changed
1454 can be notified of this change.
1456 @param This A pointer to the EFI_HII_DATABASE_PROTOCOL
1458 @param KeyGuid A pointer to the unique ID associated with a
1459 given keyboard layout.
1461 @retval EFI_SUCCESS The current keyboard layout was successfully set.
1462 @retval EFI_NOT_FOUND The referenced keyboard layout was not found, so
1464 @retval EFI_INVALID_PARAMETER The KeyGuid was NULL.
1469 HiiSetKeyboardLayout (
1470 IN CONST EFI_HII_DATABASE_PROTOCOL
*This
,
1471 IN CONST EFI_GUID
*KeyGuid
1476 Return the EFI handle associated with a package list.
1478 @param This A pointer to the EFI_HII_DATABASE_PROTOCOL
1480 @param PackageListHandle An EFI_HII_HANDLE that corresponds to the desired
1481 package list in the HIIdatabase.
1482 @param DriverHandle On return, contains the EFI_HANDLE which was
1483 registered with the package list in
1486 @retval EFI_SUCCESS The DriverHandle was returned successfully.
1487 @retval EFI_INVALID_PARAMETER The PackageListHandle was not valid or
1488 DriverHandle was NULL.
1493 HiiGetPackageListHandle (
1494 IN CONST EFI_HII_DATABASE_PROTOCOL
*This
,
1495 IN EFI_HII_HANDLE PackageListHandle
,
1496 OUT EFI_HANDLE
*DriverHandle
1500 // EFI_HII_CONFIG_ROUTING_PROTOCOL interfaces
1505 This function allows a caller to extract the current configuration
1506 for one or more named elements from one or more drivers.
1508 @param This A pointer to the EFI_HII_CONFIG_ROUTING_PROTOCOL
1510 @param Request A null-terminated Unicode string in
1511 <MultiConfigRequest> format.
1512 @param Progress On return, points to a character in the Request
1513 string. Points to the string's null terminator if
1514 request was successful. Points to the most recent
1515 & before the first failing name / value pair (or
1516 the beginning of the string if the failure is in
1517 the first name / value pair) if the request was
1519 @param Results Null-terminated Unicode string in
1520 <MultiConfigAltResp> format which has all values
1521 filled in for the names in the Request string.
1522 String to be allocated by the called function.
1524 @retval EFI_SUCCESS The Results string is filled with the values
1525 corresponding to all requested names.
1526 @retval EFI_OUT_OF_RESOURCES Not enough memory to store the parts of the
1527 results that must be stored awaiting possible
1529 @retval EFI_NOT_FOUND Routing data doesn't match any known driver.
1530 Progress set to the "G" in "GUID" of the
1531 routing header that doesn't match. Note: There
1532 is no requirement that all routing data
1533 be validated before any configuration extraction.
1534 @retval EFI_INVALID_PARAMETER For example, passing in a NULL for the Request
1535 parameter would result in this type of error. The
1536 Progress parameter is set to NULL.
1537 @retval EFI_INVALID_PARAMETER Illegal syntax. Progress set to most recent &
1538 before the error or the beginning of the string.
1539 @retval EFI_INVALID_PARAMETER Unknown name. Progress points to the & before the
1545 HiiConfigRoutingExtractConfig (
1546 IN CONST EFI_HII_CONFIG_ROUTING_PROTOCOL
*This
,
1547 IN CONST EFI_STRING Request
,
1548 OUT EFI_STRING
*Progress
,
1549 OUT EFI_STRING
*Results
1554 This function allows the caller to request the current configuration for the
1555 entirety of the current HII database and returns the data in a null-terminated Unicode string.
1557 @param This A pointer to the EFI_HII_CONFIG_ROUTING_PROTOCOL
1559 @param Results Null-terminated Unicode string in
1560 <MultiConfigAltResp> format which has all values
1561 filled in for the entirety of the current HII
1562 database. String to be allocated by the called
1563 function. De-allocation is up to the caller.
1565 @retval EFI_SUCCESS The Results string is filled with the values
1566 corresponding to all requested names.
1567 @retval EFI_OUT_OF_RESOURCES Not enough memory to store the parts of the
1568 results that must be stored awaiting possible
1570 @retval EFI_INVALID_PARAMETER For example, passing in a NULL for the Results
1571 parameter would result in this type of error.
1576 HiiConfigRoutingExportConfig (
1577 IN CONST EFI_HII_CONFIG_ROUTING_PROTOCOL
*This
,
1578 OUT EFI_STRING
*Results
1583 This function processes the results of processing forms and routes it to the
1584 appropriate handlers or storage.
1586 @param This A pointer to the EFI_HII_CONFIG_ROUTING_PROTOCOL
1588 @param Configuration A null-terminated Unicode string in
1589 <MulltiConfigResp> format.
1590 @param Progress A pointer to a string filled in with the offset
1591 of the most recent & before the first failing
1592 name / value pair (or the beginning of the string
1593 if the failure is in the first name / value pair)
1594 or the terminating NULL if all was successful.
1596 @retval EFI_SUCCESS The results have been distributed or are awaiting
1598 @retval EFI_OUT_OF_RESOURCES Not enough memory to store the parts of the
1599 results that must be stored awaiting possible
1601 @retval EFI_INVALID_PARAMETER Passing in a NULL for the Configuration parameter
1602 would result in this type of error.
1603 @retval EFI_NOT_FOUND Target for the specified routing data was not
1609 HiiConfigRoutingRouteConfig (
1610 IN CONST EFI_HII_CONFIG_ROUTING_PROTOCOL
*This
,
1611 IN CONST EFI_STRING Configuration
,
1612 OUT EFI_STRING
*Progress
1618 This helper function is to be called by drivers to map configuration data stored
1619 in byte array ("block") formats such as UEFI Variables into current configuration strings.
1621 @param This A pointer to the EFI_HII_CONFIG_ROUTING_PROTOCOL
1623 @param ConfigRequest A null-terminated Unicode string in
1624 <ConfigRequest> format.
1625 @param Block Array of bytes defining the block's
1627 @param BlockSize Length in bytes of Block.
1628 @param Config Filled-in configuration string. String allocated
1629 by the function. Returned only if call is
1631 @param Progress A pointer to a string filled in with the offset
1632 of the most recent & before the first failing
1633 name/value pair (or the beginning of the string
1634 if the failure is in the first name / value pair)
1635 or the terminating NULL if all was successful.
1637 @retval EFI_SUCCESS The request succeeded. Progress points to the
1638 null terminator at the end of the ConfigRequest
1640 @retval EFI_OUT_OF_RESOURCES Not enough memory to allocate Config.
1641 Progress points to the first character of
1643 @retval EFI_INVALID_PARAMETER Passing in a NULL for the ConfigRequest or
1644 Block parameter would result in this type of
1645 error. Progress points to the first character of
1647 @retval EFI_NOT_FOUND Target for the specified routing data was not
1648 found. Progress points to the "G" in "GUID" of
1649 the errant routing data.
1650 @retval EFI_DEVICE_ERROR Block not large enough. Progress undefined.
1651 @retval EFI_INVALID_PARAMETER Encountered non <BlockName> formatted string.
1652 Block is left updated and Progress points at
1653 the '&' preceding the first non-<BlockName>.
1659 IN CONST EFI_HII_CONFIG_ROUTING_PROTOCOL
*This
,
1660 IN CONST EFI_STRING ConfigRequest
,
1661 IN CONST UINT8
*Block
,
1662 IN CONST UINTN BlockSize
,
1663 OUT EFI_STRING
*Config
,
1664 OUT EFI_STRING
*Progress
1669 This helper function is to be called by drivers to map configuration strings
1670 to configurations stored in byte array ("block") formats such as UEFI Variables.
1672 @param This A pointer to the EFI_HII_CONFIG_ROUTING_PROTOCOL
1674 @param ConfigResp A null-terminated Unicode string in <ConfigResp>
1676 @param Block A possibly null array of bytes representing the
1677 current block. Only bytes referenced in the
1678 ConfigResp string in the block are modified. If
1679 this parameter is null or if the *BlockSize
1680 parameter is (on input) shorter than required by
1681 the Configuration string, only the BlockSize
1682 parameter is updated and an appropriate status
1683 (see below) is returned.
1684 @param BlockSize The length of the Block in units of UINT8. On
1685 input, this is the size of the Block. On output,
1686 if successful, contains the largest index of the
1687 modified byte in the Block, or the required buffer
1688 size if the Block is not large enough.
1689 @param Progress On return, points to an element of the ConfigResp
1690 string filled in with the offset of the most
1691 recent '&' before the first failing name / value
1692 pair (or the beginning of the string if the
1693 failure is in the first name / value pair) or
1694 the terminating NULL if all was successful.
1696 @retval EFI_SUCCESS The request succeeded. Progress points to the
1697 null terminator at the end of the ConfigResp
1699 @retval EFI_OUT_OF_RESOURCES Not enough memory to allocate Config.
1700 Progress points to the first character of
1702 @retval EFI_INVALID_PARAMETER Passing in a NULL for the ConfigResp or
1703 Block parameter would result in this type of
1704 error. Progress points to the first character of
1706 @retval EFI_NOT_FOUND Target for the specified routing data was not
1707 found. Progress points to the "G" in "GUID" of
1708 the errant routing data.
1709 @retval EFI_INVALID_PARAMETER Encountered non <BlockName> formatted name /
1710 value pair. Block is left updated and
1711 Progress points at the '&' preceding the first
1713 @retval EFI_BUFFER_TOO_SMALL Block not large enough. Progress undefined.
1714 BlockSize is updated with the required buffer size.
1720 IN CONST EFI_HII_CONFIG_ROUTING_PROTOCOL
*This
,
1721 IN CONST EFI_STRING ConfigResp
,
1722 IN OUT UINT8
*Block
,
1723 IN OUT UINTN
*BlockSize
,
1724 OUT EFI_STRING
*Progress
1729 This helper function is to be called by drivers to extract portions of
1730 a larger configuration string.
1732 @param This A pointer to the EFI_HII_CONFIG_ROUTING_PROTOCOL
1734 @param Configuration A null-terminated Unicode string in
1735 <MultiConfigAltResp> format.
1736 @param Guid A pointer to the GUID value to search for in the
1737 routing portion of the ConfigResp string when
1738 retrieving the requested data. If Guid is NULL,
1739 then all GUID values will be searched for.
1740 @param Name A pointer to the NAME value to search for in the
1741 routing portion of the ConfigResp string when
1742 retrieving the requested data. If Name is NULL,
1743 then all Name values will be searched for.
1744 @param DevicePath A pointer to the PATH value to search for in the
1745 routing portion of the ConfigResp string when
1746 retrieving the requested data. If DevicePath is
1747 NULL, then all DevicePath values will be
1749 @param AltCfgId A pointer to the ALTCFG value to search for in
1750 the routing portion of the ConfigResp string
1751 when retrieving the requested data. If this
1752 parameter is NULL, then the current setting will
1754 @param AltCfgResp A pointer to a buffer which will be allocated by
1755 the function which contains the retrieved string
1756 as requested. This buffer is only allocated if
1757 the call was successful.
1759 @retval EFI_SUCCESS The request succeeded. The requested data was
1760 extracted and placed in the newly allocated
1762 @retval EFI_OUT_OF_RESOURCES Not enough memory to allocate AltCfgResp.
1763 @retval EFI_INVALID_PARAMETER Any parameter is invalid.
1764 @retval EFI_NOT_FOUND Target for the specified routing data was not
1771 IN CONST EFI_HII_CONFIG_ROUTING_PROTOCOL
*This
,
1772 IN CONST EFI_STRING Configuration
,
1773 IN CONST EFI_GUID
*Guid
,
1774 IN CONST EFI_STRING Name
,
1775 IN CONST EFI_DEVICE_PATH_PROTOCOL
*DevicePath
,
1776 IN CONST UINT16
*AltCfgId
,
1777 OUT EFI_STRING
*AltCfgResp
1782 Compare whether two names of languages are identical.
1784 @param Language1 Name of language 1 from StringPackage
1785 @param Language2 Name of language 2 to be compared with language 1.
1788 @retval FALSE not same
1792 HiiCompareLanguage (
1793 IN CHAR8
*Language1
,
1801 extern EFI_EVENT gHiiKeyboardLayoutChanged
;