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 - 2013, Intel Corporation. All rights reserved.<BR>
7 This program and the accompanying materials are licensed and made available under
8 the terms and conditions of the BSD License that accompanies this distribution.
9 The full text of the license may be found at
10 http://opensource.org/licenses/bsd-license.php.
12 THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
13 WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
15 @par Revision Reference:
16 These definitions are from UEFI 2.1 and 2.2.
20 #ifndef __UEFI_INTERNAL_FORMREPRESENTATION_H__
21 #define __UEFI_INTERNAL_FORMREPRESENTATION_H__
23 FILE_LICENCE ( BSD3 );
25 #include <ipxe/efi/Guid/HiiFormMapMethodGuid.h>
28 /// The following types are currently defined:
30 typedef VOID* EFI_HII_HANDLE;
31 typedef CHAR16* EFI_STRING;
32 typedef UINT16 EFI_IMAGE_ID;
33 typedef UINT16 EFI_QUESTION_ID;
34 typedef UINT16 EFI_STRING_ID;
35 typedef UINT16 EFI_FORM_ID;
36 typedef UINT16 EFI_VARSTORE_ID;
37 typedef UINT16 EFI_ANIMATION_ID;
39 typedef UINT16 EFI_DEFAULT_ID;
41 typedef UINT32 EFI_HII_FONT_STYLE;
48 // Definitions for Package Lists and Package Headers
53 /// The header found at the start of each package list.
56 EFI_GUID PackageListGuid;
58 } EFI_HII_PACKAGE_LIST_HEADER;
61 /// The header found at the start of each package.
67 } EFI_HII_PACKAGE_HEADER;
70 // Value of HII package type
72 #define EFI_HII_PACKAGE_TYPE_ALL 0x00
73 #define EFI_HII_PACKAGE_TYPE_GUID 0x01
74 #define EFI_HII_PACKAGE_FORMS 0x02
75 #define EFI_HII_PACKAGE_STRINGS 0x04
76 #define EFI_HII_PACKAGE_FONTS 0x05
77 #define EFI_HII_PACKAGE_IMAGES 0x06
78 #define EFI_HII_PACKAGE_SIMPLE_FONTS 0x07
79 #define EFI_HII_PACKAGE_DEVICE_PATH 0x08
80 #define EFI_HII_PACKAGE_KEYBOARD_LAYOUT 0x09
81 #define EFI_HII_PACKAGE_ANIMATIONS 0x0A
82 #define EFI_HII_PACKAGE_END 0xDF
83 #define EFI_HII_PACKAGE_TYPE_SYSTEM_BEGIN 0xE0
84 #define EFI_HII_PACKAGE_TYPE_SYSTEM_END 0xFF
87 // Definitions for Simplified Font Package
91 /// Contents of EFI_NARROW_GLYPH.Attributes.
93 #define EFI_GLYPH_NON_SPACING 0x01
94 #define EFI_GLYPH_WIDE 0x02
95 #define EFI_GLYPH_HEIGHT 19
96 #define EFI_GLYPH_WIDTH 8
100 /// The EFI_NARROW_GLYPH has a preferred dimension (w x h) of 8 x 19 pixels.
104 /// The Unicode representation of the glyph. The term weight is the
105 /// technical term for a character code.
107 CHAR16 UnicodeWeight;
109 /// The data element containing the glyph definitions.
113 /// The column major glyph representation of the character. Bits
114 /// with values of one indicate that the corresponding pixel is to be
115 /// on when normally displayed; those with zero are off.
117 UINT8 GlyphCol1[EFI_GLYPH_HEIGHT];
121 /// The EFI_WIDE_GLYPH has a preferred dimension (w x h) of 16 x 19 pixels, which is large enough
122 /// to accommodate logographic characters.
126 /// The Unicode representation of the glyph. The term weight is the
127 /// technical term for a character code.
129 CHAR16 UnicodeWeight;
131 /// The data element containing the glyph definitions.
135 /// The column major glyph representation of the character. Bits
136 /// with values of one indicate that the corresponding pixel is to be
137 /// on when normally displayed; those with zero are off.
139 UINT8 GlyphCol1[EFI_GLYPH_HEIGHT];
141 /// The column major glyph representation of the character. Bits
142 /// with values of one indicate that the corresponding pixel is to be
143 /// on when normally displayed; those with zero are off.
145 UINT8 GlyphCol2[EFI_GLYPH_HEIGHT];
147 /// Ensures that sizeof (EFI_WIDE_GLYPH) is twice the
148 /// sizeof (EFI_NARROW_GLYPH). The contents of Pad must
155 /// A simplified font package consists of a font header
156 /// followed by a series of glyph structures.
158 typedef struct _EFI_HII_SIMPLE_FONT_PACKAGE_HDR {
159 EFI_HII_PACKAGE_HEADER Header;
160 UINT16 NumberOfNarrowGlyphs;
161 UINT16 NumberOfWideGlyphs;
162 // EFI_NARROW_GLYPH NarrowGlyphs[];
163 // EFI_WIDE_GLYPH WideGlyphs[];
164 } EFI_HII_SIMPLE_FONT_PACKAGE_HDR;
167 // Definitions for Font Package
172 // Value for font style
174 #define EFI_HII_FONT_STYLE_NORMAL 0x00000000
175 #define EFI_HII_FONT_STYLE_BOLD 0x00000001
176 #define EFI_HII_FONT_STYLE_ITALIC 0x00000002
177 #define EFI_HII_FONT_STYLE_EMBOSS 0x00010000
178 #define EFI_HII_FONT_STYLE_OUTLINE 0x00020000
179 #define EFI_HII_FONT_STYLE_SHADOW 0x00040000
180 #define EFI_HII_FONT_STYLE_UNDERLINE 0x00080000
181 #define EFI_HII_FONT_STYLE_DBL_UNDER 0x00100000
183 typedef struct _EFI_HII_GLYPH_INFO {
189 } EFI_HII_GLYPH_INFO;
192 /// The fixed header consists of a standard record header,
193 /// then the character values in this section, the flags
194 /// (including the encoding method) and the offsets of the glyph
195 /// information, the glyph bitmaps and the character map.
197 typedef struct _EFI_HII_FONT_PACKAGE_HDR {
198 EFI_HII_PACKAGE_HEADER Header;
200 UINT32 GlyphBlockOffset;
201 EFI_HII_GLYPH_INFO Cell;
202 EFI_HII_FONT_STYLE FontStyle;
203 CHAR16 FontFamily[1];
204 } EFI_HII_FONT_PACKAGE_HDR;
207 // Value of different glyph info block types
209 #define EFI_HII_GIBT_END 0x00
210 #define EFI_HII_GIBT_GLYPH 0x10
211 #define EFI_HII_GIBT_GLYPHS 0x11
212 #define EFI_HII_GIBT_GLYPH_DEFAULT 0x12
213 #define EFI_HII_GIBT_GLYPHS_DEFAULT 0x13
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_SKIP1_BLOCK {
287 EFI_HII_GLYPH_BLOCK Header;
289 } EFI_HII_GIBT_SKIP1_BLOCK;
291 typedef struct _EFI_HII_GIBT_SKIP2_BLOCK {
292 EFI_HII_GLYPH_BLOCK Header;
294 } EFI_HII_GIBT_SKIP2_BLOCK;
297 // Definitions for Device Path Package
302 /// The device path package is used to carry a device path
303 /// associated with the package list.
305 typedef struct _EFI_HII_DEVICE_PATH_PACKAGE_HDR {
306 EFI_HII_PACKAGE_HEADER Header;
307 // EFI_DEVICE_PATH_PROTOCOL DevicePath[];
308 } EFI_HII_DEVICE_PATH_PACKAGE_HDR;
311 // Definitions for GUID Package
316 /// The GUID package is used to carry data where the format is defined by a GUID.
318 typedef struct _EFI_HII_GUID_PACKAGE_HDR {
319 EFI_HII_PACKAGE_HEADER Header;
321 // Data per GUID definition may follow
322 } EFI_HII_GUID_PACKAGE_HDR;
325 // Definitions for String Package
329 #define UEFI_CONFIG_LANG "x-UEFI"
330 #define UEFI_CONFIG_LANG_2 "x-i-UEFI"
333 /// The fixed header consists of a standard record header and then the string identifiers
334 /// contained in this section and the offsets of the string and language information.
336 typedef struct _EFI_HII_STRING_PACKAGE_HDR {
337 EFI_HII_PACKAGE_HEADER Header;
339 UINT32 StringInfoOffset;
340 CHAR16 LanguageWindow[16];
341 EFI_STRING_ID LanguageName;
343 } EFI_HII_STRING_PACKAGE_HDR;
347 } EFI_HII_STRING_BLOCK;
350 // Value of different string information block types
352 #define EFI_HII_SIBT_END 0x00
353 #define EFI_HII_SIBT_STRING_SCSU 0x10
354 #define EFI_HII_SIBT_STRING_SCSU_FONT 0x11
355 #define EFI_HII_SIBT_STRINGS_SCSU 0x12
356 #define EFI_HII_SIBT_STRINGS_SCSU_FONT 0x13
357 #define EFI_HII_SIBT_STRING_UCS2 0x14
358 #define EFI_HII_SIBT_STRING_UCS2_FONT 0x15
359 #define EFI_HII_SIBT_STRINGS_UCS2 0x16
360 #define EFI_HII_SIBT_STRINGS_UCS2_FONT 0x17
361 #define EFI_HII_SIBT_DUPLICATE 0x20
362 #define EFI_HII_SIBT_SKIP2 0x21
363 #define EFI_HII_SIBT_SKIP1 0x22
364 #define EFI_HII_SIBT_EXT1 0x30
365 #define EFI_HII_SIBT_EXT2 0x31
366 #define EFI_HII_SIBT_EXT4 0x32
367 #define EFI_HII_SIBT_FONT 0x40
370 // Definition of different string information block types
373 typedef struct _EFI_HII_SIBT_DUPLICATE_BLOCK {
374 EFI_HII_STRING_BLOCK Header;
375 EFI_STRING_ID StringId;
376 } EFI_HII_SIBT_DUPLICATE_BLOCK;
378 typedef struct _EFI_HII_SIBT_END_BLOCK {
379 EFI_HII_STRING_BLOCK Header;
380 } EFI_HII_SIBT_END_BLOCK;
382 typedef struct _EFI_HII_SIBT_EXT1_BLOCK {
383 EFI_HII_STRING_BLOCK Header;
386 } EFI_HII_SIBT_EXT1_BLOCK;
388 typedef struct _EFI_HII_SIBT_EXT2_BLOCK {
389 EFI_HII_STRING_BLOCK Header;
392 } EFI_HII_SIBT_EXT2_BLOCK;
394 typedef struct _EFI_HII_SIBT_EXT4_BLOCK {
395 EFI_HII_STRING_BLOCK Header;
398 } EFI_HII_SIBT_EXT4_BLOCK;
400 typedef struct _EFI_HII_SIBT_FONT_BLOCK {
401 EFI_HII_SIBT_EXT2_BLOCK Header;
404 EFI_HII_FONT_STYLE FontStyle;
406 } EFI_HII_SIBT_FONT_BLOCK;
408 typedef struct _EFI_HII_SIBT_SKIP1_BLOCK {
409 EFI_HII_STRING_BLOCK Header;
411 } EFI_HII_SIBT_SKIP1_BLOCK;
413 typedef struct _EFI_HII_SIBT_SKIP2_BLOCK {
414 EFI_HII_STRING_BLOCK Header;
416 } EFI_HII_SIBT_SKIP2_BLOCK;
418 typedef struct _EFI_HII_SIBT_STRING_SCSU_BLOCK {
419 EFI_HII_STRING_BLOCK Header;
421 } EFI_HII_SIBT_STRING_SCSU_BLOCK;
423 typedef struct _EFI_HII_SIBT_STRING_SCSU_FONT_BLOCK {
424 EFI_HII_STRING_BLOCK Header;
425 UINT8 FontIdentifier;
427 } EFI_HII_SIBT_STRING_SCSU_FONT_BLOCK;
429 typedef struct _EFI_HII_SIBT_STRINGS_SCSU_BLOCK {
430 EFI_HII_STRING_BLOCK Header;
433 } EFI_HII_SIBT_STRINGS_SCSU_BLOCK;
435 typedef struct _EFI_HII_SIBT_STRINGS_SCSU_FONT_BLOCK {
436 EFI_HII_STRING_BLOCK Header;
437 UINT8 FontIdentifier;
440 } EFI_HII_SIBT_STRINGS_SCSU_FONT_BLOCK;
442 typedef struct _EFI_HII_SIBT_STRING_UCS2_BLOCK {
443 EFI_HII_STRING_BLOCK Header;
444 CHAR16 StringText[1];
445 } EFI_HII_SIBT_STRING_UCS2_BLOCK;
447 typedef struct _EFI_HII_SIBT_STRING_UCS2_FONT_BLOCK {
448 EFI_HII_STRING_BLOCK Header;
449 UINT8 FontIdentifier;
450 CHAR16 StringText[1];
451 } EFI_HII_SIBT_STRING_UCS2_FONT_BLOCK;
453 typedef struct _EFI_HII_SIBT_STRINGS_UCS2_BLOCK {
454 EFI_HII_STRING_BLOCK Header;
456 CHAR16 StringText[1];
457 } EFI_HII_SIBT_STRINGS_UCS2_BLOCK;
459 typedef struct _EFI_HII_SIBT_STRINGS_UCS2_FONT_BLOCK {
460 EFI_HII_STRING_BLOCK Header;
461 UINT8 FontIdentifier;
463 CHAR16 StringText[1];
464 } EFI_HII_SIBT_STRINGS_UCS2_FONT_BLOCK;
467 // Definitions for Image Package
471 typedef struct _EFI_HII_IMAGE_PACKAGE_HDR {
472 EFI_HII_PACKAGE_HEADER Header;
473 UINT32 ImageInfoOffset;
474 UINT32 PaletteInfoOffset;
475 } EFI_HII_IMAGE_PACKAGE_HDR;
477 typedef struct _EFI_HII_IMAGE_BLOCK {
479 } EFI_HII_IMAGE_BLOCK;
482 // Value of different image information block types
484 #define EFI_HII_IIBT_END 0x00
485 #define EFI_HII_IIBT_IMAGE_1BIT 0x10
486 #define EFI_HII_IIBT_IMAGE_1BIT_TRANS 0x11
487 #define EFI_HII_IIBT_IMAGE_4BIT 0x12
488 #define EFI_HII_IIBT_IMAGE_4BIT_TRANS 0x13
489 #define EFI_HII_IIBT_IMAGE_8BIT 0x14
490 #define EFI_HII_IIBT_IMAGE_8BIT_TRANS 0x15
491 #define EFI_HII_IIBT_IMAGE_24BIT 0x16
492 #define EFI_HII_IIBT_IMAGE_24BIT_TRANS 0x17
493 #define EFI_HII_IIBT_IMAGE_JPEG 0x18
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_SKIP1_BLOCK {
615 EFI_HII_IMAGE_BLOCK Header;
617 } EFI_HII_IIBT_SKIP1_BLOCK;
619 typedef struct _EFI_HII_IIBT_SKIP2_BLOCK {
620 EFI_HII_IMAGE_BLOCK Header;
622 } EFI_HII_IIBT_SKIP2_BLOCK;
625 // Definitions for Palette Information
628 typedef struct _EFI_HII_IMAGE_PALETTE_INFO_HEADER {
630 } EFI_HII_IMAGE_PALETTE_INFO_HEADER;
632 typedef struct _EFI_HII_IMAGE_PALETTE_INFO {
634 EFI_HII_RGB_PIXEL PaletteValue[1];
635 } EFI_HII_IMAGE_PALETTE_INFO;
638 // Definitions for Forms Package
643 /// The Form package is used to carry form-based encoding data.
645 typedef struct _EFI_HII_FORM_PACKAGE_HDR {
646 EFI_HII_PACKAGE_HEADER Header;
647 // EFI_IFR_OP_HEADER OpCodeHeader;
648 // More op-codes follow
649 } EFI_HII_FORM_PACKAGE_HDR;
664 EFI_QUESTION_ID QuestionId;
666 EFI_GUID FormSetGuid;
667 EFI_STRING_ID DevicePath;
678 EFI_STRING_ID string; ///< EFI_IFR_TYPE_STRING, EFI_IFR_TYPE_ACTION
679 EFI_HII_REF ref; ///< EFI_IFR_TYPE_REF
680 // UINT8 buffer[]; ///< EFI_IFR_TYPE_BUFFER
681 } EFI_IFR_TYPE_VALUE;
686 #define EFI_IFR_FORM_OP 0x01
687 #define EFI_IFR_SUBTITLE_OP 0x02
688 #define EFI_IFR_TEXT_OP 0x03
689 #define EFI_IFR_IMAGE_OP 0x04
690 #define EFI_IFR_ONE_OF_OP 0x05
691 #define EFI_IFR_CHECKBOX_OP 0x06
692 #define EFI_IFR_NUMERIC_OP 0x07
693 #define EFI_IFR_PASSWORD_OP 0x08
694 #define EFI_IFR_ONE_OF_OPTION_OP 0x09
695 #define EFI_IFR_SUPPRESS_IF_OP 0x0A
696 #define EFI_IFR_LOCKED_OP 0x0B
697 #define EFI_IFR_ACTION_OP 0x0C
698 #define EFI_IFR_RESET_BUTTON_OP 0x0D
699 #define EFI_IFR_FORM_SET_OP 0x0E
700 #define EFI_IFR_REF_OP 0x0F
701 #define EFI_IFR_NO_SUBMIT_IF_OP 0x10
702 #define EFI_IFR_INCONSISTENT_IF_OP 0x11
703 #define EFI_IFR_EQ_ID_VAL_OP 0x12
704 #define EFI_IFR_EQ_ID_ID_OP 0x13
705 #define EFI_IFR_EQ_ID_VAL_LIST_OP 0x14
706 #define EFI_IFR_AND_OP 0x15
707 #define EFI_IFR_OR_OP 0x16
708 #define EFI_IFR_NOT_OP 0x17
709 #define EFI_IFR_RULE_OP 0x18
710 #define EFI_IFR_GRAY_OUT_IF_OP 0x19
711 #define EFI_IFR_DATE_OP 0x1A
712 #define EFI_IFR_TIME_OP 0x1B
713 #define EFI_IFR_STRING_OP 0x1C
714 #define EFI_IFR_REFRESH_OP 0x1D
715 #define EFI_IFR_DISABLE_IF_OP 0x1E
716 #define EFI_IFR_ANIMATION_OP 0x1F
717 #define EFI_IFR_TO_LOWER_OP 0x20
718 #define EFI_IFR_TO_UPPER_OP 0x21
719 #define EFI_IFR_MAP_OP 0x22
720 #define EFI_IFR_ORDERED_LIST_OP 0x23
721 #define EFI_IFR_VARSTORE_OP 0x24
722 #define EFI_IFR_VARSTORE_NAME_VALUE_OP 0x25
723 #define EFI_IFR_VARSTORE_EFI_OP 0x26
724 #define EFI_IFR_VARSTORE_DEVICE_OP 0x27
725 #define EFI_IFR_VERSION_OP 0x28
726 #define EFI_IFR_END_OP 0x29
727 #define EFI_IFR_MATCH_OP 0x2A
728 #define EFI_IFR_GET_OP 0x2B
729 #define EFI_IFR_SET_OP 0x2C
730 #define EFI_IFR_READ_OP 0x2D
731 #define EFI_IFR_WRITE_OP 0x2E
732 #define EFI_IFR_EQUAL_OP 0x2F
733 #define EFI_IFR_NOT_EQUAL_OP 0x30
734 #define EFI_IFR_GREATER_THAN_OP 0x31
735 #define EFI_IFR_GREATER_EQUAL_OP 0x32
736 #define EFI_IFR_LESS_THAN_OP 0x33
737 #define EFI_IFR_LESS_EQUAL_OP 0x34
738 #define EFI_IFR_BITWISE_AND_OP 0x35
739 #define EFI_IFR_BITWISE_OR_OP 0x36
740 #define EFI_IFR_BITWISE_NOT_OP 0x37
741 #define EFI_IFR_SHIFT_LEFT_OP 0x38
742 #define EFI_IFR_SHIFT_RIGHT_OP 0x39
743 #define EFI_IFR_ADD_OP 0x3A
744 #define EFI_IFR_SUBTRACT_OP 0x3B
745 #define EFI_IFR_MULTIPLY_OP 0x3C
746 #define EFI_IFR_DIVIDE_OP 0x3D
747 #define EFI_IFR_MODULO_OP 0x3E
748 #define EFI_IFR_RULE_REF_OP 0x3F
749 #define EFI_IFR_QUESTION_REF1_OP 0x40
750 #define EFI_IFR_QUESTION_REF2_OP 0x41
751 #define EFI_IFR_UINT8_OP 0x42
752 #define EFI_IFR_UINT16_OP 0x43
753 #define EFI_IFR_UINT32_OP 0x44
754 #define EFI_IFR_UINT64_OP 0x45
755 #define EFI_IFR_TRUE_OP 0x46
756 #define EFI_IFR_FALSE_OP 0x47
757 #define EFI_IFR_TO_UINT_OP 0x48
758 #define EFI_IFR_TO_STRING_OP 0x49
759 #define EFI_IFR_TO_BOOLEAN_OP 0x4A
760 #define EFI_IFR_MID_OP 0x4B
761 #define EFI_IFR_FIND_OP 0x4C
762 #define EFI_IFR_TOKEN_OP 0x4D
763 #define EFI_IFR_STRING_REF1_OP 0x4E
764 #define EFI_IFR_STRING_REF2_OP 0x4F
765 #define EFI_IFR_CONDITIONAL_OP 0x50
766 #define EFI_IFR_QUESTION_REF3_OP 0x51
767 #define EFI_IFR_ZERO_OP 0x52
768 #define EFI_IFR_ONE_OP 0x53
769 #define EFI_IFR_ONES_OP 0x54
770 #define EFI_IFR_UNDEFINED_OP 0x55
771 #define EFI_IFR_LENGTH_OP 0x56
772 #define EFI_IFR_DUP_OP 0x57
773 #define EFI_IFR_THIS_OP 0x58
774 #define EFI_IFR_SPAN_OP 0x59
775 #define EFI_IFR_VALUE_OP 0x5A
776 #define EFI_IFR_DEFAULT_OP 0x5B
777 #define EFI_IFR_DEFAULTSTORE_OP 0x5C
778 #define EFI_IFR_FORM_MAP_OP 0x5D
779 #define EFI_IFR_CATENATE_OP 0x5E
780 #define EFI_IFR_GUID_OP 0x5F
781 #define EFI_IFR_SECURITY_OP 0x60
782 #define EFI_IFR_MODAL_TAG_OP 0x61
783 #define EFI_IFR_REFRESH_ID_OP 0x62
784 #define EFI_IFR_WARNING_IF_OP 0x63
787 // Definitions of IFR Standard Headers
791 typedef struct _EFI_IFR_OP_HEADER {
797 typedef struct _EFI_IFR_STATEMENT_HEADER {
798 EFI_STRING_ID Prompt;
800 } EFI_IFR_STATEMENT_HEADER;
802 typedef struct _EFI_IFR_QUESTION_HEADER {
803 EFI_IFR_STATEMENT_HEADER Header;
804 EFI_QUESTION_ID QuestionId;
805 EFI_VARSTORE_ID VarStoreId;
807 EFI_STRING_ID VarName;
811 } EFI_IFR_QUESTION_HEADER;
814 // Flag values of EFI_IFR_QUESTION_HEADER
816 #define EFI_IFR_FLAG_READ_ONLY 0x01
817 #define EFI_IFR_FLAG_CALLBACK 0x04
818 #define EFI_IFR_FLAG_RESET_REQUIRED 0x10
819 #define EFI_IFR_FLAG_OPTIONS_ONLY 0x80
822 // Definition for Opcode Reference
825 typedef struct _EFI_IFR_DEFAULTSTORE {
826 EFI_IFR_OP_HEADER Header;
827 EFI_STRING_ID DefaultName;
829 } EFI_IFR_DEFAULTSTORE;
832 // Default Identifier of default store
834 #define EFI_HII_DEFAULT_CLASS_STANDARD 0x0000
835 #define EFI_HII_DEFAULT_CLASS_MANUFACTURING 0x0001
836 #define EFI_HII_DEFAULT_CLASS_SAFE 0x0002
837 #define EFI_HII_DEFAULT_CLASS_PLATFORM_BEGIN 0x4000
838 #define EFI_HII_DEFAULT_CLASS_PLATFORM_END 0x7fff
839 #define EFI_HII_DEFAULT_CLASS_HARDWARE_BEGIN 0x8000
840 #define EFI_HII_DEFAULT_CLASS_HARDWARE_END 0xbfff
841 #define EFI_HII_DEFAULT_CLASS_FIRMWARE_BEGIN 0xc000
842 #define EFI_HII_DEFAULT_CLASS_FIRMWARE_END 0xffff
844 typedef struct _EFI_IFR_VARSTORE {
845 EFI_IFR_OP_HEADER Header;
847 EFI_VARSTORE_ID VarStoreId;
852 typedef struct _EFI_IFR_VARSTORE_EFI {
853 EFI_IFR_OP_HEADER Header;
854 EFI_VARSTORE_ID VarStoreId;
859 } EFI_IFR_VARSTORE_EFI;
861 typedef struct _EFI_IFR_VARSTORE_NAME_VALUE {
862 EFI_IFR_OP_HEADER Header;
863 EFI_VARSTORE_ID VarStoreId;
865 } EFI_IFR_VARSTORE_NAME_VALUE;
867 typedef struct _EFI_IFR_FORM_SET {
868 EFI_IFR_OP_HEADER Header;
870 EFI_STRING_ID FormSetTitle;
873 // EFI_GUID ClassGuid[];
876 typedef struct _EFI_IFR_END {
877 EFI_IFR_OP_HEADER Header;
880 typedef struct _EFI_IFR_FORM {
881 EFI_IFR_OP_HEADER Header;
883 EFI_STRING_ID FormTitle;
886 typedef struct _EFI_IFR_IMAGE {
887 EFI_IFR_OP_HEADER Header;
891 typedef struct _EFI_IFR_MODAL_TAG {
892 EFI_IFR_OP_HEADER Header;
895 typedef struct _EFI_IFR_LOCKED {
896 EFI_IFR_OP_HEADER Header;
899 typedef struct _EFI_IFR_RULE {
900 EFI_IFR_OP_HEADER Header;
904 typedef struct _EFI_IFR_DEFAULT {
905 EFI_IFR_OP_HEADER Header;
908 EFI_IFR_TYPE_VALUE Value;
911 typedef struct _EFI_IFR_DEFAULT_2 {
912 EFI_IFR_OP_HEADER Header;
917 typedef struct _EFI_IFR_VALUE {
918 EFI_IFR_OP_HEADER Header;
921 typedef struct _EFI_IFR_SUBTITLE {
922 EFI_IFR_OP_HEADER Header;
923 EFI_IFR_STATEMENT_HEADER Statement;
927 #define EFI_IFR_FLAGS_HORIZONTAL 0x01
929 typedef struct _EFI_IFR_CHECKBOX {
930 EFI_IFR_OP_HEADER Header;
931 EFI_IFR_QUESTION_HEADER Question;
935 #define EFI_IFR_CHECKBOX_DEFAULT 0x01
936 #define EFI_IFR_CHECKBOX_DEFAULT_MFG 0x02
938 typedef struct _EFI_IFR_TEXT {
939 EFI_IFR_OP_HEADER Header;
940 EFI_IFR_STATEMENT_HEADER Statement;
941 EFI_STRING_ID TextTwo;
944 typedef struct _EFI_IFR_REF {
945 EFI_IFR_OP_HEADER Header;
946 EFI_IFR_QUESTION_HEADER Question;
950 typedef struct _EFI_IFR_REF2 {
951 EFI_IFR_OP_HEADER Header;
952 EFI_IFR_QUESTION_HEADER Question;
954 EFI_QUESTION_ID QuestionId;
957 typedef struct _EFI_IFR_REF3 {
958 EFI_IFR_OP_HEADER Header;
959 EFI_IFR_QUESTION_HEADER Question;
961 EFI_QUESTION_ID QuestionId;
965 typedef struct _EFI_IFR_REF4 {
966 EFI_IFR_OP_HEADER Header;
967 EFI_IFR_QUESTION_HEADER Question;
969 EFI_QUESTION_ID QuestionId;
971 EFI_STRING_ID DevicePath;
974 typedef struct _EFI_IFR_REF5 {
975 EFI_IFR_OP_HEADER Header;
976 EFI_IFR_QUESTION_HEADER Question;
979 typedef struct _EFI_IFR_RESET_BUTTON {
980 EFI_IFR_OP_HEADER Header;
981 EFI_IFR_STATEMENT_HEADER Statement;
982 EFI_DEFAULT_ID DefaultId;
983 } EFI_IFR_RESET_BUTTON;
985 typedef struct _EFI_IFR_ACTION {
986 EFI_IFR_OP_HEADER Header;
987 EFI_IFR_QUESTION_HEADER Question;
988 EFI_STRING_ID QuestionConfig;
991 typedef struct _EFI_IFR_ACTION_1 {
992 EFI_IFR_OP_HEADER Header;
993 EFI_IFR_QUESTION_HEADER Question;
996 typedef struct _EFI_IFR_DATE {
997 EFI_IFR_OP_HEADER Header;
998 EFI_IFR_QUESTION_HEADER Question;
1003 // Flags that describe the behavior of the question.
1005 #define EFI_QF_DATE_YEAR_SUPPRESS 0x01
1006 #define EFI_QF_DATE_MONTH_SUPPRESS 0x02
1007 #define EFI_QF_DATE_DAY_SUPPRESS 0x04
1009 #define EFI_QF_DATE_STORAGE 0x30
1010 #define QF_DATE_STORAGE_NORMAL 0x00
1011 #define QF_DATE_STORAGE_TIME 0x10
1012 #define QF_DATE_STORAGE_WAKEUP 0x20
1037 typedef struct _EFI_IFR_NUMERIC {
1038 EFI_IFR_OP_HEADER Header;
1039 EFI_IFR_QUESTION_HEADER Question;
1041 MINMAXSTEP_DATA data;
1045 // Flags related to the numeric question
1047 #define EFI_IFR_NUMERIC_SIZE 0x03
1048 #define EFI_IFR_NUMERIC_SIZE_1 0x00
1049 #define EFI_IFR_NUMERIC_SIZE_2 0x01
1050 #define EFI_IFR_NUMERIC_SIZE_4 0x02
1051 #define EFI_IFR_NUMERIC_SIZE_8 0x03
1053 #define EFI_IFR_DISPLAY 0x30
1054 #define EFI_IFR_DISPLAY_INT_DEC 0x00
1055 #define EFI_IFR_DISPLAY_UINT_DEC 0x10
1056 #define EFI_IFR_DISPLAY_UINT_HEX 0x20
1058 typedef struct _EFI_IFR_ONE_OF {
1059 EFI_IFR_OP_HEADER Header;
1060 EFI_IFR_QUESTION_HEADER Question;
1062 MINMAXSTEP_DATA data;
1065 typedef struct _EFI_IFR_STRING {
1066 EFI_IFR_OP_HEADER Header;
1067 EFI_IFR_QUESTION_HEADER Question;
1073 #define EFI_IFR_STRING_MULTI_LINE 0x01
1075 typedef struct _EFI_IFR_PASSWORD {
1076 EFI_IFR_OP_HEADER Header;
1077 EFI_IFR_QUESTION_HEADER Question;
1082 typedef struct _EFI_IFR_ORDERED_LIST {
1083 EFI_IFR_OP_HEADER Header;
1084 EFI_IFR_QUESTION_HEADER Question;
1085 UINT8 MaxContainers;
1087 } EFI_IFR_ORDERED_LIST;
1089 #define EFI_IFR_UNIQUE_SET 0x01
1090 #define EFI_IFR_NO_EMPTY_SET 0x02
1092 typedef struct _EFI_IFR_TIME {
1093 EFI_IFR_OP_HEADER Header;
1094 EFI_IFR_QUESTION_HEADER Question;
1099 // A bit-mask that determines which unique settings are active for this opcode.
1101 #define QF_TIME_HOUR_SUPPRESS 0x01
1102 #define QF_TIME_MINUTE_SUPPRESS 0x02
1103 #define QF_TIME_SECOND_SUPPRESS 0x04
1105 #define QF_TIME_STORAGE 0x30
1106 #define QF_TIME_STORAGE_NORMAL 0x00
1107 #define QF_TIME_STORAGE_TIME 0x10
1108 #define QF_TIME_STORAGE_WAKEUP 0x20
1110 typedef struct _EFI_IFR_DISABLE_IF {
1111 EFI_IFR_OP_HEADER Header;
1112 } EFI_IFR_DISABLE_IF;
1114 typedef struct _EFI_IFR_SUPPRESS_IF {
1115 EFI_IFR_OP_HEADER Header;
1116 } EFI_IFR_SUPPRESS_IF;
1118 typedef struct _EFI_IFR_GRAY_OUT_IF {
1119 EFI_IFR_OP_HEADER Header;
1120 } EFI_IFR_GRAY_OUT_IF;
1122 typedef struct _EFI_IFR_INCONSISTENT_IF {
1123 EFI_IFR_OP_HEADER Header;
1124 EFI_STRING_ID Error;
1125 } EFI_IFR_INCONSISTENT_IF;
1127 typedef struct _EFI_IFR_NO_SUBMIT_IF {
1128 EFI_IFR_OP_HEADER Header;
1129 EFI_STRING_ID Error;
1130 } EFI_IFR_NO_SUBMIT_IF;
1132 typedef struct _EFI_IFR_WARNING_IF {
1133 EFI_IFR_OP_HEADER Header;
1134 EFI_STRING_ID Warning;
1136 } EFI_IFR_WARNING_IF;
1138 typedef struct _EFI_IFR_REFRESH {
1139 EFI_IFR_OP_HEADER Header;
1140 UINT8 RefreshInterval;
1143 typedef struct _EFI_IFR_VARSTORE_DEVICE {
1144 EFI_IFR_OP_HEADER Header;
1145 EFI_STRING_ID DevicePath;
1146 } EFI_IFR_VARSTORE_DEVICE;
1148 typedef struct _EFI_IFR_ONE_OF_OPTION {
1149 EFI_IFR_OP_HEADER Header;
1150 EFI_STRING_ID Option;
1153 EFI_IFR_TYPE_VALUE Value;
1154 } EFI_IFR_ONE_OF_OPTION;
1157 // Types of the option's value.
1159 #define EFI_IFR_TYPE_NUM_SIZE_8 0x00
1160 #define EFI_IFR_TYPE_NUM_SIZE_16 0x01
1161 #define EFI_IFR_TYPE_NUM_SIZE_32 0x02
1162 #define EFI_IFR_TYPE_NUM_SIZE_64 0x03
1163 #define EFI_IFR_TYPE_BOOLEAN 0x04
1164 #define EFI_IFR_TYPE_TIME 0x05
1165 #define EFI_IFR_TYPE_DATE 0x06
1166 #define EFI_IFR_TYPE_STRING 0x07
1167 #define EFI_IFR_TYPE_OTHER 0x08
1168 #define EFI_IFR_TYPE_UNDEFINED 0x09
1169 #define EFI_IFR_TYPE_ACTION 0x0A
1170 #define EFI_IFR_TYPE_BUFFER 0x0B
1171 #define EFI_IFR_TYPE_REF 0x0C
1173 #define EFI_IFR_OPTION_DEFAULT 0x10
1174 #define EFI_IFR_OPTION_DEFAULT_MFG 0x20
1176 typedef struct _EFI_IFR_GUID {
1177 EFI_IFR_OP_HEADER Header;
1179 //Optional Data Follows
1182 typedef struct _EFI_IFR_REFRESH_ID {
1183 EFI_IFR_OP_HEADER Header;
1184 EFI_GUID RefreshEventGroupId;
1185 } EFI_IFR_REFRESH_ID;
1187 typedef struct _EFI_IFR_DUP {
1188 EFI_IFR_OP_HEADER Header;
1191 typedef struct _EFI_IFR_EQ_ID_ID {
1192 EFI_IFR_OP_HEADER Header;
1193 EFI_QUESTION_ID QuestionId1;
1194 EFI_QUESTION_ID QuestionId2;
1197 typedef struct _EFI_IFR_EQ_ID_VAL {
1198 EFI_IFR_OP_HEADER Header;
1199 EFI_QUESTION_ID QuestionId;
1201 } EFI_IFR_EQ_ID_VAL;
1203 typedef struct _EFI_IFR_EQ_ID_VAL_LIST {
1204 EFI_IFR_OP_HEADER Header;
1205 EFI_QUESTION_ID QuestionId;
1207 UINT16 ValueList[1];
1208 } EFI_IFR_EQ_ID_VAL_LIST;
1210 typedef struct _EFI_IFR_UINT8 {
1211 EFI_IFR_OP_HEADER Header;
1215 typedef struct _EFI_IFR_UINT16 {
1216 EFI_IFR_OP_HEADER Header;
1220 typedef struct _EFI_IFR_UINT32 {
1221 EFI_IFR_OP_HEADER Header;
1225 typedef struct _EFI_IFR_UINT64 {
1226 EFI_IFR_OP_HEADER Header;
1230 typedef struct _EFI_IFR_QUESTION_REF1 {
1231 EFI_IFR_OP_HEADER Header;
1232 EFI_QUESTION_ID QuestionId;
1233 } EFI_IFR_QUESTION_REF1;
1235 typedef struct _EFI_IFR_QUESTION_REF2 {
1236 EFI_IFR_OP_HEADER Header;
1237 } EFI_IFR_QUESTION_REF2;
1239 typedef struct _EFI_IFR_QUESTION_REF3 {
1240 EFI_IFR_OP_HEADER Header;
1241 } EFI_IFR_QUESTION_REF3;
1243 typedef struct _EFI_IFR_QUESTION_REF3_2 {
1244 EFI_IFR_OP_HEADER Header;
1245 EFI_STRING_ID DevicePath;
1246 } EFI_IFR_QUESTION_REF3_2;
1248 typedef struct _EFI_IFR_QUESTION_REF3_3 {
1249 EFI_IFR_OP_HEADER Header;
1250 EFI_STRING_ID DevicePath;
1252 } EFI_IFR_QUESTION_REF3_3;
1254 typedef struct _EFI_IFR_RULE_REF {
1255 EFI_IFR_OP_HEADER Header;
1259 typedef struct _EFI_IFR_STRING_REF1 {
1260 EFI_IFR_OP_HEADER Header;
1261 EFI_STRING_ID StringId;
1262 } EFI_IFR_STRING_REF1;
1264 typedef struct _EFI_IFR_STRING_REF2 {
1265 EFI_IFR_OP_HEADER Header;
1266 } EFI_IFR_STRING_REF2;
1268 typedef struct _EFI_IFR_THIS {
1269 EFI_IFR_OP_HEADER Header;
1272 typedef struct _EFI_IFR_TRUE {
1273 EFI_IFR_OP_HEADER Header;
1276 typedef struct _EFI_IFR_FALSE {
1277 EFI_IFR_OP_HEADER Header;
1280 typedef struct _EFI_IFR_ONE {
1281 EFI_IFR_OP_HEADER Header;
1284 typedef struct _EFI_IFR_ONES {
1285 EFI_IFR_OP_HEADER Header;
1288 typedef struct _EFI_IFR_ZERO {
1289 EFI_IFR_OP_HEADER Header;
1292 typedef struct _EFI_IFR_UNDEFINED {
1293 EFI_IFR_OP_HEADER Header;
1294 } EFI_IFR_UNDEFINED;
1296 typedef struct _EFI_IFR_VERSION {
1297 EFI_IFR_OP_HEADER Header;
1300 typedef struct _EFI_IFR_LENGTH {
1301 EFI_IFR_OP_HEADER Header;
1304 typedef struct _EFI_IFR_NOT {
1305 EFI_IFR_OP_HEADER Header;
1308 typedef struct _EFI_IFR_BITWISE_NOT {
1309 EFI_IFR_OP_HEADER Header;
1310 } EFI_IFR_BITWISE_NOT;
1312 typedef struct _EFI_IFR_TO_BOOLEAN {
1313 EFI_IFR_OP_HEADER Header;
1314 } EFI_IFR_TO_BOOLEAN;
1317 /// For EFI_IFR_TO_STRING, when converting from
1318 /// unsigned integers, these flags control the format:
1319 /// 0 = unsigned decimal.
1320 /// 1 = signed decimal.
1321 /// 2 = hexadecimal (lower-case alpha).
1322 /// 3 = hexadecimal (upper-case alpha).
1324 #define EFI_IFR_STRING_UNSIGNED_DEC 0
1325 #define EFI_IFR_STRING_SIGNED_DEC 1
1326 #define EFI_IFR_STRING_LOWERCASE_HEX 2
1327 #define EFI_IFR_STRING_UPPERCASE_HEX 3
1331 /// When converting from a buffer, these flags control the format:
1335 #define EFI_IFR_STRING_ASCII 0
1336 #define EFI_IFR_STRING_UNICODE 8
1339 typedef struct _EFI_IFR_TO_STRING {
1340 EFI_IFR_OP_HEADER Header;
1342 } EFI_IFR_TO_STRING;
1344 typedef struct _EFI_IFR_TO_UINT {
1345 EFI_IFR_OP_HEADER Header;
1348 typedef struct _EFI_IFR_TO_UPPER {
1349 EFI_IFR_OP_HEADER Header;
1352 typedef struct _EFI_IFR_TO_LOWER {
1353 EFI_IFR_OP_HEADER Header;
1356 typedef struct _EFI_IFR_ADD {
1357 EFI_IFR_OP_HEADER Header;
1360 typedef struct _EFI_IFR_AND {
1361 EFI_IFR_OP_HEADER Header;
1364 typedef struct _EFI_IFR_BITWISE_AND {
1365 EFI_IFR_OP_HEADER Header;
1366 } EFI_IFR_BITWISE_AND;
1368 typedef struct _EFI_IFR_BITWISE_OR {
1369 EFI_IFR_OP_HEADER Header;
1370 } EFI_IFR_BITWISE_OR;
1372 typedef struct _EFI_IFR_CATENATE {
1373 EFI_IFR_OP_HEADER Header;
1376 typedef struct _EFI_IFR_DIVIDE {
1377 EFI_IFR_OP_HEADER Header;
1380 typedef struct _EFI_IFR_EQUAL {
1381 EFI_IFR_OP_HEADER Header;
1384 typedef struct _EFI_IFR_GREATER_EQUAL {
1385 EFI_IFR_OP_HEADER Header;
1386 } EFI_IFR_GREATER_EQUAL;
1388 typedef struct _EFI_IFR_GREATER_THAN {
1389 EFI_IFR_OP_HEADER Header;
1390 } EFI_IFR_GREATER_THAN;
1392 typedef struct _EFI_IFR_LESS_EQUAL {
1393 EFI_IFR_OP_HEADER Header;
1394 } EFI_IFR_LESS_EQUAL;
1396 typedef struct _EFI_IFR_LESS_THAN {
1397 EFI_IFR_OP_HEADER Header;
1398 } EFI_IFR_LESS_THAN;
1400 typedef struct _EFI_IFR_MATCH {
1401 EFI_IFR_OP_HEADER Header;
1404 typedef struct _EFI_IFR_MULTIPLY {
1405 EFI_IFR_OP_HEADER Header;
1408 typedef struct _EFI_IFR_MODULO {
1409 EFI_IFR_OP_HEADER Header;
1412 typedef struct _EFI_IFR_NOT_EQUAL {
1413 EFI_IFR_OP_HEADER Header;
1414 } EFI_IFR_NOT_EQUAL;
1416 typedef struct _EFI_IFR_OR {
1417 EFI_IFR_OP_HEADER Header;
1420 typedef struct _EFI_IFR_SHIFT_LEFT {
1421 EFI_IFR_OP_HEADER Header;
1422 } EFI_IFR_SHIFT_LEFT;
1424 typedef struct _EFI_IFR_SHIFT_RIGHT {
1425 EFI_IFR_OP_HEADER Header;
1426 } EFI_IFR_SHIFT_RIGHT;
1428 typedef struct _EFI_IFR_SUBTRACT {
1429 EFI_IFR_OP_HEADER Header;
1432 typedef struct _EFI_IFR_CONDITIONAL {
1433 EFI_IFR_OP_HEADER Header;
1434 } EFI_IFR_CONDITIONAL;
1437 // Flags governing the matching criteria of EFI_IFR_FIND
1439 #define EFI_IFR_FF_CASE_SENSITIVE 0x00
1440 #define EFI_IFR_FF_CASE_INSENSITIVE 0x01
1442 typedef struct _EFI_IFR_FIND {
1443 EFI_IFR_OP_HEADER Header;
1447 typedef struct _EFI_IFR_MID {
1448 EFI_IFR_OP_HEADER Header;
1451 typedef struct _EFI_IFR_TOKEN {
1452 EFI_IFR_OP_HEADER Header;
1456 // Flags specifying whether to find the first matching string
1457 // or the first non-matching string.
1459 #define EFI_IFR_FLAGS_FIRST_MATCHING 0x00
1460 #define EFI_IFR_FLAGS_FIRST_NON_MATCHING 0x01
1462 typedef struct _EFI_IFR_SPAN {
1463 EFI_IFR_OP_HEADER Header;
1467 typedef struct _EFI_IFR_SECURITY {
1469 /// Standard opcode header, where Header.Op = EFI_IFR_SECURITY_OP.
1471 EFI_IFR_OP_HEADER Header;
1473 /// Security permission level.
1475 EFI_GUID Permissions;
1478 typedef struct _EFI_IFR_FORM_MAP_METHOD {
1480 /// The string identifier which provides the human-readable name of
1481 /// the configuration method for this standards map form.
1483 EFI_STRING_ID MethodTitle;
1485 /// Identifier which uniquely specifies the configuration methods
1486 /// associated with this standards map form.
1488 EFI_GUID MethodIdentifier;
1489 } EFI_IFR_FORM_MAP_METHOD;
1491 typedef struct _EFI_IFR_FORM_MAP {
1493 /// The sequence that defines the type of opcode as well as the length
1494 /// of the opcode being defined. Header.OpCode = EFI_IFR_FORM_MAP_OP.
1496 EFI_IFR_OP_HEADER Header;
1498 /// The unique identifier for this particular form.
1502 /// One or more configuration method's name and unique identifier.
1504 // EFI_IFR_FORM_MAP_METHOD Methods[];
1507 typedef struct _EFI_IFR_SET {
1509 /// The sequence that defines the type of opcode as well as the length
1510 /// of the opcode being defined. Header.OpCode = EFI_IFR_SET_OP.
1512 EFI_IFR_OP_HEADER Header;
1514 /// Specifies the identifier of a previously declared variable store to
1515 /// use when storing the question's value.
1517 EFI_VARSTORE_ID VarStoreId;
1520 /// A 16-bit Buffer Storage offset.
1522 EFI_STRING_ID VarName;
1524 /// A Name Value or EFI Variable name (VarName).
1529 /// Specifies the type used for storage.
1534 typedef struct _EFI_IFR_GET {
1536 /// The sequence that defines the type of opcode as well as the length
1537 /// of the opcode being defined. Header.OpCode = EFI_IFR_GET_OP.
1539 EFI_IFR_OP_HEADER Header;
1541 /// Specifies the identifier of a previously declared variable store to
1542 /// use when retrieving the value.
1544 EFI_VARSTORE_ID VarStoreId;
1547 /// A 16-bit Buffer Storage offset.
1549 EFI_STRING_ID VarName;
1551 /// A Name Value or EFI Variable name (VarName).
1556 /// Specifies the type used for storage.
1561 typedef struct _EFI_IFR_READ {
1562 EFI_IFR_OP_HEADER Header;
1565 typedef struct _EFI_IFR_WRITE {
1566 EFI_IFR_OP_HEADER Header;
1569 typedef struct _EFI_IFR_MAP {
1570 EFI_IFR_OP_HEADER Header;
1573 // Definitions for Keyboard Package
1574 // Releated definitions are in Section of EFI_HII_DATABASE_PROTOCOL
1578 /// Each enumeration values maps a physical key on a keyboard.
1690 /// Used to describe a physical key on a keyboard.
1694 /// Unicode character code for the Key.
1698 /// Unicode character code for the key with the shift key being held down.
1700 CHAR16 ShiftedUnicode;
1702 /// Unicode character code for the key with the Alt-GR being held down.
1704 CHAR16 AltGrUnicode;
1706 /// Unicode character code for the key with the Alt-GR and shift keys being held down.
1708 CHAR16 ShiftedAltGrUnicode;
1710 /// Modifier keys are defined to allow for special functionality that is not necessarily
1711 /// accomplished by a printable character. Many of these modifier keys are flags to toggle
1712 /// certain state bits on and off inside of a keyboard driver.
1715 UINT16 AffectedAttribute;
1716 } EFI_KEY_DESCRIPTOR;
1719 /// A key which is affected by all the standard shift modifiers.
1720 /// Most keys would be expected to have this bit active.
1722 #define EFI_AFFECTED_BY_STANDARD_SHIFT 0x0001
1725 /// This key is affected by the caps lock so that if a keyboard driver
1726 /// would need to disambiguate between a key which had a "1" defined
1727 /// versus an "a" character. Having this bit turned on would tell
1728 /// the keyboard driver to use the appropriate shifted state or not.
1730 #define EFI_AFFECTED_BY_CAPS_LOCK 0x0002
1733 /// Similar to the case of CAPS lock, if this bit is active, the key
1734 /// is affected by the num lock being turned on.
1736 #define EFI_AFFECTED_BY_NUM_LOCK 0x0004
1739 UINT16 LayoutLength;
1741 UINT32 LayoutDescriptorStringOffset;
1742 UINT8 DescriptorCount;
1743 // EFI_KEY_DESCRIPTOR Descriptors[];
1744 } EFI_HII_KEYBOARD_LAYOUT;
1747 EFI_HII_PACKAGE_HEADER Header;
1749 // EFI_HII_KEYBOARD_LAYOUT Layout[];
1750 } EFI_HII_KEYBOARD_PACKAGE_HDR;
1755 #define EFI_NULL_MODIFIER 0x0000
1756 #define EFI_LEFT_CONTROL_MODIFIER 0x0001
1757 #define EFI_RIGHT_CONTROL_MODIFIER 0x0002
1758 #define EFI_LEFT_ALT_MODIFIER 0x0003
1759 #define EFI_RIGHT_ALT_MODIFIER 0x0004
1760 #define EFI_ALT_GR_MODIFIER 0x0005
1761 #define EFI_INSERT_MODIFIER 0x0006
1762 #define EFI_DELETE_MODIFIER 0x0007
1763 #define EFI_PAGE_DOWN_MODIFIER 0x0008
1764 #define EFI_PAGE_UP_MODIFIER 0x0009
1765 #define EFI_HOME_MODIFIER 0x000A
1766 #define EFI_END_MODIFIER 0x000B
1767 #define EFI_LEFT_SHIFT_MODIFIER 0x000C
1768 #define EFI_RIGHT_SHIFT_MODIFIER 0x000D
1769 #define EFI_CAPS_LOCK_MODIFIER 0x000E
1770 #define EFI_NUM_LOCK_MODIFIER 0x000F
1771 #define EFI_LEFT_ARROW_MODIFIER 0x0010
1772 #define EFI_RIGHT_ARROW_MODIFIER 0x0011
1773 #define EFI_DOWN_ARROW_MODIFIER 0x0012
1774 #define EFI_UP_ARROW_MODIFIER 0x0013
1775 #define EFI_NS_KEY_MODIFIER 0x0014
1776 #define EFI_NS_KEY_DEPENDENCY_MODIFIER 0x0015
1777 #define EFI_FUNCTION_KEY_ONE_MODIFIER 0x0016
1778 #define EFI_FUNCTION_KEY_TWO_MODIFIER 0x0017
1779 #define EFI_FUNCTION_KEY_THREE_MODIFIER 0x0018
1780 #define EFI_FUNCTION_KEY_FOUR_MODIFIER 0x0019
1781 #define EFI_FUNCTION_KEY_FIVE_MODIFIER 0x001A
1782 #define EFI_FUNCTION_KEY_SIX_MODIFIER 0x001B
1783 #define EFI_FUNCTION_KEY_SEVEN_MODIFIER 0x001C
1784 #define EFI_FUNCTION_KEY_EIGHT_MODIFIER 0x001D
1785 #define EFI_FUNCTION_KEY_NINE_MODIFIER 0x001E
1786 #define EFI_FUNCTION_KEY_TEN_MODIFIER 0x001F
1787 #define EFI_FUNCTION_KEY_ELEVEN_MODIFIER 0x0020
1788 #define EFI_FUNCTION_KEY_TWELVE_MODIFIER 0x0021
1791 // Keys that have multiple control functions based on modifier
1792 // settings are handled in the keyboard driver implementation.
1793 // For instance, PRINT_KEY might have a modifier held down and
1794 // is still a nonprinting character, but might have an alternate
1795 // control function like SYSREQUEST
1797 #define EFI_PRINT_MODIFIER 0x0022
1798 #define EFI_SYS_REQUEST_MODIFIER 0x0023
1799 #define EFI_SCROLL_LOCK_MODIFIER 0x0024
1800 #define EFI_PAUSE_MODIFIER 0x0025
1801 #define EFI_BREAK_MODIFIER 0x0026
1803 #define EFI_LEFT_LOGO_MODIFIER 0x0027
1804 #define EFI_RIGHT_LOGO_MODIFIER 0x0028
1805 #define EFI_MENU_MODIFIER 0x0029
1808 /// Animation IFR opcode
1810 typedef struct _EFI_IFR_ANIMATION {
1812 /// Standard opcode header, where Header.OpCode is
1813 /// EFI_IFR_ANIMATION_OP.
1815 EFI_IFR_OP_HEADER Header;
1817 /// Animation identifier in the HII database.
1819 EFI_ANIMATION_ID Id;
1820 } EFI_IFR_ANIMATION;
1823 /// HII animation package header.
1825 typedef struct _EFI_HII_ANIMATION_PACKAGE_HDR {
1827 /// Standard package header, where Header.Type = EFI_HII_PACKAGE_ANIMATIONS.
1829 EFI_HII_PACKAGE_HEADER Header;
1831 /// Offset, relative to this header, of the animation information. If
1832 /// this is zero, then there are no animation sequences in the package.
1834 UINT32 AnimationInfoOffset;
1835 } EFI_HII_ANIMATION_PACKAGE_HDR;
1838 /// Animation information is encoded as a series of blocks,
1839 /// with each block prefixed by a single byte header EFI_HII_ANIMATION_BLOCK.
1841 typedef struct _EFI_HII_ANIMATION_BLOCK {
1843 //UINT8 BlockBody[];
1844 } EFI_HII_ANIMATION_BLOCK;
1847 /// Animation block types.
1849 #define EFI_HII_AIBT_END 0x00
1850 #define EFI_HII_AIBT_OVERLAY_IMAGES 0x10
1851 #define EFI_HII_AIBT_CLEAR_IMAGES 0x11
1852 #define EFI_HII_AIBT_RESTORE_SCRN 0x12
1853 #define EFI_HII_AIBT_OVERLAY_IMAGES_LOOP 0x18
1854 #define EFI_HII_AIBT_CLEAR_IMAGES_LOOP 0x19
1855 #define EFI_HII_AIBT_RESTORE_SCRN_LOOP 0x1A
1856 #define EFI_HII_AIBT_DUPLICATE 0x20
1857 #define EFI_HII_AIBT_SKIP2 0x21
1858 #define EFI_HII_AIBT_SKIP1 0x22
1859 #define EFI_HII_AIBT_EXT1 0x30
1860 #define EFI_HII_AIBT_EXT2 0x31
1861 #define EFI_HII_AIBT_EXT4 0x32
1864 /// Extended block headers used for variable sized animation records
1865 /// which need an explicit length.
1868 typedef struct _EFI_HII_AIBT_EXT1_BLOCK {
1870 /// Standard animation header, where Header.BlockType = EFI_HII_AIBT_EXT1.
1872 EFI_HII_ANIMATION_BLOCK Header;
1878 /// Size of the animation block, in bytes, including the animation block header.
1881 } EFI_HII_AIBT_EXT1_BLOCK;
1883 typedef struct _EFI_HII_AIBT_EXT2_BLOCK {
1885 /// Standard animation header, where Header.BlockType = EFI_HII_AIBT_EXT2.
1887 EFI_HII_ANIMATION_BLOCK Header;
1893 /// Size of the animation block, in bytes, including the animation block header.
1896 } EFI_HII_AIBT_EXT2_BLOCK;
1898 typedef struct _EFI_HII_AIBT_EXT4_BLOCK {
1900 /// Standard animation header, where Header.BlockType = EFI_HII_AIBT_EXT4.
1902 EFI_HII_ANIMATION_BLOCK Header;
1908 /// Size of the animation block, in bytes, including the animation block header.
1911 } EFI_HII_AIBT_EXT4_BLOCK;
1913 typedef struct _EFI_HII_ANIMATION_CELL {
1915 /// The X offset from the upper left hand corner of the logical
1916 /// window to position the indexed image.
1920 /// The Y offset from the upper left hand corner of the logical
1921 /// window to position the indexed image.
1925 /// The image to display at the specified offset from the upper left
1926 /// hand corner of the logical window.
1928 EFI_IMAGE_ID ImageId;
1930 /// The number of milliseconds to delay after displaying the indexed
1931 /// image and before continuing on to the next linked image. If value
1932 /// is zero, no delay.
1935 } EFI_HII_ANIMATION_CELL;
1938 /// An animation block to describe an animation sequence that does not cycle, and
1939 /// where one image is simply displayed over the previous image.
1941 typedef struct _EFI_HII_AIBT_OVERLAY_IMAGES_BLOCK {
1943 /// This is image that is to be reference by the image protocols, if the
1944 /// animation function is not supported or disabled. This image can
1945 /// be one particular image from the animation sequence (if any one
1946 /// of the animation frames has a complete image) or an alternate
1947 /// image that can be displayed alone. If the value is zero, no image
1950 EFI_IMAGE_ID DftImageId;
1952 /// The overall width of the set of images (logical window width).
1956 /// The overall height of the set of images (logical window height).
1960 /// The number of EFI_HII_ANIMATION_CELL contained in the
1961 /// animation sequence.
1965 /// An array of CellCount animation cells.
1967 EFI_HII_ANIMATION_CELL AnimationCell[1];
1968 } EFI_HII_AIBT_OVERLAY_IMAGES_BLOCK;
1971 /// An animation block to describe an animation sequence that does not cycle,
1972 /// and where the logical window is cleared to the specified color before
1973 /// the next image is displayed.
1975 typedef struct _EFI_HII_AIBT_CLEAR_IMAGES_BLOCK {
1977 /// This is image that is to be reference by the image protocols, if the
1978 /// animation function is not supported or disabled. This image can
1979 /// be one particular image from the animation sequence (if any one
1980 /// of the animation frames has a complete image) or an alternate
1981 /// image that can be displayed alone. If the value is zero, no image
1984 EFI_IMAGE_ID DftImageId;
1986 /// The overall width of the set of images (logical window width).
1990 /// The overall height of the set of images (logical window height).
1994 /// The number of EFI_HII_ANIMATION_CELL contained in the
1995 /// animation sequence.
1999 /// The color to clear the logical window to before displaying the
2002 EFI_HII_RGB_PIXEL BackgndColor;
2004 /// An array of CellCount animation cells.
2006 EFI_HII_ANIMATION_CELL AnimationCell[1];
2007 } EFI_HII_AIBT_CLEAR_IMAGES_BLOCK;
2010 /// An animation block to describe an animation sequence that does not cycle,
2011 /// and where the screen is restored to the original state before the next
2012 /// image is displayed.
2014 typedef struct _EFI_HII_AIBT_RESTORE_SCRN_BLOCK {
2016 /// This is image that is to be reference by the image protocols, if the
2017 /// animation function is not supported or disabled. This image can
2018 /// be one particular image from the animation sequence (if any one
2019 /// of the animation frames has a complete image) or an alternate
2020 /// image that can be displayed alone. If the value is zero, no image
2023 EFI_IMAGE_ID DftImageId;
2025 /// The overall width of the set of images (logical window width).
2029 /// The overall height of the set of images (logical window height).
2033 /// The number of EFI_HII_ANIMATION_CELL contained in the
2034 /// animation sequence.
2038 /// An array of CellCount animation cells.
2040 EFI_HII_ANIMATION_CELL AnimationCell[1];
2041 } EFI_HII_AIBT_RESTORE_SCRN_BLOCK;
2044 /// An animation block to describe an animation sequence that continuously cycles,
2045 /// and where one image is simply displayed over the previous image.
2047 typedef EFI_HII_AIBT_OVERLAY_IMAGES_BLOCK EFI_HII_AIBT_OVERLAY_IMAGES_LOOP_BLOCK;
2050 /// An animation block to describe an animation sequence that continuously cycles,
2051 /// and where the logical window is cleared to the specified color before
2052 /// the next image is displayed.
2054 typedef EFI_HII_AIBT_CLEAR_IMAGES_BLOCK EFI_HII_AIBT_CLEAR_IMAGES_LOOP_BLOCK;
2057 /// An animation block to describe an animation sequence that continuously cycles,
2058 /// and where the screen is restored to the original state before
2059 /// the next image is displayed.
2061 typedef EFI_HII_AIBT_RESTORE_SCRN_BLOCK EFI_HII_AIBT_RESTORE_SCRN_LOOP_BLOCK;
2064 /// Assigns a new character value to a previously defined animation sequence.
2066 typedef struct _EFI_HII_AIBT_DUPLICATE_BLOCK {
2068 /// The previously defined animation ID with the exact same
2069 /// animation information.
2071 EFI_ANIMATION_ID AnimationId;
2072 } EFI_HII_AIBT_DUPLICATE_BLOCK;
2075 /// Skips animation IDs.
2077 typedef struct _EFI_HII_AIBT_SKIP1_BLOCK {
2079 /// The unsigned 8-bit value to add to AnimationIdCurrent.
2082 } EFI_HII_AIBT_SKIP1_BLOCK;
2085 /// Skips animation IDs.
2087 typedef struct _EFI_HII_AIBT_SKIP2_BLOCK {
2089 /// The unsigned 16-bit value to add to AnimationIdCurrent.
2092 } EFI_HII_AIBT_SKIP2_BLOCK;
2099 /// References to string tokens must use this macro to enable scanning for
2103 /// STRING_TOKEN is not defined in UEFI specification. But it is placed
2104 /// here for the easy access by C files and VFR source files.
2106 #define STRING_TOKEN(t) t