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 #define EFI_HII_DATABASE_PROTOCOL_GUID \
20 { 0xef9fc172, 0xa1b2, 0x4693, { 0xb3, 0x27, 0x6d, 0x32, 0xfc, 0x41, 0x60, 0x42 } }
23 typedef struct _EFI_HII_DATABASE_PROTOCOL EFI_HII_DATABASE_PROTOCOL
;
26 // ConfigurationS of HII.
29 #define GLYPH_HEIGHT 19
33 Each package starts with a header, as defined above, which
34 indicates the size and type of the package. When added to a
35 pointer pointing to the start of the header, Length points at
36 the next package. The package lists form a package list when
37 concatenated together and terminated with an
38 EFI_HII_PACKAGE_HEADER with a Type of EFI_HII_PACKAGE_END. The
39 type EFI_HII_PACKAGE_TYPE_GUID is used for vendor-defined HII
40 packages, whose contents are determined by the Guid. The range
41 of package types starting with EFI_HII_PACKAGE_TYPE_SYSTEM_BEGIN
42 through EFI_HII_PACKAGE_TYPE_SYSTEM_END are reserved for system
43 firmware implementers.
45 @param Length The size of the package in bytes.
47 @param Type The package type. See EFI_HII_PACKAGE_TYPE_x,
50 @param Data The package data, the format of which is
58 } EFI_HII_PACKAGE_HEADER
;
61 // EFI_HII_PACKAGE_TYPE_x.
63 #define EFI_HII_PACKAGE_TYPE_ALL 0x00
64 #define EFI_HII_PACKAGE_TYPE_GUID 0x01
65 #define EFI_HII_PACKAGE_FORM_CONFIG 0x02
66 #define EFI_HII_PACKAGE_FORM_APP 0x03
67 #define EFI_HII_PACKAGE_STRINGS 0x04
68 #define EFI_HII_PACKAGE_FONTS 0x05
69 #define EFI_HII_PACKAGE_IMAGES 0x06
70 #define EFI_HII_PACKAGE_SIMPLE_FONTS 0x07
71 #define EFI_HII_PACKAGE_DEVICE_PATH 0x08
72 #define EFI_HII_PACKAGE_END 0x09
73 #define EFI_HII_PACKAGE_TYPE_SYSTEM_BEGIN 0xE0
74 #define EFI_HII_PACKAGE_TYPE_SYSTEM_END 0xFF
79 This header uniquely identifies the package list.and is placed
80 in front of a list of packages. Package lists with the same
81 PackageListGuid value should contain the same data set. Updated
82 versions should have updated GUIDs.
84 @param PackageListGuid The unique identifier applied to the
85 list of packages which follows.
88 @param PackageLength The size of the package list (in
89 bytes), including the header.
93 EFI_GUID PackageListGuid
;
95 } EFI_HII_PACKAGE_LIST_HEADER
;
99 The fonts must be presented in Unicode sort order. That is,
100 the primary sort key is the UnicodeWeight and the secondary
101 sort key is the SurrogateWeight. It is up to developers who
102 manage fonts to choose efficient mechanisms for accessing
103 fonts. The contiguous presentation can easily be used because
104 narrow and wide glyphs are not intermixed, so a binary search
105 is possible (hence the requirement that the glyphs be sorted
108 @param Header The header contains a Length and Type field.
109 In the case of a font package, the type will
110 be EFI_HII_PACKAGE_SIMPLE_FONTS and the length
111 will be the total size of the font package
112 including the size of the narrow and wide
113 glyphs. See EFI_HII_PACKAGE_HEADER.
115 @param NumberOfNarrowGlyphs The number of NarrowGlyphs that
116 are included in the font package.
118 @param NumberOfWideGlyphs The number of WideGlyphs that are
119 included in the font package.
121 @param NarrowGlyphs An array of EFI_NARROW_GLYPH entries.
122 The number of entries is specified by
123 NumberOfNarrowGlyphs.
125 @param WideGlyphs An array of EFI_WIDE_GLYPH entries. The
126 number of entries is specified by
127 NumberOfWideGlyphs. To calculate the
128 offset of WideGlyphs, use the offset of
129 NarrowGlyphs and add the size of
130 EFI_NARROW_GLYPH multiplied by the
131 NumberOfNarrowGlyphs.
134 typedef struct _EFI_HII_SIMPLE_FONT_PACKAGE_HDR
{
135 EFI_HII_PACKAGE_HEADER Header
;
136 UINT16 NumberOfNarrowGlyphs
;
137 UINT16 NumberOfWideGlyphs
;
138 // EFI_NARROW_GLYPH NarrowGlyphs[];
139 // EFI_WIDE_GLYPH WideGlyphs[];
140 } EFI_HII_SIMPLE_FONT_PACKAGE_HDR
;
143 // Contents of EFI_NARROW_GLYPH.Attributes
145 #define EFI_GLYPH_NON_SPACING 0x01
146 #define EFI_GLYPH_WIDE 0x02
150 Glyphs are represented by two structures, one each for the two
151 sizes of glyphs. The narrow glyph (EFI_NARROW_GLYPH) is the
152 normal glyph used for text display.
154 @param UnicodeWeight The Unicode representation of the glyph.
155 The term weight is the technical term
156 for a character value.
158 @param Attributes The data element containing the glyph
159 definitions; see Related Definitions
162 @param GlyphCol1 The column major glyph representation of the
163 character. Bits with values of one
164 indicate that the corresponding pixel is to
165 be on when normally displayed; those with
170 CHAR16 UnicodeWeight
;
177 Glyphs are represented via the two structures, one each for the
178 two sizes of glyphs. The wide glyph (EFI_WIDE_GLYPH) is large
179 enough to display logographic characters.
181 @param UnicodeWeight The Unicode representation of the glyph.
182 The term weight is the technical term
183 for a character value.
185 @param Attributes The data element containing the glyph
186 definitions; see Related Definitions in
187 EFI_NARROW_GLYPH for attribute values.
189 @param GlyphCol1, GlyphCol2 The column major glyph
190 representation of the character.
191 Bits with values of one indicate
192 that the corresponding pixel is
193 to be on when normally
194 displayed; those with zero are
197 @param Pad Ensures that sizeof(EFI_WIDE_GLYPH) is twice the
198 sizeof(EFI_NARROW_GLYPH). The contents of Pad must
204 CHAR16 UnicodeWeight
;
206 UINT8 GlyphCol1
[GLYPH_HEIGHT
];
207 UINT8 GlyphCol2
[GLYPH_HEIGHT
];
213 // EFI_HII_FONT_STYLE
215 typedef UINT32 EFI_HII_FONT_STYLE
;
216 #define EFI_HII_FONT_STYLE_BOLD 0x00000001
217 #define EFI_HII_FONT_STYLE_ITALIC 0x00000002
218 #define EFI_HII_FONT_STYLE_EMBOSS 0x00010000
219 #define EFI_HII_FONT_STYLE_OUTLINE 0x00020000
220 #define EFI_HII_FONT_STYLE_SHADOW 0x00040000
221 #define EFI_HII_FONT_STYLE_UNDERLINE 0x00080000
222 #define EFI_HII_FONT_STYLE_DBL_UNDER 0x00100000
225 // EFI_HII_GLYPH_BLOCK.BlockType
227 #define EFI_HII_GIBT_END 0x00
228 #define EFI_HII_GIBT_GLYPH 0x10
229 #define EFI_HII_GIBT_GLYPHS 0x11
230 #define EFI_HII_GIBT_GLYPH_DEFAULT 0x12
231 #define EFI_HII_GIBT_GLYPHS_DEFAULT 0x13
232 #define EFI_HII_GIBT_DUPLICATE 0x20
233 #define EFI_HII_GIBT_SKIP2 0x21
234 #define EFI_HII_GIBT_SKIP1 0x22
235 #define EFI_HII_GIBT_DEFAULTS 0x23
236 #define EFI_HII_GIBT_EXT1 0x30
237 #define EFI_HII_GIBT_EXT2 0x31
238 #define EFI_HII_GIBT_EXT4 0x32
242 EFI_HII_GIBT_END block is found. When processing the glyph
243 blocks, each block refers to the current character value
244 (CharValueCurrent), which is initially set to one (1). Glyph
245 blocks of an unknown type should be skipped. If they cannot be
246 skipped, then processing halts.
249 typedef struct _EFI_HII_GLYPH_BLOCK
{
252 } EFI_HII_GLYPH_BLOCK
;
257 @param Width Width of the character or character cell, in
258 pixels. For fixed-pitch fonts, this is the same
261 @param Height Height of the character or character cell, in
264 @param OffsetX Offset to the horizontal edge of the character
267 @param OffsetY Offset to the vertical edge of the character
270 @param AdvanceX Number of pixels to advance to the right
271 when moving from the origin of the current
272 glyph to the origin of the next glyph.
275 typedef struct _EFI_HII_GLYPH_INFO
{
281 } EFI_HII_GLYPH_INFO
;
286 Changes the default cell information used for subsequent
287 EFI_HII_GIBT_GLYPH_DEFAULT and EFI_HII_GIBT_GLYPHS_DEFAULT glyph
288 blocks. The cell information described by Cell remains in effect
289 until the next EFI_HII_GIBT_DEFAULTS is found. Prior to the
290 first EFI_HII_GIBT_DEFAULTS block, the cell information in the
291 fixed header are used.
293 @param Header Standard glyph block header, where
294 Header.BlockType = EFI_HII_GIBT_DEFAULTS.
296 @param Cell The new default cell information which will be
297 applied to all subsequent GLYPH_DEFAULT and
298 GLYPHS_DEFAULT blocks.
301 typedef struct _EFI_HII_GIBT_DEFAULTS_BLOCK
{
302 EFI_HII_GLYPH_BLOCK Header
;
303 EFI_HII_GLYPH_INFO Cell
;
304 } EFI_HII_GIBT_DEFAULTS_BLOCK
;
309 Indicates that the glyph with character value CharValueCurrent
310 has the same glyph as a previously defined character value and
311 increments CharValueCurrent by one.
313 @param Header Standard glyph block header, where
314 Header.BlockType = EFI_HII_GIBT_DUPLICATE.
316 @param CharValue The previously defined character value with
317 the exact same glyph.
320 typedef struct _EFI_HII_GIBT_DUPLICATE_BLOCK
{
321 EFI_HII_GLYPH_BLOCK Header
;
323 } EFI_HII_GIBT_DUPLICATE_BLOCK
;
328 Any glyphs with a character value greater than or equal to
329 CharValueCurrent are empty.
331 @param Header Standard glyph block header, where
332 Header.BlockType = EFI_HII_GIBT_END.
335 typedef struct _EFI_GLYPH_GIBT_END_BLOCK
{
336 EFI_HII_GLYPH_BLOCK Header
;
337 } EFI_GLYPH_GIBT_END_BLOCK
;
341 These are reserved for future expansion, with length bytes
342 included so that they can be easily skipped.
344 @param Header Standard glyph block header, where
345 Header.BlockType = EFI_HII_GIBT_EXT1,
346 EFI_HII_GIBT_EXT2 or EFI_HII_GIBT_EXT4.
348 @param Length Size of the glyph block, in bytes.
351 typedef struct _EFI_HII_GIBT_EXT1_BLOCK
{
352 EFI_HII_GLYPH_BLOCK Header
;
355 } EFI_HII_GIBT_EXT1_BLOCK
;
360 These are reserved for future expansion, with length bytes
361 included so that they can be easily skipped.
363 @param Header Standard glyph block header, where
364 Header.BlockType = EFI_HII_GIBT_EXT1,
365 EFI_HII_GIBT_EXT2 or EFI_HII_GIBT_EXT4.
367 @param Length Size of the glyph block, in bytes.
370 typedef struct _EFI_HII_GIBT_EXT2_BLOCK
{
371 EFI_HII_GLYPH_BLOCK Header
;
374 } EFI_HII_GIBT_EXT2_BLOCK
;
378 These are reserved for future expansion, with length bytes
379 included so that they can be easily skipped.
381 @param Header Standard glyph block header, where
382 Header.BlockType = EFI_HII_GIBT_EXT1,
383 EFI_HII_GIBT_EXT2 or EFI_HII_GIBT_EXT4.
385 @param Length Size of the glyph block, in bytes.
388 typedef struct _EFI_HII_GIBT_EXT4_BLOCK
{
389 EFI_HII_GLYPH_BLOCK Header
;
392 } EFI_HII_GIBT_EXT4_BLOCK
;
397 This block provides the bitmap for the character with the value
398 CharValueCurrent and increments CharValueCurrent by one. Each
399 glyph contains a glyph width and height, a drawing offset,
400 number of pixels to advance after drawing and then the encoded
403 @param Header Standard glyph block header, where
404 Header.BlockType = EFI_HII_GIBT_GLYPH.
406 @param Cell Contains the width and height of the encoded
407 bitmap (Cell.Width and Cell.Height), the number
408 of pixels (signed) right of the character cell
409 origin where the left edge of the bitmap should
410 be placed (Cell.OffsetX), the number of pixels
411 above the character cell origin where the top
412 edge of the bitmap should be placed
413 (Cell.OffsetY) and the number of pixels (signed)
414 to move right to find the origin for the next
415 charactercell (Cell.AdvanceX).
417 @param GlyphCount The number of glyph bitmaps.
419 @param BitmapData The bitmap data specifies a series of
420 pixels, one bit per pixel, left-to-right,
421 top-tobottom. Each glyph bitmap only
422 encodes the portion of the bitmap enclosed
423 by its character-bounding box, but the
424 entire glyph is padded out to the nearest
425 byte. The number of bytes per bitmap can
426 be calculated as: ((Cell.Width + 7)/8) *
431 typedef struct _EFI_HII_GIBT_GLYPH_BLOCK
{
432 EFI_HII_GLYPH_BLOCK Header
;
433 EFI_HII_GLYPH_INFO Cell
;
436 } EFI_HII_GIBT_GLYPH_BLOCK
;
440 Provides the bitmaps for the characters with the values
441 CharValueCurrent through CharValueCurrent + Count -1 and
442 increments CharValueCurrent by Count. These glyphs have
443 identical cell information and the encoded bitmaps are exactly
444 the same number of byes.
446 @param Header Standard glyph block header, where
447 Header.BlockType = EFI_HII_GIBT_GLYPHS.
449 @param Cell Contains the width and height of the encoded
450 bitmap (Cell.Width and Cell.Height), the
451 number of pixels (signed) right of the
452 character cell origin where the left edge of
453 the bitmap should be placed (Cell.OffsetX),
454 the number of pixels above the character cell
455 origin where the top edge of the bitmap should
456 be placed (Cell.OffsetY) and the number of
457 pixels(signed) to move right to find the
458 origin for the next character cell
461 @param BitmapData The bitmap data specifies a series of
462 pixels, one bit per pixel, left-to-right,
463 top-tobottom, for each glyph. Each glyph
464 bitmap only encodes the portion of the
465 bitmap enclosed by its character-bounding
466 box. The number of bytes per bitmap can be
467 calculated as: ((Cell.Width + 7)/8) *
471 typedef struct _EFI_HII_GIBT_GLYPHS_BLOCK
{
472 EFI_HII_GLYPH_BLOCK Header
;
473 EFI_HII_GLYPH_INFO Cell
;
475 } EFI_HII_GIBT_GLYPHS_BLOCK
;
479 Provides the bitmap for the character with the value
480 CharValueCurrent and increments CharValueCurrent by 1. This
481 glyph uses the default cell information. The default cell
482 information is found in the font header or the most recently
483 processed EFI_HII_GIBT_DEFAULTS.
485 @param Header Standard glyph block header, where
486 Header.BlockType = EFI_HII_GIBT_GLYPH_DEFAULT.
488 @param BitmapData The bitmap data specifies a series of
489 pixels, one bit per pixel, left-to-right,
490 top-tobottom. Each glyph bitmap only
491 encodes the portion of the bitmap enclosed
492 by its character-bounding box. The number
493 of bytes per bitmap can be calculated as:
494 ((Global.Cell.Width + 7)/8) *
498 typedef struct _EFI_HII_GIBT_GLYPH_DEFAULT_BLOCK
{
499 EFI_HII_GLYPH_BLOCK Header
;
501 } EFI_HII_GIBT_GLYPH_DEFAULT_BLOCK
;
508 Provides the bitmaps for the characters with the values
509 CharValueCurrent through CharValueCurrent + Count -1 and
510 increments CharValueCurrent by Count. These glyphs use the
511 default cell information and the encoded bitmaps have exactly
512 the same number of byes.
514 @param Header Standard glyph block header, where
516 EFI_HII_GIBT_GLYPHS_DEFAULT.
518 @param Count Number of glyphs in the glyph block.
520 @param BitmapData The bitmap data specifies a series of
521 pixels, one bit per pixel, left-to-right,
522 top-tobottom, for each glyph. Each glyph
523 bitmap only encodes the portion of the
524 bitmap enclosed by its character-bounding
525 box. The number of bytes per bitmap can be
526 calculated as: ((Global.Cell.Width + 7)/8)
530 typedef struct _EFI_HII_GIBT_GLYPHS_DEFAULT_BLOCK
{
531 EFI_HII_GLYPH_BLOCK Header
;
534 } EFI_HII_GIBT_GLYPHS_DEFAULT_BLOCK
;
538 Increments the current character value CharValueCurrent by the
541 @param Header Standard glyph block header, where BlockType =
542 EFI_HII_GIBT_SKIP1 or EFI_HII_GIBT_SKIP2.
544 @param SkipCount The unsigned 8- or 16-bit value to add to
548 typedef struct _EFI_HII_GIBT_SKIP2_BLOCK
{
549 EFI_HII_GLYPH_BLOCK Header
;
551 } EFI_HII_GIBT_SKIP2_BLOCK
;
556 Increments the current character value CharValueCurrent by the
559 @param Header Standard glyph block header, where BlockType =
560 EFI_HII_GIBT_SKIP1 or EFI_HII_GIBT_SKIP2.
562 @param SkipCount The unsigned 8- or 16-bit value to add to
566 typedef struct _EFI_HII_GIBT_SKIP1_BLOCK
{
567 EFI_HII_GLYPH_BLOCK Header
;
569 } EFI_HII_GIBT_SKIP1_BLOCK
;
574 This package is created by NewPackageList() when the package
575 list is first added to the HII database by locating the
576 EFI_DEVICE_PATH_PROTOCOL attached to the driver handle passed in
580 typedef EFI_DEVICE_PATH_PROTOCOL EFI_HII_DEVICE_PATH_PACKAGE_HDR
;
585 This is a free-form package type designed to allow extensibility
586 by allowing the format to be specified using Guid.
588 @param Guid Identifier which describes the remaining data
592 typedef struct _EFI_HII_GUID_PACKAGE_HDR
{
594 } EFI_HII_GUID_PACKAGE_HDR
;
599 The Strings package record describes the mapping between string
600 identifiers and the actual text of the strings themselves. The
601 package consists of three parts: a fixed header, the string
602 information and the font information.
604 @param Header The standard package header, where Header.Type
605 = EFI_HII_PACKAGE_STRINGS.
607 @param HdrSize Size of this header.
609 @param StringInfoOffset Offset, relative to the start of
610 this header, of the string information.
612 @param LanguageWindow Specifies the default values placed in
613 the static and dynamic windows before
614 processing each SCSU-encoded strings.
617 @param LanguageName String identifier within the current
618 string package of the full name of the
619 language specified by Language. Language
620 Language of the strings, as specified by
624 typedef struct _EFI_HII_STRING_PACKAGE_HDR
{
625 EFI_HII_PACKAGE_HEADER Header
;
627 UINT32 StringInfoOffset
;
628 CHAR16 LanguageWindow
[16];
629 EFI_STRING_ID LanguageName
;
631 } EFI_HII_STRING_PACKAGE_HDR
;
637 The fixed header consists of a standard record header and then
638 the character values in this section, the flags (including the
639 encoding method) and the offsets of the glyph information, the
640 glyph bitmaps and the character map.
642 @param Header The standard package header, where Header.Size
643 EFI_HII_PACKAGE_FONTS.
645 @param HdrSize Size of this header.
647 @param GlyphInfoOffset The offset, relative to the start of
648 this header, of a series of
649 variable-length glyph blocks, each
650 describing information about the
651 bitmap associated with a glyph.
653 @param Cell This contains the measurement of the widest and
654 tallest characters in the font (Cell.Width and
655 Cell.Height). It also contains the offset to the
656 horizontal and vertical origin point of the
657 character cell (Cell.OffsetX and Cell.OffsetY).
658 Finally, it contains the default AdvanceX. The
659 individual glyph's OffsetX and OffsetY value is
660 added to this position to determine where to
661 draw the top-left pixel of the character's
662 glyph. The character glyph's AdvanceX is added
663 to this position to determine the origin point
664 for the next character.
666 @param FontStyle The design style of the font, 1 bit per
667 style. See EFI_HII_FONT_STYLE.
669 @param FontFamily The null-terminated string with the name
670 of the font family to which the font
674 typedef struct _EFI_HII_FONT_PACKAGE_HDR
{
675 EFI_HII_PACKAGE_HEADER Header
;
677 UINT32 GlyphBlockOffset
;
678 EFI_HII_GLYPH_INFO Cell
;
679 EFI_HII_FONT_STYLE FontStyle
;
680 CHAR16 FontFamily
[1];
681 } EFI_HII_FONT_PACKAGE_HDR
;
685 // EFI_HII_STRING_BLOCK.BlockType
687 #define FI_HII_SIBT_END 0x00
688 #define EFI_HII_SIBT_STRING_SCSU 0x10
689 #define EFI_HII_SIBT_STRING_SCSU_FONT 0x11
690 #define EFI_HII_SIBT_STRINGS_SCSU 0x12
691 #define EFI_HII_SIBT_STRINGS_SCSU_FONT 0x13
692 #define EFI_HII_SIBT_STRING_UCS2 0x14
693 #define EFI_HII_SIBT_STRING_UCS2_FONT 0x15
694 #define EFI_HII_SIBT_STRINGS_UCS2 0x16
695 #define EFI_HII_SIBT_STRINGS_UCS2_FONT 0x17
696 #define EFI_HII_SIBT_DUPLICATE 0x20
697 #define EFI_HII_SIBT_SKIP2 0x21
698 #define EFI_HII_SIBT_SKIP1 0x22
699 #define EFI_HII_SIBT_EXT1 0x30
700 #define EFI_HII_SIBT_EXT2 0x31
701 #define EFI_HII_SIBT_EXT4 0x32
702 #define EFI_HII_SIBT_FONT 0x40
706 String blocks specify the text and font for the current string
707 identifier and increment to the next string identifier.
712 } EFI_HII_STRING_BLOCK
;
717 Indicates that the string with string identifier
718 StringIdCurrent is the same as a previously defined string and
719 increments StringIdCurrent by one.
721 @param Header Standard string block header, where
722 Header.BlockType = EFI_HII_SIBT_DUPLICATE.
724 @param StringId The string identifier of a previously
725 defined string with the exact same string
730 typedef struct _EFI_HII_SIBT_DUPLICATE_BLOCK
{
731 EFI_HII_STRING_BLOCK Header
;
732 EFI_STRING_ID StringId
;
733 } EFI_HII_SIBT_DUPLICATE_BLOCK
;
737 Any strings with a string identifier greater than or equal to
738 StringIdCurrent are empty.
740 @param Header Standard string block header, where
741 Header.BlockType = EFI_HII_SIBT_END.
744 typedef struct _EFI_HII_SIBT_END_BLOCK
{
745 EFI_HII_STRING_BLOCK Header
;
746 } EFI_HII_SIBT_END_BLOCK
;
751 These are reserved for future expansion, with length bytes
752 included so that they can be easily skip
754 @param Header Standard string block header, where
755 Header.BlockType = EFI_HII_SIBT_EXT1,
756 EFI_HII_SIBT_EXT2 or EFI_HII_SIBT_EXT4.
758 @param Length Size of the string block, in bytes.
761 typedef struct _EFI_HII_SIBT_EXT1_BLOCK
{
762 EFI_HII_STRING_BLOCK Header
;
765 } EFI_HII_SIBT_EXT1_BLOCK
;
769 These are reserved for future expansion, with length bytes
770 included so that they can be easily skip
772 @param Header Standard string block header, where
773 Header.BlockType = EFI_HII_SIBT_EXT1,
774 EFI_HII_SIBT_EXT2 or EFI_HII_SIBT_EXT4.
776 @param Length Size of the string block, in bytes.
779 typedef struct _EFI_HII_SIBT_EXT2_BLOCK
{
780 EFI_HII_STRING_BLOCK Header
;
783 } EFI_HII_SIBT_EXT2_BLOCK
;
787 These are reserved for future expansion, with length bytes
788 included so that they can be easily skip
790 @param Header Standard string block header, where
791 Header.BlockType = EFI_HII_SIBT_EXT1,
792 EFI_HII_SIBT_EXT2 or EFI_HII_SIBT_EXT4.
794 @param Length Size of the string block, in bytes.
797 typedef struct _EFI_HII_SIBT_EXT4_BLOCK
{
798 EFI_HII_STRING_BLOCK Header
;
801 } EFI_HII_SIBT_EXT4_BLOCK
;
805 Associates a font identifier FontId with a font name FontName,
806 size FontSize and style FontStyle. This font identifier may be
807 used with the string blocks. The font identifier 0 is the
808 default font for those string blocks which do not specify a font
811 @param Header Standard extended header, where
812 Header.BlockType = EFI_HII_SIBT_FONT.
814 @param FontId Font identifier, which must be unique within
817 @param FontSize Character cell size, in pixels, of the font.
819 @param FontStyle Font style.
821 @param FontName Null-terminated font family name.
824 typedef struct _EFI_HII_SIBT_FONT_BLOCK
{
825 EFI_HII_SIBT_EXT2_BLOCK Header
;
828 EFI_HII_FONT_STYLE FontStyle
;
830 } EFI_HII_SIBT_FONT_BLOCK
;
834 Increments the current string identifier StringIdCurrent by the
837 @param Header Standard string block header, where
838 Header.BlockType = EFI_HII_SIBT_SKIP1.
840 @param SkipCount The unsigned 8-bit value to add to
844 typedef struct _EFI_HII_SIBT_SKIP1_BLOCK
{
845 EFI_HII_STRING_BLOCK Header
;
847 } EFI_HII_SIBT_SKIP1_BLOCK
;
851 Increments the current string identifier StringIdCurrent by
852 the number specified.
854 @param Header Standard string block header, where
855 Header.BlockType = EFI_HII_SIBT_SKIP2.
857 @param SkipCount The unsigned 16-bit value to add to
861 typedef struct _EFI_HII_SIBT_SKIP2_BLOCK
{
862 EFI_HII_STRING_BLOCK Header
;
864 } EFI_HII_SIBT_SKIP2_BLOCK
;
868 This string block provides the SCSU-encoded text for the string
869 in the default font with string identifier StringIdCurrent and
870 increments StringIdCurrent by one.
872 @param Header Standard header where Header.BlockType =
873 EFI_HII_SIBT_STRING_SCSU.
875 @param StringText The string text is a null-terminated
876 string, which is assigned to the string
877 identifier StringIdCurrent.
880 typedef struct _EFI_HII_SIBT_STRING_SCSU_BLOCK
{
881 EFI_HII_STRING_BLOCK Header
;
883 } EFI_HII_SIBT_STRING_SCSU_BLOCK
;
888 This string block provides the SCSU-encoded text for the string
889 in the font specified by FontIdentifier with string identifier
890 StringIdCurrent and increments StringIdCurrent by one.
892 @param Header Standard string block header, where
893 Header.BlockType = EFI_HII_SIBT_STRING_SCSU_FONT.
895 @param FontIdentifier The identifier of the font to be used
896 as the starting font for the entire
897 string. The identifier must either be
898 0 for the default font or an
899 identifier previously specified by an
900 EFI_HII_SIBT_FONT block. Any string
901 characters that deviates from this
902 font family, size or style must
903 provide an explicit control character.
905 @param StringText The string text is a null-terminated
906 encoded string, which is assigned to the
907 string identifier StringIdCurrent.
911 typedef struct _EFI_HII_SIBT_STRING_SCSU_FONT_BLOCK
{
912 EFI_HII_STRING_BLOCK Header
;
913 UINT8 FontIdentifier
;
915 } EFI_HII_SIBT_STRING_SCSU_FONT_BLOCK
;
920 This string block provides the SCSU-encoded text for StringCount
921 strings which have the default font and which have sequential
922 string identifiers. The strings are assigned the identifiers,
923 starting with StringIdCurrent and continuing through
924 StringIdCurrent + StringCount ??C 1. StringIdCurrent is
925 incremented by StringCount.
927 @param Header Standard header where Header.BlockType =
928 EFI_HII_SIBT_STRINGS_SCSU.
930 @param StringCount Number of strings in StringText.
932 @param StringText The strings, where each string is a
933 null-terminated encoded string.
936 typedef struct _EFI_HII_SIBT_STRINGS_SCSU_BLOCK
{
937 EFI_HII_STRING_BLOCK Header
;
940 } EFI_HII_SIBT_STRINGS_SCSU_BLOCK
;
945 This string block provides the SCSU-encoded text for StringCount
946 strings which have the font specified by FontIdentifier and
947 which have sequential string identifiers. The strings are
948 assigned the identifiers, starting with StringIdCurrent and
949 continuing through StringIdCurrent + StringCount ??C 1.
950 StringIdCurrent is incremented by StringCount.
952 @param Header Standard header where Header.BlockType =
953 EFI_HII_SIBT_STRINGS_SCSU_FONT.
955 @param StringCount Number of strings in StringText.
957 @param FontIdentifier The identifier of the font to be used
958 as the starting font for the entire
959 string. The identifier must either be
960 0 for the default font or an
961 identifier previously specified by an
962 EFI_HII_SIBT_FONT block. Any string
963 characters that deviates from this
964 font family, size or style must
965 provide an explicit control character.
967 @param StringText The strings, where each string is a
968 null-terminated encoded string.
971 typedef struct _EFI_HII_SIBT_STRINGS_SCSU_FONT_BLOCK
{
972 EFI_HII_STRING_BLOCK Header
;
974 UINT8 FontIdentifier
;
976 } EFI_HII_SIBT_STRINGS_SCSU_FONT_BLOCK
;
981 This string block provides the UCS-2 encoded text for the string
982 in the default font with string identifier StringIdCurrent and
983 increments StringIdCurrent by one.
985 @param Header Standard header where Header.BlockType =
986 EFI_HII_SIBT_STRING_UCS2.
988 @param StringText The string text is a null-terminated UCS-2
989 string, which is assigned to the string
990 identifier StringIdCurrent.
993 typedef struct _EFI_HII_SIBT_STRING_UCS2_BLOCK
{
994 EFI_HII_STRING_BLOCK Header
;
995 CHAR16 StringText
[1];
996 } EFI_HII_SIBT_STRING_UCS2_BLOCK
;
1001 This string block provides the UCS-2 encoded text for the string
1002 in the font specified by FontIdentifier with string identifier
1003 StringIdCurrent and increments StringIdCurrent by one
1005 @param Header Standard header where Header.BlockType =
1006 EFI_HII_SIBT_STRING_UCS2_FONT.
1008 @param FontIdentifier The identifier of the font to be used
1009 as the starting font for the entire
1010 string. The identifier must either be
1011 0 for the default font or an
1012 identifier previously specified by an
1013 EFI_HII_SIBT_FONT block. Any string
1014 characters that deviates from this
1015 font family, size or style must
1016 provide an explicit control character.
1018 @param StringText The string text is a null-terminated UCS-2
1019 string, which is assigned to the string
1020 identifier StringIdCurrent.
1023 typedef struct _EFI_HII_SIBT_STRING_UCS2_FONT_BLOCK
{
1024 EFI_HII_STRING_BLOCK Header
;
1025 UINT8 FontIdentifier
;
1026 CHAR16 StringText
[1];
1027 } EFI_HII_SIBT_STRING_UCS2_FONT_BLOCK
;
1032 This string block provides the UCS-2 encoded text for the
1033 strings in the default font with string identifiers
1034 StringIdCurrent to StringIdCurrent + StringCount - 1 and
1035 increments StringIdCurrent by StringCount.
1037 @param Header Standard header where Header.BlockType =
1038 EFI_HII_SIBT_STRINGS_UCS2.
1040 @param StringCount Number of strings in StringText.
1042 @param StringText The string text is a series of
1043 null-terminated UCS-2 strings, which are
1044 assigned to the string identifiers
1045 StringIdCurrent.to StringIdCurrent +
1049 typedef struct _EFI_HII_SIBT_STRINGS_UCS2_BLOCK
{
1050 EFI_HII_STRING_BLOCK Header
;
1052 CHAR16 StringText
[1];
1053 } EFI_HII_SIBT_STRINGS_UCS2_BLOCK
;
1058 The fixed header consists of a standard record header and the
1059 offsets of the image and palette information.
1061 @param Header Standard package header, where Header.Type =
1062 EFI_HII_PACKAGE_IMAGES. ImageInfoOffset
1063 Offset, relative to this header, of the image
1064 information. If this is zero, then there are
1065 no images in the package.
1067 @param PaletteInfoOffset Offset, relative to this header, of
1068 the palette information. If this is
1069 zero, then there are no palettes in
1073 typedef struct _EFI_HII_IMAGE_PACKAGE_HDR
{
1074 EFI_HII_PACKAGE_HEADER Header
;
1075 UINT32 ImageInfoOffset
;
1076 UINT32 PaletteInfoOffset
;
1077 } EFI_HII_IMAGE_PACKAGE_HDR
;
1081 // EFI_HII_IMAGE_BLOCK
1083 typedef struct _EFI_HII_IMAGE_BLOCK
{
1086 } EFI_HII_IMAGE_BLOCK
;
1089 // EFI_HII_IMAGE_BLOCK.BlockType.
1091 #define EFI_HII_IIBT_END 0x00
1092 #define EFI_HII_IIBT_IMAGE_1BIT 0x10
1093 #define EFI_HII_IIBT_IMAGE_1BIT_TRANS 0x11
1094 #define EFI_HII_IIBT_IMAGE_4BIT 0x12
1095 #define EFI_HII_IIBT_IMAGE_4BIT_TRANS 0x13
1096 #define EFI_HII_IIBT_IMAGE_8BIT 0x14
1097 #define EFI_HII_IIBT_IMAGE_8BIT_TRANS 0x15
1098 #define EFI_HII_IIBT_IMAGE_24BIT 0x16
1099 #define EFI_HII_IIBT_IMAGE_24BIT_TRANS 0x17
1100 #define EFI_HII_IIBT_IMAGE_JPEG 0x18
1101 #define EFI_HII_IIBT_DUPLICATE 0x20
1102 #define EFI_HII_IIBT_SKIP2 0x21
1103 #define EFI_HII_IIBT_SKIP1 0x22
1104 #define EFI_HII_IIBT_EXT1 0x30
1105 #define EFI_HII_IIBT_EXT2 0x31
1106 #define EFI_HII_IIBT_EXT4 0x32
1111 Any images with an image identifier greater than or equal to
1112 ImageIdCurrent are empty.
1114 @param Header Standard image block header, where
1115 Header.BlockType = EFI_HII_IIBT_END.
1118 typedef struct _EFI_HII_IIBT_END_BLOCK
{
1119 EFI_HII_IMAGE_BLOCK Header
;
1120 } EFI_HII_IIBT_END_BLOCK
;
1125 Future extensions for image records which need a length-byte
1126 length use this prefix.
1128 @param Header Standard image block header, where
1129 Header.BlockType = EFI_HII_IIBT_EXT1,
1130 EFI_HII_IIBT_EXT2 or EFI_HII_IIBT_EXT4.
1132 @param Length Size of the image block, in bytes, including
1133 the image block header.
1136 typedef struct _EFI_HII_IIBT_EXT1_BLOCK
{
1137 EFI_HII_IMAGE_BLOCK Header
;
1140 } EFI_HII_IIBT_EXT1_BLOCK
;
1144 Future extensions for image records which need a length-byte
1145 length use this prefix.
1147 @param Header Standard image block header, where
1148 Header.BlockType = EFI_HII_IIBT_EXT1,
1149 EFI_HII_IIBT_EXT2 or EFI_HII_IIBT_EXT4.
1151 @param Length Size of the image block, in bytes, including
1152 the image block header.
1155 typedef struct _EFI_HII_IIBT_EXT2_BLOCK
{
1156 EFI_HII_IMAGE_BLOCK Header
;
1159 } EFI_HII_IIBT_EXT2_BLOCK
;
1163 Future extensions for image records which need a length-byte
1164 length use this prefix.
1166 @param Header Standard image block header, where
1167 Header.BlockType = EFI_HII_IIBT_EXT1,
1168 EFI_HII_IIBT_EXT2 or EFI_HII_IIBT_EXT4.
1170 @param Length Size of the image block, in bytes, including
1171 the image block header.
1174 typedef struct _EFI_HII_IIBT_EXT4_BLOCK
{
1175 EFI_HII_IMAGE_BLOCK Header
;
1178 } EFI_HII_IIBT_EXT4_BL0CK
;
1181 // EFI_HII_IIBT_IMAGE_1BIT_BASE
1183 typedef struct _EFI_HII_IIBT_IMAGE_1BIT_BASE
{
1187 } EFI_HII_IIBT_IMAGE_1BIT_BASE
;
1191 This record assigns the 1-bit-per-pixel bitmap data to the
1192 ImageIdCurrent identifier and increment ImageIdCurrent by one.
1193 The data in the EFI_HII_IMAGE_1BIT_TRANS structure is exactly
1194 the same as the EFI_HII_IMAGE_1BIT structure, the difference is
1195 how the data is treated. The bitmap pixel value 0 is the
1196 transparency value and will not be written to the
1197 screen. The bitmap pixel value 1 will be translated to the color
1198 specified by Palette.
1200 @param Header Standard image header, where Header.BlockType
1201 = EFI_HII_IIBT_IMAGE_1BIT_TRANS.
1203 @param PaletteIndex Index of the palette in the palette
1206 @param Bitmap The bitmap specifies a series of pixels, one
1207 bit per pixel, left-to-right, top-to-bottom,
1208 and is padded out to the nearest byte. The
1209 number of bytes per bitmap can be calculated
1210 as: ((Width + 7)/8) * Height.
1213 typedef struct _EFI_HII_IBIT_IMAGE_1BIT_BLOCK
{
1214 EFI_HII_IMAGE_BLOCK Header
;
1216 EFI_HII_IIBT_IMAGE_1BIT_BASE Bitmap
;
1217 } EFI_HII_IIBT_IMAGE_1BIT_BLOCK
;
1219 typedef EFI_HII_IIBT_IMAGE_1BIT_BLOCK EFI_HII_IIBT_IMAGE_1BIT_TRANS_BLOCK
;
1223 // EFI_HII_RGB_PIXEL
1225 typedef struct _EFI_HII_RGB_PIXEL
{
1229 } EFI_HII_RGB_PIXEL
;
1232 // FI_HII_IIBT_IMAGE_24BIT_BASE
1234 typedef struct _EFI_HII_IIBT_IMAGE_24BIT_BASE
{
1237 // EFI_HII_RGB_PIXEL Bitmap[...];
1238 } EFI_HII_IIBT_IMAGE_24BIT_BASE
;
1242 This record assigns the 24-bit-per-pixel bitmap data to the
1243 ImageIdCurrent identifier and increment ImageIdCurrent by one.
1244 The image's upper left hand corner pixel is composed of the
1245 first three bitmap bytes. The first byte is the pixel????s blue
1246 component value, the next byte is the pixel????s green component
1247 value, and the third byte is the pixel's red component value
1248 (B,G,R). Each color component value can vary from 0x00 (color
1249 off) to 0xFF (color full on), allowing 16.8 millions colors that
1252 @param Header Standard image header, where Header.BlockType
1253 = EFI_HII_IIBT_IMAGE_24BIT. Bitmap The bitmap
1254 specifies a series of pixels, 24 bits per
1255 pixel, left-to-right, top-to-bottom. The
1256 number of bytes per bitmap can be calculated
1257 as: (Width * 3) * Height.
1259 @param Type See EFI_HII_RGB_PIXEL definition.
1263 EFI_HII_IMAGE_BLOCK Header
;
1264 EFI_HII_IIBT_IMAGE_24BIT_BASE Bitmap
;
1265 } EFI_HII_IIBT_IMAGE_24BIT_BLOCK
;
1267 typedef EFI_HII_IIBT_IMAGE_24BIT_BLOCK EFI_HII_IIBT_IMAGE_24BIT_TRANS_BLOCK
;
1272 // EFI_HII_IIBT_IMAGE_4BIT_BASE
1274 typedef struct _EFI_HII_IIBT_IMAGE_4BIT_BASE
{
1278 } EFI_HII_IIBT_IMAGE_4BIT_BASE
;
1282 This record assigns the 4-bit-per-pixel bitmap data to the
1283 ImageIdCurrent identifier using the specified palette and
1284 increment ImageIdCurrent by one. The image????s upper left hand
1285 corner pixel is the most significant nibble of the first bitmap
1288 @param Header Standard image header, where Header.BlockType
1289 = EFI_HII_IIBT_IMAGE_4BIT.
1291 @param PaletteIndex Index of the palette in the palette
1294 @param Bitmap The bitmap specifies a series of pixels, four
1295 bits per pixel, left-to-right, top-to-bottom,
1296 and is padded out to the nearest byte. The
1297 number of bytes per bitmap can be calculated
1298 as: ((Width + 1)/2) Height.
1301 typedef struct _EFI_HII_IIBT_IMAGE_4BIT_BLOCK
{
1302 EFI_HII_IMAGE_BLOCK Header
;
1304 EFI_HII_IIBT_IMAGE_4BIT_BASE Bitmap
;
1305 } EFI_HII_IIBT_IMAGE_4BIT_BLOCK
;
1307 typedef EFI_HII_IIBT_IMAGE_4BIT_BLOCK EFI_HII_IIBT_IMAGE_4BIT_TRANS_BLOCK
;
1312 // EFI_HII_IIBT_IMAGE_8BIT_BASE
1314 typedef struct _EFI_HII_IIBT_IMAGE_8BIT_BASE
{
1318 } EFI_HII_IIBT_IMAGE_8BIT_BASE
;
1322 This record assigns the 8-bit-per-pixel bitmap data to the
1323 ImageIdCurrent identifier using the specified palette and
1324 increment ImageIdCurrent by one. The image????s upper left hand
1325 corner pixel is the first bitmap byte.
1327 @param Header Standard image header, where Header.BlockType
1328 = EFI_HII_IIBT_IMAGE_8BIT.
1330 @param PaletteIndex Index of the palette in the palette
1333 @param Bitmap The bitmap specifies a series of pixels, eight
1334 bits per pixel, left-to-right, top-to-bottom.
1335 The number of bytes per bitmap can be
1336 calculated as: Width * Height.
1339 typedef struct _EFI_HII_IIBT_IMAGE_8BIT_PALETTE
{
1340 EFI_HII_IMAGE_BLOCK Header
;
1342 EFI_HII_IIBT_IMAGE_8BIT_BASE Bitmap
;
1343 } EFI_HII_IIBT_IMAGE_8BIT_PALETTE
;
1345 typedef EFI_HII_IIBT_IMAGE_8BIT_PALETTE EFI_HII_IIBT_IMAGE_8BIT_TRANS_BLOCK
;
1350 Indicates that the image with image ID ImageValueCurrent has the
1351 same image as a previously defined image ID and increments
1352 ImageValueCurrent by one
1354 @param Header Standard image header, where Header.BlockType
1355 = EFI_HII_IIBT_DUPLICATE.
1357 @param ImageId The previously defined image ID with the exact
1362 typedef struct _EFI_HII_IIBT_DUPLICATE_BLOCK
{
1363 EFI_HII_IMAGE_BLOCK Header
;
1364 EFI_IMAGE_ID ImageId
;
1365 } EFI_HII_IIBT_DUPLICATE_BLOCK
;
1370 This record assigns the JPEG image data to the ImageIdCurrent
1371 identifier and increment ImageIdCurrent by one. The JPEG decoder
1372 is only required to cover the basic JPEG encoding types, which
1373 are produced by standard available paint packages (for example:
1374 MSPaint under Windows from Microsoft). This would include JPEG
1375 encoding of high (1:1:1) and medium (4:1:1) quality with only
1376 three components (R,G,B) ??C no support for the special gray
1379 @param Header Standard image header, where Header.BlockType
1380 = EFI_HII_IIBT_IMAGE_JPEG.
1382 @param Size Specifies the size of the JPEG encoded data.
1384 @param Data JPEG encoded data with ????JFIF???? signature at
1385 offset 6 in the data block. The JPEG encoded
1386 data, specifies type of encoding and final size
1387 of true-color image.
1390 typedef struct _EFI_HII_IIBT_JPEG
{
1391 EFI_HII_IMAGE_BLOCK Header
;
1393 //UINT8 Data[ ¡ ];
1394 } EFI_HII_IIBT_JPEG
;
1399 Increments the current image ID ImageIdCurrent by the number
1402 @param Header Standard image header, where Header.BlockType
1403 = EFI_HII_IIBT_SKIP1.
1405 @param SkipCount The unsigned 8-bit value to add to
1409 typedef struct _EFI_HII_IIBT_SKIP1_BLOCK
{
1410 EFI_HII_IMAGE_BLOCK Header
;
1412 } EFI_HII_IIBT_SKIP1_BLOCK
;
1416 Increments the current image ID ImageIdCurrent by the number
1419 @param Header Standard image header, where Header.BlockType
1420 = EFI_HII_IIBT_SKIP2.
1422 @param SkipCount The unsigned 16-bit value to add to
1426 typedef struct _EFI_HII_IIBT_SKIP2_BLOCK
{
1427 EFI_HII_IMAGE_BLOCK Header
;
1429 } EFI_HII_IIBT_SKIP2_BLOCK
;
1434 This fixed header is followed by zero or more variable-length
1435 palette information records. The structures are assigned a
1438 @param PaletteCount Number of palettes.
1441 typedef struct _EFI_HII_IMAGE_PALETTE_INFO_HEADER
{
1442 UINT16 PaletteCount
;
1443 } EFI_HII_IMAGE_PALETTE_INFO_HEADER
;
1447 Each palette information record is an array of 24-bit color
1448 structures. The first entry (PaletteValue[0]) corresponds to
1449 color 0 in the source image; the second entry (PaletteValue[1])
1450 corresponds to color 1, etc. Each palette entry is a three byte
1451 entry, with the first byte equal to the blue component of the
1452 color, followed by green, and finally red (B,G,R). Each color
1453 component value can vary from 0x00 (color off) to 0xFF (color
1454 full on), allowing 16.8 millions colors that can be specified.
1456 @param PaletteSize Size of the palette information.
1458 @param PaletteValue Array of color values.
1461 typedef struct _EFI_HII_IMAGE_PALETTE_INFO
{
1463 // EFI_HII_RGB_PIXEL PaletteValue[...];
1464 } EFI_HII_IMAGE_PALETTE_INFO
;
1469 // EFI_HII_DATABASE_NOTIFY_TYPE
1471 typedef UINTN EFI_HII_DATABASE_NOTIFY_TYPE
;
1472 #define EFI_HII_DATABASE_NOTIFY_NEW_PACK 0x00000001
1473 #define EFI_HII_DATABASE_NOTIFY_REMOVE_PACK 0x00000002
1474 #define EFI_HII_DATABASE_NOTIFY_EXPORT_PACK 0x00000004
1475 #define EFI_HII_DATABASE_NOTIFY_ADD_PACK 0x00000008
1478 Functions which are registered to receive notification of
1479 database events have this prototype. The actual event is encoded
1480 in NotifyType. The following table describes how PackageType,
1481 PackageGuid, Handle, and Package are used for each of the
1484 @param PackageType Package type of the notification.
1486 @param PackageGuid If PackageType is
1487 EFI_HII_PACKAGE_TYPE_GUID, then this is
1488 the pointer to the GUID from the Guid
1489 field of EFI_HII_PACKAGE_GUID_HEADER.
1490 Otherwise, it must be NULL.
1492 @param Package Points to the package referred to by the
1493 notification Handle The handle of the package
1494 list which contains the specified package.
1496 @param NotifyType The type of change concerning the
1498 EFI_HII_DATABASE_NOTIFY_TYPE.
1503 (EFIAPI
*EFI_HII_DATABASE_NOTIFY
) (
1504 IN CONST UINT8 PackageType
,
1505 IN CONST EFI_GUID
*PackageGuid
,
1506 IN CONST EFI_HII_PACKAGE_HEADER
*Package
,
1507 IN CONST EFI_HII_HANDLE Handle
,
1508 IN CONST EFI_HII_DATABASE_NOTIFY_TYPE NotifyType
1513 This function adds the packages in the package list to the
1514 database and returns a handle. If there is a
1515 EFI_DEVICE_PATH_PROTOCOL associated with the DriverHandle, then
1516 this function will create a package of type
1517 EFI_PACKAGE_TYPE_DEVICE_PATH and add it to the package list. For
1518 each package in the package list, registered functions with the
1519 notification type NEW_PACK and having the same package type will
1520 be called. For each call to NewPackageList(), there should be a
1521 corresponding call to
1522 EFI_HII_DATABASE_PROTOCOL.RemovePackageList().
1524 @param This A pointer to the EFI_HII_DATABASE_PROTOCOL
1527 @param PackageList A pointer to an
1528 EFI_HII_PACKAGE_LIST_HEADER structure.
1530 @param DriverHandle Associate the package list with this EFI
1531 handle Handle A pointer to the
1532 EFI_HII_HANDLE instance.
1534 @retval EFI_SUCCESS The package list associated with the
1535 Handle was added to the HII database.
1537 @retval EFI_OUT_OF_RESOURCES Unable to allocate necessary
1538 resources for the new database
1541 @retval EFI_INVALID_PARAMETER PackageList is NULL or Handle
1547 (EFIAPI
*EFI_HII_NEW_PACK
) (
1548 IN CONST EFI_HII_DATABASE_PROTOCOL
*This
,
1549 IN CONST EFI_HII_PACKAGE_LIST_HEADER
*PackageList
,
1550 IN CONST EFI_HANDLE DriverHandle
,
1551 OUT EFI_HII_HANDLE
*Handle
1557 This function removes the package list that is associated with a
1558 handle Handle from the HII database. Before removing the
1559 package, any registered functions with the notification type
1560 REMOVE_PACK and the same package type will be called. For each
1561 call to EFI_HII_DATABASE_PROTOCOL.NewPackageList(), there should
1562 be a corresponding call to RemovePackageList.
1564 @param This A pointer to the EFI_HII_DATABASE_PROTOCOL
1567 @param Handle The handle that was registered to the data
1568 that is requested for removal.
1570 @retval EFI_SUCCESS The data associated with the Handle was
1571 removed from the HII database.
1573 @retval EFI_INVALID_PARAMETER The Handle was not valid.
1578 (EFIAPI
*EFI_HII_REMOVE_PACK
) (
1579 IN CONST EFI_HII_DATABASE_PROTOCOL
*This
,
1580 IN CONST EFI_HII_HANDLE Handle
1586 This function updates the existing package list (which has the
1587 specified Handle) in the HII databases, using the new package
1588 list specified by PackageList. The update process has the
1589 following steps: Collect all the package types in the package
1590 list specified by PackageList. A package type consists of the
1591 Type field of EFI_HII_PACKAGE_HEADER and, if the Type is
1592 EFI_HII_PACKAGE_TYPE_GUID, the Guid field, as defined in
1593 EFI_HII_PACKAGE_GUID_HEADER. Iterate through the packages within
1594 the existing package list in the HII database specified by
1595 Handle. If a package??s type matches one of the types collected
1596 in step 1, then perform the following steps:
1597 - Call any functions registered with the notification type
1599 - Remove the package from the package list and the HII
1601 Add all of the packages within the new package list specified
1602 by PackageList, using the following steps:
1603 - Add the package to the package list and the HII database.
1604 - Call any functions registered with the notification type
1607 @param This A pointer to the EFI_HII_DATABASE_PROTOCOL
1610 @param Handle The handle that was registered to the data
1611 that is requested for removal.
1613 @param PackageList A pointer to an EFI_HII_PACKAGE_LIST
1616 @retval EFI_SUCCESS The HII database was successfully
1619 @retval EFI_OUT_OF_RESOURCES Unable to allocate enough memory
1620 for the updated database.
1622 @retval EFI_INVALID_PARAMETER The Handle was not valid.
1627 (EFIAPI
*EFI_HII_UPDATE_PACK
) (
1628 IN CONST EFI_HII_DATABASE_PROTOCOL
*This
,
1629 IN CONST EFI_HII_HANDLE Handle
,
1630 IN CONST EFI_HII_PACKAGE_LIST_HEADER
*PackageList
1636 This function returns a list of the package handles of the
1637 specified type that are currently active in the database. The
1638 pseudo-type EFI_HII_PACKAGE_TYPE_ALL will cause all package
1639 handles to be listed.
1641 @param This A pointer to the EFI_HII_DATABASE_PROTOCOL
1644 @param PackageType Specifies the package type of the packages
1645 to list or EFI_HII_PACKAGE_TYPE_ALL for
1646 all packages to be listed.
1648 @param PackageGuid If PackageType is
1649 EFI_HII_PACKAGE_TYPE_GUID, then this is
1650 the pointer to the GUID which must match
1652 EFI_HII_PACKAGE_GUID_HEADER. Otherwise, it
1655 @param HandleBufferLength On input, a pointer to the length
1656 of the handle buffer. On output,
1657 the length of the handle buffer
1658 that is required for the handles
1661 @param Handle An array of EFI_HII_HANDLE instances returned.
1664 @retval EFI_SUCCESS Handle was updated successfully.
1666 @retval EFI_BUFFER_TOO_SMALL The HandleBufferLength parameter
1667 indicates that Handle is too
1668 small to support the number of
1669 handles. HandleBufferLength is
1670 updated with a value that will
1671 enable the data to fit.
1677 (EFIAPI
*EFI_HII_LIST_PACKS
) (
1678 IN CONST EFI_HII_DATABASE_PROTOCOL
*This
,
1679 IN CONST UINT8 PackageType
,
1680 IN CONST EFI_GUID
*PackageGuid
,
1681 IN OUT UINTN
*HandleBufferLength
,
1682 OUT EFI_HII_HANDLE
*Handle
1692 This function will export one or all package lists in the
1693 database to a buffer. For each package list exported, this
1694 function will call functions registered with EXPORT_PACK and
1695 then copy the package list to the buffer. The registered
1696 functions may call EFI_HII_DATABASE_PROTOCOL.UpdatePackageList()
1697 to modify the package list before it is copied to the buffer. If
1698 the specified BufferSize is too small, then the status
1699 EFI_OUT_OF_RESOURCES will be returned and the actual package
1700 size will be returned in BufferSize.
1702 @param This A pointer to the EFI_HII_DATABASE_PROTOCOL
1705 @param Handle An EFI_HII_HANDLE that corresponds to the
1706 desired package list in the HII database to
1707 export or NULL to indicate all package lists
1710 @param BufferSize On input, a pointer to the length of the
1711 buffer. On output, the length of the
1712 buffer that is required for the exported
1715 @param Buffer A pointer to a buffer that will contain the
1716 results of the export function.
1719 @retval EFI_SUCCESS Package exported.
1721 @retval EFI_OUT_OF_RESOURCES BufferSize is too small to hold
1727 (EFIAPI
*EFI_HII_EXPORT_PACKS
) (
1728 IN CONST EFI_HII_DATABASE_PROTOCOL
*This
,
1729 IN CONST EFI_HII_HANDLE Handle
,
1730 IN OUT UINTN
*BufferSize
,
1731 OUT EFI_HII_PACKAGE_HEADER
*Buffer
1738 This function registers a function which will be called when
1739 specified actions related to packages of the specified type
1740 occur in the HII database. By registering a function, other
1741 HII-related drivers are notified when specific package types
1742 are added, removed or updated in the HII database. Each driver
1743 or application which registers a notification should use
1744 EFI_HII_DATABASE_PROTOCOL.UnregisterPackageNotify() before
1748 @param This A pointer to the EFI_HII_DATABASE_PROTOCOL
1751 @param PackageType The package type. See
1752 EFI_HII_PACKAGE_TYPE_x in EFI_HII_PACKAGE_HEADER.
1754 @param PackageGuid If PackageType is
1755 EFI_HII_PACKAGE_TYPE_GUID, then this is
1756 the pointer to the GUID which must match
1758 EFI_HII_PACKAGE_GUID_HEADER. Otherwise, it
1761 @param PackageNotifyFn Points to the function to be called
1762 when the event specified by
1763 NotificationType occurs. See
1764 EFI_HII_DATABASE_NOTIFY.
1766 @param NotifyType Describes the types of notification which
1767 this function will be receiving. See
1768 EFI_HII_DATABASE_NOTIFY_TYPE for more a
1771 @param NotifyHandle Points to the unique handle assigned to
1772 the registered notification. Can be used
1774 EFI_HII_DATABASE_PROTOCOL.UnregisterPack
1775 to stop notifications.
1778 @retval EFI_SUCCESS Notification registered successfully.
1780 @retval EFI_OUT_OF_RESOURCES Unable to allocate necessary
1783 @retval EFI_INVALID_PARAMETER PackageGuid is not NULL when
1785 EFI_HII_PACKAGE_TYPE_GUID.
1790 (EFIAPI
*EFI_HII_REGISTER_NOTIFY
) (
1791 IN CONST EFI_HII_DATABASE_PROTOCOL
*This
,
1792 IN CONST UINT8 PackageType
,
1793 IN CONST EFI_GUID
*PackageGuid
,
1794 IN CONST EFI_HII_DATABASE_NOTIFY PackageNotifyFn
,
1795 IN CONST EFI_HII_DATABASE_NOTIFY_TYPE NotifyType
,
1796 OUT EFI_HANDLE
*NotifyHandle
1802 Removes the specified HII database package-related notification.
1804 @param This A pointer to the EFI_HII_DATABASE_PROTOCOL
1807 @param NotificationHandle The handle of the notification
1808 function being unregistered.
1810 @retval EFI_SUCCESS Unregister the notification
1813 @retval EFI_INVALID_PARAMETER The Handle is invalid.
1818 (EFIAPI
*EFI_HII_UNREGISTER_NOTIFY
) (
1819 IN CONST EFI_HII_DATABASE_PROTOCOL
*This
,
1820 IN CONST EFI_HANDLE NotificationHandle
1826 @param Header The general pack header which defines both the
1827 type of pack and the length of the entire
1830 @param LayoutCount The number of keyboard layouts contained
1831 in the entire keyboard pack.
1833 @param Layout An array of LayoutCount number of keyboard
1838 EFI_HII_PACKAGE_HEADER Header
;
1840 // EFI_HII_KEYBOARD_LAYOUT Layout[...];
1841 } EFI_HII_KEYBOARD_PACK
;
1845 @param LayoutLength The length of the current keyboard
1848 @param Guid The unique ID associated with this keyboard
1851 @param LayoutDescriptorString An offset location (0 is the
1853 EFI_KEYBOARD_LAYOUT instance)
1854 of the string which describes
1855 this keyboard layout. The data
1856 that is being referenced is in
1857 EFI_DESCRIPTION_STRING_BUNDLE
1860 @param DescriptorCount The number of Descriptor entries in
1863 @param Descriptors An array of key descriptors.
1867 UINT16 LayoutLength
;
1869 RELOFST LayoutDescriptorString
;
1870 UINT8 DescriptorCount
;
1871 // EFI_KEY_DESCRIPTOR Descriptors[...];
1872 } EFI_HII_KEYBOARD_LAYOUT
;
1877 @param Language The language to associate with
1880 @param Space A space (U-0x0020) character to force as a
1881 separator between the Language field and the
1882 formal description string.
1884 @param DescriptionString A null-terminated description
1891 CHAR16 DescriptionString
[1];
1892 } EFI_DESCRIPTION_STRING
;
1896 @param DescriptionCount The number of description strings.
1898 @param DescriptionString An array of language-specific
1899 description strings.
1903 UINT16 DescriptionCount
;
1904 // EFI_DESCRIPTION_STRING DescriptionString[];
1905 } EFI_DESCRIPTION_STRING_BUNDLE
;
1909 See the figure below for which key corresponds to the values in
1910 the enumeration above. For example, EfiKeyLCtrl corresponds to
1911 the left control key in the lower-left corner of the keyboard,
1912 EfiKeyFour corresponds to the 4 key on the numeric keypad, and
1913 EfiKeySLck corresponds to the Scroll Lock key in the upper-right
1914 corner of the keyboard.
1918 EfiKeyLCtrl
, EfiKeyA0
, EfiKeyLAlt
, EfiKeySpaceBar
,
1919 EfiKeyA2
, EfiKeyA3
, EfiKeyA4
, EfiKeyRCtrl
, EfiKeyLeftArrow
,
1920 EfiKeyDownArrow
, EfiKeyRightArrow
, EfiKeyZero
,
1921 EfiKeyPeriod
, EfiKeyEnter
, EfiKeyLShift
, EfiKeyB0
,
1922 EfiKeyB1
, EfiKeyB2
, EfiKeyB3
, EfiKeyB4
, EfiKeyB5
, EfiKeyB6
,
1923 EfiKeyB7
, EfiKeyB8
, EfiKeyB9
, EfiKeyB10
, EfiKeyRshift
,
1924 EfiKeyUpArrow
, EfiKeyOne
, EfiKeyTwo
, EfiKeyThree
,
1925 EfiKeyCapsLock
, EfiKeyC1
, EfiKeyC2
, EfiKeyC3
, EfiKeyC4
,
1926 EfiKeyC5
, EfiKeyC6
, EfiKeyC7
, EfiKeyC8
, EfiKeyC9
,
1927 EfiKeyC10
, EfiKeyC11
, EfiKeyC12
, EfiKeyFour
, EfiKeyFive
,
1928 EfiKeySix
, EfiKeyPlus
, EfiKeyTab
, EfiKeyD1
, EfiKeyD2
,
1929 EfiKeyD3
, EfiKeyD4
, EfiKeyD5
, EfiKeyD6
, EfiKeyD7
, EfiKeyD8
,
1930 EfiKeyD9
, EfiKeyD10
, EfiKeyD11
, EfiKeyD12
, EfiKeyD13
,
1931 EfiKeyDel
, EfiKeyEnd
, EfiKeyPgDn
, EfiKeySeven
, EfiKeyEight
,
1932 EfiKeyNine
, EfiKeyE0
, EfiKeyE1
, EfiKeyE2
, EfiKeyE3
,
1933 EfiKeyE4
, EfiKeyE5
, EfiKeyE6
, EfiKeyE7
, EfiKeyE8
, EfiKeyE9
,
1934 EfiKeyE10
, EfiKeyE11
, EfiKeyE12
, EfiKeyBackSpace
,
1935 EfiKeyIns
, EfiKeyHome
, EfiKeyPgUp
, EfiKeyNLck
, EfiKeySlash
,
1936 EfiKeyAsterisk
, EfiKeyMinus
, EfiKeyEsc
, EfiKeyF1
, EfiKeyF2
,
1937 EfiKeyF3
, EfiKeyF4
, EfiKeyF5
, EfiKeyF6
, EfiKeyF7
, EfiKeyF8
,
1938 EfiKeyF9
, EfiKeyF10
, EfiKeyF11
, EfiKeyF12
, EfiKeyPrint
,
1939 EfiKeySLck
, EfiKeyPause
1944 @param Key Used to describe a physical key on a keyboard.
1946 @param Unicode Unicode value for the Key.
1948 @param ShiftedUnicode Unicode value for the key with the
1949 shift key being held down.
1951 @param AltGrUnicode Unicode value for the key with the
1952 Alt-GR being held down.
1954 @param ShiftedAltGrUnicode Unicode value for the key with the
1955 Alt-GR and shift keys being held down.
1957 @param Modifier Modifier keys are defined to allow for
1958 special functionality that is not
1959 necessarily accomplished by a printable
1960 character. Many of these modifier keys are
1961 flags to toggle certain state bits on and
1962 off inside of a keyboard driver.
1968 CHAR16 ShiftedUnicode
;
1969 CHAR16 AltGrUnicode
;
1970 CHAR16 ShiftedAltGrUnicode
;
1972 } EFI_KEY_DESCRIPTOR
;
1978 #define EFI_NULL_MODIFIER 0x0000
1979 #define EFI_LEFT_CONTROL_MODIFIER 0x0001
1980 #define EFI_RIGHT_CONTROL_MODIFIER 0x0002
1981 #define EFI_LEFT_ALT_MODIFIER 0x0003
1982 #define EFI_RIGHT_ALT_MODIFIER 0x0004
1983 #define EFI_ALT_GR_MODIFIER 0x0005
1984 #define EFI_INSERT_MODIFIER 0x0006
1985 #define EFI_DELETE_MODIFIER 0x0007
1986 #define EFI_PAGE_DOWN_MODIFIER 0x0008
1987 #define EFI_PAGE_UP_MODIFIER 0x0009
1988 #define EFI_HOME_MODIFIER 0x000A
1989 #define EFI_END_MODIFIER 0x000B
1990 #define EFI_LEFT_SHIFT_MODIFIER 0x000C
1991 #define EFI_RIGHT_SHIFT_MODIFIER 0x000D
1992 #define EFI_CAPS_LOCK_MODIFIER 0x000E
1993 #define EFI_NUM_LOCK _MODIFIER 0x000F
1994 #define EFI_LEFT_ARROW_MODIFIER 0x0010
1995 #define EFI_RIGHT_ARROW_MODIFIER 0x0011
1996 #define EFI_DOWN_ARROW_MODIFIER 0x0012
1997 #define EFI_UP_ARROW_MODIFIER 0X0013
1998 #define EFI_NS_KEY_MODIFIER 0x0014
1999 #define EFI_NS_KEY_DEPENDENCY_MODIFIER 0x0015
2000 #define EFI_FUNCTION_KEY_ONE_MODIFIER 0x0016
2001 #define EFI_FUNCTION_KEY_TWO_MODIFIER 0x0017
2002 #define EFI_FUNCTION_KEY_THREE_MODIFIER 0x0018
2003 #define EFI_FUNCTION_KEY_FOUR_MODIFIER 0x0019
2004 #define EFI_FUNCTION_KEY_FIVE_MODIFIER 0x001A
2005 #define EFI_FUNCTION_KEY_SIX_MODIFIER 0x001B
2006 #define EFI_FUNCTION_KEY_SEVEN_MODIFIER 0x001C
2007 #define EFI_FUNCTION_KEY_EIGHT_MODIFIER 0x001D
2008 #define EFI_FUNCTION_KEY_NINE_MODIFIER 0x001E
2009 #define EFI_FUNCTION_KEY_TEN_MODIFIER 0x001F
2010 #define EFI_FUNCTION_KEY_ELEVEN_MODIFIER 0x0020
2011 #define EFI_FUNCTION_KEY_TWELVE_MODIFIER 0x0021
2013 // Keys that have multiple control functions based on modifier
2014 // settings are handled in the keyboard driver implementation.
2015 // For instance PRINT_KEY might have a modifier held down and
2016 // is still a nonprinting character, but might have an alternate
2017 // control function like SYSREQUEST
2019 #define EFI_PRINT_MODIFIER 0x0022
2020 #define EFI_SYS_REQUEST_MODIFIER 0x0023
2021 #define EFI_SCROLL_LOCK_MODIFIER 0x0024
2022 #define EFI_PAUSE_MODIFIER 0x0025
2023 #define EFI_BREAK_MODIFIER 0x0026
2029 This routine retrieves an array of GUID values for each keyboard
2030 layout that was previously registered in the system.
2032 @param This A pointer to the EFI_HII_PROTOCOL instance.
2034 @param KeyGuidBufferLength On input, a pointer to the length
2035 of the keyboard GUID buffer. On
2036 output, the length of the handle
2037 buffer that is required for the
2038 handles found. KeyGuidBuffer An
2039 array of keyboard layout GUID
2042 @retval EFI_SUCCESS KeyGuidBuffer was updated successfully.
2044 @retval EFI_BUFFER_TOO_SMALL The KeyGuidBufferLength
2045 parameter indicates that
2046 KeyGuidBuffer is too small to
2047 support the number of GUIDs.
2048 KeyGuidBufferLength is updated
2049 with a value that will enable
2055 (EFIAPI
*EFI_HII_FIND_KEYBOARD_LAYOUTS
) (
2056 IN CONST EFI_HII_DATABASE_PROTOCOL
*This
,
2057 IN OUT UINT16
*KeyGuidBufferLength
,
2058 OUT EFI_GUID
*KeyGuidBuffer
2064 This routine retrieves the requested keyboard layout. The layout
2065 is a physical description of the keys on a keyboard and the
2066 character(s) that are associated with a particular set of key
2069 @param This A pointer to the EFI_HII_PROTOCOL instance.
2071 @param KeyGuid A pointer to the unique ID associated with a
2072 given keyboard layout. If KeyGuid is NULL then
2073 the current layout will be retrieved.
2075 @param KeyboardLayout A pointer to a buffer containing the
2076 retrieved keyboard layout. below.
2078 @retval EFI_SUCCESS The keyboard layout was retrieved
2081 @retval EFI_NOT_FOUND The requested keyboard layout was not
2087 (EFIAPI
*EFI_HII_GET_KEYBOARD_LAYOUT
) (
2088 IN CONST EFI_HII_DATABASE_PROTOCOL
*This
,
2089 IN CONST EFI_GUID
*KeyGuid
,
2090 OUT EFI_HII_KEYBOARD_LAYOUT
*KeyboardLayout
2095 This routine sets the default keyboard layout to the one
2096 referenced by KeyGuid. When this routine is called, an event
2097 will be signaled of the EFI_HII_SET_KEYBOARD_LAYOUT_EVENT_GUID
2098 group type. This is so that agents which are sensitive to the
2099 current keyboard layout being changed can be notified of this
2102 @param This A pointer to the EFI_HII_DATABASE_PROTOCOL
2105 @param KeyGuid A pointer to the unique ID associated with a
2106 given keyboard layout.
2109 @retval EFI_SUCCESS The current keyboard layout was
2112 @retval EFI_NOT_FOUND The referenced keyboard layout was not
2113 found, so action was taken.
2118 (EFIAPI
*EFI_HII_SET_KEYBOARD_LAYOUT
) (
2119 IN CONST EFI_HII_DATABASE_PROTOCOL
*This
,
2120 IN CONST EFI_GUID
*KeyGuid
2125 Return the EFI handle associated with a package list.
2127 @param This A pointer to the EFI_HII_DATABASE_PROTOCOL
2130 @param PackageListHandle An EFI_HII_HANDLE that corresponds
2131 to the desired package list in the
2134 @param DriverHandle On return, contains the EFI_HANDLE which
2135 was registered with the package list in
2138 @retval EFI_SUCCESS The DriverHandle was returned
2141 @retval EFI_INVALID_PARAMETER The PackageListHandle was not
2147 (EFIAPI
*EFI_HII_GET_PACK_HANDLE
) (
2148 IN CONST EFI_HII_DATABASE_PROTOCOL
*This
,
2149 IN CONST EFI_HII_HANDLE PackageListHandle
,
2150 OUT EFI_HANDLE
*DriverHandle
2155 @param NewPackageList Add a new package list to the HII
2158 @param RemovePackageList Remove a package list from the HII
2161 @param UpdatePackageList Update a package list in the HII
2164 @param ListPackageLists List the handles of the package
2165 lists within the HII database.
2167 @param ExportPackageLists Export package lists from the HII
2170 @param RegisterPackageNotify Register notification when
2171 packages of a certain type are
2174 @param UnregisterPackageNotify Unregister notification of
2177 @param FindKeyboardLayouts Retrieves a list of the keyboard
2178 layouts in the system.
2180 @param GetKeyboardLayout Allows a program to extract the
2181 current keyboard layout. See the
2182 GetKeyboardLayout() function
2185 @param SetKeyboardLayout Changes the current keyboard layout.
2186 See the SetKeyboardLayout() function
2190 struct _EFI_HII_DATABASE_PROTOCOL
{
2191 EFI_HII_NEW_PACK NewPackageList
;
2192 EFI_HII_REMOVE_PACK RemovePackageList
;
2193 EFI_HII_UPDATE_PACK UpdatePackageList
;
2194 EFI_HII_LIST_PACKS ListPackageLists
;
2195 EFI_HII_EXPORT_PACKS ExportPackageLists
;
2196 EFI_HII_REGISTER_NOTIFY RegisterPackageNotify
;
2197 EFI_HII_UNREGISTER_NOTIFY UnregisterPackageNotify
;
2198 EFI_HII_FIND_KEYBOARD_LAYOUTS FindKeyboardLayouts
;
2199 EFI_HII_GET_KEYBOARD_LAYOUT GetKeyboardLayout
;
2200 EFI_HII_SET_KEYBOARD_LAYOUT SetKeyboardLayout
;
2201 EFI_HII_GET_PACK_HANDLE GetPackageHandle
;
2204 extern EFI_GUID gEfiHiiDatabaseProtocolGuid
;