2 The file provides Database manager for HII-related data
5 Copyright (c) 2006 - 2007, Intel Corporation
6 All rights reserved. This program and the accompanying materials
7 are licensed and made available under the terms and conditions of the BSD License
8 which accompanies this distribution. The full text of the license may be found at
9 http://opensource.org/licenses/bsd-license.php
11 THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
12 WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
16 #ifndef __HII_DATABASE_H__
17 #define __HII_DATABASE_H__
19 #error "UEFI 2.1 HII is not fully implemented for now, Please don't include this file now."
21 #define EFI_HII_DATABASE_PROTOCOL_GUID \
22 { 0xef9fc172, 0xa1b2, 0x4693, { 0xb3, 0x27, 0x6d, 0x32, 0xfc, 0x41, 0x60, 0x42 } }
25 typedef struct _EFI_HII_DATABASE_PROTOCOL EFI_HII_DATABASE_PROTOCOL
;
28 // ConfigurationS of HII.
31 #define GLYPH_HEIGHT 19
35 Each package starts with a header, as defined above, which
36 indicates the size and type of the package. When added to a
37 pointer pointing to the start of the header, Length points at
38 the next package. The package lists form a package list when
39 concatenated together and terminated with an
40 EFI_HII_PACKAGE_HEADER with a Type of EFI_HII_PACKAGE_END. The
41 type EFI_HII_PACKAGE_TYPE_GUID is used for vendor-defined HII
42 packages, whose contents are determined by the Guid. The range
43 of package types starting with EFI_HII_PACKAGE_TYPE_SYSTEM_BEGIN
44 through EFI_HII_PACKAGE_TYPE_SYSTEM_END are reserved for system
45 firmware implementers.
47 @param Length The size of the package in bytes.
49 @param Type The package type. See EFI_HII_PACKAGE_TYPE_x,
52 @param Data The package data, the format of which is
60 } EFI_HII_PACKAGE_HEADER
;
63 // EFI_HII_PACKAGE_TYPE_x.
65 #define EFI_HII_PACKAGE_TYPE_ALL 0x00
66 #define EFI_HII_PACKAGE_TYPE_GUID 0x01
67 #define EFI_HII_PACKAGE_FORM_CONFIG 0x02
68 #define EFI_HII_PACKAGE_FORM_APP 0x03
69 #define EFI_HII_PACKAGE_STRINGS 0x04
70 #define EFI_HII_PACKAGE_FONTS 0x05
71 #define EFI_HII_PACKAGE_IMAGES 0x06
72 #define EFI_HII_PACKAGE_SIMPLE_FONTS 0x07
73 #define EFI_HII_PACKAGE_DEVICE_PATH 0x08
74 #define EFI_HII_PACKAGE_END 0x09
75 #define EFI_HII_PACKAGE_TYPE_SYSTEM_BEGIN 0xE0
76 #define EFI_HII_PACKAGE_TYPE_SYSTEM_END 0xFF
81 This header uniquely identifies the package list.and is placed
82 in front of a list of packages. Package lists with the same
83 PackageListGuid value should contain the same data set. Updated
84 versions should have updated GUIDs.
86 @param PackageListGuid The unique identifier applied to the
87 list of packages which follows.
90 @param PackageLength The size of the package list (in
91 bytes), including the header.
95 EFI_GUID PackageListGuid
;
97 } EFI_HII_PACKAGE_LIST_HEADER
;
101 The fonts must be presented in Unicode sort order. That is,
102 the primary sort key is the UnicodeWeight and the secondary
103 sort key is the SurrogateWeight. It is up to developers who
104 manage fonts to choose efficient mechanisms for accessing
105 fonts. The contiguous presentation can easily be used because
106 narrow and wide glyphs are not intermixed, so a binary search
107 is possible (hence the requirement that the glyphs be sorted
110 @param Header The header contains a Length and Type field.
111 In the case of a font package, the type will
112 be EFI_HII_PACKAGE_SIMPLE_FONTS and the length
113 will be the total size of the font package
114 including the size of the narrow and wide
115 glyphs. See EFI_HII_PACKAGE_HEADER.
117 @param NumberOfNarrowGlyphs The number of NarrowGlyphs that
118 are included in the font package.
120 @param NumberOfWideGlyphs The number of WideGlyphs that are
121 included in the font package.
123 @param NarrowGlyphs An array of EFI_NARROW_GLYPH entries.
124 The number of entries is specified by
125 NumberOfNarrowGlyphs.
127 @param WideGlyphs An array of EFI_WIDE_GLYPH entries. The
128 number of entries is specified by
129 NumberOfWideGlyphs. To calculate the
130 offset of WideGlyphs, use the offset of
131 NarrowGlyphs and add the size of
132 EFI_NARROW_GLYPH multiplied by the
133 NumberOfNarrowGlyphs.
136 typedef struct _EFI_HII_SIMPLE_FONT_PACKAGE_HDR
{
137 EFI_HII_PACKAGE_HEADER Header
;
138 UINT16 NumberOfNarrowGlyphs
;
139 UINT16 NumberOfWideGlyphs
;
140 // EFI_NARROW_GLYPH NarrowGlyphs[];
141 // EFI_WIDE_GLYPH WideGlyphs[];
142 } EFI_HII_SIMPLE_FONT_PACKAGE_HDR
;
145 // Contents of EFI_NARROW_GLYPH.Attributes
147 #define EFI_GLYPH_NON_SPACING 0x01
148 #define EFI_GLYPH_WIDE 0x02
152 Glyphs are represented by two structures, one each for the two
153 sizes of glyphs. The narrow glyph (EFI_NARROW_GLYPH) is the
154 normal glyph used for text display.
156 @param UnicodeWeight The Unicode representation of the glyph.
157 The term weight is the technical term
158 for a character value.
160 @param Attributes The data element containing the glyph
161 definitions; see Related Definitions
164 @param GlyphCol1 The column major glyph representation of the
165 character. Bits with values of one
166 indicate that the corresponding pixel is to
167 be on when normally displayed; those with
172 CHAR16 UnicodeWeight
;
179 Glyphs are represented via the two structures, one each for the
180 two sizes of glyphs. The wide glyph (EFI_WIDE_GLYPH) is large
181 enough to display logographic characters.
183 @param UnicodeWeight The Unicode representation of the glyph.
184 The term weight is the technical term
185 for a character value.
187 @param Attributes The data element containing the glyph
188 definitions; see Related Definitions in
189 EFI_NARROW_GLYPH for attribute values.
191 @param GlyphCol1, GlyphCol2 The column major glyph
192 representation of the character.
193 Bits with values of one indicate
194 that the corresponding pixel is
195 to be on when normally
196 displayed; those with zero are
199 @param Pad Ensures that sizeof(EFI_WIDE_GLYPH) is twice the
200 sizeof(EFI_NARROW_GLYPH). The contents of Pad must
206 CHAR16 UnicodeWeight
;
208 UINT8 GlyphCol1
[GLYPH_HEIGHT
];
209 UINT8 GlyphCol2
[GLYPH_HEIGHT
];
215 // EFI_HII_FONT_STYLE
217 typedef UINT32 EFI_HII_FONT_STYLE
;
218 #define EFI_HII_FONT_STYLE_BOLD 0x00000001
219 #define EFI_HII_FONT_STYLE_ITALIC 0x00000002
220 #define EFI_HII_FONT_STYLE_EMBOSS 0x00010000
221 #define EFI_HII_FONT_STYLE_OUTLINE 0x00020000
222 #define EFI_HII_FONT_STYLE_SHADOW 0x00040000
223 #define EFI_HII_FONT_STYLE_UNDERLINE 0x00080000
224 #define EFI_HII_FONT_STYLE_DBL_UNDER 0x00100000
227 // EFI_HII_GLYPH_BLOCK.BlockType
229 #define EFI_HII_GIBT_END 0x00
230 #define EFI_HII_GIBT_GLYPH 0x10
231 #define EFI_HII_GIBT_GLYPHS 0x11
232 #define EFI_HII_GIBT_GLYPH_DEFAULT 0x12
233 #define EFI_HII_GIBT_GLYPHS_DEFAULT 0x13
234 #define EFI_HII_GIBT_DUPLICATE 0x20
235 #define EFI_HII_GIBT_SKIP2 0x21
236 #define EFI_HII_GIBT_SKIP1 0x22
237 #define EFI_HII_GIBT_DEFAULTS 0x23
238 #define EFI_HII_GIBT_EXT1 0x30
239 #define EFI_HII_GIBT_EXT2 0x31
240 #define EFI_HII_GIBT_EXT4 0x32
244 EFI_HII_GIBT_END block is found. When processing the glyph
245 blocks, each block refers to the current character value
246 (CharValueCurrent), which is initially set to one (1). Glyph
247 blocks of an unknown type should be skipped. If they cannot be
248 skipped, then processing halts.
251 typedef struct _EFI_HII_GLYPH_BLOCK
{
254 } EFI_HII_GLYPH_BLOCK
;
259 @param Width Width of the character or character cell, in
260 pixels. For fixed-pitch fonts, this is the same
263 @param Height Height of the character or character cell, in
266 @param OffsetX Offset to the horizontal edge of the character
269 @param OffsetY Offset to the vertical edge of the character
272 @param AdvanceX Number of pixels to advance to the right
273 when moving from the origin of the current
274 glyph to the origin of the next glyph.
277 typedef struct _EFI_HII_GLYPH_INFO
{
283 } EFI_HII_GLYPH_INFO
;
288 Changes the default cell information used for subsequent
289 EFI_HII_GIBT_GLYPH_DEFAULT and EFI_HII_GIBT_GLYPHS_DEFAULT glyph
290 blocks. The cell information described by Cell remains in effect
291 until the next EFI_HII_GIBT_DEFAULTS is found. Prior to the
292 first EFI_HII_GIBT_DEFAULTS block, the cell information in the
293 fixed header are used.
295 @param Header Standard glyph block header, where
296 Header.BlockType = EFI_HII_GIBT_DEFAULTS.
298 @param Cell The new default cell information which will be
299 applied to all subsequent GLYPH_DEFAULT and
300 GLYPHS_DEFAULT blocks.
303 typedef struct _EFI_HII_GIBT_DEFAULTS_BLOCK
{
304 EFI_HII_GLYPH_BLOCK Header
;
305 EFI_HII_GLYPH_INFO Cell
;
306 } EFI_HII_GIBT_DEFAULTS_BLOCK
;
311 Indicates that the glyph with character value CharValueCurrent
312 has the same glyph as a previously defined character value and
313 increments CharValueCurrent by one.
315 @param Header Standard glyph block header, where
316 Header.BlockType = EFI_HII_GIBT_DUPLICATE.
318 @param CharValue The previously defined character value with
319 the exact same glyph.
322 typedef struct _EFI_HII_GIBT_DUPLICATE_BLOCK
{
323 EFI_HII_GLYPH_BLOCK Header
;
325 } EFI_HII_GIBT_DUPLICATE_BLOCK
;
330 Any glyphs with a character value greater than or equal to
331 CharValueCurrent are empty.
333 @param Header Standard glyph block header, where
334 Header.BlockType = EFI_HII_GIBT_END.
337 typedef struct _EFI_GLYPH_GIBT_END_BLOCK
{
338 EFI_HII_GLYPH_BLOCK Header
;
339 } EFI_GLYPH_GIBT_END_BLOCK
;
343 These are reserved for future expansion, with length bytes
344 included so that they can be easily skipped.
346 @param Header Standard glyph block header, where
347 Header.BlockType = EFI_HII_GIBT_EXT1,
348 EFI_HII_GIBT_EXT2 or EFI_HII_GIBT_EXT4.
350 @param Length Size of the glyph block, in bytes.
353 typedef struct _EFI_HII_GIBT_EXT1_BLOCK
{
354 EFI_HII_GLYPH_BLOCK Header
;
357 } EFI_HII_GIBT_EXT1_BLOCK
;
362 These are reserved for future expansion, with length bytes
363 included so that they can be easily skipped.
365 @param Header Standard glyph block header, where
366 Header.BlockType = EFI_HII_GIBT_EXT1,
367 EFI_HII_GIBT_EXT2 or EFI_HII_GIBT_EXT4.
369 @param Length Size of the glyph block, in bytes.
372 typedef struct _EFI_HII_GIBT_EXT2_BLOCK
{
373 EFI_HII_GLYPH_BLOCK Header
;
376 } EFI_HII_GIBT_EXT2_BLOCK
;
380 These are reserved for future expansion, with length bytes
381 included so that they can be easily skipped.
383 @param Header Standard glyph block header, where
384 Header.BlockType = EFI_HII_GIBT_EXT1,
385 EFI_HII_GIBT_EXT2 or EFI_HII_GIBT_EXT4.
387 @param Length Size of the glyph block, in bytes.
390 typedef struct _EFI_HII_GIBT_EXT4_BLOCK
{
391 EFI_HII_GLYPH_BLOCK Header
;
394 } EFI_HII_GIBT_EXT4_BLOCK
;
399 This block provides the bitmap for the character with the value
400 CharValueCurrent and increments CharValueCurrent by one. Each
401 glyph contains a glyph width and height, a drawing offset,
402 number of pixels to advance after drawing and then the encoded
405 @param Header Standard glyph block header, where
406 Header.BlockType = EFI_HII_GIBT_GLYPH.
408 @param Cell Contains the width and height of the encoded
409 bitmap (Cell.Width and Cell.Height), the number
410 of pixels (signed) right of the character cell
411 origin where the left edge of the bitmap should
412 be placed (Cell.OffsetX), the number of pixels
413 above the character cell origin where the top
414 edge of the bitmap should be placed
415 (Cell.OffsetY) and the number of pixels (signed)
416 to move right to find the origin for the next
417 charactercell (Cell.AdvanceX).
419 @param GlyphCount The number of glyph bitmaps.
421 @param BitmapData The bitmap data specifies a series of
422 pixels, one bit per pixel, left-to-right,
423 top-tobottom. Each glyph bitmap only
424 encodes the portion of the bitmap enclosed
425 by its character-bounding box, but the
426 entire glyph is padded out to the nearest
427 byte. The number of bytes per bitmap can
428 be calculated as: ((Cell.Width + 7)/8) *
433 typedef struct _EFI_HII_GIBT_GLYPH_BLOCK
{
434 EFI_HII_GLYPH_BLOCK Header
;
435 EFI_HII_GLYPH_INFO Cell
;
438 } EFI_HII_GIBT_GLYPH_BLOCK
;
442 Provides the bitmaps for the characters with the values
443 CharValueCurrent through CharValueCurrent + Count -1 and
444 increments CharValueCurrent by Count. These glyphs have
445 identical cell information and the encoded bitmaps are exactly
446 the same number of byes.
448 @param Header Standard glyph block header, where
449 Header.BlockType = EFI_HII_GIBT_GLYPHS.
451 @param Cell Contains the width and height of the encoded
452 bitmap (Cell.Width and Cell.Height), the
453 number of pixels (signed) right of the
454 character cell origin where the left edge of
455 the bitmap should be placed (Cell.OffsetX),
456 the number of pixels above the character cell
457 origin where the top edge of the bitmap should
458 be placed (Cell.OffsetY) and the number of
459 pixels(signed) to move right to find the
460 origin for the next character cell
463 @param BitmapData The bitmap data specifies a series of
464 pixels, one bit per pixel, left-to-right,
465 top-tobottom, for each glyph. Each glyph
466 bitmap only encodes the portion of the
467 bitmap enclosed by its character-bounding
468 box. The number of bytes per bitmap can be
469 calculated as: ((Cell.Width + 7)/8) *
473 typedef struct _EFI_HII_GIBT_GLYPHS_BLOCK
{
474 EFI_HII_GLYPH_BLOCK Header
;
475 EFI_HII_GLYPH_INFO Cell
;
477 } EFI_HII_GIBT_GLYPHS_BLOCK
;
481 Provides the bitmap for the character with the value
482 CharValueCurrent and increments CharValueCurrent by 1. This
483 glyph uses the default cell information. The default cell
484 information is found in the font header or the most recently
485 processed EFI_HII_GIBT_DEFAULTS.
487 @param Header Standard glyph block header, where
488 Header.BlockType = EFI_HII_GIBT_GLYPH_DEFAULT.
490 @param BitmapData The bitmap data specifies a series of
491 pixels, one bit per pixel, left-to-right,
492 top-tobottom. Each glyph bitmap only
493 encodes the portion of the bitmap enclosed
494 by its character-bounding box. The number
495 of bytes per bitmap can be calculated as:
496 ((Global.Cell.Width + 7)/8) *
500 typedef struct _EFI_HII_GIBT_GLYPH_DEFAULT_BLOCK
{
501 EFI_HII_GLYPH_BLOCK Header
;
503 } EFI_HII_GIBT_GLYPH_DEFAULT_BLOCK
;
510 Provides the bitmaps for the characters with the values
511 CharValueCurrent through CharValueCurrent + Count -1 and
512 increments CharValueCurrent by Count. These glyphs use the
513 default cell information and the encoded bitmaps have exactly
514 the same number of byes.
516 @param Header Standard glyph block header, where
518 EFI_HII_GIBT_GLYPHS_DEFAULT.
520 @param Count Number of glyphs in the glyph block.
522 @param BitmapData The bitmap data specifies a series of
523 pixels, one bit per pixel, left-to-right,
524 top-tobottom, for each glyph. Each glyph
525 bitmap only encodes the portion of the
526 bitmap enclosed by its character-bounding
527 box. The number of bytes per bitmap can be
528 calculated as: ((Global.Cell.Width + 7)/8)
532 typedef struct _EFI_HII_GIBT_GLYPHS_DEFAULT_BLOCK
{
533 EFI_HII_GLYPH_BLOCK Header
;
536 } EFI_HII_GIBT_GLYPHS_DEFAULT_BLOCK
;
540 Increments the current character value CharValueCurrent by the
543 @param Header Standard glyph block header, where BlockType =
544 EFI_HII_GIBT_SKIP1 or EFI_HII_GIBT_SKIP2.
546 @param SkipCount The unsigned 8- or 16-bit value to add to
550 typedef struct _EFI_HII_GIBT_SKIP2_BLOCK
{
551 EFI_HII_GLYPH_BLOCK Header
;
553 } EFI_HII_GIBT_SKIP2_BLOCK
;
558 Increments the current character value CharValueCurrent by the
561 @param Header Standard glyph block header, where BlockType =
562 EFI_HII_GIBT_SKIP1 or EFI_HII_GIBT_SKIP2.
564 @param SkipCount The unsigned 8- or 16-bit value to add to
568 typedef struct _EFI_HII_GIBT_SKIP1_BLOCK
{
569 EFI_HII_GLYPH_BLOCK Header
;
571 } EFI_HII_GIBT_SKIP1_BLOCK
;
576 This package is created by NewPackageList() when the package
577 list is first added to the HII database by locating the
578 EFI_DEVICE_PATH_PROTOCOL attached to the driver handle passed in
582 typedef EFI_DEVICE_PATH_PROTOCOL EFI_HII_DEVICE_PATH_PACKAGE_HDR
;
587 This is a free-form package type designed to allow extensibility
588 by allowing the format to be specified using Guid.
590 @param Guid Identifier which describes the remaining data
594 typedef struct _EFI_HII_GUID_PACKAGE_HDR
{
596 } EFI_HII_GUID_PACKAGE_HDR
;
601 The Strings package record describes the mapping between string
602 identifiers and the actual text of the strings themselves. The
603 package consists of three parts: a fixed header, the string
604 information and the font information.
606 @param Header The standard package header, where Header.Type
607 = EFI_HII_PACKAGE_STRINGS.
609 @param HdrSize Size of this header.
611 @param StringInfoOffset Offset, relative to the start of
612 this header, of the string information.
614 @param LanguageWindow Specifies the default values placed in
615 the static and dynamic windows before
616 processing each SCSU-encoded strings.
619 @param LanguageName String identifier within the current
620 string package of the full name of the
621 language specified by Language. Language
622 Language of the strings, as specified by
626 typedef struct _EFI_HII_STRING_PACKAGE_HDR
{
627 EFI_HII_PACKAGE_HEADER Header
;
629 UINT32 StringInfoOffset
;
630 CHAR16 LanguageWindow
[16];
631 EFI_STRING_ID LanguageName
;
633 } EFI_HII_STRING_PACKAGE_HDR
;
639 The fixed header consists of a standard record header and then
640 the character values in this section, the flags (including the
641 encoding method) and the offsets of the glyph information, the
642 glyph bitmaps and the character map.
644 @param Header The standard package header, where Header.Size
645 EFI_HII_PACKAGE_FONTS.
647 @param HdrSize Size of this header.
649 @param GlyphInfoOffset The offset, relative to the start of
650 this header, of a series of
651 variable-length glyph blocks, each
652 describing information about the
653 bitmap associated with a glyph.
655 @param Cell This contains the measurement of the widest and
656 tallest characters in the font (Cell.Width and
657 Cell.Height). It also contains the offset to the
658 horizontal and vertical origin point of the
659 character cell (Cell.OffsetX and Cell.OffsetY).
660 Finally, it contains the default AdvanceX. The
661 individual glyph's OffsetX and OffsetY value is
662 added to this position to determine where to
663 draw the top-left pixel of the character's
664 glyph. The character glyph's AdvanceX is added
665 to this position to determine the origin point
666 for the next character.
668 @param FontStyle The design style of the font, 1 bit per
669 style. See EFI_HII_FONT_STYLE.
671 @param FontFamily The null-terminated string with the name
672 of the font family to which the font
676 typedef struct _EFI_HII_FONT_PACKAGE_HDR
{
677 EFI_HII_PACKAGE_HEADER Header
;
679 UINT32 GlyphBlockOffset
;
680 EFI_HII_GLYPH_INFO Cell
;
681 EFI_HII_FONT_STYLE FontStyle
;
682 CHAR16 FontFamily
[1];
683 } EFI_HII_FONT_PACKAGE_HDR
;
687 // EFI_HII_STRING_BLOCK.BlockType
689 #define FI_HII_SIBT_END 0x00
690 #define EFI_HII_SIBT_STRING_SCSU 0x10
691 #define EFI_HII_SIBT_STRING_SCSU_FONT 0x11
692 #define EFI_HII_SIBT_STRINGS_SCSU 0x12
693 #define EFI_HII_SIBT_STRINGS_SCSU_FONT 0x13
694 #define EFI_HII_SIBT_STRING_UCS2 0x14
695 #define EFI_HII_SIBT_STRING_UCS2_FONT 0x15
696 #define EFI_HII_SIBT_STRINGS_UCS2 0x16
697 #define EFI_HII_SIBT_STRINGS_UCS2_FONT 0x17
698 #define EFI_HII_SIBT_DUPLICATE 0x20
699 #define EFI_HII_SIBT_SKIP2 0x21
700 #define EFI_HII_SIBT_SKIP1 0x22
701 #define EFI_HII_SIBT_EXT1 0x30
702 #define EFI_HII_SIBT_EXT2 0x31
703 #define EFI_HII_SIBT_EXT4 0x32
704 #define EFI_HII_SIBT_FONT 0x40
708 String blocks specify the text and font for the current string
709 identifier and increment to the next string identifier.
714 } EFI_HII_STRING_BLOCK
;
719 Indicates that the string with string identifier
720 StringIdCurrent is the same as a previously defined string and
721 increments StringIdCurrent by one.
723 @param Header Standard string block header, where
724 Header.BlockType = EFI_HII_SIBT_DUPLICATE.
726 @param StringId The string identifier of a previously
727 defined string with the exact same string
732 typedef struct _EFI_HII_SIBT_DUPLICATE_BLOCK
{
733 EFI_HII_STRING_BLOCK Header
;
734 EFI_STRING_ID StringId
;
735 } EFI_HII_SIBT_DUPLICATE_BLOCK
;
739 Any strings with a string identifier greater than or equal to
740 StringIdCurrent are empty.
742 @param Header Standard string block header, where
743 Header.BlockType = EFI_HII_SIBT_END.
746 typedef struct _EFI_HII_SIBT_END_BLOCK
{
747 EFI_HII_STRING_BLOCK Header
;
748 } EFI_HII_SIBT_END_BLOCK
;
753 These are reserved for future expansion, with length bytes
754 included so that they can be easily skip
756 @param Header Standard string block header, where
757 Header.BlockType = EFI_HII_SIBT_EXT1,
758 EFI_HII_SIBT_EXT2 or EFI_HII_SIBT_EXT4.
760 @param Length Size of the string block, in bytes.
763 typedef struct _EFI_HII_SIBT_EXT1_BLOCK
{
764 EFI_HII_STRING_BLOCK Header
;
767 } EFI_HII_SIBT_EXT1_BLOCK
;
771 These are reserved for future expansion, with length bytes
772 included so that they can be easily skip
774 @param Header Standard string block header, where
775 Header.BlockType = EFI_HII_SIBT_EXT1,
776 EFI_HII_SIBT_EXT2 or EFI_HII_SIBT_EXT4.
778 @param Length Size of the string block, in bytes.
781 typedef struct _EFI_HII_SIBT_EXT2_BLOCK
{
782 EFI_HII_STRING_BLOCK Header
;
785 } EFI_HII_SIBT_EXT2_BLOCK
;
789 These are reserved for future expansion, with length bytes
790 included so that they can be easily skip
792 @param Header Standard string block header, where
793 Header.BlockType = EFI_HII_SIBT_EXT1,
794 EFI_HII_SIBT_EXT2 or EFI_HII_SIBT_EXT4.
796 @param Length Size of the string block, in bytes.
799 typedef struct _EFI_HII_SIBT_EXT4_BLOCK
{
800 EFI_HII_STRING_BLOCK Header
;
803 } EFI_HII_SIBT_EXT4_BLOCK
;
807 Associates a font identifier FontId with a font name FontName,
808 size FontSize and style FontStyle. This font identifier may be
809 used with the string blocks. The font identifier 0 is the
810 default font for those string blocks which do not specify a font
813 @param Header Standard extended header, where
814 Header.BlockType = EFI_HII_SIBT_FONT.
816 @param FontId Font identifier, which must be unique within
819 @param FontSize Character cell size, in pixels, of the font.
821 @param FontStyle Font style.
823 @param FontName Null-terminated font family name.
826 typedef struct _EFI_HII_SIBT_FONT_BLOCK
{
827 EFI_HII_SIBT_EXT2_BLOCK Header
;
830 EFI_HII_FONT_STYLE FontStyle
;
832 } EFI_HII_SIBT_FONT_BLOCK
;
836 Increments the current string identifier StringIdCurrent by the
839 @param Header Standard string block header, where
840 Header.BlockType = EFI_HII_SIBT_SKIP1.
842 @param SkipCount The unsigned 8-bit value to add to
846 typedef struct _EFI_HII_SIBT_SKIP1_BLOCK
{
847 EFI_HII_STRING_BLOCK Header
;
849 } EFI_HII_SIBT_SKIP1_BLOCK
;
853 Increments the current string identifier StringIdCurrent by
854 the number specified.
856 @param Header Standard string block header, where
857 Header.BlockType = EFI_HII_SIBT_SKIP2.
859 @param SkipCount The unsigned 16-bit value to add to
863 typedef struct _EFI_HII_SIBT_SKIP2_BLOCK
{
864 EFI_HII_STRING_BLOCK Header
;
866 } EFI_HII_SIBT_SKIP2_BLOCK
;
870 This string block provides the SCSU-encoded text for the string
871 in the default font with string identifier StringIdCurrent and
872 increments StringIdCurrent by one.
874 @param Header Standard header where Header.BlockType =
875 EFI_HII_SIBT_STRING_SCSU.
877 @param StringText The string text is a null-terminated
878 string, which is assigned to the string
879 identifier StringIdCurrent.
882 typedef struct _EFI_HII_SIBT_STRING_SCSU_BLOCK
{
883 EFI_HII_STRING_BLOCK Header
;
885 } EFI_HII_SIBT_STRING_SCSU_BLOCK
;
890 This string block provides the SCSU-encoded text for the string
891 in the font specified by FontIdentifier with string identifier
892 StringIdCurrent and increments StringIdCurrent by one.
894 @param Header Standard string block header, where
895 Header.BlockType = EFI_HII_SIBT_STRING_SCSU_FONT.
897 @param FontIdentifier The identifier of the font to be used
898 as the starting font for the entire
899 string. The identifier must either be
900 0 for the default font or an
901 identifier previously specified by an
902 EFI_HII_SIBT_FONT block. Any string
903 characters that deviates from this
904 font family, size or style must
905 provide an explicit control character.
907 @param StringText The string text is a null-terminated
908 encoded string, which is assigned to the
909 string identifier StringIdCurrent.
913 typedef struct _EFI_HII_SIBT_STRING_SCSU_FONT_BLOCK
{
914 EFI_HII_STRING_BLOCK Header
;
915 UINT8 FontIdentifier
;
917 } EFI_HII_SIBT_STRING_SCSU_FONT_BLOCK
;
922 This string block provides the SCSU-encoded text for StringCount
923 strings which have the default font and which have sequential
924 string identifiers. The strings are assigned the identifiers,
925 starting with StringIdCurrent and continuing through
926 StringIdCurrent + StringCount ??C 1. StringIdCurrent is
927 incremented by StringCount.
929 @param Header Standard header where Header.BlockType =
930 EFI_HII_SIBT_STRINGS_SCSU.
932 @param StringCount Number of strings in StringText.
934 @param StringText The strings, where each string is a
935 null-terminated encoded string.
938 typedef struct _EFI_HII_SIBT_STRINGS_SCSU_BLOCK
{
939 EFI_HII_STRING_BLOCK Header
;
942 } EFI_HII_SIBT_STRINGS_SCSU_BLOCK
;
947 This string block provides the SCSU-encoded text for StringCount
948 strings which have the font specified by FontIdentifier and
949 which have sequential string identifiers. The strings are
950 assigned the identifiers, starting with StringIdCurrent and
951 continuing through StringIdCurrent + StringCount ??C 1.
952 StringIdCurrent is incremented by StringCount.
954 @param Header Standard header where Header.BlockType =
955 EFI_HII_SIBT_STRINGS_SCSU_FONT.
957 @param StringCount Number of strings in StringText.
959 @param FontIdentifier The identifier of the font to be used
960 as the starting font for the entire
961 string. The identifier must either be
962 0 for the default font or an
963 identifier previously specified by an
964 EFI_HII_SIBT_FONT block. Any string
965 characters that deviates from this
966 font family, size or style must
967 provide an explicit control character.
969 @param StringText The strings, where each string is a
970 null-terminated encoded string.
973 typedef struct _EFI_HII_SIBT_STRINGS_SCSU_FONT_BLOCK
{
974 EFI_HII_STRING_BLOCK Header
;
976 UINT8 FontIdentifier
;
978 } EFI_HII_SIBT_STRINGS_SCSU_FONT_BLOCK
;
983 This string block provides the UCS-2 encoded text for the string
984 in the default font with string identifier StringIdCurrent and
985 increments StringIdCurrent by one.
987 @param Header Standard header where Header.BlockType =
988 EFI_HII_SIBT_STRING_UCS2.
990 @param StringText The string text is a null-terminated UCS-2
991 string, which is assigned to the string
992 identifier StringIdCurrent.
995 typedef struct _EFI_HII_SIBT_STRING_UCS2_BLOCK
{
996 EFI_HII_STRING_BLOCK Header
;
997 CHAR16 StringText
[1];
998 } EFI_HII_SIBT_STRING_UCS2_BLOCK
;
1003 This string block provides the UCS-2 encoded text for the string
1004 in the font specified by FontIdentifier with string identifier
1005 StringIdCurrent and increments StringIdCurrent by one
1007 @param Header Standard header where Header.BlockType =
1008 EFI_HII_SIBT_STRING_UCS2_FONT.
1010 @param FontIdentifier The identifier of the font to be used
1011 as the starting font for the entire
1012 string. The identifier must either be
1013 0 for the default font or an
1014 identifier previously specified by an
1015 EFI_HII_SIBT_FONT block. Any string
1016 characters that deviates from this
1017 font family, size or style must
1018 provide an explicit control character.
1020 @param StringText The string text is a null-terminated UCS-2
1021 string, which is assigned to the string
1022 identifier StringIdCurrent.
1025 typedef struct _EFI_HII_SIBT_STRING_UCS2_FONT_BLOCK
{
1026 EFI_HII_STRING_BLOCK Header
;
1027 UINT8 FontIdentifier
;
1028 CHAR16 StringText
[1];
1029 } EFI_HII_SIBT_STRING_UCS2_FONT_BLOCK
;
1034 This string block provides the UCS-2 encoded text for the
1035 strings in the default font with string identifiers
1036 StringIdCurrent to StringIdCurrent + StringCount - 1 and
1037 increments StringIdCurrent by StringCount.
1039 @param Header Standard header where Header.BlockType =
1040 EFI_HII_SIBT_STRINGS_UCS2.
1042 @param StringCount Number of strings in StringText.
1044 @param StringText The string text is a series of
1045 null-terminated UCS-2 strings, which are
1046 assigned to the string identifiers
1047 StringIdCurrent.to StringIdCurrent +
1051 typedef struct _EFI_HII_SIBT_STRINGS_UCS2_BLOCK
{
1052 EFI_HII_STRING_BLOCK Header
;
1054 CHAR16 StringText
[1];
1055 } EFI_HII_SIBT_STRINGS_UCS2_BLOCK
;
1060 The fixed header consists of a standard record header and the
1061 offsets of the image and palette information.
1063 @param Header Standard package header, where Header.Type =
1064 EFI_HII_PACKAGE_IMAGES. ImageInfoOffset
1065 Offset, relative to this header, of the image
1066 information. If this is zero, then there are
1067 no images in the package.
1069 @param PaletteInfoOffset Offset, relative to this header, of
1070 the palette information. If this is
1071 zero, then there are no palettes in
1075 typedef struct _EFI_HII_IMAGE_PACKAGE_HDR
{
1076 EFI_HII_PACKAGE_HEADER Header
;
1077 UINT32 ImageInfoOffset
;
1078 UINT32 PaletteInfoOffset
;
1079 } EFI_HII_IMAGE_PACKAGE_HDR
;
1083 // EFI_HII_IMAGE_BLOCK
1085 typedef struct _EFI_HII_IMAGE_BLOCK
{
1088 } EFI_HII_IMAGE_BLOCK
;
1091 // EFI_HII_IMAGE_BLOCK.BlockType.
1093 #define EFI_HII_IIBT_END 0x00
1094 #define EFI_HII_IIBT_IMAGE_1BIT 0x10
1095 #define EFI_HII_IIBT_IMAGE_1BIT_TRANS 0x11
1096 #define EFI_HII_IIBT_IMAGE_4BIT 0x12
1097 #define EFI_HII_IIBT_IMAGE_4BIT_TRANS 0x13
1098 #define EFI_HII_IIBT_IMAGE_8BIT 0x14
1099 #define EFI_HII_IIBT_IMAGE_8BIT_TRANS 0x15
1100 #define EFI_HII_IIBT_IMAGE_24BIT 0x16
1101 #define EFI_HII_IIBT_IMAGE_24BIT_TRANS 0x17
1102 #define EFI_HII_IIBT_IMAGE_JPEG 0x18
1103 #define EFI_HII_IIBT_DUPLICATE 0x20
1104 #define EFI_HII_IIBT_SKIP2 0x21
1105 #define EFI_HII_IIBT_SKIP1 0x22
1106 #define EFI_HII_IIBT_EXT1 0x30
1107 #define EFI_HII_IIBT_EXT2 0x31
1108 #define EFI_HII_IIBT_EXT4 0x32
1113 Any images with an image identifier greater than or equal to
1114 ImageIdCurrent are empty.
1116 @param Header Standard image block header, where
1117 Header.BlockType = EFI_HII_IIBT_END.
1120 typedef struct _EFI_HII_IIBT_END_BLOCK
{
1121 EFI_HII_IMAGE_BLOCK Header
;
1122 } EFI_HII_IIBT_END_BLOCK
;
1127 Future extensions for image records which need a length-byte
1128 length use this prefix.
1130 @param Header Standard image block header, where
1131 Header.BlockType = EFI_HII_IIBT_EXT1,
1132 EFI_HII_IIBT_EXT2 or EFI_HII_IIBT_EXT4.
1134 @param Length Size of the image block, in bytes, including
1135 the image block header.
1138 typedef struct _EFI_HII_IIBT_EXT1_BLOCK
{
1139 EFI_HII_IMAGE_BLOCK Header
;
1142 } EFI_HII_IIBT_EXT1_BLOCK
;
1146 Future extensions for image records which need a length-byte
1147 length use this prefix.
1149 @param Header Standard image block header, where
1150 Header.BlockType = EFI_HII_IIBT_EXT1,
1151 EFI_HII_IIBT_EXT2 or EFI_HII_IIBT_EXT4.
1153 @param Length Size of the image block, in bytes, including
1154 the image block header.
1157 typedef struct _EFI_HII_IIBT_EXT2_BLOCK
{
1158 EFI_HII_IMAGE_BLOCK Header
;
1161 } EFI_HII_IIBT_EXT2_BLOCK
;
1165 Future extensions for image records which need a length-byte
1166 length use this prefix.
1168 @param Header Standard image block header, where
1169 Header.BlockType = EFI_HII_IIBT_EXT1,
1170 EFI_HII_IIBT_EXT2 or EFI_HII_IIBT_EXT4.
1172 @param Length Size of the image block, in bytes, including
1173 the image block header.
1176 typedef struct _EFI_HII_IIBT_EXT4_BLOCK
{
1177 EFI_HII_IMAGE_BLOCK Header
;
1180 } EFI_HII_IIBT_EXT4_BL0CK
;
1183 // EFI_HII_IIBT_IMAGE_1BIT_BASE
1185 typedef struct _EFI_HII_IIBT_IMAGE_1BIT_BASE
{
1189 } EFI_HII_IIBT_IMAGE_1BIT_BASE
;
1193 This record assigns the 1-bit-per-pixel bitmap data to the
1194 ImageIdCurrent identifier and increment ImageIdCurrent by one.
1195 The data in the EFI_HII_IMAGE_1BIT_TRANS structure is exactly
1196 the same as the EFI_HII_IMAGE_1BIT structure, the difference is
1197 how the data is treated. The bitmap pixel value 0 is the
1198 transparency value and will not be written to the
1199 screen. The bitmap pixel value 1 will be translated to the color
1200 specified by Palette.
1202 @param Header Standard image header, where Header.BlockType
1203 = EFI_HII_IIBT_IMAGE_1BIT_TRANS.
1205 @param PaletteIndex Index of the palette in the palette
1208 @param Bitmap The bitmap specifies a series of pixels, one
1209 bit per pixel, left-to-right, top-to-bottom,
1210 and is padded out to the nearest byte. The
1211 number of bytes per bitmap can be calculated
1212 as: ((Width + 7)/8) * Height.
1215 typedef struct _EFI_HII_IBIT_IMAGE_1BIT_BLOCK
{
1216 EFI_HII_IMAGE_BLOCK Header
;
1218 EFI_HII_IIBT_IMAGE_1BIT_BASE Bitmap
;
1219 } EFI_HII_IIBT_IMAGE_1BIT_BLOCK
;
1221 typedef EFI_HII_IIBT_IMAGE_1BIT_BLOCK EFI_HII_IIBT_IMAGE_1BIT_TRANS_BLOCK
;
1225 // EFI_HII_RGB_PIXEL
1227 typedef struct _EFI_HII_RGB_PIXEL
{
1231 } EFI_HII_RGB_PIXEL
;
1234 // FI_HII_IIBT_IMAGE_24BIT_BASE
1236 typedef struct _EFI_HII_IIBT_IMAGE_24BIT_BASE
{
1239 // EFI_HII_RGB_PIXEL Bitmap[...];
1240 } EFI_HII_IIBT_IMAGE_24BIT_BASE
;
1244 This record assigns the 24-bit-per-pixel bitmap data to the
1245 ImageIdCurrent identifier and increment ImageIdCurrent by one.
1246 The image's upper left hand corner pixel is composed of the
1247 first three bitmap bytes. The first byte is the pixel????s blue
1248 component value, the next byte is the pixel????s green component
1249 value, and the third byte is the pixel's red component value
1250 (B,G,R). Each color component value can vary from 0x00 (color
1251 off) to 0xFF (color full on), allowing 16.8 millions colors that
1254 @param Header Standard image header, where Header.BlockType
1255 = EFI_HII_IIBT_IMAGE_24BIT. Bitmap The bitmap
1256 specifies a series of pixels, 24 bits per
1257 pixel, left-to-right, top-to-bottom. The
1258 number of bytes per bitmap can be calculated
1259 as: (Width * 3) * Height.
1261 @param Type See EFI_HII_RGB_PIXEL definition.
1265 EFI_HII_IMAGE_BLOCK Header
;
1266 EFI_HII_IIBT_IMAGE_24BIT_BASE Bitmap
;
1267 } EFI_HII_IIBT_IMAGE_24BIT_BLOCK
;
1269 typedef EFI_HII_IIBT_IMAGE_24BIT_BLOCK EFI_HII_IIBT_IMAGE_24BIT_TRANS_BLOCK
;
1274 // EFI_HII_IIBT_IMAGE_4BIT_BASE
1276 typedef struct _EFI_HII_IIBT_IMAGE_4BIT_BASE
{
1280 } EFI_HII_IIBT_IMAGE_4BIT_BASE
;
1284 This record assigns the 4-bit-per-pixel bitmap data to the
1285 ImageIdCurrent identifier using the specified palette and
1286 increment ImageIdCurrent by one. The image????s upper left hand
1287 corner pixel is the most significant nibble of the first bitmap
1290 @param Header Standard image header, where Header.BlockType
1291 = EFI_HII_IIBT_IMAGE_4BIT.
1293 @param PaletteIndex Index of the palette in the palette
1296 @param Bitmap The bitmap specifies a series of pixels, four
1297 bits per pixel, left-to-right, top-to-bottom,
1298 and is padded out to the nearest byte. The
1299 number of bytes per bitmap can be calculated
1300 as: ((Width + 1)/2) Height.
1303 typedef struct _EFI_HII_IIBT_IMAGE_4BIT_BLOCK
{
1304 EFI_HII_IMAGE_BLOCK Header
;
1306 EFI_HII_IIBT_IMAGE_4BIT_BASE Bitmap
;
1307 } EFI_HII_IIBT_IMAGE_4BIT_BLOCK
;
1309 typedef EFI_HII_IIBT_IMAGE_4BIT_BLOCK EFI_HII_IIBT_IMAGE_4BIT_TRANS_BLOCK
;
1314 // EFI_HII_IIBT_IMAGE_8BIT_BASE
1316 typedef struct _EFI_HII_IIBT_IMAGE_8BIT_BASE
{
1320 } EFI_HII_IIBT_IMAGE_8BIT_BASE
;
1324 This record assigns the 8-bit-per-pixel bitmap data to the
1325 ImageIdCurrent identifier using the specified palette and
1326 increment ImageIdCurrent by one. The image????s upper left hand
1327 corner pixel is the first bitmap byte.
1329 @param Header Standard image header, where Header.BlockType
1330 = EFI_HII_IIBT_IMAGE_8BIT.
1332 @param PaletteIndex Index of the palette in the palette
1335 @param Bitmap The bitmap specifies a series of pixels, eight
1336 bits per pixel, left-to-right, top-to-bottom.
1337 The number of bytes per bitmap can be
1338 calculated as: Width * Height.
1341 typedef struct _EFI_HII_IIBT_IMAGE_8BIT_PALETTE
{
1342 EFI_HII_IMAGE_BLOCK Header
;
1344 EFI_HII_IIBT_IMAGE_8BIT_BASE Bitmap
;
1345 } EFI_HII_IIBT_IMAGE_8BIT_PALETTE
;
1347 typedef EFI_HII_IIBT_IMAGE_8BIT_PALETTE EFI_HII_IIBT_IMAGE_8BIT_TRANS_BLOCK
;
1352 Indicates that the image with image ID ImageValueCurrent has the
1353 same image as a previously defined image ID and increments
1354 ImageValueCurrent by one
1356 @param Header Standard image header, where Header.BlockType
1357 = EFI_HII_IIBT_DUPLICATE.
1359 @param ImageId The previously defined image ID with the exact
1364 typedef struct _EFI_HII_IIBT_DUPLICATE_BLOCK
{
1365 EFI_HII_IMAGE_BLOCK Header
;
1366 EFI_IMAGE_ID ImageId
;
1367 } EFI_HII_IIBT_DUPLICATE_BLOCK
;
1372 This record assigns the JPEG image data to the ImageIdCurrent
1373 identifier and increment ImageIdCurrent by one. The JPEG decoder
1374 is only required to cover the basic JPEG encoding types, which
1375 are produced by standard available paint packages (for example:
1376 MSPaint under Windows from Microsoft). This would include JPEG
1377 encoding of high (1:1:1) and medium (4:1:1) quality with only
1378 three components (R,G,B) ??C no support for the special gray
1381 @param Header Standard image header, where Header.BlockType
1382 = EFI_HII_IIBT_IMAGE_JPEG.
1384 @param Size Specifies the size of the JPEG encoded data.
1386 @param Data JPEG encoded data with ????JFIF???? signature at
1387 offset 6 in the data block. The JPEG encoded
1388 data, specifies type of encoding and final size
1389 of true-color image.
1392 typedef struct _EFI_HII_IIBT_JPEG
{
1393 EFI_HII_IMAGE_BLOCK Header
;
1395 //UINT8 Data[ ¡ ];
1396 } EFI_HII_IIBT_JPEG
;
1401 Increments the current image ID ImageIdCurrent by the number
1404 @param Header Standard image header, where Header.BlockType
1405 = EFI_HII_IIBT_SKIP1.
1407 @param SkipCount The unsigned 8-bit value to add to
1411 typedef struct _EFI_HII_IIBT_SKIP1_BLOCK
{
1412 EFI_HII_IMAGE_BLOCK Header
;
1414 } EFI_HII_IIBT_SKIP1_BLOCK
;
1418 Increments the current image ID ImageIdCurrent by the number
1421 @param Header Standard image header, where Header.BlockType
1422 = EFI_HII_IIBT_SKIP2.
1424 @param SkipCount The unsigned 16-bit value to add to
1428 typedef struct _EFI_HII_IIBT_SKIP2_BLOCK
{
1429 EFI_HII_IMAGE_BLOCK Header
;
1431 } EFI_HII_IIBT_SKIP2_BLOCK
;
1436 This fixed header is followed by zero or more variable-length
1437 palette information records. The structures are assigned a
1440 @param PaletteCount Number of palettes.
1443 typedef struct _EFI_HII_IMAGE_PALETTE_INFO_HEADER
{
1444 UINT16 PaletteCount
;
1445 } EFI_HII_IMAGE_PALETTE_INFO_HEADER
;
1449 Each palette information record is an array of 24-bit color
1450 structures. The first entry (PaletteValue[0]) corresponds to
1451 color 0 in the source image; the second entry (PaletteValue[1])
1452 corresponds to color 1, etc. Each palette entry is a three byte
1453 entry, with the first byte equal to the blue component of the
1454 color, followed by green, and finally red (B,G,R). Each color
1455 component value can vary from 0x00 (color off) to 0xFF (color
1456 full on), allowing 16.8 millions colors that can be specified.
1458 @param PaletteSize Size of the palette information.
1460 @param PaletteValue Array of color values.
1463 typedef struct _EFI_HII_IMAGE_PALETTE_INFO
{
1465 // EFI_HII_RGB_PIXEL PaletteValue[...];
1466 } EFI_HII_IMAGE_PALETTE_INFO
;
1471 // EFI_HII_DATABASE_NOTIFY_TYPE
1473 typedef UINTN EFI_HII_DATABASE_NOTIFY_TYPE
;
1474 #define EFI_HII_DATABASE_NOTIFY_NEW_PACK 0x00000001
1475 #define EFI_HII_DATABASE_NOTIFY_REMOVE_PACK 0x00000002
1476 #define EFI_HII_DATABASE_NOTIFY_EXPORT_PACK 0x00000004
1477 #define EFI_HII_DATABASE_NOTIFY_ADD_PACK 0x00000008
1480 Functions which are registered to receive notification of
1481 database events have this prototype. The actual event is encoded
1482 in NotifyType. The following table describes how PackageType,
1483 PackageGuid, Handle, and Package are used for each of the
1486 @param PackageType Package type of the notification.
1488 @param PackageGuid If PackageType is
1489 EFI_HII_PACKAGE_TYPE_GUID, then this is
1490 the pointer to the GUID from the Guid
1491 field of EFI_HII_PACKAGE_GUID_HEADER.
1492 Otherwise, it must be NULL.
1494 @param Package Points to the package referred to by the
1495 notification Handle The handle of the package
1496 list which contains the specified package.
1498 @param NotifyType The type of change concerning the
1500 EFI_HII_DATABASE_NOTIFY_TYPE.
1505 (EFIAPI
*EFI_HII_DATABASE_NOTIFY
) (
1506 IN CONST UINT8 PackageType
,
1507 IN CONST EFI_GUID
*PackageGuid
,
1508 IN CONST EFI_HII_PACKAGE_HEADER
*Package
,
1509 IN CONST EFI_HII_HANDLE Handle
,
1510 IN CONST EFI_HII_DATABASE_NOTIFY_TYPE NotifyType
1515 This function adds the packages in the package list to the
1516 database and returns a handle. If there is a
1517 EFI_DEVICE_PATH_PROTOCOL associated with the DriverHandle, then
1518 this function will create a package of type
1519 EFI_PACKAGE_TYPE_DEVICE_PATH and add it to the package list. For
1520 each package in the package list, registered functions with the
1521 notification type NEW_PACK and having the same package type will
1522 be called. For each call to NewPackageList(), there should be a
1523 corresponding call to
1524 EFI_HII_DATABASE_PROTOCOL.RemovePackageList().
1526 @param This A pointer to the EFI_HII_DATABASE_PROTOCOL
1529 @param PackageList A pointer to an
1530 EFI_HII_PACKAGE_LIST_HEADER structure.
1532 @param DriverHandle Associate the package list with this EFI
1533 handle Handle A pointer to the
1534 EFI_HII_HANDLE instance.
1536 @retval EFI_SUCCESS The package list associated with the
1537 Handle was added to the HII database.
1539 @retval EFI_OUT_OF_RESOURCES Unable to allocate necessary
1540 resources for the new database
1543 @retval EFI_INVALID_PARAMETER PackageList is NULL or Handle
1549 (EFIAPI
*EFI_HII_NEW_PACK
) (
1550 IN CONST EFI_HII_DATABASE_PROTOCOL
*This
,
1551 IN CONST EFI_HII_PACKAGE_LIST_HEADER
*PackageList
,
1552 IN CONST EFI_HANDLE DriverHandle
,
1553 OUT EFI_HII_HANDLE
*Handle
1559 This function removes the package list that is associated with a
1560 handle Handle from the HII database. Before removing the
1561 package, any registered functions with the notification type
1562 REMOVE_PACK and the same package type will be called. For each
1563 call to EFI_HII_DATABASE_PROTOCOL.NewPackageList(), there should
1564 be a corresponding call to RemovePackageList.
1566 @param This A pointer to the EFI_HII_DATABASE_PROTOCOL
1569 @param Handle The handle that was registered to the data
1570 that is requested for removal.
1572 @retval EFI_SUCCESS The data associated with the Handle was
1573 removed from the HII database.
1575 @retval EFI_INVALID_PARAMETER The Handle was not valid.
1580 (EFIAPI
*EFI_HII_REMOVE_PACK
) (
1581 IN CONST EFI_HII_DATABASE_PROTOCOL
*This
,
1582 IN CONST EFI_HII_HANDLE Handle
1588 This function updates the existing package list (which has the
1589 specified Handle) in the HII databases, using the new package
1590 list specified by PackageList. The update process has the
1591 following steps: Collect all the package types in the package
1592 list specified by PackageList. A package type consists of the
1593 Type field of EFI_HII_PACKAGE_HEADER and, if the Type is
1594 EFI_HII_PACKAGE_TYPE_GUID, the Guid field, as defined in
1595 EFI_HII_PACKAGE_GUID_HEADER. Iterate through the packages within
1596 the existing package list in the HII database specified by
1597 Handle. If a package??s type matches one of the types collected
1598 in step 1, then perform the following steps:
1599 - Call any functions registered with the notification type
1601 - Remove the package from the package list and the HII
1603 Add all of the packages within the new package list specified
1604 by PackageList, using the following steps:
1605 - Add the package to the package list and the HII database.
1606 - Call any functions registered with the notification type
1609 @param This A pointer to the EFI_HII_DATABASE_PROTOCOL
1612 @param Handle The handle that was registered to the data
1613 that is requested for removal.
1615 @param PackageList A pointer to an EFI_HII_PACKAGE_LIST
1618 @retval EFI_SUCCESS The HII database was successfully
1621 @retval EFI_OUT_OF_RESOURCES Unable to allocate enough memory
1622 for the updated database.
1624 @retval EFI_INVALID_PARAMETER The Handle was not valid.
1629 (EFIAPI
*EFI_HII_UPDATE_PACK
) (
1630 IN CONST EFI_HII_DATABASE_PROTOCOL
*This
,
1631 IN CONST EFI_HII_HANDLE Handle
,
1632 IN CONST EFI_HII_PACKAGE_LIST_HEADER
*PackageList
1638 This function returns a list of the package handles of the
1639 specified type that are currently active in the database. The
1640 pseudo-type EFI_HII_PACKAGE_TYPE_ALL will cause all package
1641 handles to be listed.
1643 @param This A pointer to the EFI_HII_DATABASE_PROTOCOL
1646 @param PackageType Specifies the package type of the packages
1647 to list or EFI_HII_PACKAGE_TYPE_ALL for
1648 all packages to be listed.
1650 @param PackageGuid If PackageType is
1651 EFI_HII_PACKAGE_TYPE_GUID, then this is
1652 the pointer to the GUID which must match
1654 EFI_HII_PACKAGE_GUID_HEADER. Otherwise, it
1657 @param HandleBufferLength On input, a pointer to the length
1658 of the handle buffer. On output,
1659 the length of the handle buffer
1660 that is required for the handles
1663 @param Handle An array of EFI_HII_HANDLE instances returned.
1666 @retval EFI_SUCCESS Handle was updated successfully.
1668 @retval EFI_BUFFER_TOO_SMALL The HandleBufferLength parameter
1669 indicates that Handle is too
1670 small to support the number of
1671 handles. HandleBufferLength is
1672 updated with a value that will
1673 enable the data to fit.
1679 (EFIAPI
*EFI_HII_LIST_PACKS
) (
1680 IN CONST EFI_HII_DATABASE_PROTOCOL
*This
,
1681 IN CONST UINT8 PackageType
,
1682 IN CONST EFI_GUID
*PackageGuid
,
1683 IN OUT UINTN
*HandleBufferLength
,
1684 OUT EFI_HII_HANDLE
*Handle
1694 This function will export one or all package lists in the
1695 database to a buffer. For each package list exported, this
1696 function will call functions registered with EXPORT_PACK and
1697 then copy the package list to the buffer. The registered
1698 functions may call EFI_HII_DATABASE_PROTOCOL.UpdatePackageList()
1699 to modify the package list before it is copied to the buffer. If
1700 the specified BufferSize is too small, then the status
1701 EFI_OUT_OF_RESOURCES will be returned and the actual package
1702 size will be returned in BufferSize.
1704 @param This A pointer to the EFI_HII_DATABASE_PROTOCOL
1707 @param Handle An EFI_HII_HANDLE that corresponds to the
1708 desired package list in the HII database to
1709 export or NULL to indicate all package lists
1712 @param BufferSize On input, a pointer to the length of the
1713 buffer. On output, the length of the
1714 buffer that is required for the exported
1717 @param Buffer A pointer to a buffer that will contain the
1718 results of the export function.
1721 @retval EFI_SUCCESS Package exported.
1723 @retval EFI_OUT_OF_RESOURCES BufferSize is too small to hold
1729 (EFIAPI
*EFI_HII_EXPORT_PACKS
) (
1730 IN CONST EFI_HII_DATABASE_PROTOCOL
*This
,
1731 IN CONST EFI_HII_HANDLE Handle
,
1732 IN OUT UINTN
*BufferSize
,
1733 OUT EFI_HII_PACKAGE_HEADER
*Buffer
1740 This function registers a function which will be called when
1741 specified actions related to packages of the specified type
1742 occur in the HII database. By registering a function, other
1743 HII-related drivers are notified when specific package types
1744 are added, removed or updated in the HII database. Each driver
1745 or application which registers a notification should use
1746 EFI_HII_DATABASE_PROTOCOL.UnregisterPackageNotify() before
1750 @param This A pointer to the EFI_HII_DATABASE_PROTOCOL
1753 @param PackageType The package type. See
1754 EFI_HII_PACKAGE_TYPE_x in EFI_HII_PACKAGE_HEADER.
1756 @param PackageGuid If PackageType is
1757 EFI_HII_PACKAGE_TYPE_GUID, then this is
1758 the pointer to the GUID which must match
1760 EFI_HII_PACKAGE_GUID_HEADER. Otherwise, it
1763 @param PackageNotifyFn Points to the function to be called
1764 when the event specified by
1765 NotificationType occurs. See
1766 EFI_HII_DATABASE_NOTIFY.
1768 @param NotifyType Describes the types of notification which
1769 this function will be receiving. See
1770 EFI_HII_DATABASE_NOTIFY_TYPE for more a
1773 @param NotifyHandle Points to the unique handle assigned to
1774 the registered notification. Can be used
1776 EFI_HII_DATABASE_PROTOCOL.UnregisterPack
1777 to stop notifications.
1780 @retval EFI_SUCCESS Notification registered successfully.
1782 @retval EFI_OUT_OF_RESOURCES Unable to allocate necessary
1785 @retval EFI_INVALID_PARAMETER PackageGuid is not NULL when
1787 EFI_HII_PACKAGE_TYPE_GUID.
1792 (EFIAPI
*EFI_HII_REGISTER_NOTIFY
) (
1793 IN CONST EFI_HII_DATABASE_PROTOCOL
*This
,
1794 IN CONST UINT8 PackageType
,
1795 IN CONST EFI_GUID
*PackageGuid
,
1796 IN CONST EFI_HII_DATABASE_NOTIFY PackageNotifyFn
,
1797 IN CONST EFI_HII_DATABASE_NOTIFY_TYPE NotifyType
,
1798 OUT EFI_HANDLE
*NotifyHandle
1804 Removes the specified HII database package-related notification.
1806 @param This A pointer to the EFI_HII_DATABASE_PROTOCOL
1809 @param NotificationHandle The handle of the notification
1810 function being unregistered.
1812 @retval EFI_SUCCESS Unregister the notification
1815 @retval EFI_INVALID_PARAMETER The Handle is invalid.
1820 (EFIAPI
*EFI_HII_UNREGISTER_NOTIFY
) (
1821 IN CONST EFI_HII_DATABASE_PROTOCOL
*This
,
1822 IN CONST EFI_HANDLE NotificationHandle
1828 @param Header The general pack header which defines both the
1829 type of pack and the length of the entire
1832 @param LayoutCount The number of keyboard layouts contained
1833 in the entire keyboard pack.
1835 @param Layout An array of LayoutCount number of keyboard
1840 EFI_HII_PACKAGE_HEADER Header
;
1842 // EFI_HII_KEYBOARD_LAYOUT Layout[...];
1843 } EFI_HII_KEYBOARD_PACK
;
1847 @param LayoutLength The length of the current keyboard
1850 @param Guid The unique ID associated with this keyboard
1853 @param LayoutDescriptorString An offset location (0 is the
1855 EFI_KEYBOARD_LAYOUT instance)
1856 of the string which describes
1857 this keyboard layout. The data
1858 that is being referenced is in
1859 EFI_DESCRIPTION_STRING_BUNDLE
1862 @param DescriptorCount The number of Descriptor entries in
1865 @param Descriptors An array of key descriptors.
1869 UINT16 LayoutLength
;
1871 RELOFST LayoutDescriptorString
;
1872 UINT8 DescriptorCount
;
1873 // EFI_KEY_DESCRIPTOR Descriptors[...];
1874 } EFI_HII_KEYBOARD_LAYOUT
;
1879 @param Language The language to associate with
1882 @param Space A space (U-0x0020) character to force as a
1883 separator between the Language field and the
1884 formal description string.
1886 @param DescriptionString A null-terminated description
1893 CHAR16 DescriptionString
[1];
1894 } EFI_DESCRIPTION_STRING
;
1898 @param DescriptionCount The number of description strings.
1900 @param DescriptionString An array of language-specific
1901 description strings.
1905 UINT16 DescriptionCount
;
1906 // EFI_DESCRIPTION_STRING DescriptionString[];
1907 } EFI_DESCRIPTION_STRING_BUNDLE
;
1911 See the figure below for which key corresponds to the values in
1912 the enumeration above. For example, EfiKeyLCtrl corresponds to
1913 the left control key in the lower-left corner of the keyboard,
1914 EfiKeyFour corresponds to the 4 key on the numeric keypad, and
1915 EfiKeySLck corresponds to the Scroll Lock key in the upper-right
1916 corner of the keyboard.
1920 EfiKeyLCtrl
, EfiKeyA0
, EfiKeyLAlt
, EfiKeySpaceBar
,
1921 EfiKeyA2
, EfiKeyA3
, EfiKeyA4
, EfiKeyRCtrl
, EfiKeyLeftArrow
,
1922 EfiKeyDownArrow
, EfiKeyRightArrow
, EfiKeyZero
,
1923 EfiKeyPeriod
, EfiKeyEnter
, EfiKeyLShift
, EfiKeyB0
,
1924 EfiKeyB1
, EfiKeyB2
, EfiKeyB3
, EfiKeyB4
, EfiKeyB5
, EfiKeyB6
,
1925 EfiKeyB7
, EfiKeyB8
, EfiKeyB9
, EfiKeyB10
, EfiKeyRshift
,
1926 EfiKeyUpArrow
, EfiKeyOne
, EfiKeyTwo
, EfiKeyThree
,
1927 EfiKeyCapsLock
, EfiKeyC1
, EfiKeyC2
, EfiKeyC3
, EfiKeyC4
,
1928 EfiKeyC5
, EfiKeyC6
, EfiKeyC7
, EfiKeyC8
, EfiKeyC9
,
1929 EfiKeyC10
, EfiKeyC11
, EfiKeyC12
, EfiKeyFour
, EfiKeyFive
,
1930 EfiKeySix
, EfiKeyPlus
, EfiKeyTab
, EfiKeyD1
, EfiKeyD2
,
1931 EfiKeyD3
, EfiKeyD4
, EfiKeyD5
, EfiKeyD6
, EfiKeyD7
, EfiKeyD8
,
1932 EfiKeyD9
, EfiKeyD10
, EfiKeyD11
, EfiKeyD12
, EfiKeyD13
,
1933 EfiKeyDel
, EfiKeyEnd
, EfiKeyPgDn
, EfiKeySeven
, EfiKeyEight
,
1934 EfiKeyNine
, EfiKeyE0
, EfiKeyE1
, EfiKeyE2
, EfiKeyE3
,
1935 EfiKeyE4
, EfiKeyE5
, EfiKeyE6
, EfiKeyE7
, EfiKeyE8
, EfiKeyE9
,
1936 EfiKeyE10
, EfiKeyE11
, EfiKeyE12
, EfiKeyBackSpace
,
1937 EfiKeyIns
, EfiKeyHome
, EfiKeyPgUp
, EfiKeyNLck
, EfiKeySlash
,
1938 EfiKeyAsterisk
, EfiKeyMinus
, EfiKeyEsc
, EfiKeyF1
, EfiKeyF2
,
1939 EfiKeyF3
, EfiKeyF4
, EfiKeyF5
, EfiKeyF6
, EfiKeyF7
, EfiKeyF8
,
1940 EfiKeyF9
, EfiKeyF10
, EfiKeyF11
, EfiKeyF12
, EfiKeyPrint
,
1941 EfiKeySLck
, EfiKeyPause
1946 @param Key Used to describe a physical key on a keyboard.
1948 @param Unicode Unicode value for the Key.
1950 @param ShiftedUnicode Unicode value for the key with the
1951 shift key being held down.
1953 @param AltGrUnicode Unicode value for the key with the
1954 Alt-GR being held down.
1956 @param ShiftedAltGrUnicode Unicode value for the key with the
1957 Alt-GR and shift keys being held down.
1959 @param Modifier Modifier keys are defined to allow for
1960 special functionality that is not
1961 necessarily accomplished by a printable
1962 character. Many of these modifier keys are
1963 flags to toggle certain state bits on and
1964 off inside of a keyboard driver.
1970 CHAR16 ShiftedUnicode
;
1971 CHAR16 AltGrUnicode
;
1972 CHAR16 ShiftedAltGrUnicode
;
1974 } EFI_KEY_DESCRIPTOR
;
1980 #define EFI_NULL_MODIFIER 0x0000
1981 #define EFI_LEFT_CONTROL_MODIFIER 0x0001
1982 #define EFI_RIGHT_CONTROL_MODIFIER 0x0002
1983 #define EFI_LEFT_ALT_MODIFIER 0x0003
1984 #define EFI_RIGHT_ALT_MODIFIER 0x0004
1985 #define EFI_ALT_GR_MODIFIER 0x0005
1986 #define EFI_INSERT_MODIFIER 0x0006
1987 #define EFI_DELETE_MODIFIER 0x0007
1988 #define EFI_PAGE_DOWN_MODIFIER 0x0008
1989 #define EFI_PAGE_UP_MODIFIER 0x0009
1990 #define EFI_HOME_MODIFIER 0x000A
1991 #define EFI_END_MODIFIER 0x000B
1992 #define EFI_LEFT_SHIFT_MODIFIER 0x000C
1993 #define EFI_RIGHT_SHIFT_MODIFIER 0x000D
1994 #define EFI_CAPS_LOCK_MODIFIER 0x000E
1995 #define EFI_NUM_LOCK _MODIFIER 0x000F
1996 #define EFI_LEFT_ARROW_MODIFIER 0x0010
1997 #define EFI_RIGHT_ARROW_MODIFIER 0x0011
1998 #define EFI_DOWN_ARROW_MODIFIER 0x0012
1999 #define EFI_UP_ARROW_MODIFIER 0X0013
2000 #define EFI_NS_KEY_MODIFIER 0x0014
2001 #define EFI_NS_KEY_DEPENDENCY_MODIFIER 0x0015
2002 #define EFI_FUNCTION_KEY_ONE_MODIFIER 0x0016
2003 #define EFI_FUNCTION_KEY_TWO_MODIFIER 0x0017
2004 #define EFI_FUNCTION_KEY_THREE_MODIFIER 0x0018
2005 #define EFI_FUNCTION_KEY_FOUR_MODIFIER 0x0019
2006 #define EFI_FUNCTION_KEY_FIVE_MODIFIER 0x001A
2007 #define EFI_FUNCTION_KEY_SIX_MODIFIER 0x001B
2008 #define EFI_FUNCTION_KEY_SEVEN_MODIFIER 0x001C
2009 #define EFI_FUNCTION_KEY_EIGHT_MODIFIER 0x001D
2010 #define EFI_FUNCTION_KEY_NINE_MODIFIER 0x001E
2011 #define EFI_FUNCTION_KEY_TEN_MODIFIER 0x001F
2012 #define EFI_FUNCTION_KEY_ELEVEN_MODIFIER 0x0020
2013 #define EFI_FUNCTION_KEY_TWELVE_MODIFIER 0x0021
2015 // Keys that have multiple control functions based on modifier
2016 // settings are handled in the keyboard driver implementation.
2017 // For instance PRINT_KEY might have a modifier held down and
2018 // is still a nonprinting character, but might have an alternate
2019 // control function like SYSREQUEST
2021 #define EFI_PRINT_MODIFIER 0x0022
2022 #define EFI_SYS_REQUEST_MODIFIER 0x0023
2023 #define EFI_SCROLL_LOCK_MODIFIER 0x0024
2024 #define EFI_PAUSE_MODIFIER 0x0025
2025 #define EFI_BREAK_MODIFIER 0x0026
2031 This routine retrieves an array of GUID values for each keyboard
2032 layout that was previously registered in the system.
2034 @param This A pointer to the EFI_HII_PROTOCOL instance.
2036 @param KeyGuidBufferLength On input, a pointer to the length
2037 of the keyboard GUID buffer. On
2038 output, the length of the handle
2039 buffer that is required for the
2040 handles found. KeyGuidBuffer An
2041 array of keyboard layout GUID
2044 @retval EFI_SUCCESS KeyGuidBuffer was updated successfully.
2046 @retval EFI_BUFFER_TOO_SMALL The KeyGuidBufferLength
2047 parameter indicates that
2048 KeyGuidBuffer is too small to
2049 support the number of GUIDs.
2050 KeyGuidBufferLength is updated
2051 with a value that will enable
2057 (EFIAPI
*EFI_HII_FIND_KEYBOARD_LAYOUTS
) (
2058 IN CONST EFI_HII_DATABASE_PROTOCOL
*This
,
2059 IN OUT UINT16
*KeyGuidBufferLength
,
2060 OUT EFI_GUID
*KeyGuidBuffer
2066 This routine retrieves the requested keyboard layout. The layout
2067 is a physical description of the keys on a keyboard and the
2068 character(s) that are associated with a particular set of key
2071 @param This A pointer to the EFI_HII_PROTOCOL instance.
2073 @param KeyGuid A pointer to the unique ID associated with a
2074 given keyboard layout. If KeyGuid is NULL then
2075 the current layout will be retrieved.
2077 @param KeyboardLayout A pointer to a buffer containing the
2078 retrieved keyboard layout. below.
2080 @retval EFI_SUCCESS The keyboard layout was retrieved
2083 @retval EFI_NOT_FOUND The requested keyboard layout was not
2089 (EFIAPI
*EFI_HII_GET_KEYBOARD_LAYOUT
) (
2090 IN CONST EFI_HII_DATABASE_PROTOCOL
*This
,
2091 IN CONST EFI_GUID
*KeyGuid
,
2092 OUT EFI_HII_KEYBOARD_LAYOUT
*KeyboardLayout
2097 This routine sets the default keyboard layout to the one
2098 referenced by KeyGuid. When this routine is called, an event
2099 will be signaled of the EFI_HII_SET_KEYBOARD_LAYOUT_EVENT_GUID
2100 group type. This is so that agents which are sensitive to the
2101 current keyboard layout being changed can be notified of this
2104 @param This A pointer to the EFI_HII_DATABASE_PROTOCOL
2107 @param KeyGuid A pointer to the unique ID associated with a
2108 given keyboard layout.
2111 @retval EFI_SUCCESS The current keyboard layout was
2114 @retval EFI_NOT_FOUND The referenced keyboard layout was not
2115 found, so action was taken.
2120 (EFIAPI
*EFI_HII_SET_KEYBOARD_LAYOUT
) (
2121 IN CONST EFI_HII_DATABASE_PROTOCOL
*This
,
2122 IN CONST EFI_GUID
*KeyGuid
2127 Return the EFI handle associated with a package list.
2129 @param This A pointer to the EFI_HII_DATABASE_PROTOCOL
2132 @param PackageListHandle An EFI_HII_HANDLE that corresponds
2133 to the desired package list in the
2136 @param DriverHandle On return, contains the EFI_HANDLE which
2137 was registered with the package list in
2140 @retval EFI_SUCCESS The DriverHandle was returned
2143 @retval EFI_INVALID_PARAMETER The PackageListHandle was not
2149 (EFIAPI
*EFI_HII_GET_PACK_HANDLE
) (
2150 IN CONST EFI_HII_DATABASE_PROTOCOL
*This
,
2151 IN CONST EFI_HII_HANDLE PackageListHandle
,
2152 OUT EFI_HANDLE
*DriverHandle
2157 @param NewPackageList Add a new package list to the HII
2160 @param RemovePackageList Remove a package list from the HII
2163 @param UpdatePackageList Update a package list in the HII
2166 @param ListPackageLists List the handles of the package
2167 lists within the HII database.
2169 @param ExportPackageLists Export package lists from the HII
2172 @param RegisterPackageNotify Register notification when
2173 packages of a certain type are
2176 @param UnregisterPackageNotify Unregister notification of
2179 @param FindKeyboardLayouts Retrieves a list of the keyboard
2180 layouts in the system.
2182 @param GetKeyboardLayout Allows a program to extract the
2183 current keyboard layout. See the
2184 GetKeyboardLayout() function
2187 @param SetKeyboardLayout Changes the current keyboard layout.
2188 See the SetKeyboardLayout() function
2192 struct _EFI_HII_DATABASE_PROTOCOL
{
2193 EFI_HII_NEW_PACK NewPackageList
;
2194 EFI_HII_REMOVE_PACK RemovePackageList
;
2195 EFI_HII_UPDATE_PACK UpdatePackageList
;
2196 EFI_HII_LIST_PACKS ListPackageLists
;
2197 EFI_HII_EXPORT_PACKS ExportPackageLists
;
2198 EFI_HII_REGISTER_NOTIFY RegisterPackageNotify
;
2199 EFI_HII_UNREGISTER_NOTIFY UnregisterPackageNotify
;
2200 EFI_HII_FIND_KEYBOARD_LAYOUTS FindKeyboardLayouts
;
2201 EFI_HII_GET_KEYBOARD_LAYOUT GetKeyboardLayout
;
2202 EFI_HII_SET_KEYBOARD_LAYOUT SetKeyboardLayout
;
2203 EFI_HII_GET_PACK_HANDLE GetPackageHandle
;
2206 extern EFI_GUID gEfiHiiDatabaseProtocolGuid
;