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 - 2015, 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 #include <Guid/HiiFormMapMethodGuid.h>
26 /// The following types are currently defined:
28 typedef VOID
* EFI_HII_HANDLE
;
29 typedef CHAR16
* EFI_STRING
;
30 typedef UINT16 EFI_IMAGE_ID
;
31 typedef UINT16 EFI_QUESTION_ID
;
32 typedef UINT16 EFI_STRING_ID
;
33 typedef UINT16 EFI_FORM_ID
;
34 typedef UINT16 EFI_VARSTORE_ID
;
35 typedef UINT16 EFI_ANIMATION_ID
;
37 typedef UINT16 EFI_DEFAULT_ID
;
39 typedef UINT32 EFI_HII_FONT_STYLE
;
46 // Definitions for Package Lists and Package Headers
51 /// The header found at the start of each package list.
54 EFI_GUID PackageListGuid
;
56 } EFI_HII_PACKAGE_LIST_HEADER
;
59 /// The header found at the start of each package.
65 } EFI_HII_PACKAGE_HEADER
;
68 // Value of HII package type
70 #define EFI_HII_PACKAGE_TYPE_ALL 0x00
71 #define EFI_HII_PACKAGE_TYPE_GUID 0x01
72 #define EFI_HII_PACKAGE_FORMS 0x02
73 #define EFI_HII_PACKAGE_STRINGS 0x04
74 #define EFI_HII_PACKAGE_FONTS 0x05
75 #define EFI_HII_PACKAGE_IMAGES 0x06
76 #define EFI_HII_PACKAGE_SIMPLE_FONTS 0x07
77 #define EFI_HII_PACKAGE_DEVICE_PATH 0x08
78 #define EFI_HII_PACKAGE_KEYBOARD_LAYOUT 0x09
79 #define EFI_HII_PACKAGE_ANIMATIONS 0x0A
80 #define EFI_HII_PACKAGE_END 0xDF
81 #define EFI_HII_PACKAGE_TYPE_SYSTEM_BEGIN 0xE0
82 #define EFI_HII_PACKAGE_TYPE_SYSTEM_END 0xFF
85 // Definitions for Simplified Font Package
89 /// Contents of EFI_NARROW_GLYPH.Attributes.
91 #define EFI_GLYPH_NON_SPACING 0x01
92 #define EFI_GLYPH_WIDE 0x02
93 #define EFI_GLYPH_HEIGHT 19
94 #define EFI_GLYPH_WIDTH 8
98 /// The EFI_NARROW_GLYPH has a preferred dimension (w x h) of 8 x 19 pixels.
102 /// The Unicode representation of the glyph. The term weight is the
103 /// technical term for a character code.
105 CHAR16 UnicodeWeight
;
107 /// The data element containing the glyph definitions.
111 /// The column major glyph representation of the character. Bits
112 /// with values of one indicate that the corresponding pixel is to be
113 /// on when normally displayed; those with zero are off.
115 UINT8 GlyphCol1
[EFI_GLYPH_HEIGHT
];
119 /// The EFI_WIDE_GLYPH has a preferred dimension (w x h) of 16 x 19 pixels, which is large enough
120 /// to accommodate logographic characters.
124 /// The Unicode representation of the glyph. The term weight is the
125 /// technical term for a character code.
127 CHAR16 UnicodeWeight
;
129 /// The data element containing the glyph definitions.
133 /// The column major glyph representation of the character. Bits
134 /// with values of one indicate that the corresponding pixel is to be
135 /// on when normally displayed; those with zero are off.
137 UINT8 GlyphCol1
[EFI_GLYPH_HEIGHT
];
139 /// The column major glyph representation of the character. Bits
140 /// with values of one indicate that the corresponding pixel is to be
141 /// on when normally displayed; those with zero are off.
143 UINT8 GlyphCol2
[EFI_GLYPH_HEIGHT
];
145 /// Ensures that sizeof (EFI_WIDE_GLYPH) is twice the
146 /// sizeof (EFI_NARROW_GLYPH). The contents of Pad must
153 /// A simplified font package consists of a font header
154 /// followed by a series of glyph structures.
156 typedef struct _EFI_HII_SIMPLE_FONT_PACKAGE_HDR
{
157 EFI_HII_PACKAGE_HEADER Header
;
158 UINT16 NumberOfNarrowGlyphs
;
159 UINT16 NumberOfWideGlyphs
;
160 // EFI_NARROW_GLYPH NarrowGlyphs[];
161 // EFI_WIDE_GLYPH WideGlyphs[];
162 } EFI_HII_SIMPLE_FONT_PACKAGE_HDR
;
165 // Definitions for Font Package
170 // Value for font style
172 #define EFI_HII_FONT_STYLE_NORMAL 0x00000000
173 #define EFI_HII_FONT_STYLE_BOLD 0x00000001
174 #define EFI_HII_FONT_STYLE_ITALIC 0x00000002
175 #define EFI_HII_FONT_STYLE_EMBOSS 0x00010000
176 #define EFI_HII_FONT_STYLE_OUTLINE 0x00020000
177 #define EFI_HII_FONT_STYLE_SHADOW 0x00040000
178 #define EFI_HII_FONT_STYLE_UNDERLINE 0x00080000
179 #define EFI_HII_FONT_STYLE_DBL_UNDER 0x00100000
181 typedef struct _EFI_HII_GLYPH_INFO
{
187 } EFI_HII_GLYPH_INFO
;
190 /// The fixed header consists of a standard record header,
191 /// then the character values in this section, the flags
192 /// (including the encoding method) and the offsets of the glyph
193 /// information, the glyph bitmaps and the character map.
195 typedef struct _EFI_HII_FONT_PACKAGE_HDR
{
196 EFI_HII_PACKAGE_HEADER Header
;
198 UINT32 GlyphBlockOffset
;
199 EFI_HII_GLYPH_INFO Cell
;
200 EFI_HII_FONT_STYLE FontStyle
;
201 CHAR16 FontFamily
[1];
202 } EFI_HII_FONT_PACKAGE_HDR
;
205 // Value of different glyph info block types
207 #define EFI_HII_GIBT_END 0x00
208 #define EFI_HII_GIBT_GLYPH 0x10
209 #define EFI_HII_GIBT_GLYPHS 0x11
210 #define EFI_HII_GIBT_GLYPH_DEFAULT 0x12
211 #define EFI_HII_GIBT_GLYPHS_DEFAULT 0x13
212 #define EFI_HII_GIBT_DUPLICATE 0x20
213 #define EFI_HII_GIBT_SKIP2 0x21
214 #define EFI_HII_GIBT_SKIP1 0x22
215 #define EFI_HII_GIBT_DEFAULTS 0x23
216 #define EFI_HII_GIBT_EXT1 0x30
217 #define EFI_HII_GIBT_EXT2 0x31
218 #define EFI_HII_GIBT_EXT4 0x32
220 typedef struct _EFI_HII_GLYPH_BLOCK
{
222 } EFI_HII_GLYPH_BLOCK
;
225 // Definition of different glyph info block types
228 typedef struct _EFI_HII_GIBT_DEFAULTS_BLOCK
{
229 EFI_HII_GLYPH_BLOCK Header
;
230 EFI_HII_GLYPH_INFO Cell
;
231 } EFI_HII_GIBT_DEFAULTS_BLOCK
;
233 typedef struct _EFI_HII_GIBT_DUPLICATE_BLOCK
{
234 EFI_HII_GLYPH_BLOCK Header
;
236 } EFI_HII_GIBT_DUPLICATE_BLOCK
;
238 typedef struct _EFI_GLYPH_GIBT_END_BLOCK
{
239 EFI_HII_GLYPH_BLOCK Header
;
240 } EFI_GLYPH_GIBT_END_BLOCK
;
242 typedef struct _EFI_HII_GIBT_EXT1_BLOCK
{
243 EFI_HII_GLYPH_BLOCK Header
;
246 } EFI_HII_GIBT_EXT1_BLOCK
;
248 typedef struct _EFI_HII_GIBT_EXT2_BLOCK
{
249 EFI_HII_GLYPH_BLOCK Header
;
252 } EFI_HII_GIBT_EXT2_BLOCK
;
254 typedef struct _EFI_HII_GIBT_EXT4_BLOCK
{
255 EFI_HII_GLYPH_BLOCK Header
;
258 } EFI_HII_GIBT_EXT4_BLOCK
;
260 typedef struct _EFI_HII_GIBT_GLYPH_BLOCK
{
261 EFI_HII_GLYPH_BLOCK Header
;
262 EFI_HII_GLYPH_INFO Cell
;
264 } EFI_HII_GIBT_GLYPH_BLOCK
;
266 typedef struct _EFI_HII_GIBT_GLYPHS_BLOCK
{
267 EFI_HII_GLYPH_BLOCK Header
;
268 EFI_HII_GLYPH_INFO Cell
;
271 } EFI_HII_GIBT_GLYPHS_BLOCK
;
273 typedef struct _EFI_HII_GIBT_GLYPH_DEFAULT_BLOCK
{
274 EFI_HII_GLYPH_BLOCK Header
;
276 } EFI_HII_GIBT_GLYPH_DEFAULT_BLOCK
;
278 typedef struct _EFI_HII_GIBT_GLYPHS_DEFAULT_BLOCK
{
279 EFI_HII_GLYPH_BLOCK Header
;
282 } EFI_HII_GIBT_GLYPHS_DEFAULT_BLOCK
;
284 typedef struct _EFI_HII_GIBT_SKIP1_BLOCK
{
285 EFI_HII_GLYPH_BLOCK Header
;
287 } EFI_HII_GIBT_SKIP1_BLOCK
;
289 typedef struct _EFI_HII_GIBT_SKIP2_BLOCK
{
290 EFI_HII_GLYPH_BLOCK Header
;
292 } EFI_HII_GIBT_SKIP2_BLOCK
;
295 // Definitions for Device Path Package
300 /// The device path package is used to carry a device path
301 /// associated with the package list.
303 typedef struct _EFI_HII_DEVICE_PATH_PACKAGE_HDR
{
304 EFI_HII_PACKAGE_HEADER Header
;
305 // EFI_DEVICE_PATH_PROTOCOL DevicePath[];
306 } EFI_HII_DEVICE_PATH_PACKAGE_HDR
;
309 // Definitions for GUID Package
314 /// The GUID package is used to carry data where the format is defined by a GUID.
316 typedef struct _EFI_HII_GUID_PACKAGE_HDR
{
317 EFI_HII_PACKAGE_HEADER Header
;
319 // Data per GUID definition may follow
320 } EFI_HII_GUID_PACKAGE_HDR
;
323 // Definitions for String Package
327 #define UEFI_CONFIG_LANG "x-UEFI"
328 #define UEFI_CONFIG_LANG_2 "x-i-UEFI"
331 /// The fixed header consists of a standard record header and then the string identifiers
332 /// contained in this section and the offsets of the string and language information.
334 typedef struct _EFI_HII_STRING_PACKAGE_HDR
{
335 EFI_HII_PACKAGE_HEADER Header
;
337 UINT32 StringInfoOffset
;
338 CHAR16 LanguageWindow
[16];
339 EFI_STRING_ID LanguageName
;
341 } EFI_HII_STRING_PACKAGE_HDR
;
345 } EFI_HII_STRING_BLOCK
;
348 // Value of different string information block types
350 #define EFI_HII_SIBT_END 0x00
351 #define EFI_HII_SIBT_STRING_SCSU 0x10
352 #define EFI_HII_SIBT_STRING_SCSU_FONT 0x11
353 #define EFI_HII_SIBT_STRINGS_SCSU 0x12
354 #define EFI_HII_SIBT_STRINGS_SCSU_FONT 0x13
355 #define EFI_HII_SIBT_STRING_UCS2 0x14
356 #define EFI_HII_SIBT_STRING_UCS2_FONT 0x15
357 #define EFI_HII_SIBT_STRINGS_UCS2 0x16
358 #define EFI_HII_SIBT_STRINGS_UCS2_FONT 0x17
359 #define EFI_HII_SIBT_DUPLICATE 0x20
360 #define EFI_HII_SIBT_SKIP2 0x21
361 #define EFI_HII_SIBT_SKIP1 0x22
362 #define EFI_HII_SIBT_EXT1 0x30
363 #define EFI_HII_SIBT_EXT2 0x31
364 #define EFI_HII_SIBT_EXT4 0x32
365 #define EFI_HII_SIBT_FONT 0x40
368 // Definition of different string information block types
371 typedef struct _EFI_HII_SIBT_DUPLICATE_BLOCK
{
372 EFI_HII_STRING_BLOCK Header
;
373 EFI_STRING_ID StringId
;
374 } EFI_HII_SIBT_DUPLICATE_BLOCK
;
376 typedef struct _EFI_HII_SIBT_END_BLOCK
{
377 EFI_HII_STRING_BLOCK Header
;
378 } EFI_HII_SIBT_END_BLOCK
;
380 typedef struct _EFI_HII_SIBT_EXT1_BLOCK
{
381 EFI_HII_STRING_BLOCK Header
;
384 } EFI_HII_SIBT_EXT1_BLOCK
;
386 typedef struct _EFI_HII_SIBT_EXT2_BLOCK
{
387 EFI_HII_STRING_BLOCK Header
;
390 } EFI_HII_SIBT_EXT2_BLOCK
;
392 typedef struct _EFI_HII_SIBT_EXT4_BLOCK
{
393 EFI_HII_STRING_BLOCK Header
;
396 } EFI_HII_SIBT_EXT4_BLOCK
;
398 typedef struct _EFI_HII_SIBT_FONT_BLOCK
{
399 EFI_HII_SIBT_EXT2_BLOCK Header
;
402 EFI_HII_FONT_STYLE FontStyle
;
404 } EFI_HII_SIBT_FONT_BLOCK
;
406 typedef struct _EFI_HII_SIBT_SKIP1_BLOCK
{
407 EFI_HII_STRING_BLOCK Header
;
409 } EFI_HII_SIBT_SKIP1_BLOCK
;
411 typedef struct _EFI_HII_SIBT_SKIP2_BLOCK
{
412 EFI_HII_STRING_BLOCK Header
;
414 } EFI_HII_SIBT_SKIP2_BLOCK
;
416 typedef struct _EFI_HII_SIBT_STRING_SCSU_BLOCK
{
417 EFI_HII_STRING_BLOCK Header
;
419 } EFI_HII_SIBT_STRING_SCSU_BLOCK
;
421 typedef struct _EFI_HII_SIBT_STRING_SCSU_FONT_BLOCK
{
422 EFI_HII_STRING_BLOCK Header
;
423 UINT8 FontIdentifier
;
425 } EFI_HII_SIBT_STRING_SCSU_FONT_BLOCK
;
427 typedef struct _EFI_HII_SIBT_STRINGS_SCSU_BLOCK
{
428 EFI_HII_STRING_BLOCK Header
;
431 } EFI_HII_SIBT_STRINGS_SCSU_BLOCK
;
433 typedef struct _EFI_HII_SIBT_STRINGS_SCSU_FONT_BLOCK
{
434 EFI_HII_STRING_BLOCK Header
;
435 UINT8 FontIdentifier
;
438 } EFI_HII_SIBT_STRINGS_SCSU_FONT_BLOCK
;
440 typedef struct _EFI_HII_SIBT_STRING_UCS2_BLOCK
{
441 EFI_HII_STRING_BLOCK Header
;
442 CHAR16 StringText
[1];
443 } EFI_HII_SIBT_STRING_UCS2_BLOCK
;
445 typedef struct _EFI_HII_SIBT_STRING_UCS2_FONT_BLOCK
{
446 EFI_HII_STRING_BLOCK Header
;
447 UINT8 FontIdentifier
;
448 CHAR16 StringText
[1];
449 } EFI_HII_SIBT_STRING_UCS2_FONT_BLOCK
;
451 typedef struct _EFI_HII_SIBT_STRINGS_UCS2_BLOCK
{
452 EFI_HII_STRING_BLOCK Header
;
454 CHAR16 StringText
[1];
455 } EFI_HII_SIBT_STRINGS_UCS2_BLOCK
;
457 typedef struct _EFI_HII_SIBT_STRINGS_UCS2_FONT_BLOCK
{
458 EFI_HII_STRING_BLOCK Header
;
459 UINT8 FontIdentifier
;
461 CHAR16 StringText
[1];
462 } EFI_HII_SIBT_STRINGS_UCS2_FONT_BLOCK
;
465 // Definitions for Image Package
469 typedef struct _EFI_HII_IMAGE_PACKAGE_HDR
{
470 EFI_HII_PACKAGE_HEADER Header
;
471 UINT32 ImageInfoOffset
;
472 UINT32 PaletteInfoOffset
;
473 } EFI_HII_IMAGE_PACKAGE_HDR
;
475 typedef struct _EFI_HII_IMAGE_BLOCK
{
477 } EFI_HII_IMAGE_BLOCK
;
480 // Value of different image information block types
482 #define EFI_HII_IIBT_END 0x00
483 #define EFI_HII_IIBT_IMAGE_1BIT 0x10
484 #define EFI_HII_IIBT_IMAGE_1BIT_TRANS 0x11
485 #define EFI_HII_IIBT_IMAGE_4BIT 0x12
486 #define EFI_HII_IIBT_IMAGE_4BIT_TRANS 0x13
487 #define EFI_HII_IIBT_IMAGE_8BIT 0x14
488 #define EFI_HII_IIBT_IMAGE_8BIT_TRANS 0x15
489 #define EFI_HII_IIBT_IMAGE_24BIT 0x16
490 #define EFI_HII_IIBT_IMAGE_24BIT_TRANS 0x17
491 #define EFI_HII_IIBT_IMAGE_JPEG 0x18
492 #define EFI_HII_IIBT_DUPLICATE 0x20
493 #define EFI_HII_IIBT_SKIP2 0x21
494 #define EFI_HII_IIBT_SKIP1 0x22
495 #define EFI_HII_IIBT_EXT1 0x30
496 #define EFI_HII_IIBT_EXT2 0x31
497 #define EFI_HII_IIBT_EXT4 0x32
500 // Definition of different image information block types
503 typedef struct _EFI_HII_IIBT_END_BLOCK
{
504 EFI_HII_IMAGE_BLOCK Header
;
505 } EFI_HII_IIBT_END_BLOCK
;
507 typedef struct _EFI_HII_IIBT_EXT1_BLOCK
{
508 EFI_HII_IMAGE_BLOCK Header
;
511 } EFI_HII_IIBT_EXT1_BLOCK
;
513 typedef struct _EFI_HII_IIBT_EXT2_BLOCK
{
514 EFI_HII_IMAGE_BLOCK Header
;
517 } EFI_HII_IIBT_EXT2_BLOCK
;
519 typedef struct _EFI_HII_IIBT_EXT4_BLOCK
{
520 EFI_HII_IMAGE_BLOCK Header
;
523 } EFI_HII_IIBT_EXT4_BLOCK
;
525 typedef struct _EFI_HII_IIBT_IMAGE_1BIT_BASE
{
529 } EFI_HII_IIBT_IMAGE_1BIT_BASE
;
531 typedef struct _EFI_HII_IIBT_IMAGE_1BIT_BLOCK
{
532 EFI_HII_IMAGE_BLOCK Header
;
534 EFI_HII_IIBT_IMAGE_1BIT_BASE Bitmap
;
535 } EFI_HII_IIBT_IMAGE_1BIT_BLOCK
;
537 typedef struct _EFI_HII_IIBT_IMAGE_1BIT_TRANS_BLOCK
{
538 EFI_HII_IMAGE_BLOCK Header
;
540 EFI_HII_IIBT_IMAGE_1BIT_BASE Bitmap
;
541 } EFI_HII_IIBT_IMAGE_1BIT_TRANS_BLOCK
;
543 typedef struct _EFI_HII_RGB_PIXEL
{
549 typedef struct _EFI_HII_IIBT_IMAGE_24BIT_BASE
{
552 EFI_HII_RGB_PIXEL Bitmap
[1];
553 } EFI_HII_IIBT_IMAGE_24BIT_BASE
;
555 typedef struct _EFI_HII_IIBT_IMAGE_24BIT_BLOCK
{
556 EFI_HII_IMAGE_BLOCK Header
;
557 EFI_HII_IIBT_IMAGE_24BIT_BASE Bitmap
;
558 } EFI_HII_IIBT_IMAGE_24BIT_BLOCK
;
560 typedef struct _EFI_HII_IIBT_IMAGE_24BIT_TRANS_BLOCK
{
561 EFI_HII_IMAGE_BLOCK Header
;
562 EFI_HII_IIBT_IMAGE_24BIT_BASE Bitmap
;
563 } EFI_HII_IIBT_IMAGE_24BIT_TRANS_BLOCK
;
565 typedef struct _EFI_HII_IIBT_IMAGE_4BIT_BASE
{
569 } EFI_HII_IIBT_IMAGE_4BIT_BASE
;
571 typedef struct _EFI_HII_IIBT_IMAGE_4BIT_BLOCK
{
572 EFI_HII_IMAGE_BLOCK Header
;
574 EFI_HII_IIBT_IMAGE_4BIT_BASE Bitmap
;
575 } EFI_HII_IIBT_IMAGE_4BIT_BLOCK
;
577 typedef struct _EFI_HII_IIBT_IMAGE_4BIT_TRANS_BLOCK
{
578 EFI_HII_IMAGE_BLOCK Header
;
580 EFI_HII_IIBT_IMAGE_4BIT_BASE Bitmap
;
581 } EFI_HII_IIBT_IMAGE_4BIT_TRANS_BLOCK
;
583 typedef struct _EFI_HII_IIBT_IMAGE_8BIT_BASE
{
587 } EFI_HII_IIBT_IMAGE_8BIT_BASE
;
589 typedef struct _EFI_HII_IIBT_IMAGE_8BIT_PALETTE_BLOCK
{
590 EFI_HII_IMAGE_BLOCK Header
;
592 EFI_HII_IIBT_IMAGE_8BIT_BASE Bitmap
;
593 } EFI_HII_IIBT_IMAGE_8BIT_BLOCK
;
595 typedef struct _EFI_HII_IIBT_IMAGE_8BIT_TRANS_BLOCK
{
596 EFI_HII_IMAGE_BLOCK Header
;
598 EFI_HII_IIBT_IMAGE_8BIT_BASE Bitmap
;
599 } EFI_HII_IIBT_IMAGE_8BIT_TRAN_BLOCK
;
601 typedef struct _EFI_HII_IIBT_DUPLICATE_BLOCK
{
602 EFI_HII_IMAGE_BLOCK Header
;
603 EFI_IMAGE_ID ImageId
;
604 } EFI_HII_IIBT_DUPLICATE_BLOCK
;
606 typedef struct _EFI_HII_IIBT_JPEG_BLOCK
{
607 EFI_HII_IMAGE_BLOCK Header
;
610 } EFI_HII_IIBT_JPEG_BLOCK
;
612 typedef struct _EFI_HII_IIBT_SKIP1_BLOCK
{
613 EFI_HII_IMAGE_BLOCK Header
;
615 } EFI_HII_IIBT_SKIP1_BLOCK
;
617 typedef struct _EFI_HII_IIBT_SKIP2_BLOCK
{
618 EFI_HII_IMAGE_BLOCK Header
;
620 } EFI_HII_IIBT_SKIP2_BLOCK
;
623 // Definitions for Palette Information
626 typedef struct _EFI_HII_IMAGE_PALETTE_INFO_HEADER
{
628 } EFI_HII_IMAGE_PALETTE_INFO_HEADER
;
630 typedef struct _EFI_HII_IMAGE_PALETTE_INFO
{
632 EFI_HII_RGB_PIXEL PaletteValue
[1];
633 } EFI_HII_IMAGE_PALETTE_INFO
;
636 // Definitions for Forms Package
641 /// The Form package is used to carry form-based encoding data.
643 typedef struct _EFI_HII_FORM_PACKAGE_HDR
{
644 EFI_HII_PACKAGE_HEADER Header
;
645 // EFI_IFR_OP_HEADER OpCodeHeader;
646 // More op-codes follow
647 } EFI_HII_FORM_PACKAGE_HDR
;
662 EFI_QUESTION_ID QuestionId
;
664 EFI_GUID FormSetGuid
;
665 EFI_STRING_ID DevicePath
;
676 EFI_STRING_ID string
; ///< EFI_IFR_TYPE_STRING, EFI_IFR_TYPE_ACTION
677 EFI_HII_REF ref
; ///< EFI_IFR_TYPE_REF
678 // UINT8 buffer[]; ///< EFI_IFR_TYPE_BUFFER
679 } EFI_IFR_TYPE_VALUE
;
684 #define EFI_IFR_FORM_OP 0x01
685 #define EFI_IFR_SUBTITLE_OP 0x02
686 #define EFI_IFR_TEXT_OP 0x03
687 #define EFI_IFR_IMAGE_OP 0x04
688 #define EFI_IFR_ONE_OF_OP 0x05
689 #define EFI_IFR_CHECKBOX_OP 0x06
690 #define EFI_IFR_NUMERIC_OP 0x07
691 #define EFI_IFR_PASSWORD_OP 0x08
692 #define EFI_IFR_ONE_OF_OPTION_OP 0x09
693 #define EFI_IFR_SUPPRESS_IF_OP 0x0A
694 #define EFI_IFR_LOCKED_OP 0x0B
695 #define EFI_IFR_ACTION_OP 0x0C
696 #define EFI_IFR_RESET_BUTTON_OP 0x0D
697 #define EFI_IFR_FORM_SET_OP 0x0E
698 #define EFI_IFR_REF_OP 0x0F
699 #define EFI_IFR_NO_SUBMIT_IF_OP 0x10
700 #define EFI_IFR_INCONSISTENT_IF_OP 0x11
701 #define EFI_IFR_EQ_ID_VAL_OP 0x12
702 #define EFI_IFR_EQ_ID_ID_OP 0x13
703 #define EFI_IFR_EQ_ID_VAL_LIST_OP 0x14
704 #define EFI_IFR_AND_OP 0x15
705 #define EFI_IFR_OR_OP 0x16
706 #define EFI_IFR_NOT_OP 0x17
707 #define EFI_IFR_RULE_OP 0x18
708 #define EFI_IFR_GRAY_OUT_IF_OP 0x19
709 #define EFI_IFR_DATE_OP 0x1A
710 #define EFI_IFR_TIME_OP 0x1B
711 #define EFI_IFR_STRING_OP 0x1C
712 #define EFI_IFR_REFRESH_OP 0x1D
713 #define EFI_IFR_DISABLE_IF_OP 0x1E
714 #define EFI_IFR_ANIMATION_OP 0x1F
715 #define EFI_IFR_TO_LOWER_OP 0x20
716 #define EFI_IFR_TO_UPPER_OP 0x21
717 #define EFI_IFR_MAP_OP 0x22
718 #define EFI_IFR_ORDERED_LIST_OP 0x23
719 #define EFI_IFR_VARSTORE_OP 0x24
720 #define EFI_IFR_VARSTORE_NAME_VALUE_OP 0x25
721 #define EFI_IFR_VARSTORE_EFI_OP 0x26
722 #define EFI_IFR_VARSTORE_DEVICE_OP 0x27
723 #define EFI_IFR_VERSION_OP 0x28
724 #define EFI_IFR_END_OP 0x29
725 #define EFI_IFR_MATCH_OP 0x2A
726 #define EFI_IFR_GET_OP 0x2B
727 #define EFI_IFR_SET_OP 0x2C
728 #define EFI_IFR_READ_OP 0x2D
729 #define EFI_IFR_WRITE_OP 0x2E
730 #define EFI_IFR_EQUAL_OP 0x2F
731 #define EFI_IFR_NOT_EQUAL_OP 0x30
732 #define EFI_IFR_GREATER_THAN_OP 0x31
733 #define EFI_IFR_GREATER_EQUAL_OP 0x32
734 #define EFI_IFR_LESS_THAN_OP 0x33
735 #define EFI_IFR_LESS_EQUAL_OP 0x34
736 #define EFI_IFR_BITWISE_AND_OP 0x35
737 #define EFI_IFR_BITWISE_OR_OP 0x36
738 #define EFI_IFR_BITWISE_NOT_OP 0x37
739 #define EFI_IFR_SHIFT_LEFT_OP 0x38
740 #define EFI_IFR_SHIFT_RIGHT_OP 0x39
741 #define EFI_IFR_ADD_OP 0x3A
742 #define EFI_IFR_SUBTRACT_OP 0x3B
743 #define EFI_IFR_MULTIPLY_OP 0x3C
744 #define EFI_IFR_DIVIDE_OP 0x3D
745 #define EFI_IFR_MODULO_OP 0x3E
746 #define EFI_IFR_RULE_REF_OP 0x3F
747 #define EFI_IFR_QUESTION_REF1_OP 0x40
748 #define EFI_IFR_QUESTION_REF2_OP 0x41
749 #define EFI_IFR_UINT8_OP 0x42
750 #define EFI_IFR_UINT16_OP 0x43
751 #define EFI_IFR_UINT32_OP 0x44
752 #define EFI_IFR_UINT64_OP 0x45
753 #define EFI_IFR_TRUE_OP 0x46
754 #define EFI_IFR_FALSE_OP 0x47
755 #define EFI_IFR_TO_UINT_OP 0x48
756 #define EFI_IFR_TO_STRING_OP 0x49
757 #define EFI_IFR_TO_BOOLEAN_OP 0x4A
758 #define EFI_IFR_MID_OP 0x4B
759 #define EFI_IFR_FIND_OP 0x4C
760 #define EFI_IFR_TOKEN_OP 0x4D
761 #define EFI_IFR_STRING_REF1_OP 0x4E
762 #define EFI_IFR_STRING_REF2_OP 0x4F
763 #define EFI_IFR_CONDITIONAL_OP 0x50
764 #define EFI_IFR_QUESTION_REF3_OP 0x51
765 #define EFI_IFR_ZERO_OP 0x52
766 #define EFI_IFR_ONE_OP 0x53
767 #define EFI_IFR_ONES_OP 0x54
768 #define EFI_IFR_UNDEFINED_OP 0x55
769 #define EFI_IFR_LENGTH_OP 0x56
770 #define EFI_IFR_DUP_OP 0x57
771 #define EFI_IFR_THIS_OP 0x58
772 #define EFI_IFR_SPAN_OP 0x59
773 #define EFI_IFR_VALUE_OP 0x5A
774 #define EFI_IFR_DEFAULT_OP 0x5B
775 #define EFI_IFR_DEFAULTSTORE_OP 0x5C
776 #define EFI_IFR_FORM_MAP_OP 0x5D
777 #define EFI_IFR_CATENATE_OP 0x5E
778 #define EFI_IFR_GUID_OP 0x5F
779 #define EFI_IFR_SECURITY_OP 0x60
780 #define EFI_IFR_MODAL_TAG_OP 0x61
781 #define EFI_IFR_REFRESH_ID_OP 0x62
782 #define EFI_IFR_WARNING_IF_OP 0x63
783 #define EFI_IFR_MATCH2_OP 0x64
786 // Definitions of IFR Standard Headers
790 typedef struct _EFI_IFR_OP_HEADER
{
796 typedef struct _EFI_IFR_STATEMENT_HEADER
{
797 EFI_STRING_ID Prompt
;
799 } EFI_IFR_STATEMENT_HEADER
;
801 typedef struct _EFI_IFR_QUESTION_HEADER
{
802 EFI_IFR_STATEMENT_HEADER Header
;
803 EFI_QUESTION_ID QuestionId
;
804 EFI_VARSTORE_ID VarStoreId
;
806 EFI_STRING_ID VarName
;
810 } EFI_IFR_QUESTION_HEADER
;
813 // Flag values of EFI_IFR_QUESTION_HEADER
815 #define EFI_IFR_FLAG_READ_ONLY 0x01
816 #define EFI_IFR_FLAG_CALLBACK 0x04
817 #define EFI_IFR_FLAG_RESET_REQUIRED 0x10
818 #define EFI_IFR_FLAG_RECONNECT_REQUIRED 0x40
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_MATCH2
{
1405 EFI_IFR_OP_HEADER Header
;
1406 EFI_GUID SyntaxType
;
1409 typedef struct _EFI_IFR_MULTIPLY
{
1410 EFI_IFR_OP_HEADER Header
;
1413 typedef struct _EFI_IFR_MODULO
{
1414 EFI_IFR_OP_HEADER Header
;
1417 typedef struct _EFI_IFR_NOT_EQUAL
{
1418 EFI_IFR_OP_HEADER Header
;
1419 } EFI_IFR_NOT_EQUAL
;
1421 typedef struct _EFI_IFR_OR
{
1422 EFI_IFR_OP_HEADER Header
;
1425 typedef struct _EFI_IFR_SHIFT_LEFT
{
1426 EFI_IFR_OP_HEADER Header
;
1427 } EFI_IFR_SHIFT_LEFT
;
1429 typedef struct _EFI_IFR_SHIFT_RIGHT
{
1430 EFI_IFR_OP_HEADER Header
;
1431 } EFI_IFR_SHIFT_RIGHT
;
1433 typedef struct _EFI_IFR_SUBTRACT
{
1434 EFI_IFR_OP_HEADER Header
;
1437 typedef struct _EFI_IFR_CONDITIONAL
{
1438 EFI_IFR_OP_HEADER Header
;
1439 } EFI_IFR_CONDITIONAL
;
1442 // Flags governing the matching criteria of EFI_IFR_FIND
1444 #define EFI_IFR_FF_CASE_SENSITIVE 0x00
1445 #define EFI_IFR_FF_CASE_INSENSITIVE 0x01
1447 typedef struct _EFI_IFR_FIND
{
1448 EFI_IFR_OP_HEADER Header
;
1452 typedef struct _EFI_IFR_MID
{
1453 EFI_IFR_OP_HEADER Header
;
1456 typedef struct _EFI_IFR_TOKEN
{
1457 EFI_IFR_OP_HEADER Header
;
1461 // Flags specifying whether to find the first matching string
1462 // or the first non-matching string.
1464 #define EFI_IFR_FLAGS_FIRST_MATCHING 0x00
1465 #define EFI_IFR_FLAGS_FIRST_NON_MATCHING 0x01
1467 typedef struct _EFI_IFR_SPAN
{
1468 EFI_IFR_OP_HEADER Header
;
1472 typedef struct _EFI_IFR_SECURITY
{
1474 /// Standard opcode header, where Header.Op = EFI_IFR_SECURITY_OP.
1476 EFI_IFR_OP_HEADER Header
;
1478 /// Security permission level.
1480 EFI_GUID Permissions
;
1483 typedef struct _EFI_IFR_FORM_MAP_METHOD
{
1485 /// The string identifier which provides the human-readable name of
1486 /// the configuration method for this standards map form.
1488 EFI_STRING_ID MethodTitle
;
1490 /// Identifier which uniquely specifies the configuration methods
1491 /// associated with this standards map form.
1493 EFI_GUID MethodIdentifier
;
1494 } EFI_IFR_FORM_MAP_METHOD
;
1496 typedef struct _EFI_IFR_FORM_MAP
{
1498 /// The sequence that defines the type of opcode as well as the length
1499 /// of the opcode being defined. Header.OpCode = EFI_IFR_FORM_MAP_OP.
1501 EFI_IFR_OP_HEADER Header
;
1503 /// The unique identifier for this particular form.
1507 /// One or more configuration method's name and unique identifier.
1509 // EFI_IFR_FORM_MAP_METHOD Methods[];
1512 typedef struct _EFI_IFR_SET
{
1514 /// The sequence that defines the type of opcode as well as the length
1515 /// of the opcode being defined. Header.OpCode = EFI_IFR_SET_OP.
1517 EFI_IFR_OP_HEADER Header
;
1519 /// Specifies the identifier of a previously declared variable store to
1520 /// use when storing the question's value.
1522 EFI_VARSTORE_ID VarStoreId
;
1525 /// A 16-bit Buffer Storage offset.
1527 EFI_STRING_ID VarName
;
1529 /// A Name Value or EFI Variable name (VarName).
1534 /// Specifies the type used for storage.
1539 typedef struct _EFI_IFR_GET
{
1541 /// The sequence that defines the type of opcode as well as the length
1542 /// of the opcode being defined. Header.OpCode = EFI_IFR_GET_OP.
1544 EFI_IFR_OP_HEADER Header
;
1546 /// Specifies the identifier of a previously declared variable store to
1547 /// use when retrieving the value.
1549 EFI_VARSTORE_ID VarStoreId
;
1552 /// A 16-bit Buffer Storage offset.
1554 EFI_STRING_ID VarName
;
1556 /// A Name Value or EFI Variable name (VarName).
1561 /// Specifies the type used for storage.
1566 typedef struct _EFI_IFR_READ
{
1567 EFI_IFR_OP_HEADER Header
;
1570 typedef struct _EFI_IFR_WRITE
{
1571 EFI_IFR_OP_HEADER Header
;
1574 typedef struct _EFI_IFR_MAP
{
1575 EFI_IFR_OP_HEADER Header
;
1578 // Definitions for Keyboard Package
1579 // Releated definitions are in Section of EFI_HII_DATABASE_PROTOCOL
1583 /// Each enumeration values maps a physical key on a keyboard.
1695 /// Used to describe a physical key on a keyboard.
1699 /// Unicode character code for the Key.
1703 /// Unicode character code for the key with the shift key being held down.
1705 CHAR16 ShiftedUnicode
;
1707 /// Unicode character code for the key with the Alt-GR being held down.
1709 CHAR16 AltGrUnicode
;
1711 /// Unicode character code for the key with the Alt-GR and shift keys being held down.
1713 CHAR16 ShiftedAltGrUnicode
;
1715 /// Modifier keys are defined to allow for special functionality that is not necessarily
1716 /// accomplished by a printable character. Many of these modifier keys are flags to toggle
1717 /// certain state bits on and off inside of a keyboard driver.
1720 UINT16 AffectedAttribute
;
1721 } EFI_KEY_DESCRIPTOR
;
1724 /// A key which is affected by all the standard shift modifiers.
1725 /// Most keys would be expected to have this bit active.
1727 #define EFI_AFFECTED_BY_STANDARD_SHIFT 0x0001
1730 /// This key is affected by the caps lock so that if a keyboard driver
1731 /// would need to disambiguate between a key which had a "1" defined
1732 /// versus an "a" character. Having this bit turned on would tell
1733 /// the keyboard driver to use the appropriate shifted state or not.
1735 #define EFI_AFFECTED_BY_CAPS_LOCK 0x0002
1738 /// Similar to the case of CAPS lock, if this bit is active, the key
1739 /// is affected by the num lock being turned on.
1741 #define EFI_AFFECTED_BY_NUM_LOCK 0x0004
1744 UINT16 LayoutLength
;
1746 UINT32 LayoutDescriptorStringOffset
;
1747 UINT8 DescriptorCount
;
1748 // EFI_KEY_DESCRIPTOR Descriptors[];
1749 } EFI_HII_KEYBOARD_LAYOUT
;
1752 EFI_HII_PACKAGE_HEADER Header
;
1754 // EFI_HII_KEYBOARD_LAYOUT Layout[];
1755 } EFI_HII_KEYBOARD_PACKAGE_HDR
;
1760 #define EFI_NULL_MODIFIER 0x0000
1761 #define EFI_LEFT_CONTROL_MODIFIER 0x0001
1762 #define EFI_RIGHT_CONTROL_MODIFIER 0x0002
1763 #define EFI_LEFT_ALT_MODIFIER 0x0003
1764 #define EFI_RIGHT_ALT_MODIFIER 0x0004
1765 #define EFI_ALT_GR_MODIFIER 0x0005
1766 #define EFI_INSERT_MODIFIER 0x0006
1767 #define EFI_DELETE_MODIFIER 0x0007
1768 #define EFI_PAGE_DOWN_MODIFIER 0x0008
1769 #define EFI_PAGE_UP_MODIFIER 0x0009
1770 #define EFI_HOME_MODIFIER 0x000A
1771 #define EFI_END_MODIFIER 0x000B
1772 #define EFI_LEFT_SHIFT_MODIFIER 0x000C
1773 #define EFI_RIGHT_SHIFT_MODIFIER 0x000D
1774 #define EFI_CAPS_LOCK_MODIFIER 0x000E
1775 #define EFI_NUM_LOCK_MODIFIER 0x000F
1776 #define EFI_LEFT_ARROW_MODIFIER 0x0010
1777 #define EFI_RIGHT_ARROW_MODIFIER 0x0011
1778 #define EFI_DOWN_ARROW_MODIFIER 0x0012
1779 #define EFI_UP_ARROW_MODIFIER 0x0013
1780 #define EFI_NS_KEY_MODIFIER 0x0014
1781 #define EFI_NS_KEY_DEPENDENCY_MODIFIER 0x0015
1782 #define EFI_FUNCTION_KEY_ONE_MODIFIER 0x0016
1783 #define EFI_FUNCTION_KEY_TWO_MODIFIER 0x0017
1784 #define EFI_FUNCTION_KEY_THREE_MODIFIER 0x0018
1785 #define EFI_FUNCTION_KEY_FOUR_MODIFIER 0x0019
1786 #define EFI_FUNCTION_KEY_FIVE_MODIFIER 0x001A
1787 #define EFI_FUNCTION_KEY_SIX_MODIFIER 0x001B
1788 #define EFI_FUNCTION_KEY_SEVEN_MODIFIER 0x001C
1789 #define EFI_FUNCTION_KEY_EIGHT_MODIFIER 0x001D
1790 #define EFI_FUNCTION_KEY_NINE_MODIFIER 0x001E
1791 #define EFI_FUNCTION_KEY_TEN_MODIFIER 0x001F
1792 #define EFI_FUNCTION_KEY_ELEVEN_MODIFIER 0x0020
1793 #define EFI_FUNCTION_KEY_TWELVE_MODIFIER 0x0021
1796 // Keys that have multiple control functions based on modifier
1797 // settings are handled in the keyboard driver implementation.
1798 // For instance, PRINT_KEY might have a modifier held down and
1799 // is still a nonprinting character, but might have an alternate
1800 // control function like SYSREQUEST
1802 #define EFI_PRINT_MODIFIER 0x0022
1803 #define EFI_SYS_REQUEST_MODIFIER 0x0023
1804 #define EFI_SCROLL_LOCK_MODIFIER 0x0024
1805 #define EFI_PAUSE_MODIFIER 0x0025
1806 #define EFI_BREAK_MODIFIER 0x0026
1808 #define EFI_LEFT_LOGO_MODIFIER 0x0027
1809 #define EFI_RIGHT_LOGO_MODIFIER 0x0028
1810 #define EFI_MENU_MODIFIER 0x0029
1813 /// Animation IFR opcode
1815 typedef struct _EFI_IFR_ANIMATION
{
1817 /// Standard opcode header, where Header.OpCode is
1818 /// EFI_IFR_ANIMATION_OP.
1820 EFI_IFR_OP_HEADER Header
;
1822 /// Animation identifier in the HII database.
1824 EFI_ANIMATION_ID Id
;
1825 } EFI_IFR_ANIMATION
;
1828 /// HII animation package header.
1830 typedef struct _EFI_HII_ANIMATION_PACKAGE_HDR
{
1832 /// Standard package header, where Header.Type = EFI_HII_PACKAGE_ANIMATIONS.
1834 EFI_HII_PACKAGE_HEADER Header
;
1836 /// Offset, relative to this header, of the animation information. If
1837 /// this is zero, then there are no animation sequences in the package.
1839 UINT32 AnimationInfoOffset
;
1840 } EFI_HII_ANIMATION_PACKAGE_HDR
;
1843 /// Animation information is encoded as a series of blocks,
1844 /// with each block prefixed by a single byte header EFI_HII_ANIMATION_BLOCK.
1846 typedef struct _EFI_HII_ANIMATION_BLOCK
{
1848 //UINT8 BlockBody[];
1849 } EFI_HII_ANIMATION_BLOCK
;
1852 /// Animation block types.
1854 #define EFI_HII_AIBT_END 0x00
1855 #define EFI_HII_AIBT_OVERLAY_IMAGES 0x10
1856 #define EFI_HII_AIBT_CLEAR_IMAGES 0x11
1857 #define EFI_HII_AIBT_RESTORE_SCRN 0x12
1858 #define EFI_HII_AIBT_OVERLAY_IMAGES_LOOP 0x18
1859 #define EFI_HII_AIBT_CLEAR_IMAGES_LOOP 0x19
1860 #define EFI_HII_AIBT_RESTORE_SCRN_LOOP 0x1A
1861 #define EFI_HII_AIBT_DUPLICATE 0x20
1862 #define EFI_HII_AIBT_SKIP2 0x21
1863 #define EFI_HII_AIBT_SKIP1 0x22
1864 #define EFI_HII_AIBT_EXT1 0x30
1865 #define EFI_HII_AIBT_EXT2 0x31
1866 #define EFI_HII_AIBT_EXT4 0x32
1869 /// Extended block headers used for variable sized animation records
1870 /// which need an explicit length.
1873 typedef struct _EFI_HII_AIBT_EXT1_BLOCK
{
1875 /// Standard animation header, where Header.BlockType = EFI_HII_AIBT_EXT1.
1877 EFI_HII_ANIMATION_BLOCK Header
;
1883 /// Size of the animation block, in bytes, including the animation block header.
1886 } EFI_HII_AIBT_EXT1_BLOCK
;
1888 typedef struct _EFI_HII_AIBT_EXT2_BLOCK
{
1890 /// Standard animation header, where Header.BlockType = EFI_HII_AIBT_EXT2.
1892 EFI_HII_ANIMATION_BLOCK Header
;
1898 /// Size of the animation block, in bytes, including the animation block header.
1901 } EFI_HII_AIBT_EXT2_BLOCK
;
1903 typedef struct _EFI_HII_AIBT_EXT4_BLOCK
{
1905 /// Standard animation header, where Header.BlockType = EFI_HII_AIBT_EXT4.
1907 EFI_HII_ANIMATION_BLOCK Header
;
1913 /// Size of the animation block, in bytes, including the animation block header.
1916 } EFI_HII_AIBT_EXT4_BLOCK
;
1918 typedef struct _EFI_HII_ANIMATION_CELL
{
1920 /// The X offset from the upper left hand corner of the logical
1921 /// window to position the indexed image.
1925 /// The Y offset from the upper left hand corner of the logical
1926 /// window to position the indexed image.
1930 /// The image to display at the specified offset from the upper left
1931 /// hand corner of the logical window.
1933 EFI_IMAGE_ID ImageId
;
1935 /// The number of milliseconds to delay after displaying the indexed
1936 /// image and before continuing on to the next linked image. If value
1937 /// is zero, no delay.
1940 } EFI_HII_ANIMATION_CELL
;
1943 /// An animation block to describe an animation sequence that does not cycle, and
1944 /// where one image is simply displayed over the previous image.
1946 typedef struct _EFI_HII_AIBT_OVERLAY_IMAGES_BLOCK
{
1948 /// This is image that is to be reference by the image protocols, if the
1949 /// animation function is not supported or disabled. This image can
1950 /// be one particular image from the animation sequence (if any one
1951 /// of the animation frames has a complete image) or an alternate
1952 /// image that can be displayed alone. If the value is zero, no image
1955 EFI_IMAGE_ID DftImageId
;
1957 /// The overall width of the set of images (logical window width).
1961 /// The overall height of the set of images (logical window height).
1965 /// The number of EFI_HII_ANIMATION_CELL contained in the
1966 /// animation sequence.
1970 /// An array of CellCount animation cells.
1972 EFI_HII_ANIMATION_CELL AnimationCell
[1];
1973 } EFI_HII_AIBT_OVERLAY_IMAGES_BLOCK
;
1976 /// An animation block to describe an animation sequence that does not cycle,
1977 /// and where the logical window is cleared to the specified color before
1978 /// the next image is displayed.
1980 typedef struct _EFI_HII_AIBT_CLEAR_IMAGES_BLOCK
{
1982 /// This is image that is to be reference by the image protocols, if the
1983 /// animation function is not supported or disabled. This image can
1984 /// be one particular image from the animation sequence (if any one
1985 /// of the animation frames has a complete image) or an alternate
1986 /// image that can be displayed alone. If the value is zero, no image
1989 EFI_IMAGE_ID DftImageId
;
1991 /// The overall width of the set of images (logical window width).
1995 /// The overall height of the set of images (logical window height).
1999 /// The number of EFI_HII_ANIMATION_CELL contained in the
2000 /// animation sequence.
2004 /// The color to clear the logical window to before displaying the
2007 EFI_HII_RGB_PIXEL BackgndColor
;
2009 /// An array of CellCount animation cells.
2011 EFI_HII_ANIMATION_CELL AnimationCell
[1];
2012 } EFI_HII_AIBT_CLEAR_IMAGES_BLOCK
;
2015 /// An animation block to describe an animation sequence that does not cycle,
2016 /// and where the screen is restored to the original state before the next
2017 /// image is displayed.
2019 typedef struct _EFI_HII_AIBT_RESTORE_SCRN_BLOCK
{
2021 /// This is image that is to be reference by the image protocols, if the
2022 /// animation function is not supported or disabled. This image can
2023 /// be one particular image from the animation sequence (if any one
2024 /// of the animation frames has a complete image) or an alternate
2025 /// image that can be displayed alone. If the value is zero, no image
2028 EFI_IMAGE_ID DftImageId
;
2030 /// The overall width of the set of images (logical window width).
2034 /// The overall height of the set of images (logical window height).
2038 /// The number of EFI_HII_ANIMATION_CELL contained in the
2039 /// animation sequence.
2043 /// An array of CellCount animation cells.
2045 EFI_HII_ANIMATION_CELL AnimationCell
[1];
2046 } EFI_HII_AIBT_RESTORE_SCRN_BLOCK
;
2049 /// An animation block to describe an animation sequence that continuously cycles,
2050 /// and where one image is simply displayed over the previous image.
2052 typedef EFI_HII_AIBT_OVERLAY_IMAGES_BLOCK EFI_HII_AIBT_OVERLAY_IMAGES_LOOP_BLOCK
;
2055 /// An animation block to describe an animation sequence that continuously cycles,
2056 /// and where the logical window is cleared to the specified color before
2057 /// the next image is displayed.
2059 typedef EFI_HII_AIBT_CLEAR_IMAGES_BLOCK EFI_HII_AIBT_CLEAR_IMAGES_LOOP_BLOCK
;
2062 /// An animation block to describe an animation sequence that continuously cycles,
2063 /// and where the screen is restored to the original state before
2064 /// the next image is displayed.
2066 typedef EFI_HII_AIBT_RESTORE_SCRN_BLOCK EFI_HII_AIBT_RESTORE_SCRN_LOOP_BLOCK
;
2069 /// Assigns a new character value to a previously defined animation sequence.
2071 typedef struct _EFI_HII_AIBT_DUPLICATE_BLOCK
{
2073 /// The previously defined animation ID with the exact same
2074 /// animation information.
2076 EFI_ANIMATION_ID AnimationId
;
2077 } EFI_HII_AIBT_DUPLICATE_BLOCK
;
2080 /// Skips animation IDs.
2082 typedef struct _EFI_HII_AIBT_SKIP1_BLOCK
{
2084 /// The unsigned 8-bit value to add to AnimationIdCurrent.
2087 } EFI_HII_AIBT_SKIP1_BLOCK
;
2090 /// Skips animation IDs.
2092 typedef struct _EFI_HII_AIBT_SKIP2_BLOCK
{
2094 /// The unsigned 16-bit value to add to AnimationIdCurrent.
2097 } EFI_HII_AIBT_SKIP2_BLOCK
;
2104 /// References to string tokens must use this macro to enable scanning for
2108 /// STRING_TOKEN is not defined in UEFI specification. But it is placed
2109 /// here for the easy access by C files and VFR source files.
2111 #define STRING_TOKEN(t) t