2 This file defines the encoding for the VFR (Visual Form Representation) language.
3 IFR is primarily consumed by the EFI presentation engine, and produced by EFI
4 internal application and drivers as well as all add-in card option-ROM drivers
6 Copyright (c) 2006 - 2018, Intel Corporation. All rights reserved.<BR>
7 (C) Copyright 2016 Hewlett Packard Enterprise Development LP<BR>
8 SPDX-License-Identifier: BSD-2-Clause-Patent
10 @par Revision Reference:
11 These definitions are from UEFI 2.1 and 2.2.
15 #ifndef __UEFI_INTERNAL_FORMREPRESENTATION_H__
16 #define __UEFI_INTERNAL_FORMREPRESENTATION_H__
18 #include <Guid/HiiFormMapMethodGuid.h>
21 /// The following types are currently defined:
23 typedef VOID
*EFI_HII_HANDLE
;
24 typedef CHAR16
*EFI_STRING
;
25 typedef UINT16 EFI_IMAGE_ID
;
26 typedef UINT16 EFI_QUESTION_ID
;
27 typedef UINT16 EFI_STRING_ID
;
28 typedef UINT16 EFI_FORM_ID
;
29 typedef UINT16 EFI_VARSTORE_ID
;
30 typedef UINT16 EFI_ANIMATION_ID
;
32 typedef UINT16 EFI_DEFAULT_ID
;
34 typedef UINT32 EFI_HII_FONT_STYLE
;
39 // Definitions for Package Lists and Package Headers
44 /// The header found at the start of each package list.
47 EFI_GUID PackageListGuid
;
49 } EFI_HII_PACKAGE_LIST_HEADER
;
52 /// The header found at the start of each package.
58 } EFI_HII_PACKAGE_HEADER
;
61 // Value of HII package type
63 #define EFI_HII_PACKAGE_TYPE_ALL 0x00
64 #define EFI_HII_PACKAGE_TYPE_GUID 0x01
65 #define EFI_HII_PACKAGE_FORMS 0x02
66 #define EFI_HII_PACKAGE_STRINGS 0x04
67 #define EFI_HII_PACKAGE_FONTS 0x05
68 #define EFI_HII_PACKAGE_IMAGES 0x06
69 #define EFI_HII_PACKAGE_SIMPLE_FONTS 0x07
70 #define EFI_HII_PACKAGE_DEVICE_PATH 0x08
71 #define EFI_HII_PACKAGE_KEYBOARD_LAYOUT 0x09
72 #define EFI_HII_PACKAGE_ANIMATIONS 0x0A
73 #define EFI_HII_PACKAGE_END 0xDF
74 #define EFI_HII_PACKAGE_TYPE_SYSTEM_BEGIN 0xE0
75 #define EFI_HII_PACKAGE_TYPE_SYSTEM_END 0xFF
78 // Definitions for Simplified Font Package
82 /// Contents of EFI_NARROW_GLYPH.Attributes.
84 #define EFI_GLYPH_NON_SPACING 0x01
85 #define EFI_GLYPH_WIDE 0x02
86 #define EFI_GLYPH_HEIGHT 19
87 #define EFI_GLYPH_WIDTH 8
91 /// The EFI_NARROW_GLYPH has a preferred dimension (w x h) of 8 x 19 pixels.
95 /// The Unicode representation of the glyph. The term weight is the
96 /// technical term for a character code.
100 /// The data element containing the glyph definitions.
104 /// The column major glyph representation of the character. Bits
105 /// with values of one indicate that the corresponding pixel is to be
106 /// on when normally displayed; those with zero are off.
108 UINT8 GlyphCol1
[EFI_GLYPH_HEIGHT
];
112 /// The EFI_WIDE_GLYPH has a preferred dimension (w x h) of 16 x 19 pixels, which is large enough
113 /// to accommodate logographic characters.
117 /// The Unicode representation of the glyph. The term weight is the
118 /// technical term for a character code.
120 CHAR16 UnicodeWeight
;
122 /// The data element containing the glyph definitions.
126 /// The column major glyph representation of the character. Bits
127 /// with values of one indicate that the corresponding pixel is to be
128 /// on when normally displayed; those with zero are off.
130 UINT8 GlyphCol1
[EFI_GLYPH_HEIGHT
];
132 /// The column major glyph representation of the character. Bits
133 /// with values of one indicate that the corresponding pixel is to be
134 /// on when normally displayed; those with zero are off.
136 UINT8 GlyphCol2
[EFI_GLYPH_HEIGHT
];
138 /// Ensures that sizeof (EFI_WIDE_GLYPH) is twice the
139 /// sizeof (EFI_NARROW_GLYPH). The contents of Pad must
146 /// A simplified font package consists of a font header
147 /// followed by a series of glyph structures.
149 typedef struct _EFI_HII_SIMPLE_FONT_PACKAGE_HDR
{
150 EFI_HII_PACKAGE_HEADER Header
;
151 UINT16 NumberOfNarrowGlyphs
;
152 UINT16 NumberOfWideGlyphs
;
153 // EFI_NARROW_GLYPH NarrowGlyphs[];
154 // EFI_WIDE_GLYPH WideGlyphs[];
155 } EFI_HII_SIMPLE_FONT_PACKAGE_HDR
;
158 // Definitions for Font Package
163 // Value for font style
165 #define EFI_HII_FONT_STYLE_NORMAL 0x00000000
166 #define EFI_HII_FONT_STYLE_BOLD 0x00000001
167 #define EFI_HII_FONT_STYLE_ITALIC 0x00000002
168 #define EFI_HII_FONT_STYLE_EMBOSS 0x00010000
169 #define EFI_HII_FONT_STYLE_OUTLINE 0x00020000
170 #define EFI_HII_FONT_STYLE_SHADOW 0x00040000
171 #define EFI_HII_FONT_STYLE_UNDERLINE 0x00080000
172 #define EFI_HII_FONT_STYLE_DBL_UNDER 0x00100000
174 typedef struct _EFI_HII_GLYPH_INFO
{
180 } EFI_HII_GLYPH_INFO
;
183 /// The fixed header consists of a standard record header,
184 /// then the character values in this section, the flags
185 /// (including the encoding method) and the offsets of the glyph
186 /// information, the glyph bitmaps and the character map.
188 typedef struct _EFI_HII_FONT_PACKAGE_HDR
{
189 EFI_HII_PACKAGE_HEADER Header
;
191 UINT32 GlyphBlockOffset
;
192 EFI_HII_GLYPH_INFO Cell
;
193 EFI_HII_FONT_STYLE FontStyle
;
194 CHAR16 FontFamily
[1];
195 } EFI_HII_FONT_PACKAGE_HDR
;
198 // Value of different glyph info block types
200 #define EFI_HII_GIBT_END 0x00
201 #define EFI_HII_GIBT_GLYPH 0x10
202 #define EFI_HII_GIBT_GLYPHS 0x11
203 #define EFI_HII_GIBT_GLYPH_DEFAULT 0x12
204 #define EFI_HII_GIBT_GLYPHS_DEFAULT 0x13
205 #define EFI_HII_GIBT_GLYPH_VARIABILITY 0x14
206 #define EFI_HII_GIBT_DUPLICATE 0x20
207 #define EFI_HII_GIBT_SKIP2 0x21
208 #define EFI_HII_GIBT_SKIP1 0x22
209 #define EFI_HII_GIBT_DEFAULTS 0x23
210 #define EFI_HII_GIBT_EXT1 0x30
211 #define EFI_HII_GIBT_EXT2 0x31
212 #define EFI_HII_GIBT_EXT4 0x32
214 typedef struct _EFI_HII_GLYPH_BLOCK
{
216 } EFI_HII_GLYPH_BLOCK
;
219 // Definition of different glyph info block types
222 typedef struct _EFI_HII_GIBT_DEFAULTS_BLOCK
{
223 EFI_HII_GLYPH_BLOCK Header
;
224 EFI_HII_GLYPH_INFO Cell
;
225 } EFI_HII_GIBT_DEFAULTS_BLOCK
;
227 typedef struct _EFI_HII_GIBT_DUPLICATE_BLOCK
{
228 EFI_HII_GLYPH_BLOCK Header
;
230 } EFI_HII_GIBT_DUPLICATE_BLOCK
;
232 typedef struct _EFI_GLYPH_GIBT_END_BLOCK
{
233 EFI_HII_GLYPH_BLOCK Header
;
234 } EFI_GLYPH_GIBT_END_BLOCK
;
236 typedef struct _EFI_HII_GIBT_EXT1_BLOCK
{
237 EFI_HII_GLYPH_BLOCK Header
;
240 } EFI_HII_GIBT_EXT1_BLOCK
;
242 typedef struct _EFI_HII_GIBT_EXT2_BLOCK
{
243 EFI_HII_GLYPH_BLOCK Header
;
246 } EFI_HII_GIBT_EXT2_BLOCK
;
248 typedef struct _EFI_HII_GIBT_EXT4_BLOCK
{
249 EFI_HII_GLYPH_BLOCK Header
;
252 } EFI_HII_GIBT_EXT4_BLOCK
;
254 typedef struct _EFI_HII_GIBT_GLYPH_BLOCK
{
255 EFI_HII_GLYPH_BLOCK Header
;
256 EFI_HII_GLYPH_INFO Cell
;
258 } EFI_HII_GIBT_GLYPH_BLOCK
;
260 typedef struct _EFI_HII_GIBT_GLYPHS_BLOCK
{
261 EFI_HII_GLYPH_BLOCK Header
;
262 EFI_HII_GLYPH_INFO Cell
;
265 } EFI_HII_GIBT_GLYPHS_BLOCK
;
267 typedef struct _EFI_HII_GIBT_GLYPH_DEFAULT_BLOCK
{
268 EFI_HII_GLYPH_BLOCK Header
;
270 } EFI_HII_GIBT_GLYPH_DEFAULT_BLOCK
;
272 typedef struct _EFI_HII_GIBT_GLYPHS_DEFAULT_BLOCK
{
273 EFI_HII_GLYPH_BLOCK Header
;
276 } EFI_HII_GIBT_GLYPHS_DEFAULT_BLOCK
;
278 typedef struct _EFI_HII_GIBT_VARIABILITY_BLOCK
{
279 EFI_HII_GLYPH_BLOCK Header
;
280 EFI_HII_GLYPH_INFO Cell
;
281 UINT8 GlyphPackInBits
;
283 } EFI_HII_GIBT_VARIABILITY_BLOCK
;
285 typedef struct _EFI_HII_GIBT_SKIP1_BLOCK
{
286 EFI_HII_GLYPH_BLOCK Header
;
288 } EFI_HII_GIBT_SKIP1_BLOCK
;
290 typedef struct _EFI_HII_GIBT_SKIP2_BLOCK
{
291 EFI_HII_GLYPH_BLOCK Header
;
293 } EFI_HII_GIBT_SKIP2_BLOCK
;
296 // Definitions for Device Path Package
301 /// The device path package is used to carry a device path
302 /// associated with the package list.
304 typedef struct _EFI_HII_DEVICE_PATH_PACKAGE_HDR
{
305 EFI_HII_PACKAGE_HEADER Header
;
306 // EFI_DEVICE_PATH_PROTOCOL DevicePath[];
307 } EFI_HII_DEVICE_PATH_PACKAGE_HDR
;
310 // Definitions for GUID Package
315 /// The GUID package is used to carry data where the format is defined by a GUID.
317 typedef struct _EFI_HII_GUID_PACKAGE_HDR
{
318 EFI_HII_PACKAGE_HEADER Header
;
320 // Data per GUID definition may follow
321 } EFI_HII_GUID_PACKAGE_HDR
;
324 // Definitions for String Package
328 #define UEFI_CONFIG_LANG "x-UEFI"
329 #define UEFI_CONFIG_LANG_2 "x-i-UEFI"
332 /// The fixed header consists of a standard record header and then the string identifiers
333 /// contained in this section and the offsets of the string and language information.
335 typedef struct _EFI_HII_STRING_PACKAGE_HDR
{
336 EFI_HII_PACKAGE_HEADER Header
;
338 UINT32 StringInfoOffset
;
339 CHAR16 LanguageWindow
[16];
340 EFI_STRING_ID LanguageName
;
342 } EFI_HII_STRING_PACKAGE_HDR
;
346 } EFI_HII_STRING_BLOCK
;
349 // Value of different string information block types
351 #define EFI_HII_SIBT_END 0x00
352 #define EFI_HII_SIBT_STRING_SCSU 0x10
353 #define EFI_HII_SIBT_STRING_SCSU_FONT 0x11
354 #define EFI_HII_SIBT_STRINGS_SCSU 0x12
355 #define EFI_HII_SIBT_STRINGS_SCSU_FONT 0x13
356 #define EFI_HII_SIBT_STRING_UCS2 0x14
357 #define EFI_HII_SIBT_STRING_UCS2_FONT 0x15
358 #define EFI_HII_SIBT_STRINGS_UCS2 0x16
359 #define EFI_HII_SIBT_STRINGS_UCS2_FONT 0x17
360 #define EFI_HII_SIBT_DUPLICATE 0x20
361 #define EFI_HII_SIBT_SKIP2 0x21
362 #define EFI_HII_SIBT_SKIP1 0x22
363 #define EFI_HII_SIBT_EXT1 0x30
364 #define EFI_HII_SIBT_EXT2 0x31
365 #define EFI_HII_SIBT_EXT4 0x32
366 #define EFI_HII_SIBT_FONT 0x40
369 // Definition of different string information block types
372 typedef struct _EFI_HII_SIBT_DUPLICATE_BLOCK
{
373 EFI_HII_STRING_BLOCK Header
;
374 EFI_STRING_ID StringId
;
375 } EFI_HII_SIBT_DUPLICATE_BLOCK
;
377 typedef struct _EFI_HII_SIBT_END_BLOCK
{
378 EFI_HII_STRING_BLOCK Header
;
379 } EFI_HII_SIBT_END_BLOCK
;
381 typedef struct _EFI_HII_SIBT_EXT1_BLOCK
{
382 EFI_HII_STRING_BLOCK Header
;
385 } EFI_HII_SIBT_EXT1_BLOCK
;
387 typedef struct _EFI_HII_SIBT_EXT2_BLOCK
{
388 EFI_HII_STRING_BLOCK Header
;
391 } EFI_HII_SIBT_EXT2_BLOCK
;
393 typedef struct _EFI_HII_SIBT_EXT4_BLOCK
{
394 EFI_HII_STRING_BLOCK Header
;
397 } EFI_HII_SIBT_EXT4_BLOCK
;
399 typedef struct _EFI_HII_SIBT_FONT_BLOCK
{
400 EFI_HII_SIBT_EXT2_BLOCK Header
;
403 EFI_HII_FONT_STYLE FontStyle
;
405 } EFI_HII_SIBT_FONT_BLOCK
;
407 typedef struct _EFI_HII_SIBT_SKIP1_BLOCK
{
408 EFI_HII_STRING_BLOCK Header
;
410 } EFI_HII_SIBT_SKIP1_BLOCK
;
412 typedef struct _EFI_HII_SIBT_SKIP2_BLOCK
{
413 EFI_HII_STRING_BLOCK Header
;
415 } EFI_HII_SIBT_SKIP2_BLOCK
;
417 typedef struct _EFI_HII_SIBT_STRING_SCSU_BLOCK
{
418 EFI_HII_STRING_BLOCK Header
;
420 } EFI_HII_SIBT_STRING_SCSU_BLOCK
;
422 typedef struct _EFI_HII_SIBT_STRING_SCSU_FONT_BLOCK
{
423 EFI_HII_STRING_BLOCK Header
;
424 UINT8 FontIdentifier
;
426 } EFI_HII_SIBT_STRING_SCSU_FONT_BLOCK
;
428 typedef struct _EFI_HII_SIBT_STRINGS_SCSU_BLOCK
{
429 EFI_HII_STRING_BLOCK Header
;
432 } EFI_HII_SIBT_STRINGS_SCSU_BLOCK
;
434 typedef struct _EFI_HII_SIBT_STRINGS_SCSU_FONT_BLOCK
{
435 EFI_HII_STRING_BLOCK Header
;
436 UINT8 FontIdentifier
;
439 } EFI_HII_SIBT_STRINGS_SCSU_FONT_BLOCK
;
441 typedef struct _EFI_HII_SIBT_STRING_UCS2_BLOCK
{
442 EFI_HII_STRING_BLOCK Header
;
443 CHAR16 StringText
[1];
444 } EFI_HII_SIBT_STRING_UCS2_BLOCK
;
446 typedef struct _EFI_HII_SIBT_STRING_UCS2_FONT_BLOCK
{
447 EFI_HII_STRING_BLOCK Header
;
448 UINT8 FontIdentifier
;
449 CHAR16 StringText
[1];
450 } EFI_HII_SIBT_STRING_UCS2_FONT_BLOCK
;
452 typedef struct _EFI_HII_SIBT_STRINGS_UCS2_BLOCK
{
453 EFI_HII_STRING_BLOCK Header
;
455 CHAR16 StringText
[1];
456 } EFI_HII_SIBT_STRINGS_UCS2_BLOCK
;
458 typedef struct _EFI_HII_SIBT_STRINGS_UCS2_FONT_BLOCK
{
459 EFI_HII_STRING_BLOCK Header
;
460 UINT8 FontIdentifier
;
462 CHAR16 StringText
[1];
463 } EFI_HII_SIBT_STRINGS_UCS2_FONT_BLOCK
;
466 // Definitions for Image Package
470 typedef struct _EFI_HII_IMAGE_PACKAGE_HDR
{
471 EFI_HII_PACKAGE_HEADER Header
;
472 UINT32 ImageInfoOffset
;
473 UINT32 PaletteInfoOffset
;
474 } EFI_HII_IMAGE_PACKAGE_HDR
;
476 typedef struct _EFI_HII_IMAGE_BLOCK
{
478 } EFI_HII_IMAGE_BLOCK
;
481 // Value of different image information block types
483 #define EFI_HII_IIBT_END 0x00
484 #define EFI_HII_IIBT_IMAGE_1BIT 0x10
485 #define EFI_HII_IIBT_IMAGE_1BIT_TRANS 0x11
486 #define EFI_HII_IIBT_IMAGE_4BIT 0x12
487 #define EFI_HII_IIBT_IMAGE_4BIT_TRANS 0x13
488 #define EFI_HII_IIBT_IMAGE_8BIT 0x14
489 #define EFI_HII_IIBT_IMAGE_8BIT_TRANS 0x15
490 #define EFI_HII_IIBT_IMAGE_24BIT 0x16
491 #define EFI_HII_IIBT_IMAGE_24BIT_TRANS 0x17
492 #define EFI_HII_IIBT_IMAGE_JPEG 0x18
493 #define EFI_HII_IIBT_IMAGE_PNG 0x19
494 #define EFI_HII_IIBT_DUPLICATE 0x20
495 #define EFI_HII_IIBT_SKIP2 0x21
496 #define EFI_HII_IIBT_SKIP1 0x22
497 #define EFI_HII_IIBT_EXT1 0x30
498 #define EFI_HII_IIBT_EXT2 0x31
499 #define EFI_HII_IIBT_EXT4 0x32
502 // Definition of different image information block types
505 typedef struct _EFI_HII_IIBT_END_BLOCK
{
506 EFI_HII_IMAGE_BLOCK Header
;
507 } EFI_HII_IIBT_END_BLOCK
;
509 typedef struct _EFI_HII_IIBT_EXT1_BLOCK
{
510 EFI_HII_IMAGE_BLOCK Header
;
513 } EFI_HII_IIBT_EXT1_BLOCK
;
515 typedef struct _EFI_HII_IIBT_EXT2_BLOCK
{
516 EFI_HII_IMAGE_BLOCK Header
;
519 } EFI_HII_IIBT_EXT2_BLOCK
;
521 typedef struct _EFI_HII_IIBT_EXT4_BLOCK
{
522 EFI_HII_IMAGE_BLOCK Header
;
525 } EFI_HII_IIBT_EXT4_BLOCK
;
527 typedef struct _EFI_HII_IIBT_IMAGE_1BIT_BASE
{
531 } EFI_HII_IIBT_IMAGE_1BIT_BASE
;
533 typedef struct _EFI_HII_IIBT_IMAGE_1BIT_BLOCK
{
534 EFI_HII_IMAGE_BLOCK Header
;
536 EFI_HII_IIBT_IMAGE_1BIT_BASE Bitmap
;
537 } EFI_HII_IIBT_IMAGE_1BIT_BLOCK
;
539 typedef struct _EFI_HII_IIBT_IMAGE_1BIT_TRANS_BLOCK
{
540 EFI_HII_IMAGE_BLOCK Header
;
542 EFI_HII_IIBT_IMAGE_1BIT_BASE Bitmap
;
543 } EFI_HII_IIBT_IMAGE_1BIT_TRANS_BLOCK
;
545 typedef struct _EFI_HII_RGB_PIXEL
{
551 typedef struct _EFI_HII_IIBT_IMAGE_24BIT_BASE
{
554 EFI_HII_RGB_PIXEL Bitmap
[1];
555 } EFI_HII_IIBT_IMAGE_24BIT_BASE
;
557 typedef struct _EFI_HII_IIBT_IMAGE_24BIT_BLOCK
{
558 EFI_HII_IMAGE_BLOCK Header
;
559 EFI_HII_IIBT_IMAGE_24BIT_BASE Bitmap
;
560 } EFI_HII_IIBT_IMAGE_24BIT_BLOCK
;
562 typedef struct _EFI_HII_IIBT_IMAGE_24BIT_TRANS_BLOCK
{
563 EFI_HII_IMAGE_BLOCK Header
;
564 EFI_HII_IIBT_IMAGE_24BIT_BASE Bitmap
;
565 } EFI_HII_IIBT_IMAGE_24BIT_TRANS_BLOCK
;
567 typedef struct _EFI_HII_IIBT_IMAGE_4BIT_BASE
{
571 } EFI_HII_IIBT_IMAGE_4BIT_BASE
;
573 typedef struct _EFI_HII_IIBT_IMAGE_4BIT_BLOCK
{
574 EFI_HII_IMAGE_BLOCK Header
;
576 EFI_HII_IIBT_IMAGE_4BIT_BASE Bitmap
;
577 } EFI_HII_IIBT_IMAGE_4BIT_BLOCK
;
579 typedef struct _EFI_HII_IIBT_IMAGE_4BIT_TRANS_BLOCK
{
580 EFI_HII_IMAGE_BLOCK Header
;
582 EFI_HII_IIBT_IMAGE_4BIT_BASE Bitmap
;
583 } EFI_HII_IIBT_IMAGE_4BIT_TRANS_BLOCK
;
585 typedef struct _EFI_HII_IIBT_IMAGE_8BIT_BASE
{
589 } EFI_HII_IIBT_IMAGE_8BIT_BASE
;
591 typedef struct _EFI_HII_IIBT_IMAGE_8BIT_PALETTE_BLOCK
{
592 EFI_HII_IMAGE_BLOCK Header
;
594 EFI_HII_IIBT_IMAGE_8BIT_BASE Bitmap
;
595 } EFI_HII_IIBT_IMAGE_8BIT_BLOCK
;
597 typedef struct _EFI_HII_IIBT_IMAGE_8BIT_TRANS_BLOCK
{
598 EFI_HII_IMAGE_BLOCK Header
;
600 EFI_HII_IIBT_IMAGE_8BIT_BASE Bitmap
;
601 } EFI_HII_IIBT_IMAGE_8BIT_TRAN_BLOCK
;
603 typedef struct _EFI_HII_IIBT_DUPLICATE_BLOCK
{
604 EFI_HII_IMAGE_BLOCK Header
;
605 EFI_IMAGE_ID ImageId
;
606 } EFI_HII_IIBT_DUPLICATE_BLOCK
;
608 typedef struct _EFI_HII_IIBT_JPEG_BLOCK
{
609 EFI_HII_IMAGE_BLOCK Header
;
612 } EFI_HII_IIBT_JPEG_BLOCK
;
614 typedef struct _EFI_HII_IIBT_PNG_BLOCK
{
615 EFI_HII_IMAGE_BLOCK Header
;
618 } EFI_HII_IIBT_PNG_BLOCK
;
620 typedef struct _EFI_HII_IIBT_SKIP1_BLOCK
{
621 EFI_HII_IMAGE_BLOCK Header
;
623 } EFI_HII_IIBT_SKIP1_BLOCK
;
625 typedef struct _EFI_HII_IIBT_SKIP2_BLOCK
{
626 EFI_HII_IMAGE_BLOCK Header
;
628 } EFI_HII_IIBT_SKIP2_BLOCK
;
631 // Definitions for Palette Information
634 typedef struct _EFI_HII_IMAGE_PALETTE_INFO_HEADER
{
636 } EFI_HII_IMAGE_PALETTE_INFO_HEADER
;
638 typedef struct _EFI_HII_IMAGE_PALETTE_INFO
{
640 EFI_HII_RGB_PIXEL PaletteValue
[1];
641 } EFI_HII_IMAGE_PALETTE_INFO
;
644 // Definitions for Forms Package
649 /// The Form package is used to carry form-based encoding data.
651 typedef struct _EFI_HII_FORM_PACKAGE_HDR
{
652 EFI_HII_PACKAGE_HEADER Header
;
653 // EFI_IFR_OP_HEADER OpCodeHeader;
654 // More op-codes follow
655 } EFI_HII_FORM_PACKAGE_HDR
;
670 EFI_QUESTION_ID QuestionId
;
672 EFI_GUID FormSetGuid
;
673 EFI_STRING_ID DevicePath
;
684 EFI_STRING_ID string
; ///< EFI_IFR_TYPE_STRING, EFI_IFR_TYPE_ACTION
685 EFI_HII_REF ref
; ///< EFI_IFR_TYPE_REF
686 // UINT8 buffer[]; ///< EFI_IFR_TYPE_BUFFER
687 } EFI_IFR_TYPE_VALUE
;
692 #define EFI_IFR_FORM_OP 0x01
693 #define EFI_IFR_SUBTITLE_OP 0x02
694 #define EFI_IFR_TEXT_OP 0x03
695 #define EFI_IFR_IMAGE_OP 0x04
696 #define EFI_IFR_ONE_OF_OP 0x05
697 #define EFI_IFR_CHECKBOX_OP 0x06
698 #define EFI_IFR_NUMERIC_OP 0x07
699 #define EFI_IFR_PASSWORD_OP 0x08
700 #define EFI_IFR_ONE_OF_OPTION_OP 0x09
701 #define EFI_IFR_SUPPRESS_IF_OP 0x0A
702 #define EFI_IFR_LOCKED_OP 0x0B
703 #define EFI_IFR_ACTION_OP 0x0C
704 #define EFI_IFR_RESET_BUTTON_OP 0x0D
705 #define EFI_IFR_FORM_SET_OP 0x0E
706 #define EFI_IFR_REF_OP 0x0F
707 #define EFI_IFR_NO_SUBMIT_IF_OP 0x10
708 #define EFI_IFR_INCONSISTENT_IF_OP 0x11
709 #define EFI_IFR_EQ_ID_VAL_OP 0x12
710 #define EFI_IFR_EQ_ID_ID_OP 0x13
711 #define EFI_IFR_EQ_ID_VAL_LIST_OP 0x14
712 #define EFI_IFR_AND_OP 0x15
713 #define EFI_IFR_OR_OP 0x16
714 #define EFI_IFR_NOT_OP 0x17
715 #define EFI_IFR_RULE_OP 0x18
716 #define EFI_IFR_GRAY_OUT_IF_OP 0x19
717 #define EFI_IFR_DATE_OP 0x1A
718 #define EFI_IFR_TIME_OP 0x1B
719 #define EFI_IFR_STRING_OP 0x1C
720 #define EFI_IFR_REFRESH_OP 0x1D
721 #define EFI_IFR_DISABLE_IF_OP 0x1E
722 #define EFI_IFR_ANIMATION_OP 0x1F
723 #define EFI_IFR_TO_LOWER_OP 0x20
724 #define EFI_IFR_TO_UPPER_OP 0x21
725 #define EFI_IFR_MAP_OP 0x22
726 #define EFI_IFR_ORDERED_LIST_OP 0x23
727 #define EFI_IFR_VARSTORE_OP 0x24
728 #define EFI_IFR_VARSTORE_NAME_VALUE_OP 0x25
729 #define EFI_IFR_VARSTORE_EFI_OP 0x26
730 #define EFI_IFR_VARSTORE_DEVICE_OP 0x27
731 #define EFI_IFR_VERSION_OP 0x28
732 #define EFI_IFR_END_OP 0x29
733 #define EFI_IFR_MATCH_OP 0x2A
734 #define EFI_IFR_GET_OP 0x2B
735 #define EFI_IFR_SET_OP 0x2C
736 #define EFI_IFR_READ_OP 0x2D
737 #define EFI_IFR_WRITE_OP 0x2E
738 #define EFI_IFR_EQUAL_OP 0x2F
739 #define EFI_IFR_NOT_EQUAL_OP 0x30
740 #define EFI_IFR_GREATER_THAN_OP 0x31
741 #define EFI_IFR_GREATER_EQUAL_OP 0x32
742 #define EFI_IFR_LESS_THAN_OP 0x33
743 #define EFI_IFR_LESS_EQUAL_OP 0x34
744 #define EFI_IFR_BITWISE_AND_OP 0x35
745 #define EFI_IFR_BITWISE_OR_OP 0x36
746 #define EFI_IFR_BITWISE_NOT_OP 0x37
747 #define EFI_IFR_SHIFT_LEFT_OP 0x38
748 #define EFI_IFR_SHIFT_RIGHT_OP 0x39
749 #define EFI_IFR_ADD_OP 0x3A
750 #define EFI_IFR_SUBTRACT_OP 0x3B
751 #define EFI_IFR_MULTIPLY_OP 0x3C
752 #define EFI_IFR_DIVIDE_OP 0x3D
753 #define EFI_IFR_MODULO_OP 0x3E
754 #define EFI_IFR_RULE_REF_OP 0x3F
755 #define EFI_IFR_QUESTION_REF1_OP 0x40
756 #define EFI_IFR_QUESTION_REF2_OP 0x41
757 #define EFI_IFR_UINT8_OP 0x42
758 #define EFI_IFR_UINT16_OP 0x43
759 #define EFI_IFR_UINT32_OP 0x44
760 #define EFI_IFR_UINT64_OP 0x45
761 #define EFI_IFR_TRUE_OP 0x46
762 #define EFI_IFR_FALSE_OP 0x47
763 #define EFI_IFR_TO_UINT_OP 0x48
764 #define EFI_IFR_TO_STRING_OP 0x49
765 #define EFI_IFR_TO_BOOLEAN_OP 0x4A
766 #define EFI_IFR_MID_OP 0x4B
767 #define EFI_IFR_FIND_OP 0x4C
768 #define EFI_IFR_TOKEN_OP 0x4D
769 #define EFI_IFR_STRING_REF1_OP 0x4E
770 #define EFI_IFR_STRING_REF2_OP 0x4F
771 #define EFI_IFR_CONDITIONAL_OP 0x50
772 #define EFI_IFR_QUESTION_REF3_OP 0x51
773 #define EFI_IFR_ZERO_OP 0x52
774 #define EFI_IFR_ONE_OP 0x53
775 #define EFI_IFR_ONES_OP 0x54
776 #define EFI_IFR_UNDEFINED_OP 0x55
777 #define EFI_IFR_LENGTH_OP 0x56
778 #define EFI_IFR_DUP_OP 0x57
779 #define EFI_IFR_THIS_OP 0x58
780 #define EFI_IFR_SPAN_OP 0x59
781 #define EFI_IFR_VALUE_OP 0x5A
782 #define EFI_IFR_DEFAULT_OP 0x5B
783 #define EFI_IFR_DEFAULTSTORE_OP 0x5C
784 #define EFI_IFR_FORM_MAP_OP 0x5D
785 #define EFI_IFR_CATENATE_OP 0x5E
786 #define EFI_IFR_GUID_OP 0x5F
787 #define EFI_IFR_SECURITY_OP 0x60
788 #define EFI_IFR_MODAL_TAG_OP 0x61
789 #define EFI_IFR_REFRESH_ID_OP 0x62
790 #define EFI_IFR_WARNING_IF_OP 0x63
791 #define EFI_IFR_MATCH2_OP 0x64
794 // Definitions of IFR Standard Headers
798 typedef struct _EFI_IFR_OP_HEADER
{
804 typedef struct _EFI_IFR_STATEMENT_HEADER
{
805 EFI_STRING_ID Prompt
;
807 } EFI_IFR_STATEMENT_HEADER
;
809 typedef struct _EFI_IFR_QUESTION_HEADER
{
810 EFI_IFR_STATEMENT_HEADER Header
;
811 EFI_QUESTION_ID QuestionId
;
812 EFI_VARSTORE_ID VarStoreId
;
814 EFI_STRING_ID VarName
;
818 } EFI_IFR_QUESTION_HEADER
;
821 // Flag values of EFI_IFR_QUESTION_HEADER
823 #define EFI_IFR_FLAG_READ_ONLY 0x01
824 #define EFI_IFR_FLAG_CALLBACK 0x04
825 #define EFI_IFR_FLAG_RESET_REQUIRED 0x10
826 #define EFI_IFR_FLAG_REST_STYLE 0x20
827 #define EFI_IFR_FLAG_RECONNECT_REQUIRED 0x40
828 #define EFI_IFR_FLAG_OPTIONS_ONLY 0x80
831 // Definition for Opcode Reference
834 typedef struct _EFI_IFR_DEFAULTSTORE
{
835 EFI_IFR_OP_HEADER Header
;
836 EFI_STRING_ID DefaultName
;
838 } EFI_IFR_DEFAULTSTORE
;
841 // Default Identifier of default store
843 #define EFI_HII_DEFAULT_CLASS_STANDARD 0x0000
844 #define EFI_HII_DEFAULT_CLASS_MANUFACTURING 0x0001
845 #define EFI_HII_DEFAULT_CLASS_SAFE 0x0002
846 #define EFI_HII_DEFAULT_CLASS_PLATFORM_BEGIN 0x4000
847 #define EFI_HII_DEFAULT_CLASS_PLATFORM_END 0x7fff
848 #define EFI_HII_DEFAULT_CLASS_HARDWARE_BEGIN 0x8000
849 #define EFI_HII_DEFAULT_CLASS_HARDWARE_END 0xbfff
850 #define EFI_HII_DEFAULT_CLASS_FIRMWARE_BEGIN 0xc000
851 #define EFI_HII_DEFAULT_CLASS_FIRMWARE_END 0xffff
853 typedef struct _EFI_IFR_VARSTORE
{
854 EFI_IFR_OP_HEADER Header
;
856 EFI_VARSTORE_ID VarStoreId
;
861 typedef struct _EFI_IFR_VARSTORE_EFI
{
862 EFI_IFR_OP_HEADER Header
;
863 EFI_VARSTORE_ID VarStoreId
;
868 } EFI_IFR_VARSTORE_EFI
;
870 typedef struct _EFI_IFR_VARSTORE_NAME_VALUE
{
871 EFI_IFR_OP_HEADER Header
;
872 EFI_VARSTORE_ID VarStoreId
;
874 } EFI_IFR_VARSTORE_NAME_VALUE
;
876 typedef struct _EFI_IFR_FORM_SET
{
877 EFI_IFR_OP_HEADER Header
;
879 EFI_STRING_ID FormSetTitle
;
882 // EFI_GUID ClassGuid[];
885 typedef struct _EFI_IFR_END
{
886 EFI_IFR_OP_HEADER Header
;
889 typedef struct _EFI_IFR_FORM
{
890 EFI_IFR_OP_HEADER Header
;
892 EFI_STRING_ID FormTitle
;
895 typedef struct _EFI_IFR_IMAGE
{
896 EFI_IFR_OP_HEADER Header
;
900 typedef struct _EFI_IFR_MODAL_TAG
{
901 EFI_IFR_OP_HEADER Header
;
904 typedef struct _EFI_IFR_LOCKED
{
905 EFI_IFR_OP_HEADER Header
;
908 typedef struct _EFI_IFR_RULE
{
909 EFI_IFR_OP_HEADER Header
;
913 typedef struct _EFI_IFR_DEFAULT
{
914 EFI_IFR_OP_HEADER Header
;
917 EFI_IFR_TYPE_VALUE Value
;
920 typedef struct _EFI_IFR_DEFAULT_2
{
921 EFI_IFR_OP_HEADER Header
;
926 typedef struct _EFI_IFR_VALUE
{
927 EFI_IFR_OP_HEADER Header
;
930 typedef struct _EFI_IFR_SUBTITLE
{
931 EFI_IFR_OP_HEADER Header
;
932 EFI_IFR_STATEMENT_HEADER Statement
;
936 #define EFI_IFR_FLAGS_HORIZONTAL 0x01
938 typedef struct _EFI_IFR_CHECKBOX
{
939 EFI_IFR_OP_HEADER Header
;
940 EFI_IFR_QUESTION_HEADER Question
;
944 #define EFI_IFR_CHECKBOX_DEFAULT 0x01
945 #define EFI_IFR_CHECKBOX_DEFAULT_MFG 0x02
947 typedef struct _EFI_IFR_TEXT
{
948 EFI_IFR_OP_HEADER Header
;
949 EFI_IFR_STATEMENT_HEADER Statement
;
950 EFI_STRING_ID TextTwo
;
953 typedef struct _EFI_IFR_REF
{
954 EFI_IFR_OP_HEADER Header
;
955 EFI_IFR_QUESTION_HEADER Question
;
959 typedef struct _EFI_IFR_REF2
{
960 EFI_IFR_OP_HEADER Header
;
961 EFI_IFR_QUESTION_HEADER Question
;
963 EFI_QUESTION_ID QuestionId
;
966 typedef struct _EFI_IFR_REF3
{
967 EFI_IFR_OP_HEADER Header
;
968 EFI_IFR_QUESTION_HEADER Question
;
970 EFI_QUESTION_ID QuestionId
;
974 typedef struct _EFI_IFR_REF4
{
975 EFI_IFR_OP_HEADER Header
;
976 EFI_IFR_QUESTION_HEADER Question
;
978 EFI_QUESTION_ID QuestionId
;
980 EFI_STRING_ID DevicePath
;
983 typedef struct _EFI_IFR_REF5
{
984 EFI_IFR_OP_HEADER Header
;
985 EFI_IFR_QUESTION_HEADER Question
;
988 typedef struct _EFI_IFR_RESET_BUTTON
{
989 EFI_IFR_OP_HEADER Header
;
990 EFI_IFR_STATEMENT_HEADER Statement
;
991 EFI_DEFAULT_ID DefaultId
;
992 } EFI_IFR_RESET_BUTTON
;
994 typedef struct _EFI_IFR_ACTION
{
995 EFI_IFR_OP_HEADER Header
;
996 EFI_IFR_QUESTION_HEADER Question
;
997 EFI_STRING_ID QuestionConfig
;
1000 typedef struct _EFI_IFR_ACTION_1
{
1001 EFI_IFR_OP_HEADER Header
;
1002 EFI_IFR_QUESTION_HEADER Question
;
1005 typedef struct _EFI_IFR_DATE
{
1006 EFI_IFR_OP_HEADER Header
;
1007 EFI_IFR_QUESTION_HEADER Question
;
1012 // Flags that describe the behavior of the question.
1014 #define EFI_QF_DATE_YEAR_SUPPRESS 0x01
1015 #define EFI_QF_DATE_MONTH_SUPPRESS 0x02
1016 #define EFI_QF_DATE_DAY_SUPPRESS 0x04
1018 #define EFI_QF_DATE_STORAGE 0x30
1019 #define QF_DATE_STORAGE_NORMAL 0x00
1020 #define QF_DATE_STORAGE_TIME 0x10
1021 #define QF_DATE_STORAGE_WAKEUP 0x20
1046 typedef struct _EFI_IFR_NUMERIC
{
1047 EFI_IFR_OP_HEADER Header
;
1048 EFI_IFR_QUESTION_HEADER Question
;
1050 MINMAXSTEP_DATA data
;
1054 // Flags related to the numeric question
1056 #define EFI_IFR_NUMERIC_SIZE 0x03
1057 #define EFI_IFR_NUMERIC_SIZE_1 0x00
1058 #define EFI_IFR_NUMERIC_SIZE_2 0x01
1059 #define EFI_IFR_NUMERIC_SIZE_4 0x02
1060 #define EFI_IFR_NUMERIC_SIZE_8 0x03
1062 #define EFI_IFR_DISPLAY 0x30
1063 #define EFI_IFR_DISPLAY_INT_DEC 0x00
1064 #define EFI_IFR_DISPLAY_UINT_DEC 0x10
1065 #define EFI_IFR_DISPLAY_UINT_HEX 0x20
1067 typedef struct _EFI_IFR_ONE_OF
{
1068 EFI_IFR_OP_HEADER Header
;
1069 EFI_IFR_QUESTION_HEADER Question
;
1071 MINMAXSTEP_DATA data
;
1074 typedef struct _EFI_IFR_STRING
{
1075 EFI_IFR_OP_HEADER Header
;
1076 EFI_IFR_QUESTION_HEADER Question
;
1082 #define EFI_IFR_STRING_MULTI_LINE 0x01
1084 typedef struct _EFI_IFR_PASSWORD
{
1085 EFI_IFR_OP_HEADER Header
;
1086 EFI_IFR_QUESTION_HEADER Question
;
1091 typedef struct _EFI_IFR_ORDERED_LIST
{
1092 EFI_IFR_OP_HEADER Header
;
1093 EFI_IFR_QUESTION_HEADER Question
;
1094 UINT8 MaxContainers
;
1096 } EFI_IFR_ORDERED_LIST
;
1098 #define EFI_IFR_UNIQUE_SET 0x01
1099 #define EFI_IFR_NO_EMPTY_SET 0x02
1101 typedef struct _EFI_IFR_TIME
{
1102 EFI_IFR_OP_HEADER Header
;
1103 EFI_IFR_QUESTION_HEADER Question
;
1108 // A bit-mask that determines which unique settings are active for this opcode.
1110 #define QF_TIME_HOUR_SUPPRESS 0x01
1111 #define QF_TIME_MINUTE_SUPPRESS 0x02
1112 #define QF_TIME_SECOND_SUPPRESS 0x04
1114 #define QF_TIME_STORAGE 0x30
1115 #define QF_TIME_STORAGE_NORMAL 0x00
1116 #define QF_TIME_STORAGE_TIME 0x10
1117 #define QF_TIME_STORAGE_WAKEUP 0x20
1119 typedef struct _EFI_IFR_DISABLE_IF
{
1120 EFI_IFR_OP_HEADER Header
;
1121 } EFI_IFR_DISABLE_IF
;
1123 typedef struct _EFI_IFR_SUPPRESS_IF
{
1124 EFI_IFR_OP_HEADER Header
;
1125 } EFI_IFR_SUPPRESS_IF
;
1127 typedef struct _EFI_IFR_GRAY_OUT_IF
{
1128 EFI_IFR_OP_HEADER Header
;
1129 } EFI_IFR_GRAY_OUT_IF
;
1131 typedef struct _EFI_IFR_INCONSISTENT_IF
{
1132 EFI_IFR_OP_HEADER Header
;
1133 EFI_STRING_ID Error
;
1134 } EFI_IFR_INCONSISTENT_IF
;
1136 typedef struct _EFI_IFR_NO_SUBMIT_IF
{
1137 EFI_IFR_OP_HEADER Header
;
1138 EFI_STRING_ID Error
;
1139 } EFI_IFR_NO_SUBMIT_IF
;
1141 typedef struct _EFI_IFR_WARNING_IF
{
1142 EFI_IFR_OP_HEADER Header
;
1143 EFI_STRING_ID Warning
;
1145 } EFI_IFR_WARNING_IF
;
1147 typedef struct _EFI_IFR_REFRESH
{
1148 EFI_IFR_OP_HEADER Header
;
1149 UINT8 RefreshInterval
;
1152 typedef struct _EFI_IFR_VARSTORE_DEVICE
{
1153 EFI_IFR_OP_HEADER Header
;
1154 EFI_STRING_ID DevicePath
;
1155 } EFI_IFR_VARSTORE_DEVICE
;
1157 typedef struct _EFI_IFR_ONE_OF_OPTION
{
1158 EFI_IFR_OP_HEADER Header
;
1159 EFI_STRING_ID Option
;
1162 EFI_IFR_TYPE_VALUE Value
;
1163 } EFI_IFR_ONE_OF_OPTION
;
1166 // Types of the option's value.
1168 #define EFI_IFR_TYPE_NUM_SIZE_8 0x00
1169 #define EFI_IFR_TYPE_NUM_SIZE_16 0x01
1170 #define EFI_IFR_TYPE_NUM_SIZE_32 0x02
1171 #define EFI_IFR_TYPE_NUM_SIZE_64 0x03
1172 #define EFI_IFR_TYPE_BOOLEAN 0x04
1173 #define EFI_IFR_TYPE_TIME 0x05
1174 #define EFI_IFR_TYPE_DATE 0x06
1175 #define EFI_IFR_TYPE_STRING 0x07
1176 #define EFI_IFR_TYPE_OTHER 0x08
1177 #define EFI_IFR_TYPE_UNDEFINED 0x09
1178 #define EFI_IFR_TYPE_ACTION 0x0A
1179 #define EFI_IFR_TYPE_BUFFER 0x0B
1180 #define EFI_IFR_TYPE_REF 0x0C
1182 #define EFI_IFR_OPTION_DEFAULT 0x10
1183 #define EFI_IFR_OPTION_DEFAULT_MFG 0x20
1185 typedef struct _EFI_IFR_GUID
{
1186 EFI_IFR_OP_HEADER Header
;
1188 // Optional Data Follows
1191 typedef struct _EFI_IFR_REFRESH_ID
{
1192 EFI_IFR_OP_HEADER Header
;
1193 EFI_GUID RefreshEventGroupId
;
1194 } EFI_IFR_REFRESH_ID
;
1196 typedef struct _EFI_IFR_DUP
{
1197 EFI_IFR_OP_HEADER Header
;
1200 typedef struct _EFI_IFR_EQ_ID_ID
{
1201 EFI_IFR_OP_HEADER Header
;
1202 EFI_QUESTION_ID QuestionId1
;
1203 EFI_QUESTION_ID QuestionId2
;
1206 typedef struct _EFI_IFR_EQ_ID_VAL
{
1207 EFI_IFR_OP_HEADER Header
;
1208 EFI_QUESTION_ID QuestionId
;
1210 } EFI_IFR_EQ_ID_VAL
;
1212 typedef struct _EFI_IFR_EQ_ID_VAL_LIST
{
1213 EFI_IFR_OP_HEADER Header
;
1214 EFI_QUESTION_ID QuestionId
;
1216 UINT16 ValueList
[1];
1217 } EFI_IFR_EQ_ID_VAL_LIST
;
1219 typedef struct _EFI_IFR_UINT8
{
1220 EFI_IFR_OP_HEADER Header
;
1224 typedef struct _EFI_IFR_UINT16
{
1225 EFI_IFR_OP_HEADER Header
;
1229 typedef struct _EFI_IFR_UINT32
{
1230 EFI_IFR_OP_HEADER Header
;
1234 typedef struct _EFI_IFR_UINT64
{
1235 EFI_IFR_OP_HEADER Header
;
1239 typedef struct _EFI_IFR_QUESTION_REF1
{
1240 EFI_IFR_OP_HEADER Header
;
1241 EFI_QUESTION_ID QuestionId
;
1242 } EFI_IFR_QUESTION_REF1
;
1244 typedef struct _EFI_IFR_QUESTION_REF2
{
1245 EFI_IFR_OP_HEADER Header
;
1246 } EFI_IFR_QUESTION_REF2
;
1248 typedef struct _EFI_IFR_QUESTION_REF3
{
1249 EFI_IFR_OP_HEADER Header
;
1250 } EFI_IFR_QUESTION_REF3
;
1252 typedef struct _EFI_IFR_QUESTION_REF3_2
{
1253 EFI_IFR_OP_HEADER Header
;
1254 EFI_STRING_ID DevicePath
;
1255 } EFI_IFR_QUESTION_REF3_2
;
1257 typedef struct _EFI_IFR_QUESTION_REF3_3
{
1258 EFI_IFR_OP_HEADER Header
;
1259 EFI_STRING_ID DevicePath
;
1261 } EFI_IFR_QUESTION_REF3_3
;
1263 typedef struct _EFI_IFR_RULE_REF
{
1264 EFI_IFR_OP_HEADER Header
;
1268 typedef struct _EFI_IFR_STRING_REF1
{
1269 EFI_IFR_OP_HEADER Header
;
1270 EFI_STRING_ID StringId
;
1271 } EFI_IFR_STRING_REF1
;
1273 typedef struct _EFI_IFR_STRING_REF2
{
1274 EFI_IFR_OP_HEADER Header
;
1275 } EFI_IFR_STRING_REF2
;
1277 typedef struct _EFI_IFR_THIS
{
1278 EFI_IFR_OP_HEADER Header
;
1281 typedef struct _EFI_IFR_TRUE
{
1282 EFI_IFR_OP_HEADER Header
;
1285 typedef struct _EFI_IFR_FALSE
{
1286 EFI_IFR_OP_HEADER Header
;
1289 typedef struct _EFI_IFR_ONE
{
1290 EFI_IFR_OP_HEADER Header
;
1293 typedef struct _EFI_IFR_ONES
{
1294 EFI_IFR_OP_HEADER Header
;
1297 typedef struct _EFI_IFR_ZERO
{
1298 EFI_IFR_OP_HEADER Header
;
1301 typedef struct _EFI_IFR_UNDEFINED
{
1302 EFI_IFR_OP_HEADER Header
;
1303 } EFI_IFR_UNDEFINED
;
1305 typedef struct _EFI_IFR_VERSION
{
1306 EFI_IFR_OP_HEADER Header
;
1309 typedef struct _EFI_IFR_LENGTH
{
1310 EFI_IFR_OP_HEADER Header
;
1313 typedef struct _EFI_IFR_NOT
{
1314 EFI_IFR_OP_HEADER Header
;
1317 typedef struct _EFI_IFR_BITWISE_NOT
{
1318 EFI_IFR_OP_HEADER Header
;
1319 } EFI_IFR_BITWISE_NOT
;
1321 typedef struct _EFI_IFR_TO_BOOLEAN
{
1322 EFI_IFR_OP_HEADER Header
;
1323 } EFI_IFR_TO_BOOLEAN
;
1326 /// For EFI_IFR_TO_STRING, when converting from
1327 /// unsigned integers, these flags control the format:
1328 /// 0 = unsigned decimal.
1329 /// 1 = signed decimal.
1330 /// 2 = hexadecimal (lower-case alpha).
1331 /// 3 = hexadecimal (upper-case alpha).
1333 #define EFI_IFR_STRING_UNSIGNED_DEC 0
1334 #define EFI_IFR_STRING_SIGNED_DEC 1
1335 #define EFI_IFR_STRING_LOWERCASE_HEX 2
1336 #define EFI_IFR_STRING_UPPERCASE_HEX 3
1340 /// When converting from a buffer, these flags control the format:
1344 #define EFI_IFR_STRING_ASCII 0
1345 #define EFI_IFR_STRING_UNICODE 8
1348 typedef struct _EFI_IFR_TO_STRING
{
1349 EFI_IFR_OP_HEADER Header
;
1351 } EFI_IFR_TO_STRING
;
1353 typedef struct _EFI_IFR_TO_UINT
{
1354 EFI_IFR_OP_HEADER Header
;
1357 typedef struct _EFI_IFR_TO_UPPER
{
1358 EFI_IFR_OP_HEADER Header
;
1361 typedef struct _EFI_IFR_TO_LOWER
{
1362 EFI_IFR_OP_HEADER Header
;
1365 typedef struct _EFI_IFR_ADD
{
1366 EFI_IFR_OP_HEADER Header
;
1369 typedef struct _EFI_IFR_AND
{
1370 EFI_IFR_OP_HEADER Header
;
1373 typedef struct _EFI_IFR_BITWISE_AND
{
1374 EFI_IFR_OP_HEADER Header
;
1375 } EFI_IFR_BITWISE_AND
;
1377 typedef struct _EFI_IFR_BITWISE_OR
{
1378 EFI_IFR_OP_HEADER Header
;
1379 } EFI_IFR_BITWISE_OR
;
1381 typedef struct _EFI_IFR_CATENATE
{
1382 EFI_IFR_OP_HEADER Header
;
1385 typedef struct _EFI_IFR_DIVIDE
{
1386 EFI_IFR_OP_HEADER Header
;
1389 typedef struct _EFI_IFR_EQUAL
{
1390 EFI_IFR_OP_HEADER Header
;
1393 typedef struct _EFI_IFR_GREATER_EQUAL
{
1394 EFI_IFR_OP_HEADER Header
;
1395 } EFI_IFR_GREATER_EQUAL
;
1397 typedef struct _EFI_IFR_GREATER_THAN
{
1398 EFI_IFR_OP_HEADER Header
;
1399 } EFI_IFR_GREATER_THAN
;
1401 typedef struct _EFI_IFR_LESS_EQUAL
{
1402 EFI_IFR_OP_HEADER Header
;
1403 } EFI_IFR_LESS_EQUAL
;
1405 typedef struct _EFI_IFR_LESS_THAN
{
1406 EFI_IFR_OP_HEADER Header
;
1407 } EFI_IFR_LESS_THAN
;
1409 typedef struct _EFI_IFR_MATCH
{
1410 EFI_IFR_OP_HEADER Header
;
1413 typedef struct _EFI_IFR_MATCH2
{
1414 EFI_IFR_OP_HEADER Header
;
1415 EFI_GUID SyntaxType
;
1418 typedef struct _EFI_IFR_MULTIPLY
{
1419 EFI_IFR_OP_HEADER Header
;
1422 typedef struct _EFI_IFR_MODULO
{
1423 EFI_IFR_OP_HEADER Header
;
1426 typedef struct _EFI_IFR_NOT_EQUAL
{
1427 EFI_IFR_OP_HEADER Header
;
1428 } EFI_IFR_NOT_EQUAL
;
1430 typedef struct _EFI_IFR_OR
{
1431 EFI_IFR_OP_HEADER Header
;
1434 typedef struct _EFI_IFR_SHIFT_LEFT
{
1435 EFI_IFR_OP_HEADER Header
;
1436 } EFI_IFR_SHIFT_LEFT
;
1438 typedef struct _EFI_IFR_SHIFT_RIGHT
{
1439 EFI_IFR_OP_HEADER Header
;
1440 } EFI_IFR_SHIFT_RIGHT
;
1442 typedef struct _EFI_IFR_SUBTRACT
{
1443 EFI_IFR_OP_HEADER Header
;
1446 typedef struct _EFI_IFR_CONDITIONAL
{
1447 EFI_IFR_OP_HEADER Header
;
1448 } EFI_IFR_CONDITIONAL
;
1451 // Flags governing the matching criteria of EFI_IFR_FIND
1453 #define EFI_IFR_FF_CASE_SENSITIVE 0x00
1454 #define EFI_IFR_FF_CASE_INSENSITIVE 0x01
1456 typedef struct _EFI_IFR_FIND
{
1457 EFI_IFR_OP_HEADER Header
;
1461 typedef struct _EFI_IFR_MID
{
1462 EFI_IFR_OP_HEADER Header
;
1465 typedef struct _EFI_IFR_TOKEN
{
1466 EFI_IFR_OP_HEADER Header
;
1470 // Flags specifying whether to find the first matching string
1471 // or the first non-matching string.
1473 #define EFI_IFR_FLAGS_FIRST_MATCHING 0x00
1474 #define EFI_IFR_FLAGS_FIRST_NON_MATCHING 0x01
1476 typedef struct _EFI_IFR_SPAN
{
1477 EFI_IFR_OP_HEADER Header
;
1481 typedef struct _EFI_IFR_SECURITY
{
1483 /// Standard opcode header, where Header.Op = EFI_IFR_SECURITY_OP.
1485 EFI_IFR_OP_HEADER Header
;
1487 /// Security permission level.
1489 EFI_GUID Permissions
;
1492 typedef struct _EFI_IFR_FORM_MAP_METHOD
{
1494 /// The string identifier which provides the human-readable name of
1495 /// the configuration method for this standards map form.
1497 EFI_STRING_ID MethodTitle
;
1499 /// Identifier which uniquely specifies the configuration methods
1500 /// associated with this standards map form.
1502 EFI_GUID MethodIdentifier
;
1503 } EFI_IFR_FORM_MAP_METHOD
;
1505 typedef struct _EFI_IFR_FORM_MAP
{
1507 /// The sequence that defines the type of opcode as well as the length
1508 /// of the opcode being defined. Header.OpCode = EFI_IFR_FORM_MAP_OP.
1510 EFI_IFR_OP_HEADER Header
;
1512 /// The unique identifier for this particular form.
1516 /// One or more configuration method's name and unique identifier.
1518 // EFI_IFR_FORM_MAP_METHOD Methods[];
1521 typedef struct _EFI_IFR_SET
{
1523 /// The sequence that defines the type of opcode as well as the length
1524 /// of the opcode being defined. Header.OpCode = EFI_IFR_SET_OP.
1526 EFI_IFR_OP_HEADER Header
;
1528 /// Specifies the identifier of a previously declared variable store to
1529 /// use when storing the question's value.
1531 EFI_VARSTORE_ID VarStoreId
;
1534 /// A 16-bit Buffer Storage offset.
1536 EFI_STRING_ID VarName
;
1538 /// A Name Value or EFI Variable name (VarName).
1543 /// Specifies the type used for storage.
1548 typedef struct _EFI_IFR_GET
{
1550 /// The sequence that defines the type of opcode as well as the length
1551 /// of the opcode being defined. Header.OpCode = EFI_IFR_GET_OP.
1553 EFI_IFR_OP_HEADER Header
;
1555 /// Specifies the identifier of a previously declared variable store to
1556 /// use when retrieving the value.
1558 EFI_VARSTORE_ID VarStoreId
;
1561 /// A 16-bit Buffer Storage offset.
1563 EFI_STRING_ID VarName
;
1565 /// A Name Value or EFI Variable name (VarName).
1570 /// Specifies the type used for storage.
1575 typedef struct _EFI_IFR_READ
{
1576 EFI_IFR_OP_HEADER Header
;
1579 typedef struct _EFI_IFR_WRITE
{
1580 EFI_IFR_OP_HEADER Header
;
1583 typedef struct _EFI_IFR_MAP
{
1584 EFI_IFR_OP_HEADER Header
;
1587 // Definitions for Keyboard Package
1588 // Releated definitions are in Section of EFI_HII_DATABASE_PROTOCOL
1592 /// Each enumeration values maps a physical key on a keyboard.
1704 /// Used to describe a physical key on a keyboard.
1708 /// Unicode character code for the Key.
1712 /// Unicode character code for the key with the shift key being held down.
1714 CHAR16 ShiftedUnicode
;
1716 /// Unicode character code for the key with the Alt-GR being held down.
1718 CHAR16 AltGrUnicode
;
1720 /// Unicode character code for the key with the Alt-GR and shift keys being held down.
1722 CHAR16 ShiftedAltGrUnicode
;
1724 /// Modifier keys are defined to allow for special functionality that is not necessarily
1725 /// accomplished by a printable character. Many of these modifier keys are flags to toggle
1726 /// certain state bits on and off inside of a keyboard driver.
1729 UINT16 AffectedAttribute
;
1730 } EFI_KEY_DESCRIPTOR
;
1733 /// A key which is affected by all the standard shift modifiers.
1734 /// Most keys would be expected to have this bit active.
1736 #define EFI_AFFECTED_BY_STANDARD_SHIFT 0x0001
1739 /// This key is affected by the caps lock so that if a keyboard driver
1740 /// would need to disambiguate between a key which had a "1" defined
1741 /// versus an "a" character. Having this bit turned on would tell
1742 /// the keyboard driver to use the appropriate shifted state or not.
1744 #define EFI_AFFECTED_BY_CAPS_LOCK 0x0002
1747 /// Similar to the case of CAPS lock, if this bit is active, the key
1748 /// is affected by the num lock being turned on.
1750 #define EFI_AFFECTED_BY_NUM_LOCK 0x0004
1753 UINT16 LayoutLength
;
1755 UINT32 LayoutDescriptorStringOffset
;
1756 UINT8 DescriptorCount
;
1757 // EFI_KEY_DESCRIPTOR Descriptors[];
1758 } EFI_HII_KEYBOARD_LAYOUT
;
1761 EFI_HII_PACKAGE_HEADER Header
;
1763 // EFI_HII_KEYBOARD_LAYOUT Layout[];
1764 } EFI_HII_KEYBOARD_PACKAGE_HDR
;
1769 #define EFI_NULL_MODIFIER 0x0000
1770 #define EFI_LEFT_CONTROL_MODIFIER 0x0001
1771 #define EFI_RIGHT_CONTROL_MODIFIER 0x0002
1772 #define EFI_LEFT_ALT_MODIFIER 0x0003
1773 #define EFI_RIGHT_ALT_MODIFIER 0x0004
1774 #define EFI_ALT_GR_MODIFIER 0x0005
1775 #define EFI_INSERT_MODIFIER 0x0006
1776 #define EFI_DELETE_MODIFIER 0x0007
1777 #define EFI_PAGE_DOWN_MODIFIER 0x0008
1778 #define EFI_PAGE_UP_MODIFIER 0x0009
1779 #define EFI_HOME_MODIFIER 0x000A
1780 #define EFI_END_MODIFIER 0x000B
1781 #define EFI_LEFT_SHIFT_MODIFIER 0x000C
1782 #define EFI_RIGHT_SHIFT_MODIFIER 0x000D
1783 #define EFI_CAPS_LOCK_MODIFIER 0x000E
1784 #define EFI_NUM_LOCK_MODIFIER 0x000F
1785 #define EFI_LEFT_ARROW_MODIFIER 0x0010
1786 #define EFI_RIGHT_ARROW_MODIFIER 0x0011
1787 #define EFI_DOWN_ARROW_MODIFIER 0x0012
1788 #define EFI_UP_ARROW_MODIFIER 0x0013
1789 #define EFI_NS_KEY_MODIFIER 0x0014
1790 #define EFI_NS_KEY_DEPENDENCY_MODIFIER 0x0015
1791 #define EFI_FUNCTION_KEY_ONE_MODIFIER 0x0016
1792 #define EFI_FUNCTION_KEY_TWO_MODIFIER 0x0017
1793 #define EFI_FUNCTION_KEY_THREE_MODIFIER 0x0018
1794 #define EFI_FUNCTION_KEY_FOUR_MODIFIER 0x0019
1795 #define EFI_FUNCTION_KEY_FIVE_MODIFIER 0x001A
1796 #define EFI_FUNCTION_KEY_SIX_MODIFIER 0x001B
1797 #define EFI_FUNCTION_KEY_SEVEN_MODIFIER 0x001C
1798 #define EFI_FUNCTION_KEY_EIGHT_MODIFIER 0x001D
1799 #define EFI_FUNCTION_KEY_NINE_MODIFIER 0x001E
1800 #define EFI_FUNCTION_KEY_TEN_MODIFIER 0x001F
1801 #define EFI_FUNCTION_KEY_ELEVEN_MODIFIER 0x0020
1802 #define EFI_FUNCTION_KEY_TWELVE_MODIFIER 0x0021
1805 // Keys that have multiple control functions based on modifier
1806 // settings are handled in the keyboard driver implementation.
1807 // For instance, PRINT_KEY might have a modifier held down and
1808 // is still a nonprinting character, but might have an alternate
1809 // control function like SYSREQUEST
1811 #define EFI_PRINT_MODIFIER 0x0022
1812 #define EFI_SYS_REQUEST_MODIFIER 0x0023
1813 #define EFI_SCROLL_LOCK_MODIFIER 0x0024
1814 #define EFI_PAUSE_MODIFIER 0x0025
1815 #define EFI_BREAK_MODIFIER 0x0026
1817 #define EFI_LEFT_LOGO_MODIFIER 0x0027
1818 #define EFI_RIGHT_LOGO_MODIFIER 0x0028
1819 #define EFI_MENU_MODIFIER 0x0029
1822 /// Animation IFR opcode
1824 typedef struct _EFI_IFR_ANIMATION
{
1826 /// Standard opcode header, where Header.OpCode is
1827 /// EFI_IFR_ANIMATION_OP.
1829 EFI_IFR_OP_HEADER Header
;
1831 /// Animation identifier in the HII database.
1833 EFI_ANIMATION_ID Id
;
1834 } EFI_IFR_ANIMATION
;
1837 /// HII animation package header.
1839 typedef struct _EFI_HII_ANIMATION_PACKAGE_HDR
{
1841 /// Standard package header, where Header.Type = EFI_HII_PACKAGE_ANIMATIONS.
1843 EFI_HII_PACKAGE_HEADER Header
;
1845 /// Offset, relative to this header, of the animation information. If
1846 /// this is zero, then there are no animation sequences in the package.
1848 UINT32 AnimationInfoOffset
;
1849 } EFI_HII_ANIMATION_PACKAGE_HDR
;
1852 /// Animation information is encoded as a series of blocks,
1853 /// with each block prefixed by a single byte header EFI_HII_ANIMATION_BLOCK.
1855 typedef struct _EFI_HII_ANIMATION_BLOCK
{
1857 // UINT8 BlockBody[];
1858 } EFI_HII_ANIMATION_BLOCK
;
1861 /// Animation block types.
1863 #define EFI_HII_AIBT_END 0x00
1864 #define EFI_HII_AIBT_OVERLAY_IMAGES 0x10
1865 #define EFI_HII_AIBT_CLEAR_IMAGES 0x11
1866 #define EFI_HII_AIBT_RESTORE_SCRN 0x12
1867 #define EFI_HII_AIBT_OVERLAY_IMAGES_LOOP 0x18
1868 #define EFI_HII_AIBT_CLEAR_IMAGES_LOOP 0x19
1869 #define EFI_HII_AIBT_RESTORE_SCRN_LOOP 0x1A
1870 #define EFI_HII_AIBT_DUPLICATE 0x20
1871 #define EFI_HII_AIBT_SKIP2 0x21
1872 #define EFI_HII_AIBT_SKIP1 0x22
1873 #define EFI_HII_AIBT_EXT1 0x30
1874 #define EFI_HII_AIBT_EXT2 0x31
1875 #define EFI_HII_AIBT_EXT4 0x32
1878 /// Extended block headers used for variable sized animation records
1879 /// which need an explicit length.
1882 typedef struct _EFI_HII_AIBT_EXT1_BLOCK
{
1884 /// Standard animation header, where Header.BlockType = EFI_HII_AIBT_EXT1.
1886 EFI_HII_ANIMATION_BLOCK Header
;
1892 /// Size of the animation block, in bytes, including the animation block header.
1895 } EFI_HII_AIBT_EXT1_BLOCK
;
1897 typedef struct _EFI_HII_AIBT_EXT2_BLOCK
{
1899 /// Standard animation header, where Header.BlockType = EFI_HII_AIBT_EXT2.
1901 EFI_HII_ANIMATION_BLOCK Header
;
1907 /// Size of the animation block, in bytes, including the animation block header.
1910 } EFI_HII_AIBT_EXT2_BLOCK
;
1912 typedef struct _EFI_HII_AIBT_EXT4_BLOCK
{
1914 /// Standard animation header, where Header.BlockType = EFI_HII_AIBT_EXT4.
1916 EFI_HII_ANIMATION_BLOCK Header
;
1922 /// Size of the animation block, in bytes, including the animation block header.
1925 } EFI_HII_AIBT_EXT4_BLOCK
;
1927 typedef struct _EFI_HII_ANIMATION_CELL
{
1929 /// The X offset from the upper left hand corner of the logical
1930 /// window to position the indexed image.
1934 /// The Y offset from the upper left hand corner of the logical
1935 /// window to position the indexed image.
1939 /// The image to display at the specified offset from the upper left
1940 /// hand corner of the logical window.
1942 EFI_IMAGE_ID ImageId
;
1944 /// The number of milliseconds to delay after displaying the indexed
1945 /// image and before continuing on to the next linked image. If value
1946 /// is zero, no delay.
1949 } EFI_HII_ANIMATION_CELL
;
1952 /// An animation block to describe an animation sequence that does not cycle, and
1953 /// where one image is simply displayed over the previous image.
1955 typedef struct _EFI_HII_AIBT_OVERLAY_IMAGES_BLOCK
{
1957 /// This is image that is to be reference by the image protocols, if the
1958 /// animation function is not supported or disabled. This image can
1959 /// be one particular image from the animation sequence (if any one
1960 /// of the animation frames has a complete image) or an alternate
1961 /// image that can be displayed alone. If the value is zero, no image
1964 EFI_IMAGE_ID DftImageId
;
1966 /// The overall width of the set of images (logical window width).
1970 /// The overall height of the set of images (logical window height).
1974 /// The number of EFI_HII_ANIMATION_CELL contained in the
1975 /// animation sequence.
1979 /// An array of CellCount animation cells.
1981 EFI_HII_ANIMATION_CELL AnimationCell
[1];
1982 } EFI_HII_AIBT_OVERLAY_IMAGES_BLOCK
;
1985 /// An animation block to describe an animation sequence that does not cycle,
1986 /// and where the logical window is cleared to the specified color before
1987 /// the next image is displayed.
1989 typedef struct _EFI_HII_AIBT_CLEAR_IMAGES_BLOCK
{
1991 /// This is image that is to be reference by the image protocols, if the
1992 /// animation function is not supported or disabled. This image can
1993 /// be one particular image from the animation sequence (if any one
1994 /// of the animation frames has a complete image) or an alternate
1995 /// image that can be displayed alone. If the value is zero, no image
1998 EFI_IMAGE_ID DftImageId
;
2000 /// The overall width of the set of images (logical window width).
2004 /// The overall height of the set of images (logical window height).
2008 /// The number of EFI_HII_ANIMATION_CELL contained in the
2009 /// animation sequence.
2013 /// The color to clear the logical window to before displaying the
2016 EFI_HII_RGB_PIXEL BackgndColor
;
2018 /// An array of CellCount animation cells.
2020 EFI_HII_ANIMATION_CELL AnimationCell
[1];
2021 } EFI_HII_AIBT_CLEAR_IMAGES_BLOCK
;
2024 /// An animation block to describe an animation sequence that does not cycle,
2025 /// and where the screen is restored to the original state before the next
2026 /// image is displayed.
2028 typedef struct _EFI_HII_AIBT_RESTORE_SCRN_BLOCK
{
2030 /// This is image that is to be reference by the image protocols, if the
2031 /// animation function is not supported or disabled. This image can
2032 /// be one particular image from the animation sequence (if any one
2033 /// of the animation frames has a complete image) or an alternate
2034 /// image that can be displayed alone. If the value is zero, no image
2037 EFI_IMAGE_ID DftImageId
;
2039 /// The overall width of the set of images (logical window width).
2043 /// The overall height of the set of images (logical window height).
2047 /// The number of EFI_HII_ANIMATION_CELL contained in the
2048 /// animation sequence.
2052 /// An array of CellCount animation cells.
2054 EFI_HII_ANIMATION_CELL AnimationCell
[1];
2055 } EFI_HII_AIBT_RESTORE_SCRN_BLOCK
;
2058 /// An animation block to describe an animation sequence that continuously cycles,
2059 /// and where one image is simply displayed over the previous image.
2061 typedef EFI_HII_AIBT_OVERLAY_IMAGES_BLOCK EFI_HII_AIBT_OVERLAY_IMAGES_LOOP_BLOCK
;
2064 /// An animation block to describe an animation sequence that continuously cycles,
2065 /// and where the logical window is cleared to the specified color before
2066 /// the next image is displayed.
2068 typedef EFI_HII_AIBT_CLEAR_IMAGES_BLOCK EFI_HII_AIBT_CLEAR_IMAGES_LOOP_BLOCK
;
2071 /// An animation block to describe an animation sequence that continuously cycles,
2072 /// and where the screen is restored to the original state before
2073 /// the next image is displayed.
2075 typedef EFI_HII_AIBT_RESTORE_SCRN_BLOCK EFI_HII_AIBT_RESTORE_SCRN_LOOP_BLOCK
;
2078 /// Assigns a new character value to a previously defined animation sequence.
2080 typedef struct _EFI_HII_AIBT_DUPLICATE_BLOCK
{
2082 /// The previously defined animation ID with the exact same
2083 /// animation information.
2085 EFI_ANIMATION_ID AnimationId
;
2086 } EFI_HII_AIBT_DUPLICATE_BLOCK
;
2089 /// Skips animation IDs.
2091 typedef struct _EFI_HII_AIBT_SKIP1_BLOCK
{
2093 /// The unsigned 8-bit value to add to AnimationIdCurrent.
2096 } EFI_HII_AIBT_SKIP1_BLOCK
;
2099 /// Skips animation IDs.
2101 typedef struct _EFI_HII_AIBT_SKIP2_BLOCK
{
2103 /// The unsigned 16-bit value to add to AnimationIdCurrent.
2106 } EFI_HII_AIBT_SKIP2_BLOCK
;
2111 /// References to string tokens must use this macro to enable scanning for
2115 /// STRING_TOKEN is not defined in UEFI specification. But it is placed
2116 /// here for the easy access by C files and VFR source files.
2118 #define STRING_TOKEN(t) t
2121 /// IMAGE_TOKEN is not defined in UEFI specification. But it is placed
2122 /// here for the easy access by C files and VFR source files.
2124 #define IMAGE_TOKEN(t) t