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 - 2016, Intel Corporation. All rights reserved.<BR>
7 (C) Copyright 2016 Hewlett Packard Enterprise Development LP<BR>
8 This program and the accompanying materials are licensed and made available under
9 the terms and conditions of the BSD License that accompanies this distribution.
10 The full text of the license may be found at
11 http://opensource.org/licenses/bsd-license.php.
13 THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
14 WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
16 @par Revision Reference:
17 These definitions are from UEFI 2.1 and 2.2.
21 #ifndef __UEFI_INTERNAL_FORMREPRESENTATION_H__
22 #define __UEFI_INTERNAL_FORMREPRESENTATION_H__
24 #include <Guid/HiiFormMapMethodGuid.h>
27 /// The following types are currently defined:
29 typedef VOID
* EFI_HII_HANDLE
;
30 typedef CHAR16
* EFI_STRING
;
31 typedef UINT16 EFI_IMAGE_ID
;
32 typedef UINT16 EFI_QUESTION_ID
;
33 typedef UINT16 EFI_STRING_ID
;
34 typedef UINT16 EFI_FORM_ID
;
35 typedef UINT16 EFI_VARSTORE_ID
;
36 typedef UINT16 EFI_ANIMATION_ID
;
38 typedef UINT16 EFI_DEFAULT_ID
;
40 typedef UINT32 EFI_HII_FONT_STYLE
;
47 // Definitions for Package Lists and Package Headers
52 /// The header found at the start of each package list.
55 EFI_GUID PackageListGuid
;
57 } EFI_HII_PACKAGE_LIST_HEADER
;
60 /// The header found at the start of each package.
66 } EFI_HII_PACKAGE_HEADER
;
69 // Value of HII package type
71 #define EFI_HII_PACKAGE_TYPE_ALL 0x00
72 #define EFI_HII_PACKAGE_TYPE_GUID 0x01
73 #define EFI_HII_PACKAGE_FORMS 0x02
74 #define EFI_HII_PACKAGE_STRINGS 0x04
75 #define EFI_HII_PACKAGE_FONTS 0x05
76 #define EFI_HII_PACKAGE_IMAGES 0x06
77 #define EFI_HII_PACKAGE_SIMPLE_FONTS 0x07
78 #define EFI_HII_PACKAGE_DEVICE_PATH 0x08
79 #define EFI_HII_PACKAGE_KEYBOARD_LAYOUT 0x09
80 #define EFI_HII_PACKAGE_ANIMATIONS 0x0A
81 #define EFI_HII_PACKAGE_END 0xDF
82 #define EFI_HII_PACKAGE_TYPE_SYSTEM_BEGIN 0xE0
83 #define EFI_HII_PACKAGE_TYPE_SYSTEM_END 0xFF
86 // Definitions for Simplified Font Package
90 /// Contents of EFI_NARROW_GLYPH.Attributes.
92 #define EFI_GLYPH_NON_SPACING 0x01
93 #define EFI_GLYPH_WIDE 0x02
94 #define EFI_GLYPH_HEIGHT 19
95 #define EFI_GLYPH_WIDTH 8
99 /// The EFI_NARROW_GLYPH has a preferred dimension (w x h) of 8 x 19 pixels.
103 /// The Unicode representation of the glyph. The term weight is the
104 /// technical term for a character code.
106 CHAR16 UnicodeWeight
;
108 /// The data element containing the glyph definitions.
112 /// The column major glyph representation of the character. Bits
113 /// with values of one indicate that the corresponding pixel is to be
114 /// on when normally displayed; those with zero are off.
116 UINT8 GlyphCol1
[EFI_GLYPH_HEIGHT
];
120 /// The EFI_WIDE_GLYPH has a preferred dimension (w x h) of 16 x 19 pixels, which is large enough
121 /// to accommodate logographic characters.
125 /// The Unicode representation of the glyph. The term weight is the
126 /// technical term for a character code.
128 CHAR16 UnicodeWeight
;
130 /// The data element containing the glyph definitions.
134 /// The column major glyph representation of the character. Bits
135 /// with values of one indicate that the corresponding pixel is to be
136 /// on when normally displayed; those with zero are off.
138 UINT8 GlyphCol1
[EFI_GLYPH_HEIGHT
];
140 /// The column major glyph representation of the character. Bits
141 /// with values of one indicate that the corresponding pixel is to be
142 /// on when normally displayed; those with zero are off.
144 UINT8 GlyphCol2
[EFI_GLYPH_HEIGHT
];
146 /// Ensures that sizeof (EFI_WIDE_GLYPH) is twice the
147 /// sizeof (EFI_NARROW_GLYPH). The contents of Pad must
154 /// A simplified font package consists of a font header
155 /// followed by a series of glyph structures.
157 typedef struct _EFI_HII_SIMPLE_FONT_PACKAGE_HDR
{
158 EFI_HII_PACKAGE_HEADER Header
;
159 UINT16 NumberOfNarrowGlyphs
;
160 UINT16 NumberOfWideGlyphs
;
161 // EFI_NARROW_GLYPH NarrowGlyphs[];
162 // EFI_WIDE_GLYPH WideGlyphs[];
163 } EFI_HII_SIMPLE_FONT_PACKAGE_HDR
;
166 // Definitions for Font Package
171 // Value for font style
173 #define EFI_HII_FONT_STYLE_NORMAL 0x00000000
174 #define EFI_HII_FONT_STYLE_BOLD 0x00000001
175 #define EFI_HII_FONT_STYLE_ITALIC 0x00000002
176 #define EFI_HII_FONT_STYLE_EMBOSS 0x00010000
177 #define EFI_HII_FONT_STYLE_OUTLINE 0x00020000
178 #define EFI_HII_FONT_STYLE_SHADOW 0x00040000
179 #define EFI_HII_FONT_STYLE_UNDERLINE 0x00080000
180 #define EFI_HII_FONT_STYLE_DBL_UNDER 0x00100000
182 typedef struct _EFI_HII_GLYPH_INFO
{
188 } EFI_HII_GLYPH_INFO
;
191 /// The fixed header consists of a standard record header,
192 /// then the character values in this section, the flags
193 /// (including the encoding method) and the offsets of the glyph
194 /// information, the glyph bitmaps and the character map.
196 typedef struct _EFI_HII_FONT_PACKAGE_HDR
{
197 EFI_HII_PACKAGE_HEADER Header
;
199 UINT32 GlyphBlockOffset
;
200 EFI_HII_GLYPH_INFO Cell
;
201 EFI_HII_FONT_STYLE FontStyle
;
202 CHAR16 FontFamily
[1];
203 } EFI_HII_FONT_PACKAGE_HDR
;
206 // Value of different glyph info block types
208 #define EFI_HII_GIBT_END 0x00
209 #define EFI_HII_GIBT_GLYPH 0x10
210 #define EFI_HII_GIBT_GLYPHS 0x11
211 #define EFI_HII_GIBT_GLYPH_DEFAULT 0x12
212 #define EFI_HII_GIBT_GLYPHS_DEFAULT 0x13
213 #define EFI_HII_GIBT_GLYPH_VARIABILITY 0x14
214 #define EFI_HII_GIBT_DUPLICATE 0x20
215 #define EFI_HII_GIBT_SKIP2 0x21
216 #define EFI_HII_GIBT_SKIP1 0x22
217 #define EFI_HII_GIBT_DEFAULTS 0x23
218 #define EFI_HII_GIBT_EXT1 0x30
219 #define EFI_HII_GIBT_EXT2 0x31
220 #define EFI_HII_GIBT_EXT4 0x32
222 typedef struct _EFI_HII_GLYPH_BLOCK
{
224 } EFI_HII_GLYPH_BLOCK
;
227 // Definition of different glyph info block types
230 typedef struct _EFI_HII_GIBT_DEFAULTS_BLOCK
{
231 EFI_HII_GLYPH_BLOCK Header
;
232 EFI_HII_GLYPH_INFO Cell
;
233 } EFI_HII_GIBT_DEFAULTS_BLOCK
;
235 typedef struct _EFI_HII_GIBT_DUPLICATE_BLOCK
{
236 EFI_HII_GLYPH_BLOCK Header
;
238 } EFI_HII_GIBT_DUPLICATE_BLOCK
;
240 typedef struct _EFI_GLYPH_GIBT_END_BLOCK
{
241 EFI_HII_GLYPH_BLOCK Header
;
242 } EFI_GLYPH_GIBT_END_BLOCK
;
244 typedef struct _EFI_HII_GIBT_EXT1_BLOCK
{
245 EFI_HII_GLYPH_BLOCK Header
;
248 } EFI_HII_GIBT_EXT1_BLOCK
;
250 typedef struct _EFI_HII_GIBT_EXT2_BLOCK
{
251 EFI_HII_GLYPH_BLOCK Header
;
254 } EFI_HII_GIBT_EXT2_BLOCK
;
256 typedef struct _EFI_HII_GIBT_EXT4_BLOCK
{
257 EFI_HII_GLYPH_BLOCK Header
;
260 } EFI_HII_GIBT_EXT4_BLOCK
;
262 typedef struct _EFI_HII_GIBT_GLYPH_BLOCK
{
263 EFI_HII_GLYPH_BLOCK Header
;
264 EFI_HII_GLYPH_INFO Cell
;
266 } EFI_HII_GIBT_GLYPH_BLOCK
;
268 typedef struct _EFI_HII_GIBT_GLYPHS_BLOCK
{
269 EFI_HII_GLYPH_BLOCK Header
;
270 EFI_HII_GLYPH_INFO Cell
;
273 } EFI_HII_GIBT_GLYPHS_BLOCK
;
275 typedef struct _EFI_HII_GIBT_GLYPH_DEFAULT_BLOCK
{
276 EFI_HII_GLYPH_BLOCK Header
;
278 } EFI_HII_GIBT_GLYPH_DEFAULT_BLOCK
;
280 typedef struct _EFI_HII_GIBT_GLYPHS_DEFAULT_BLOCK
{
281 EFI_HII_GLYPH_BLOCK Header
;
284 } EFI_HII_GIBT_GLYPHS_DEFAULT_BLOCK
;
286 typedef struct _EFI_HII_GIBT_VARIABILITY_BLOCK
{
287 EFI_HII_GLYPH_BLOCK Header
;
288 EFI_HII_GLYPH_INFO Cell
;
289 UINT8 GlyphPackInBits
;
290 UINT8 BitmapData
[1];
291 } EFI_HII_GIBT_VARIABILITY_BLOCK
;
293 typedef struct _EFI_HII_GIBT_SKIP1_BLOCK
{
294 EFI_HII_GLYPH_BLOCK Header
;
296 } EFI_HII_GIBT_SKIP1_BLOCK
;
298 typedef struct _EFI_HII_GIBT_SKIP2_BLOCK
{
299 EFI_HII_GLYPH_BLOCK Header
;
301 } EFI_HII_GIBT_SKIP2_BLOCK
;
304 // Definitions for Device Path Package
309 /// The device path package is used to carry a device path
310 /// associated with the package list.
312 typedef struct _EFI_HII_DEVICE_PATH_PACKAGE_HDR
{
313 EFI_HII_PACKAGE_HEADER Header
;
314 // EFI_DEVICE_PATH_PROTOCOL DevicePath[];
315 } EFI_HII_DEVICE_PATH_PACKAGE_HDR
;
318 // Definitions for GUID Package
323 /// The GUID package is used to carry data where the format is defined by a GUID.
325 typedef struct _EFI_HII_GUID_PACKAGE_HDR
{
326 EFI_HII_PACKAGE_HEADER Header
;
328 // Data per GUID definition may follow
329 } EFI_HII_GUID_PACKAGE_HDR
;
332 // Definitions for String Package
336 #define UEFI_CONFIG_LANG "x-UEFI"
337 #define UEFI_CONFIG_LANG_2 "x-i-UEFI"
340 /// The fixed header consists of a standard record header and then the string identifiers
341 /// contained in this section and the offsets of the string and language information.
343 typedef struct _EFI_HII_STRING_PACKAGE_HDR
{
344 EFI_HII_PACKAGE_HEADER Header
;
346 UINT32 StringInfoOffset
;
347 CHAR16 LanguageWindow
[16];
348 EFI_STRING_ID LanguageName
;
350 } EFI_HII_STRING_PACKAGE_HDR
;
354 } EFI_HII_STRING_BLOCK
;
357 // Value of different string information block types
359 #define EFI_HII_SIBT_END 0x00
360 #define EFI_HII_SIBT_STRING_SCSU 0x10
361 #define EFI_HII_SIBT_STRING_SCSU_FONT 0x11
362 #define EFI_HII_SIBT_STRINGS_SCSU 0x12
363 #define EFI_HII_SIBT_STRINGS_SCSU_FONT 0x13
364 #define EFI_HII_SIBT_STRING_UCS2 0x14
365 #define EFI_HII_SIBT_STRING_UCS2_FONT 0x15
366 #define EFI_HII_SIBT_STRINGS_UCS2 0x16
367 #define EFI_HII_SIBT_STRINGS_UCS2_FONT 0x17
368 #define EFI_HII_SIBT_DUPLICATE 0x20
369 #define EFI_HII_SIBT_SKIP2 0x21
370 #define EFI_HII_SIBT_SKIP1 0x22
371 #define EFI_HII_SIBT_EXT1 0x30
372 #define EFI_HII_SIBT_EXT2 0x31
373 #define EFI_HII_SIBT_EXT4 0x32
374 #define EFI_HII_SIBT_FONT 0x40
377 // Definition of different string information block types
380 typedef struct _EFI_HII_SIBT_DUPLICATE_BLOCK
{
381 EFI_HII_STRING_BLOCK Header
;
382 EFI_STRING_ID StringId
;
383 } EFI_HII_SIBT_DUPLICATE_BLOCK
;
385 typedef struct _EFI_HII_SIBT_END_BLOCK
{
386 EFI_HII_STRING_BLOCK Header
;
387 } EFI_HII_SIBT_END_BLOCK
;
389 typedef struct _EFI_HII_SIBT_EXT1_BLOCK
{
390 EFI_HII_STRING_BLOCK Header
;
393 } EFI_HII_SIBT_EXT1_BLOCK
;
395 typedef struct _EFI_HII_SIBT_EXT2_BLOCK
{
396 EFI_HII_STRING_BLOCK Header
;
399 } EFI_HII_SIBT_EXT2_BLOCK
;
401 typedef struct _EFI_HII_SIBT_EXT4_BLOCK
{
402 EFI_HII_STRING_BLOCK Header
;
405 } EFI_HII_SIBT_EXT4_BLOCK
;
407 typedef struct _EFI_HII_SIBT_FONT_BLOCK
{
408 EFI_HII_SIBT_EXT2_BLOCK Header
;
411 EFI_HII_FONT_STYLE FontStyle
;
413 } EFI_HII_SIBT_FONT_BLOCK
;
415 typedef struct _EFI_HII_SIBT_SKIP1_BLOCK
{
416 EFI_HII_STRING_BLOCK Header
;
418 } EFI_HII_SIBT_SKIP1_BLOCK
;
420 typedef struct _EFI_HII_SIBT_SKIP2_BLOCK
{
421 EFI_HII_STRING_BLOCK Header
;
423 } EFI_HII_SIBT_SKIP2_BLOCK
;
425 typedef struct _EFI_HII_SIBT_STRING_SCSU_BLOCK
{
426 EFI_HII_STRING_BLOCK Header
;
428 } EFI_HII_SIBT_STRING_SCSU_BLOCK
;
430 typedef struct _EFI_HII_SIBT_STRING_SCSU_FONT_BLOCK
{
431 EFI_HII_STRING_BLOCK Header
;
432 UINT8 FontIdentifier
;
434 } EFI_HII_SIBT_STRING_SCSU_FONT_BLOCK
;
436 typedef struct _EFI_HII_SIBT_STRINGS_SCSU_BLOCK
{
437 EFI_HII_STRING_BLOCK Header
;
440 } EFI_HII_SIBT_STRINGS_SCSU_BLOCK
;
442 typedef struct _EFI_HII_SIBT_STRINGS_SCSU_FONT_BLOCK
{
443 EFI_HII_STRING_BLOCK Header
;
444 UINT8 FontIdentifier
;
447 } EFI_HII_SIBT_STRINGS_SCSU_FONT_BLOCK
;
449 typedef struct _EFI_HII_SIBT_STRING_UCS2_BLOCK
{
450 EFI_HII_STRING_BLOCK Header
;
451 CHAR16 StringText
[1];
452 } EFI_HII_SIBT_STRING_UCS2_BLOCK
;
454 typedef struct _EFI_HII_SIBT_STRING_UCS2_FONT_BLOCK
{
455 EFI_HII_STRING_BLOCK Header
;
456 UINT8 FontIdentifier
;
457 CHAR16 StringText
[1];
458 } EFI_HII_SIBT_STRING_UCS2_FONT_BLOCK
;
460 typedef struct _EFI_HII_SIBT_STRINGS_UCS2_BLOCK
{
461 EFI_HII_STRING_BLOCK Header
;
463 CHAR16 StringText
[1];
464 } EFI_HII_SIBT_STRINGS_UCS2_BLOCK
;
466 typedef struct _EFI_HII_SIBT_STRINGS_UCS2_FONT_BLOCK
{
467 EFI_HII_STRING_BLOCK Header
;
468 UINT8 FontIdentifier
;
470 CHAR16 StringText
[1];
471 } EFI_HII_SIBT_STRINGS_UCS2_FONT_BLOCK
;
474 // Definitions for Image Package
478 typedef struct _EFI_HII_IMAGE_PACKAGE_HDR
{
479 EFI_HII_PACKAGE_HEADER Header
;
480 UINT32 ImageInfoOffset
;
481 UINT32 PaletteInfoOffset
;
482 } EFI_HII_IMAGE_PACKAGE_HDR
;
484 typedef struct _EFI_HII_IMAGE_BLOCK
{
486 } EFI_HII_IMAGE_BLOCK
;
489 // Value of different image information block types
491 #define EFI_HII_IIBT_END 0x00
492 #define EFI_HII_IIBT_IMAGE_1BIT 0x10
493 #define EFI_HII_IIBT_IMAGE_1BIT_TRANS 0x11
494 #define EFI_HII_IIBT_IMAGE_4BIT 0x12
495 #define EFI_HII_IIBT_IMAGE_4BIT_TRANS 0x13
496 #define EFI_HII_IIBT_IMAGE_8BIT 0x14
497 #define EFI_HII_IIBT_IMAGE_8BIT_TRANS 0x15
498 #define EFI_HII_IIBT_IMAGE_24BIT 0x16
499 #define EFI_HII_IIBT_IMAGE_24BIT_TRANS 0x17
500 #define EFI_HII_IIBT_IMAGE_JPEG 0x18
501 #define EFI_HII_IIBT_IMAGE_PNG 0x19
502 #define EFI_HII_IIBT_DUPLICATE 0x20
503 #define EFI_HII_IIBT_SKIP2 0x21
504 #define EFI_HII_IIBT_SKIP1 0x22
505 #define EFI_HII_IIBT_EXT1 0x30
506 #define EFI_HII_IIBT_EXT2 0x31
507 #define EFI_HII_IIBT_EXT4 0x32
510 // Definition of different image information block types
513 typedef struct _EFI_HII_IIBT_END_BLOCK
{
514 EFI_HII_IMAGE_BLOCK Header
;
515 } EFI_HII_IIBT_END_BLOCK
;
517 typedef struct _EFI_HII_IIBT_EXT1_BLOCK
{
518 EFI_HII_IMAGE_BLOCK Header
;
521 } EFI_HII_IIBT_EXT1_BLOCK
;
523 typedef struct _EFI_HII_IIBT_EXT2_BLOCK
{
524 EFI_HII_IMAGE_BLOCK Header
;
527 } EFI_HII_IIBT_EXT2_BLOCK
;
529 typedef struct _EFI_HII_IIBT_EXT4_BLOCK
{
530 EFI_HII_IMAGE_BLOCK Header
;
533 } EFI_HII_IIBT_EXT4_BLOCK
;
535 typedef struct _EFI_HII_IIBT_IMAGE_1BIT_BASE
{
539 } EFI_HII_IIBT_IMAGE_1BIT_BASE
;
541 typedef struct _EFI_HII_IIBT_IMAGE_1BIT_BLOCK
{
542 EFI_HII_IMAGE_BLOCK Header
;
544 EFI_HII_IIBT_IMAGE_1BIT_BASE Bitmap
;
545 } EFI_HII_IIBT_IMAGE_1BIT_BLOCK
;
547 typedef struct _EFI_HII_IIBT_IMAGE_1BIT_TRANS_BLOCK
{
548 EFI_HII_IMAGE_BLOCK Header
;
550 EFI_HII_IIBT_IMAGE_1BIT_BASE Bitmap
;
551 } EFI_HII_IIBT_IMAGE_1BIT_TRANS_BLOCK
;
553 typedef struct _EFI_HII_RGB_PIXEL
{
559 typedef struct _EFI_HII_IIBT_IMAGE_24BIT_BASE
{
562 EFI_HII_RGB_PIXEL Bitmap
[1];
563 } EFI_HII_IIBT_IMAGE_24BIT_BASE
;
565 typedef struct _EFI_HII_IIBT_IMAGE_24BIT_BLOCK
{
566 EFI_HII_IMAGE_BLOCK Header
;
567 EFI_HII_IIBT_IMAGE_24BIT_BASE Bitmap
;
568 } EFI_HII_IIBT_IMAGE_24BIT_BLOCK
;
570 typedef struct _EFI_HII_IIBT_IMAGE_24BIT_TRANS_BLOCK
{
571 EFI_HII_IMAGE_BLOCK Header
;
572 EFI_HII_IIBT_IMAGE_24BIT_BASE Bitmap
;
573 } EFI_HII_IIBT_IMAGE_24BIT_TRANS_BLOCK
;
575 typedef struct _EFI_HII_IIBT_IMAGE_4BIT_BASE
{
579 } EFI_HII_IIBT_IMAGE_4BIT_BASE
;
581 typedef struct _EFI_HII_IIBT_IMAGE_4BIT_BLOCK
{
582 EFI_HII_IMAGE_BLOCK Header
;
584 EFI_HII_IIBT_IMAGE_4BIT_BASE Bitmap
;
585 } EFI_HII_IIBT_IMAGE_4BIT_BLOCK
;
587 typedef struct _EFI_HII_IIBT_IMAGE_4BIT_TRANS_BLOCK
{
588 EFI_HII_IMAGE_BLOCK Header
;
590 EFI_HII_IIBT_IMAGE_4BIT_BASE Bitmap
;
591 } EFI_HII_IIBT_IMAGE_4BIT_TRANS_BLOCK
;
593 typedef struct _EFI_HII_IIBT_IMAGE_8BIT_BASE
{
597 } EFI_HII_IIBT_IMAGE_8BIT_BASE
;
599 typedef struct _EFI_HII_IIBT_IMAGE_8BIT_PALETTE_BLOCK
{
600 EFI_HII_IMAGE_BLOCK Header
;
602 EFI_HII_IIBT_IMAGE_8BIT_BASE Bitmap
;
603 } EFI_HII_IIBT_IMAGE_8BIT_BLOCK
;
605 typedef struct _EFI_HII_IIBT_IMAGE_8BIT_TRANS_BLOCK
{
606 EFI_HII_IMAGE_BLOCK Header
;
608 EFI_HII_IIBT_IMAGE_8BIT_BASE Bitmap
;
609 } EFI_HII_IIBT_IMAGE_8BIT_TRAN_BLOCK
;
611 typedef struct _EFI_HII_IIBT_DUPLICATE_BLOCK
{
612 EFI_HII_IMAGE_BLOCK Header
;
613 EFI_IMAGE_ID ImageId
;
614 } EFI_HII_IIBT_DUPLICATE_BLOCK
;
616 typedef struct _EFI_HII_IIBT_JPEG_BLOCK
{
617 EFI_HII_IMAGE_BLOCK Header
;
620 } EFI_HII_IIBT_JPEG_BLOCK
;
622 typedef struct _EFI_HII_IIBT_PNG_BLOCK
{
623 EFI_HII_IMAGE_BLOCK Header
;
626 } EFI_HII_IIBT_PNG_BLOCK
;
628 typedef struct _EFI_HII_IIBT_SKIP1_BLOCK
{
629 EFI_HII_IMAGE_BLOCK Header
;
631 } EFI_HII_IIBT_SKIP1_BLOCK
;
633 typedef struct _EFI_HII_IIBT_SKIP2_BLOCK
{
634 EFI_HII_IMAGE_BLOCK Header
;
636 } EFI_HII_IIBT_SKIP2_BLOCK
;
639 // Definitions for Palette Information
642 typedef struct _EFI_HII_IMAGE_PALETTE_INFO_HEADER
{
644 } EFI_HII_IMAGE_PALETTE_INFO_HEADER
;
646 typedef struct _EFI_HII_IMAGE_PALETTE_INFO
{
648 EFI_HII_RGB_PIXEL PaletteValue
[1];
649 } EFI_HII_IMAGE_PALETTE_INFO
;
652 // Definitions for Forms Package
657 /// The Form package is used to carry form-based encoding data.
659 typedef struct _EFI_HII_FORM_PACKAGE_HDR
{
660 EFI_HII_PACKAGE_HEADER Header
;
661 // EFI_IFR_OP_HEADER OpCodeHeader;
662 // More op-codes follow
663 } EFI_HII_FORM_PACKAGE_HDR
;
678 EFI_QUESTION_ID QuestionId
;
680 EFI_GUID FormSetGuid
;
681 EFI_STRING_ID DevicePath
;
692 EFI_STRING_ID string
; ///< EFI_IFR_TYPE_STRING, EFI_IFR_TYPE_ACTION
693 EFI_HII_REF ref
; ///< EFI_IFR_TYPE_REF
694 // UINT8 buffer[]; ///< EFI_IFR_TYPE_BUFFER
695 } EFI_IFR_TYPE_VALUE
;
700 #define EFI_IFR_FORM_OP 0x01
701 #define EFI_IFR_SUBTITLE_OP 0x02
702 #define EFI_IFR_TEXT_OP 0x03
703 #define EFI_IFR_IMAGE_OP 0x04
704 #define EFI_IFR_ONE_OF_OP 0x05
705 #define EFI_IFR_CHECKBOX_OP 0x06
706 #define EFI_IFR_NUMERIC_OP 0x07
707 #define EFI_IFR_PASSWORD_OP 0x08
708 #define EFI_IFR_ONE_OF_OPTION_OP 0x09
709 #define EFI_IFR_SUPPRESS_IF_OP 0x0A
710 #define EFI_IFR_LOCKED_OP 0x0B
711 #define EFI_IFR_ACTION_OP 0x0C
712 #define EFI_IFR_RESET_BUTTON_OP 0x0D
713 #define EFI_IFR_FORM_SET_OP 0x0E
714 #define EFI_IFR_REF_OP 0x0F
715 #define EFI_IFR_NO_SUBMIT_IF_OP 0x10
716 #define EFI_IFR_INCONSISTENT_IF_OP 0x11
717 #define EFI_IFR_EQ_ID_VAL_OP 0x12
718 #define EFI_IFR_EQ_ID_ID_OP 0x13
719 #define EFI_IFR_EQ_ID_VAL_LIST_OP 0x14
720 #define EFI_IFR_AND_OP 0x15
721 #define EFI_IFR_OR_OP 0x16
722 #define EFI_IFR_NOT_OP 0x17
723 #define EFI_IFR_RULE_OP 0x18
724 #define EFI_IFR_GRAY_OUT_IF_OP 0x19
725 #define EFI_IFR_DATE_OP 0x1A
726 #define EFI_IFR_TIME_OP 0x1B
727 #define EFI_IFR_STRING_OP 0x1C
728 #define EFI_IFR_REFRESH_OP 0x1D
729 #define EFI_IFR_DISABLE_IF_OP 0x1E
730 #define EFI_IFR_ANIMATION_OP 0x1F
731 #define EFI_IFR_TO_LOWER_OP 0x20
732 #define EFI_IFR_TO_UPPER_OP 0x21
733 #define EFI_IFR_MAP_OP 0x22
734 #define EFI_IFR_ORDERED_LIST_OP 0x23
735 #define EFI_IFR_VARSTORE_OP 0x24
736 #define EFI_IFR_VARSTORE_NAME_VALUE_OP 0x25
737 #define EFI_IFR_VARSTORE_EFI_OP 0x26
738 #define EFI_IFR_VARSTORE_DEVICE_OP 0x27
739 #define EFI_IFR_VERSION_OP 0x28
740 #define EFI_IFR_END_OP 0x29
741 #define EFI_IFR_MATCH_OP 0x2A
742 #define EFI_IFR_GET_OP 0x2B
743 #define EFI_IFR_SET_OP 0x2C
744 #define EFI_IFR_READ_OP 0x2D
745 #define EFI_IFR_WRITE_OP 0x2E
746 #define EFI_IFR_EQUAL_OP 0x2F
747 #define EFI_IFR_NOT_EQUAL_OP 0x30
748 #define EFI_IFR_GREATER_THAN_OP 0x31
749 #define EFI_IFR_GREATER_EQUAL_OP 0x32
750 #define EFI_IFR_LESS_THAN_OP 0x33
751 #define EFI_IFR_LESS_EQUAL_OP 0x34
752 #define EFI_IFR_BITWISE_AND_OP 0x35
753 #define EFI_IFR_BITWISE_OR_OP 0x36
754 #define EFI_IFR_BITWISE_NOT_OP 0x37
755 #define EFI_IFR_SHIFT_LEFT_OP 0x38
756 #define EFI_IFR_SHIFT_RIGHT_OP 0x39
757 #define EFI_IFR_ADD_OP 0x3A
758 #define EFI_IFR_SUBTRACT_OP 0x3B
759 #define EFI_IFR_MULTIPLY_OP 0x3C
760 #define EFI_IFR_DIVIDE_OP 0x3D
761 #define EFI_IFR_MODULO_OP 0x3E
762 #define EFI_IFR_RULE_REF_OP 0x3F
763 #define EFI_IFR_QUESTION_REF1_OP 0x40
764 #define EFI_IFR_QUESTION_REF2_OP 0x41
765 #define EFI_IFR_UINT8_OP 0x42
766 #define EFI_IFR_UINT16_OP 0x43
767 #define EFI_IFR_UINT32_OP 0x44
768 #define EFI_IFR_UINT64_OP 0x45
769 #define EFI_IFR_TRUE_OP 0x46
770 #define EFI_IFR_FALSE_OP 0x47
771 #define EFI_IFR_TO_UINT_OP 0x48
772 #define EFI_IFR_TO_STRING_OP 0x49
773 #define EFI_IFR_TO_BOOLEAN_OP 0x4A
774 #define EFI_IFR_MID_OP 0x4B
775 #define EFI_IFR_FIND_OP 0x4C
776 #define EFI_IFR_TOKEN_OP 0x4D
777 #define EFI_IFR_STRING_REF1_OP 0x4E
778 #define EFI_IFR_STRING_REF2_OP 0x4F
779 #define EFI_IFR_CONDITIONAL_OP 0x50
780 #define EFI_IFR_QUESTION_REF3_OP 0x51
781 #define EFI_IFR_ZERO_OP 0x52
782 #define EFI_IFR_ONE_OP 0x53
783 #define EFI_IFR_ONES_OP 0x54
784 #define EFI_IFR_UNDEFINED_OP 0x55
785 #define EFI_IFR_LENGTH_OP 0x56
786 #define EFI_IFR_DUP_OP 0x57
787 #define EFI_IFR_THIS_OP 0x58
788 #define EFI_IFR_SPAN_OP 0x59
789 #define EFI_IFR_VALUE_OP 0x5A
790 #define EFI_IFR_DEFAULT_OP 0x5B
791 #define EFI_IFR_DEFAULTSTORE_OP 0x5C
792 #define EFI_IFR_FORM_MAP_OP 0x5D
793 #define EFI_IFR_CATENATE_OP 0x5E
794 #define EFI_IFR_GUID_OP 0x5F
795 #define EFI_IFR_SECURITY_OP 0x60
796 #define EFI_IFR_MODAL_TAG_OP 0x61
797 #define EFI_IFR_REFRESH_ID_OP 0x62
798 #define EFI_IFR_WARNING_IF_OP 0x63
799 #define EFI_IFR_MATCH2_OP 0x64
802 // Definitions of IFR Standard Headers
806 typedef struct _EFI_IFR_OP_HEADER
{
812 typedef struct _EFI_IFR_STATEMENT_HEADER
{
813 EFI_STRING_ID Prompt
;
815 } EFI_IFR_STATEMENT_HEADER
;
817 typedef struct _EFI_IFR_QUESTION_HEADER
{
818 EFI_IFR_STATEMENT_HEADER Header
;
819 EFI_QUESTION_ID QuestionId
;
820 EFI_VARSTORE_ID VarStoreId
;
822 EFI_STRING_ID VarName
;
826 } EFI_IFR_QUESTION_HEADER
;
829 // Flag values of EFI_IFR_QUESTION_HEADER
831 #define EFI_IFR_FLAG_READ_ONLY 0x01
832 #define EFI_IFR_FLAG_CALLBACK 0x04
833 #define EFI_IFR_FLAG_RESET_REQUIRED 0x10
834 #define EFI_IFR_FLAG_RECONNECT_REQUIRED 0x40
835 #define EFI_IFR_FLAG_OPTIONS_ONLY 0x80
838 // Definition for Opcode Reference
841 typedef struct _EFI_IFR_DEFAULTSTORE
{
842 EFI_IFR_OP_HEADER Header
;
843 EFI_STRING_ID DefaultName
;
845 } EFI_IFR_DEFAULTSTORE
;
848 // Default Identifier of default store
850 #define EFI_HII_DEFAULT_CLASS_STANDARD 0x0000
851 #define EFI_HII_DEFAULT_CLASS_MANUFACTURING 0x0001
852 #define EFI_HII_DEFAULT_CLASS_SAFE 0x0002
853 #define EFI_HII_DEFAULT_CLASS_PLATFORM_BEGIN 0x4000
854 #define EFI_HII_DEFAULT_CLASS_PLATFORM_END 0x7fff
855 #define EFI_HII_DEFAULT_CLASS_HARDWARE_BEGIN 0x8000
856 #define EFI_HII_DEFAULT_CLASS_HARDWARE_END 0xbfff
857 #define EFI_HII_DEFAULT_CLASS_FIRMWARE_BEGIN 0xc000
858 #define EFI_HII_DEFAULT_CLASS_FIRMWARE_END 0xffff
860 typedef struct _EFI_IFR_VARSTORE
{
861 EFI_IFR_OP_HEADER Header
;
863 EFI_VARSTORE_ID VarStoreId
;
868 typedef struct _EFI_IFR_VARSTORE_EFI
{
869 EFI_IFR_OP_HEADER Header
;
870 EFI_VARSTORE_ID VarStoreId
;
875 } EFI_IFR_VARSTORE_EFI
;
877 typedef struct _EFI_IFR_VARSTORE_NAME_VALUE
{
878 EFI_IFR_OP_HEADER Header
;
879 EFI_VARSTORE_ID VarStoreId
;
881 } EFI_IFR_VARSTORE_NAME_VALUE
;
883 typedef struct _EFI_IFR_FORM_SET
{
884 EFI_IFR_OP_HEADER Header
;
886 EFI_STRING_ID FormSetTitle
;
889 // EFI_GUID ClassGuid[];
892 typedef struct _EFI_IFR_END
{
893 EFI_IFR_OP_HEADER Header
;
896 typedef struct _EFI_IFR_FORM
{
897 EFI_IFR_OP_HEADER Header
;
899 EFI_STRING_ID FormTitle
;
902 typedef struct _EFI_IFR_IMAGE
{
903 EFI_IFR_OP_HEADER Header
;
907 typedef struct _EFI_IFR_MODAL_TAG
{
908 EFI_IFR_OP_HEADER Header
;
911 typedef struct _EFI_IFR_LOCKED
{
912 EFI_IFR_OP_HEADER Header
;
915 typedef struct _EFI_IFR_RULE
{
916 EFI_IFR_OP_HEADER Header
;
920 typedef struct _EFI_IFR_DEFAULT
{
921 EFI_IFR_OP_HEADER Header
;
924 EFI_IFR_TYPE_VALUE Value
;
927 typedef struct _EFI_IFR_DEFAULT_2
{
928 EFI_IFR_OP_HEADER Header
;
933 typedef struct _EFI_IFR_VALUE
{
934 EFI_IFR_OP_HEADER Header
;
937 typedef struct _EFI_IFR_SUBTITLE
{
938 EFI_IFR_OP_HEADER Header
;
939 EFI_IFR_STATEMENT_HEADER Statement
;
943 #define EFI_IFR_FLAGS_HORIZONTAL 0x01
945 typedef struct _EFI_IFR_CHECKBOX
{
946 EFI_IFR_OP_HEADER Header
;
947 EFI_IFR_QUESTION_HEADER Question
;
951 #define EFI_IFR_CHECKBOX_DEFAULT 0x01
952 #define EFI_IFR_CHECKBOX_DEFAULT_MFG 0x02
954 typedef struct _EFI_IFR_TEXT
{
955 EFI_IFR_OP_HEADER Header
;
956 EFI_IFR_STATEMENT_HEADER Statement
;
957 EFI_STRING_ID TextTwo
;
960 typedef struct _EFI_IFR_REF
{
961 EFI_IFR_OP_HEADER Header
;
962 EFI_IFR_QUESTION_HEADER Question
;
966 typedef struct _EFI_IFR_REF2
{
967 EFI_IFR_OP_HEADER Header
;
968 EFI_IFR_QUESTION_HEADER Question
;
970 EFI_QUESTION_ID QuestionId
;
973 typedef struct _EFI_IFR_REF3
{
974 EFI_IFR_OP_HEADER Header
;
975 EFI_IFR_QUESTION_HEADER Question
;
977 EFI_QUESTION_ID QuestionId
;
981 typedef struct _EFI_IFR_REF4
{
982 EFI_IFR_OP_HEADER Header
;
983 EFI_IFR_QUESTION_HEADER Question
;
985 EFI_QUESTION_ID QuestionId
;
987 EFI_STRING_ID DevicePath
;
990 typedef struct _EFI_IFR_REF5
{
991 EFI_IFR_OP_HEADER Header
;
992 EFI_IFR_QUESTION_HEADER Question
;
995 typedef struct _EFI_IFR_RESET_BUTTON
{
996 EFI_IFR_OP_HEADER Header
;
997 EFI_IFR_STATEMENT_HEADER Statement
;
998 EFI_DEFAULT_ID DefaultId
;
999 } EFI_IFR_RESET_BUTTON
;
1001 typedef struct _EFI_IFR_ACTION
{
1002 EFI_IFR_OP_HEADER Header
;
1003 EFI_IFR_QUESTION_HEADER Question
;
1004 EFI_STRING_ID QuestionConfig
;
1007 typedef struct _EFI_IFR_ACTION_1
{
1008 EFI_IFR_OP_HEADER Header
;
1009 EFI_IFR_QUESTION_HEADER Question
;
1012 typedef struct _EFI_IFR_DATE
{
1013 EFI_IFR_OP_HEADER Header
;
1014 EFI_IFR_QUESTION_HEADER Question
;
1019 // Flags that describe the behavior of the question.
1021 #define EFI_QF_DATE_YEAR_SUPPRESS 0x01
1022 #define EFI_QF_DATE_MONTH_SUPPRESS 0x02
1023 #define EFI_QF_DATE_DAY_SUPPRESS 0x04
1025 #define EFI_QF_DATE_STORAGE 0x30
1026 #define QF_DATE_STORAGE_NORMAL 0x00
1027 #define QF_DATE_STORAGE_TIME 0x10
1028 #define QF_DATE_STORAGE_WAKEUP 0x20
1053 typedef struct _EFI_IFR_NUMERIC
{
1054 EFI_IFR_OP_HEADER Header
;
1055 EFI_IFR_QUESTION_HEADER Question
;
1057 MINMAXSTEP_DATA data
;
1061 // Flags related to the numeric question
1063 #define EFI_IFR_NUMERIC_SIZE 0x03
1064 #define EFI_IFR_NUMERIC_SIZE_1 0x00
1065 #define EFI_IFR_NUMERIC_SIZE_2 0x01
1066 #define EFI_IFR_NUMERIC_SIZE_4 0x02
1067 #define EFI_IFR_NUMERIC_SIZE_8 0x03
1069 #define EFI_IFR_DISPLAY 0x30
1070 #define EFI_IFR_DISPLAY_INT_DEC 0x00
1071 #define EFI_IFR_DISPLAY_UINT_DEC 0x10
1072 #define EFI_IFR_DISPLAY_UINT_HEX 0x20
1074 typedef struct _EFI_IFR_ONE_OF
{
1075 EFI_IFR_OP_HEADER Header
;
1076 EFI_IFR_QUESTION_HEADER Question
;
1078 MINMAXSTEP_DATA data
;
1081 typedef struct _EFI_IFR_STRING
{
1082 EFI_IFR_OP_HEADER Header
;
1083 EFI_IFR_QUESTION_HEADER Question
;
1089 #define EFI_IFR_STRING_MULTI_LINE 0x01
1091 typedef struct _EFI_IFR_PASSWORD
{
1092 EFI_IFR_OP_HEADER Header
;
1093 EFI_IFR_QUESTION_HEADER Question
;
1098 typedef struct _EFI_IFR_ORDERED_LIST
{
1099 EFI_IFR_OP_HEADER Header
;
1100 EFI_IFR_QUESTION_HEADER Question
;
1101 UINT8 MaxContainers
;
1103 } EFI_IFR_ORDERED_LIST
;
1105 #define EFI_IFR_UNIQUE_SET 0x01
1106 #define EFI_IFR_NO_EMPTY_SET 0x02
1108 typedef struct _EFI_IFR_TIME
{
1109 EFI_IFR_OP_HEADER Header
;
1110 EFI_IFR_QUESTION_HEADER Question
;
1115 // A bit-mask that determines which unique settings are active for this opcode.
1117 #define QF_TIME_HOUR_SUPPRESS 0x01
1118 #define QF_TIME_MINUTE_SUPPRESS 0x02
1119 #define QF_TIME_SECOND_SUPPRESS 0x04
1121 #define QF_TIME_STORAGE 0x30
1122 #define QF_TIME_STORAGE_NORMAL 0x00
1123 #define QF_TIME_STORAGE_TIME 0x10
1124 #define QF_TIME_STORAGE_WAKEUP 0x20
1126 typedef struct _EFI_IFR_DISABLE_IF
{
1127 EFI_IFR_OP_HEADER Header
;
1128 } EFI_IFR_DISABLE_IF
;
1130 typedef struct _EFI_IFR_SUPPRESS_IF
{
1131 EFI_IFR_OP_HEADER Header
;
1132 } EFI_IFR_SUPPRESS_IF
;
1134 typedef struct _EFI_IFR_GRAY_OUT_IF
{
1135 EFI_IFR_OP_HEADER Header
;
1136 } EFI_IFR_GRAY_OUT_IF
;
1138 typedef struct _EFI_IFR_INCONSISTENT_IF
{
1139 EFI_IFR_OP_HEADER Header
;
1140 EFI_STRING_ID Error
;
1141 } EFI_IFR_INCONSISTENT_IF
;
1143 typedef struct _EFI_IFR_NO_SUBMIT_IF
{
1144 EFI_IFR_OP_HEADER Header
;
1145 EFI_STRING_ID Error
;
1146 } EFI_IFR_NO_SUBMIT_IF
;
1148 typedef struct _EFI_IFR_WARNING_IF
{
1149 EFI_IFR_OP_HEADER Header
;
1150 EFI_STRING_ID Warning
;
1152 } EFI_IFR_WARNING_IF
;
1154 typedef struct _EFI_IFR_REFRESH
{
1155 EFI_IFR_OP_HEADER Header
;
1156 UINT8 RefreshInterval
;
1159 typedef struct _EFI_IFR_VARSTORE_DEVICE
{
1160 EFI_IFR_OP_HEADER Header
;
1161 EFI_STRING_ID DevicePath
;
1162 } EFI_IFR_VARSTORE_DEVICE
;
1164 typedef struct _EFI_IFR_ONE_OF_OPTION
{
1165 EFI_IFR_OP_HEADER Header
;
1166 EFI_STRING_ID Option
;
1169 EFI_IFR_TYPE_VALUE Value
;
1170 } EFI_IFR_ONE_OF_OPTION
;
1173 // Types of the option's value.
1175 #define EFI_IFR_TYPE_NUM_SIZE_8 0x00
1176 #define EFI_IFR_TYPE_NUM_SIZE_16 0x01
1177 #define EFI_IFR_TYPE_NUM_SIZE_32 0x02
1178 #define EFI_IFR_TYPE_NUM_SIZE_64 0x03
1179 #define EFI_IFR_TYPE_BOOLEAN 0x04
1180 #define EFI_IFR_TYPE_TIME 0x05
1181 #define EFI_IFR_TYPE_DATE 0x06
1182 #define EFI_IFR_TYPE_STRING 0x07
1183 #define EFI_IFR_TYPE_OTHER 0x08
1184 #define EFI_IFR_TYPE_UNDEFINED 0x09
1185 #define EFI_IFR_TYPE_ACTION 0x0A
1186 #define EFI_IFR_TYPE_BUFFER 0x0B
1187 #define EFI_IFR_TYPE_REF 0x0C
1189 #define EFI_IFR_OPTION_DEFAULT 0x10
1190 #define EFI_IFR_OPTION_DEFAULT_MFG 0x20
1192 typedef struct _EFI_IFR_GUID
{
1193 EFI_IFR_OP_HEADER Header
;
1195 //Optional Data Follows
1198 typedef struct _EFI_IFR_REFRESH_ID
{
1199 EFI_IFR_OP_HEADER Header
;
1200 EFI_GUID RefreshEventGroupId
;
1201 } EFI_IFR_REFRESH_ID
;
1203 typedef struct _EFI_IFR_DUP
{
1204 EFI_IFR_OP_HEADER Header
;
1207 typedef struct _EFI_IFR_EQ_ID_ID
{
1208 EFI_IFR_OP_HEADER Header
;
1209 EFI_QUESTION_ID QuestionId1
;
1210 EFI_QUESTION_ID QuestionId2
;
1213 typedef struct _EFI_IFR_EQ_ID_VAL
{
1214 EFI_IFR_OP_HEADER Header
;
1215 EFI_QUESTION_ID QuestionId
;
1217 } EFI_IFR_EQ_ID_VAL
;
1219 typedef struct _EFI_IFR_EQ_ID_VAL_LIST
{
1220 EFI_IFR_OP_HEADER Header
;
1221 EFI_QUESTION_ID QuestionId
;
1223 UINT16 ValueList
[1];
1224 } EFI_IFR_EQ_ID_VAL_LIST
;
1226 typedef struct _EFI_IFR_UINT8
{
1227 EFI_IFR_OP_HEADER Header
;
1231 typedef struct _EFI_IFR_UINT16
{
1232 EFI_IFR_OP_HEADER Header
;
1236 typedef struct _EFI_IFR_UINT32
{
1237 EFI_IFR_OP_HEADER Header
;
1241 typedef struct _EFI_IFR_UINT64
{
1242 EFI_IFR_OP_HEADER Header
;
1246 typedef struct _EFI_IFR_QUESTION_REF1
{
1247 EFI_IFR_OP_HEADER Header
;
1248 EFI_QUESTION_ID QuestionId
;
1249 } EFI_IFR_QUESTION_REF1
;
1251 typedef struct _EFI_IFR_QUESTION_REF2
{
1252 EFI_IFR_OP_HEADER Header
;
1253 } EFI_IFR_QUESTION_REF2
;
1255 typedef struct _EFI_IFR_QUESTION_REF3
{
1256 EFI_IFR_OP_HEADER Header
;
1257 } EFI_IFR_QUESTION_REF3
;
1259 typedef struct _EFI_IFR_QUESTION_REF3_2
{
1260 EFI_IFR_OP_HEADER Header
;
1261 EFI_STRING_ID DevicePath
;
1262 } EFI_IFR_QUESTION_REF3_2
;
1264 typedef struct _EFI_IFR_QUESTION_REF3_3
{
1265 EFI_IFR_OP_HEADER Header
;
1266 EFI_STRING_ID DevicePath
;
1268 } EFI_IFR_QUESTION_REF3_3
;
1270 typedef struct _EFI_IFR_RULE_REF
{
1271 EFI_IFR_OP_HEADER Header
;
1275 typedef struct _EFI_IFR_STRING_REF1
{
1276 EFI_IFR_OP_HEADER Header
;
1277 EFI_STRING_ID StringId
;
1278 } EFI_IFR_STRING_REF1
;
1280 typedef struct _EFI_IFR_STRING_REF2
{
1281 EFI_IFR_OP_HEADER Header
;
1282 } EFI_IFR_STRING_REF2
;
1284 typedef struct _EFI_IFR_THIS
{
1285 EFI_IFR_OP_HEADER Header
;
1288 typedef struct _EFI_IFR_TRUE
{
1289 EFI_IFR_OP_HEADER Header
;
1292 typedef struct _EFI_IFR_FALSE
{
1293 EFI_IFR_OP_HEADER Header
;
1296 typedef struct _EFI_IFR_ONE
{
1297 EFI_IFR_OP_HEADER Header
;
1300 typedef struct _EFI_IFR_ONES
{
1301 EFI_IFR_OP_HEADER Header
;
1304 typedef struct _EFI_IFR_ZERO
{
1305 EFI_IFR_OP_HEADER Header
;
1308 typedef struct _EFI_IFR_UNDEFINED
{
1309 EFI_IFR_OP_HEADER Header
;
1310 } EFI_IFR_UNDEFINED
;
1312 typedef struct _EFI_IFR_VERSION
{
1313 EFI_IFR_OP_HEADER Header
;
1316 typedef struct _EFI_IFR_LENGTH
{
1317 EFI_IFR_OP_HEADER Header
;
1320 typedef struct _EFI_IFR_NOT
{
1321 EFI_IFR_OP_HEADER Header
;
1324 typedef struct _EFI_IFR_BITWISE_NOT
{
1325 EFI_IFR_OP_HEADER Header
;
1326 } EFI_IFR_BITWISE_NOT
;
1328 typedef struct _EFI_IFR_TO_BOOLEAN
{
1329 EFI_IFR_OP_HEADER Header
;
1330 } EFI_IFR_TO_BOOLEAN
;
1333 /// For EFI_IFR_TO_STRING, when converting from
1334 /// unsigned integers, these flags control the format:
1335 /// 0 = unsigned decimal.
1336 /// 1 = signed decimal.
1337 /// 2 = hexadecimal (lower-case alpha).
1338 /// 3 = hexadecimal (upper-case alpha).
1340 #define EFI_IFR_STRING_UNSIGNED_DEC 0
1341 #define EFI_IFR_STRING_SIGNED_DEC 1
1342 #define EFI_IFR_STRING_LOWERCASE_HEX 2
1343 #define EFI_IFR_STRING_UPPERCASE_HEX 3
1347 /// When converting from a buffer, these flags control the format:
1351 #define EFI_IFR_STRING_ASCII 0
1352 #define EFI_IFR_STRING_UNICODE 8
1355 typedef struct _EFI_IFR_TO_STRING
{
1356 EFI_IFR_OP_HEADER Header
;
1358 } EFI_IFR_TO_STRING
;
1360 typedef struct _EFI_IFR_TO_UINT
{
1361 EFI_IFR_OP_HEADER Header
;
1364 typedef struct _EFI_IFR_TO_UPPER
{
1365 EFI_IFR_OP_HEADER Header
;
1368 typedef struct _EFI_IFR_TO_LOWER
{
1369 EFI_IFR_OP_HEADER Header
;
1372 typedef struct _EFI_IFR_ADD
{
1373 EFI_IFR_OP_HEADER Header
;
1376 typedef struct _EFI_IFR_AND
{
1377 EFI_IFR_OP_HEADER Header
;
1380 typedef struct _EFI_IFR_BITWISE_AND
{
1381 EFI_IFR_OP_HEADER Header
;
1382 } EFI_IFR_BITWISE_AND
;
1384 typedef struct _EFI_IFR_BITWISE_OR
{
1385 EFI_IFR_OP_HEADER Header
;
1386 } EFI_IFR_BITWISE_OR
;
1388 typedef struct _EFI_IFR_CATENATE
{
1389 EFI_IFR_OP_HEADER Header
;
1392 typedef struct _EFI_IFR_DIVIDE
{
1393 EFI_IFR_OP_HEADER Header
;
1396 typedef struct _EFI_IFR_EQUAL
{
1397 EFI_IFR_OP_HEADER Header
;
1400 typedef struct _EFI_IFR_GREATER_EQUAL
{
1401 EFI_IFR_OP_HEADER Header
;
1402 } EFI_IFR_GREATER_EQUAL
;
1404 typedef struct _EFI_IFR_GREATER_THAN
{
1405 EFI_IFR_OP_HEADER Header
;
1406 } EFI_IFR_GREATER_THAN
;
1408 typedef struct _EFI_IFR_LESS_EQUAL
{
1409 EFI_IFR_OP_HEADER Header
;
1410 } EFI_IFR_LESS_EQUAL
;
1412 typedef struct _EFI_IFR_LESS_THAN
{
1413 EFI_IFR_OP_HEADER Header
;
1414 } EFI_IFR_LESS_THAN
;
1416 typedef struct _EFI_IFR_MATCH
{
1417 EFI_IFR_OP_HEADER Header
;
1420 typedef struct _EFI_IFR_MATCH2
{
1421 EFI_IFR_OP_HEADER Header
;
1422 EFI_GUID SyntaxType
;
1425 typedef struct _EFI_IFR_MULTIPLY
{
1426 EFI_IFR_OP_HEADER Header
;
1429 typedef struct _EFI_IFR_MODULO
{
1430 EFI_IFR_OP_HEADER Header
;
1433 typedef struct _EFI_IFR_NOT_EQUAL
{
1434 EFI_IFR_OP_HEADER Header
;
1435 } EFI_IFR_NOT_EQUAL
;
1437 typedef struct _EFI_IFR_OR
{
1438 EFI_IFR_OP_HEADER Header
;
1441 typedef struct _EFI_IFR_SHIFT_LEFT
{
1442 EFI_IFR_OP_HEADER Header
;
1443 } EFI_IFR_SHIFT_LEFT
;
1445 typedef struct _EFI_IFR_SHIFT_RIGHT
{
1446 EFI_IFR_OP_HEADER Header
;
1447 } EFI_IFR_SHIFT_RIGHT
;
1449 typedef struct _EFI_IFR_SUBTRACT
{
1450 EFI_IFR_OP_HEADER Header
;
1453 typedef struct _EFI_IFR_CONDITIONAL
{
1454 EFI_IFR_OP_HEADER Header
;
1455 } EFI_IFR_CONDITIONAL
;
1458 // Flags governing the matching criteria of EFI_IFR_FIND
1460 #define EFI_IFR_FF_CASE_SENSITIVE 0x00
1461 #define EFI_IFR_FF_CASE_INSENSITIVE 0x01
1463 typedef struct _EFI_IFR_FIND
{
1464 EFI_IFR_OP_HEADER Header
;
1468 typedef struct _EFI_IFR_MID
{
1469 EFI_IFR_OP_HEADER Header
;
1472 typedef struct _EFI_IFR_TOKEN
{
1473 EFI_IFR_OP_HEADER Header
;
1477 // Flags specifying whether to find the first matching string
1478 // or the first non-matching string.
1480 #define EFI_IFR_FLAGS_FIRST_MATCHING 0x00
1481 #define EFI_IFR_FLAGS_FIRST_NON_MATCHING 0x01
1483 typedef struct _EFI_IFR_SPAN
{
1484 EFI_IFR_OP_HEADER Header
;
1488 typedef struct _EFI_IFR_SECURITY
{
1490 /// Standard opcode header, where Header.Op = EFI_IFR_SECURITY_OP.
1492 EFI_IFR_OP_HEADER Header
;
1494 /// Security permission level.
1496 EFI_GUID Permissions
;
1499 typedef struct _EFI_IFR_FORM_MAP_METHOD
{
1501 /// The string identifier which provides the human-readable name of
1502 /// the configuration method for this standards map form.
1504 EFI_STRING_ID MethodTitle
;
1506 /// Identifier which uniquely specifies the configuration methods
1507 /// associated with this standards map form.
1509 EFI_GUID MethodIdentifier
;
1510 } EFI_IFR_FORM_MAP_METHOD
;
1512 typedef struct _EFI_IFR_FORM_MAP
{
1514 /// The sequence that defines the type of opcode as well as the length
1515 /// of the opcode being defined. Header.OpCode = EFI_IFR_FORM_MAP_OP.
1517 EFI_IFR_OP_HEADER Header
;
1519 /// The unique identifier for this particular form.
1523 /// One or more configuration method's name and unique identifier.
1525 // EFI_IFR_FORM_MAP_METHOD Methods[];
1528 typedef struct _EFI_IFR_SET
{
1530 /// The sequence that defines the type of opcode as well as the length
1531 /// of the opcode being defined. Header.OpCode = EFI_IFR_SET_OP.
1533 EFI_IFR_OP_HEADER Header
;
1535 /// Specifies the identifier of a previously declared variable store to
1536 /// use when storing the question's value.
1538 EFI_VARSTORE_ID VarStoreId
;
1541 /// A 16-bit Buffer Storage offset.
1543 EFI_STRING_ID VarName
;
1545 /// A Name Value or EFI Variable name (VarName).
1550 /// Specifies the type used for storage.
1555 typedef struct _EFI_IFR_GET
{
1557 /// The sequence that defines the type of opcode as well as the length
1558 /// of the opcode being defined. Header.OpCode = EFI_IFR_GET_OP.
1560 EFI_IFR_OP_HEADER Header
;
1562 /// Specifies the identifier of a previously declared variable store to
1563 /// use when retrieving the value.
1565 EFI_VARSTORE_ID VarStoreId
;
1568 /// A 16-bit Buffer Storage offset.
1570 EFI_STRING_ID VarName
;
1572 /// A Name Value or EFI Variable name (VarName).
1577 /// Specifies the type used for storage.
1582 typedef struct _EFI_IFR_READ
{
1583 EFI_IFR_OP_HEADER Header
;
1586 typedef struct _EFI_IFR_WRITE
{
1587 EFI_IFR_OP_HEADER Header
;
1590 typedef struct _EFI_IFR_MAP
{
1591 EFI_IFR_OP_HEADER Header
;
1594 // Definitions for Keyboard Package
1595 // Releated definitions are in Section of EFI_HII_DATABASE_PROTOCOL
1599 /// Each enumeration values maps a physical key on a keyboard.
1711 /// Used to describe a physical key on a keyboard.
1715 /// Unicode character code for the Key.
1719 /// Unicode character code for the key with the shift key being held down.
1721 CHAR16 ShiftedUnicode
;
1723 /// Unicode character code for the key with the Alt-GR being held down.
1725 CHAR16 AltGrUnicode
;
1727 /// Unicode character code for the key with the Alt-GR and shift keys being held down.
1729 CHAR16 ShiftedAltGrUnicode
;
1731 /// Modifier keys are defined to allow for special functionality that is not necessarily
1732 /// accomplished by a printable character. Many of these modifier keys are flags to toggle
1733 /// certain state bits on and off inside of a keyboard driver.
1736 UINT16 AffectedAttribute
;
1737 } EFI_KEY_DESCRIPTOR
;
1740 /// A key which is affected by all the standard shift modifiers.
1741 /// Most keys would be expected to have this bit active.
1743 #define EFI_AFFECTED_BY_STANDARD_SHIFT 0x0001
1746 /// This key is affected by the caps lock so that if a keyboard driver
1747 /// would need to disambiguate between a key which had a "1" defined
1748 /// versus an "a" character. Having this bit turned on would tell
1749 /// the keyboard driver to use the appropriate shifted state or not.
1751 #define EFI_AFFECTED_BY_CAPS_LOCK 0x0002
1754 /// Similar to the case of CAPS lock, if this bit is active, the key
1755 /// is affected by the num lock being turned on.
1757 #define EFI_AFFECTED_BY_NUM_LOCK 0x0004
1760 UINT16 LayoutLength
;
1762 UINT32 LayoutDescriptorStringOffset
;
1763 UINT8 DescriptorCount
;
1764 // EFI_KEY_DESCRIPTOR Descriptors[];
1765 } EFI_HII_KEYBOARD_LAYOUT
;
1768 EFI_HII_PACKAGE_HEADER Header
;
1770 // EFI_HII_KEYBOARD_LAYOUT Layout[];
1771 } EFI_HII_KEYBOARD_PACKAGE_HDR
;
1776 #define EFI_NULL_MODIFIER 0x0000
1777 #define EFI_LEFT_CONTROL_MODIFIER 0x0001
1778 #define EFI_RIGHT_CONTROL_MODIFIER 0x0002
1779 #define EFI_LEFT_ALT_MODIFIER 0x0003
1780 #define EFI_RIGHT_ALT_MODIFIER 0x0004
1781 #define EFI_ALT_GR_MODIFIER 0x0005
1782 #define EFI_INSERT_MODIFIER 0x0006
1783 #define EFI_DELETE_MODIFIER 0x0007
1784 #define EFI_PAGE_DOWN_MODIFIER 0x0008
1785 #define EFI_PAGE_UP_MODIFIER 0x0009
1786 #define EFI_HOME_MODIFIER 0x000A
1787 #define EFI_END_MODIFIER 0x000B
1788 #define EFI_LEFT_SHIFT_MODIFIER 0x000C
1789 #define EFI_RIGHT_SHIFT_MODIFIER 0x000D
1790 #define EFI_CAPS_LOCK_MODIFIER 0x000E
1791 #define EFI_NUM_LOCK_MODIFIER 0x000F
1792 #define EFI_LEFT_ARROW_MODIFIER 0x0010
1793 #define EFI_RIGHT_ARROW_MODIFIER 0x0011
1794 #define EFI_DOWN_ARROW_MODIFIER 0x0012
1795 #define EFI_UP_ARROW_MODIFIER 0x0013
1796 #define EFI_NS_KEY_MODIFIER 0x0014
1797 #define EFI_NS_KEY_DEPENDENCY_MODIFIER 0x0015
1798 #define EFI_FUNCTION_KEY_ONE_MODIFIER 0x0016
1799 #define EFI_FUNCTION_KEY_TWO_MODIFIER 0x0017
1800 #define EFI_FUNCTION_KEY_THREE_MODIFIER 0x0018
1801 #define EFI_FUNCTION_KEY_FOUR_MODIFIER 0x0019
1802 #define EFI_FUNCTION_KEY_FIVE_MODIFIER 0x001A
1803 #define EFI_FUNCTION_KEY_SIX_MODIFIER 0x001B
1804 #define EFI_FUNCTION_KEY_SEVEN_MODIFIER 0x001C
1805 #define EFI_FUNCTION_KEY_EIGHT_MODIFIER 0x001D
1806 #define EFI_FUNCTION_KEY_NINE_MODIFIER 0x001E
1807 #define EFI_FUNCTION_KEY_TEN_MODIFIER 0x001F
1808 #define EFI_FUNCTION_KEY_ELEVEN_MODIFIER 0x0020
1809 #define EFI_FUNCTION_KEY_TWELVE_MODIFIER 0x0021
1812 // Keys that have multiple control functions based on modifier
1813 // settings are handled in the keyboard driver implementation.
1814 // For instance, PRINT_KEY might have a modifier held down and
1815 // is still a nonprinting character, but might have an alternate
1816 // control function like SYSREQUEST
1818 #define EFI_PRINT_MODIFIER 0x0022
1819 #define EFI_SYS_REQUEST_MODIFIER 0x0023
1820 #define EFI_SCROLL_LOCK_MODIFIER 0x0024
1821 #define EFI_PAUSE_MODIFIER 0x0025
1822 #define EFI_BREAK_MODIFIER 0x0026
1824 #define EFI_LEFT_LOGO_MODIFIER 0x0027
1825 #define EFI_RIGHT_LOGO_MODIFIER 0x0028
1826 #define EFI_MENU_MODIFIER 0x0029
1829 /// Animation IFR opcode
1831 typedef struct _EFI_IFR_ANIMATION
{
1833 /// Standard opcode header, where Header.OpCode is
1834 /// EFI_IFR_ANIMATION_OP.
1836 EFI_IFR_OP_HEADER Header
;
1838 /// Animation identifier in the HII database.
1840 EFI_ANIMATION_ID Id
;
1841 } EFI_IFR_ANIMATION
;
1844 /// HII animation package header.
1846 typedef struct _EFI_HII_ANIMATION_PACKAGE_HDR
{
1848 /// Standard package header, where Header.Type = EFI_HII_PACKAGE_ANIMATIONS.
1850 EFI_HII_PACKAGE_HEADER Header
;
1852 /// Offset, relative to this header, of the animation information. If
1853 /// this is zero, then there are no animation sequences in the package.
1855 UINT32 AnimationInfoOffset
;
1856 } EFI_HII_ANIMATION_PACKAGE_HDR
;
1859 /// Animation information is encoded as a series of blocks,
1860 /// with each block prefixed by a single byte header EFI_HII_ANIMATION_BLOCK.
1862 typedef struct _EFI_HII_ANIMATION_BLOCK
{
1864 //UINT8 BlockBody[];
1865 } EFI_HII_ANIMATION_BLOCK
;
1868 /// Animation block types.
1870 #define EFI_HII_AIBT_END 0x00
1871 #define EFI_HII_AIBT_OVERLAY_IMAGES 0x10
1872 #define EFI_HII_AIBT_CLEAR_IMAGES 0x11
1873 #define EFI_HII_AIBT_RESTORE_SCRN 0x12
1874 #define EFI_HII_AIBT_OVERLAY_IMAGES_LOOP 0x18
1875 #define EFI_HII_AIBT_CLEAR_IMAGES_LOOP 0x19
1876 #define EFI_HII_AIBT_RESTORE_SCRN_LOOP 0x1A
1877 #define EFI_HII_AIBT_DUPLICATE 0x20
1878 #define EFI_HII_AIBT_SKIP2 0x21
1879 #define EFI_HII_AIBT_SKIP1 0x22
1880 #define EFI_HII_AIBT_EXT1 0x30
1881 #define EFI_HII_AIBT_EXT2 0x31
1882 #define EFI_HII_AIBT_EXT4 0x32
1885 /// Extended block headers used for variable sized animation records
1886 /// which need an explicit length.
1889 typedef struct _EFI_HII_AIBT_EXT1_BLOCK
{
1891 /// Standard animation header, where Header.BlockType = EFI_HII_AIBT_EXT1.
1893 EFI_HII_ANIMATION_BLOCK Header
;
1899 /// Size of the animation block, in bytes, including the animation block header.
1902 } EFI_HII_AIBT_EXT1_BLOCK
;
1904 typedef struct _EFI_HII_AIBT_EXT2_BLOCK
{
1906 /// Standard animation header, where Header.BlockType = EFI_HII_AIBT_EXT2.
1908 EFI_HII_ANIMATION_BLOCK Header
;
1914 /// Size of the animation block, in bytes, including the animation block header.
1917 } EFI_HII_AIBT_EXT2_BLOCK
;
1919 typedef struct _EFI_HII_AIBT_EXT4_BLOCK
{
1921 /// Standard animation header, where Header.BlockType = EFI_HII_AIBT_EXT4.
1923 EFI_HII_ANIMATION_BLOCK Header
;
1929 /// Size of the animation block, in bytes, including the animation block header.
1932 } EFI_HII_AIBT_EXT4_BLOCK
;
1934 typedef struct _EFI_HII_ANIMATION_CELL
{
1936 /// The X offset from the upper left hand corner of the logical
1937 /// window to position the indexed image.
1941 /// The Y offset from the upper left hand corner of the logical
1942 /// window to position the indexed image.
1946 /// The image to display at the specified offset from the upper left
1947 /// hand corner of the logical window.
1949 EFI_IMAGE_ID ImageId
;
1951 /// The number of milliseconds to delay after displaying the indexed
1952 /// image and before continuing on to the next linked image. If value
1953 /// is zero, no delay.
1956 } EFI_HII_ANIMATION_CELL
;
1959 /// An animation block to describe an animation sequence that does not cycle, and
1960 /// where one image is simply displayed over the previous image.
1962 typedef struct _EFI_HII_AIBT_OVERLAY_IMAGES_BLOCK
{
1964 /// This is image that is to be reference by the image protocols, if the
1965 /// animation function is not supported or disabled. This image can
1966 /// be one particular image from the animation sequence (if any one
1967 /// of the animation frames has a complete image) or an alternate
1968 /// image that can be displayed alone. If the value is zero, no image
1971 EFI_IMAGE_ID DftImageId
;
1973 /// The overall width of the set of images (logical window width).
1977 /// The overall height of the set of images (logical window height).
1981 /// The number of EFI_HII_ANIMATION_CELL contained in the
1982 /// animation sequence.
1986 /// An array of CellCount animation cells.
1988 EFI_HII_ANIMATION_CELL AnimationCell
[1];
1989 } EFI_HII_AIBT_OVERLAY_IMAGES_BLOCK
;
1992 /// An animation block to describe an animation sequence that does not cycle,
1993 /// and where the logical window is cleared to the specified color before
1994 /// the next image is displayed.
1996 typedef struct _EFI_HII_AIBT_CLEAR_IMAGES_BLOCK
{
1998 /// This is image that is to be reference by the image protocols, if the
1999 /// animation function is not supported or disabled. This image can
2000 /// be one particular image from the animation sequence (if any one
2001 /// of the animation frames has a complete image) or an alternate
2002 /// image that can be displayed alone. If the value is zero, no image
2005 EFI_IMAGE_ID DftImageId
;
2007 /// The overall width of the set of images (logical window width).
2011 /// The overall height of the set of images (logical window height).
2015 /// The number of EFI_HII_ANIMATION_CELL contained in the
2016 /// animation sequence.
2020 /// The color to clear the logical window to before displaying the
2023 EFI_HII_RGB_PIXEL BackgndColor
;
2025 /// An array of CellCount animation cells.
2027 EFI_HII_ANIMATION_CELL AnimationCell
[1];
2028 } EFI_HII_AIBT_CLEAR_IMAGES_BLOCK
;
2031 /// An animation block to describe an animation sequence that does not cycle,
2032 /// and where the screen is restored to the original state before the next
2033 /// image is displayed.
2035 typedef struct _EFI_HII_AIBT_RESTORE_SCRN_BLOCK
{
2037 /// This is image that is to be reference by the image protocols, if the
2038 /// animation function is not supported or disabled. This image can
2039 /// be one particular image from the animation sequence (if any one
2040 /// of the animation frames has a complete image) or an alternate
2041 /// image that can be displayed alone. If the value is zero, no image
2044 EFI_IMAGE_ID DftImageId
;
2046 /// The overall width of the set of images (logical window width).
2050 /// The overall height of the set of images (logical window height).
2054 /// The number of EFI_HII_ANIMATION_CELL contained in the
2055 /// animation sequence.
2059 /// An array of CellCount animation cells.
2061 EFI_HII_ANIMATION_CELL AnimationCell
[1];
2062 } EFI_HII_AIBT_RESTORE_SCRN_BLOCK
;
2065 /// An animation block to describe an animation sequence that continuously cycles,
2066 /// and where one image is simply displayed over the previous image.
2068 typedef EFI_HII_AIBT_OVERLAY_IMAGES_BLOCK EFI_HII_AIBT_OVERLAY_IMAGES_LOOP_BLOCK
;
2071 /// An animation block to describe an animation sequence that continuously cycles,
2072 /// and where the logical window is cleared to the specified color before
2073 /// the next image is displayed.
2075 typedef EFI_HII_AIBT_CLEAR_IMAGES_BLOCK EFI_HII_AIBT_CLEAR_IMAGES_LOOP_BLOCK
;
2078 /// An animation block to describe an animation sequence that continuously cycles,
2079 /// and where the screen is restored to the original state before
2080 /// the next image is displayed.
2082 typedef EFI_HII_AIBT_RESTORE_SCRN_BLOCK EFI_HII_AIBT_RESTORE_SCRN_LOOP_BLOCK
;
2085 /// Assigns a new character value to a previously defined animation sequence.
2087 typedef struct _EFI_HII_AIBT_DUPLICATE_BLOCK
{
2089 /// The previously defined animation ID with the exact same
2090 /// animation information.
2092 EFI_ANIMATION_ID AnimationId
;
2093 } EFI_HII_AIBT_DUPLICATE_BLOCK
;
2096 /// Skips animation IDs.
2098 typedef struct _EFI_HII_AIBT_SKIP1_BLOCK
{
2100 /// The unsigned 8-bit value to add to AnimationIdCurrent.
2103 } EFI_HII_AIBT_SKIP1_BLOCK
;
2106 /// Skips animation IDs.
2108 typedef struct _EFI_HII_AIBT_SKIP2_BLOCK
{
2110 /// The unsigned 16-bit value to add to AnimationIdCurrent.
2113 } EFI_HII_AIBT_SKIP2_BLOCK
;
2120 /// References to string tokens must use this macro to enable scanning for
2124 /// STRING_TOKEN is not defined in UEFI specification. But it is placed
2125 /// here for the easy access by C files and VFR source files.
2127 #define STRING_TOKEN(t) t
2130 /// IMAGE_TOKEN is not defined in UEFI specification. But it is placed
2131 /// here for the easy access by C files and VFR source files.
2133 #define IMAGE_TOKEN(t) t