2 This file defines the encoding for the VFR (Visual Form Representation) language.
3 IFR is primarily consumed by the EFI presentation engine, and produced by EFI
4 internal application and drivers as well as all add-in card option-ROM drivers
6 Copyright (c) 2006 - 2018, Intel Corporation. All rights reserved.<BR>
7 (C) Copyright 2016 Hewlett Packard Enterprise Development LP<BR>
8 SPDX-License-Identifier: BSD-2-Clause-Patent
10 @par Revision Reference:
11 These definitions are from UEFI 2.1 and 2.2.
15 #ifndef __UEFI_INTERNAL_FORMREPRESENTATION_H__
16 #define __UEFI_INTERNAL_FORMREPRESENTATION_H__
18 #include <Guid/HiiFormMapMethodGuid.h>
21 /// The following types are currently defined:
23 typedef VOID
* EFI_HII_HANDLE
;
24 typedef CHAR16
* EFI_STRING
;
25 typedef UINT16 EFI_IMAGE_ID
;
26 typedef UINT16 EFI_QUESTION_ID
;
27 typedef UINT16 EFI_STRING_ID
;
28 typedef UINT16 EFI_FORM_ID
;
29 typedef UINT16 EFI_VARSTORE_ID
;
30 typedef UINT16 EFI_ANIMATION_ID
;
32 typedef UINT16 EFI_DEFAULT_ID
;
34 typedef UINT32 EFI_HII_FONT_STYLE
;
41 // Definitions for Package Lists and Package Headers
46 /// The header found at the start of each package list.
49 EFI_GUID PackageListGuid
;
51 } EFI_HII_PACKAGE_LIST_HEADER
;
54 /// The header found at the start of each package.
60 } EFI_HII_PACKAGE_HEADER
;
63 // Value of HII package type
65 #define EFI_HII_PACKAGE_TYPE_ALL 0x00
66 #define EFI_HII_PACKAGE_TYPE_GUID 0x01
67 #define EFI_HII_PACKAGE_FORMS 0x02
68 #define EFI_HII_PACKAGE_STRINGS 0x04
69 #define EFI_HII_PACKAGE_FONTS 0x05
70 #define EFI_HII_PACKAGE_IMAGES 0x06
71 #define EFI_HII_PACKAGE_SIMPLE_FONTS 0x07
72 #define EFI_HII_PACKAGE_DEVICE_PATH 0x08
73 #define EFI_HII_PACKAGE_KEYBOARD_LAYOUT 0x09
74 #define EFI_HII_PACKAGE_ANIMATIONS 0x0A
75 #define EFI_HII_PACKAGE_END 0xDF
76 #define EFI_HII_PACKAGE_TYPE_SYSTEM_BEGIN 0xE0
77 #define EFI_HII_PACKAGE_TYPE_SYSTEM_END 0xFF
80 // Definitions for Simplified Font Package
84 /// Contents of EFI_NARROW_GLYPH.Attributes.
86 #define EFI_GLYPH_NON_SPACING 0x01
87 #define EFI_GLYPH_WIDE 0x02
88 #define EFI_GLYPH_HEIGHT 19
89 #define EFI_GLYPH_WIDTH 8
93 /// The EFI_NARROW_GLYPH has a preferred dimension (w x h) of 8 x 19 pixels.
97 /// The Unicode representation of the glyph. The term weight is the
98 /// technical term for a character code.
100 CHAR16 UnicodeWeight
;
102 /// The data element containing the glyph definitions.
106 /// The column major glyph representation of the character. Bits
107 /// with values of one indicate that the corresponding pixel is to be
108 /// on when normally displayed; those with zero are off.
110 UINT8 GlyphCol1
[EFI_GLYPH_HEIGHT
];
114 /// The EFI_WIDE_GLYPH has a preferred dimension (w x h) of 16 x 19 pixels, which is large enough
115 /// to accommodate logographic characters.
119 /// The Unicode representation of the glyph. The term weight is the
120 /// technical term for a character code.
122 CHAR16 UnicodeWeight
;
124 /// The data element containing the glyph definitions.
128 /// The column major glyph representation of the character. Bits
129 /// with values of one indicate that the corresponding pixel is to be
130 /// on when normally displayed; those with zero are off.
132 UINT8 GlyphCol1
[EFI_GLYPH_HEIGHT
];
134 /// The column major glyph representation of the character. Bits
135 /// with values of one indicate that the corresponding pixel is to be
136 /// on when normally displayed; those with zero are off.
138 UINT8 GlyphCol2
[EFI_GLYPH_HEIGHT
];
140 /// Ensures that sizeof (EFI_WIDE_GLYPH) is twice the
141 /// sizeof (EFI_NARROW_GLYPH). The contents of Pad must
148 /// A simplified font package consists of a font header
149 /// followed by a series of glyph structures.
151 typedef struct _EFI_HII_SIMPLE_FONT_PACKAGE_HDR
{
152 EFI_HII_PACKAGE_HEADER Header
;
153 UINT16 NumberOfNarrowGlyphs
;
154 UINT16 NumberOfWideGlyphs
;
155 // EFI_NARROW_GLYPH NarrowGlyphs[];
156 // EFI_WIDE_GLYPH WideGlyphs[];
157 } EFI_HII_SIMPLE_FONT_PACKAGE_HDR
;
160 // Definitions for Font Package
165 // Value for font style
167 #define EFI_HII_FONT_STYLE_NORMAL 0x00000000
168 #define EFI_HII_FONT_STYLE_BOLD 0x00000001
169 #define EFI_HII_FONT_STYLE_ITALIC 0x00000002
170 #define EFI_HII_FONT_STYLE_EMBOSS 0x00010000
171 #define EFI_HII_FONT_STYLE_OUTLINE 0x00020000
172 #define EFI_HII_FONT_STYLE_SHADOW 0x00040000
173 #define EFI_HII_FONT_STYLE_UNDERLINE 0x00080000
174 #define EFI_HII_FONT_STYLE_DBL_UNDER 0x00100000
176 typedef struct _EFI_HII_GLYPH_INFO
{
182 } EFI_HII_GLYPH_INFO
;
185 /// The fixed header consists of a standard record header,
186 /// then the character values in this section, the flags
187 /// (including the encoding method) and the offsets of the glyph
188 /// information, the glyph bitmaps and the character map.
190 typedef struct _EFI_HII_FONT_PACKAGE_HDR
{
191 EFI_HII_PACKAGE_HEADER Header
;
193 UINT32 GlyphBlockOffset
;
194 EFI_HII_GLYPH_INFO Cell
;
195 EFI_HII_FONT_STYLE FontStyle
;
196 CHAR16 FontFamily
[1];
197 } EFI_HII_FONT_PACKAGE_HDR
;
200 // Value of different glyph info block types
202 #define EFI_HII_GIBT_END 0x00
203 #define EFI_HII_GIBT_GLYPH 0x10
204 #define EFI_HII_GIBT_GLYPHS 0x11
205 #define EFI_HII_GIBT_GLYPH_DEFAULT 0x12
206 #define EFI_HII_GIBT_GLYPHS_DEFAULT 0x13
207 #define EFI_HII_GIBT_GLYPH_VARIABILITY 0x14
208 #define EFI_HII_GIBT_DUPLICATE 0x20
209 #define EFI_HII_GIBT_SKIP2 0x21
210 #define EFI_HII_GIBT_SKIP1 0x22
211 #define EFI_HII_GIBT_DEFAULTS 0x23
212 #define EFI_HII_GIBT_EXT1 0x30
213 #define EFI_HII_GIBT_EXT2 0x31
214 #define EFI_HII_GIBT_EXT4 0x32
216 typedef struct _EFI_HII_GLYPH_BLOCK
{
218 } EFI_HII_GLYPH_BLOCK
;
221 // Definition of different glyph info block types
224 typedef struct _EFI_HII_GIBT_DEFAULTS_BLOCK
{
225 EFI_HII_GLYPH_BLOCK Header
;
226 EFI_HII_GLYPH_INFO Cell
;
227 } EFI_HII_GIBT_DEFAULTS_BLOCK
;
229 typedef struct _EFI_HII_GIBT_DUPLICATE_BLOCK
{
230 EFI_HII_GLYPH_BLOCK Header
;
232 } EFI_HII_GIBT_DUPLICATE_BLOCK
;
234 typedef struct _EFI_GLYPH_GIBT_END_BLOCK
{
235 EFI_HII_GLYPH_BLOCK Header
;
236 } EFI_GLYPH_GIBT_END_BLOCK
;
238 typedef struct _EFI_HII_GIBT_EXT1_BLOCK
{
239 EFI_HII_GLYPH_BLOCK Header
;
242 } EFI_HII_GIBT_EXT1_BLOCK
;
244 typedef struct _EFI_HII_GIBT_EXT2_BLOCK
{
245 EFI_HII_GLYPH_BLOCK Header
;
248 } EFI_HII_GIBT_EXT2_BLOCK
;
250 typedef struct _EFI_HII_GIBT_EXT4_BLOCK
{
251 EFI_HII_GLYPH_BLOCK Header
;
254 } EFI_HII_GIBT_EXT4_BLOCK
;
256 typedef struct _EFI_HII_GIBT_GLYPH_BLOCK
{
257 EFI_HII_GLYPH_BLOCK Header
;
258 EFI_HII_GLYPH_INFO Cell
;
260 } EFI_HII_GIBT_GLYPH_BLOCK
;
262 typedef struct _EFI_HII_GIBT_GLYPHS_BLOCK
{
263 EFI_HII_GLYPH_BLOCK Header
;
264 EFI_HII_GLYPH_INFO Cell
;
267 } EFI_HII_GIBT_GLYPHS_BLOCK
;
269 typedef struct _EFI_HII_GIBT_GLYPH_DEFAULT_BLOCK
{
270 EFI_HII_GLYPH_BLOCK Header
;
272 } EFI_HII_GIBT_GLYPH_DEFAULT_BLOCK
;
274 typedef struct _EFI_HII_GIBT_GLYPHS_DEFAULT_BLOCK
{
275 EFI_HII_GLYPH_BLOCK Header
;
278 } EFI_HII_GIBT_GLYPHS_DEFAULT_BLOCK
;
280 typedef struct _EFI_HII_GIBT_VARIABILITY_BLOCK
{
281 EFI_HII_GLYPH_BLOCK Header
;
282 EFI_HII_GLYPH_INFO Cell
;
283 UINT8 GlyphPackInBits
;
284 UINT8 BitmapData
[1];
285 } EFI_HII_GIBT_VARIABILITY_BLOCK
;
287 typedef struct _EFI_HII_GIBT_SKIP1_BLOCK
{
288 EFI_HII_GLYPH_BLOCK Header
;
290 } EFI_HII_GIBT_SKIP1_BLOCK
;
292 typedef struct _EFI_HII_GIBT_SKIP2_BLOCK
{
293 EFI_HII_GLYPH_BLOCK Header
;
295 } EFI_HII_GIBT_SKIP2_BLOCK
;
298 // Definitions for Device Path Package
303 /// The device path package is used to carry a device path
304 /// associated with the package list.
306 typedef struct _EFI_HII_DEVICE_PATH_PACKAGE_HDR
{
307 EFI_HII_PACKAGE_HEADER Header
;
308 // EFI_DEVICE_PATH_PROTOCOL DevicePath[];
309 } EFI_HII_DEVICE_PATH_PACKAGE_HDR
;
312 // Definitions for GUID Package
317 /// The GUID package is used to carry data where the format is defined by a GUID.
319 typedef struct _EFI_HII_GUID_PACKAGE_HDR
{
320 EFI_HII_PACKAGE_HEADER Header
;
322 // Data per GUID definition may follow
323 } EFI_HII_GUID_PACKAGE_HDR
;
326 // Definitions for String Package
330 #define UEFI_CONFIG_LANG "x-UEFI"
331 #define UEFI_CONFIG_LANG_2 "x-i-UEFI"
334 /// The fixed header consists of a standard record header and then the string identifiers
335 /// contained in this section and the offsets of the string and language information.
337 typedef struct _EFI_HII_STRING_PACKAGE_HDR
{
338 EFI_HII_PACKAGE_HEADER Header
;
340 UINT32 StringInfoOffset
;
341 CHAR16 LanguageWindow
[16];
342 EFI_STRING_ID LanguageName
;
344 } EFI_HII_STRING_PACKAGE_HDR
;
348 } EFI_HII_STRING_BLOCK
;
351 // Value of different string information block types
353 #define EFI_HII_SIBT_END 0x00
354 #define EFI_HII_SIBT_STRING_SCSU 0x10
355 #define EFI_HII_SIBT_STRING_SCSU_FONT 0x11
356 #define EFI_HII_SIBT_STRINGS_SCSU 0x12
357 #define EFI_HII_SIBT_STRINGS_SCSU_FONT 0x13
358 #define EFI_HII_SIBT_STRING_UCS2 0x14
359 #define EFI_HII_SIBT_STRING_UCS2_FONT 0x15
360 #define EFI_HII_SIBT_STRINGS_UCS2 0x16
361 #define EFI_HII_SIBT_STRINGS_UCS2_FONT 0x17
362 #define EFI_HII_SIBT_DUPLICATE 0x20
363 #define EFI_HII_SIBT_SKIP2 0x21
364 #define EFI_HII_SIBT_SKIP1 0x22
365 #define EFI_HII_SIBT_EXT1 0x30
366 #define EFI_HII_SIBT_EXT2 0x31
367 #define EFI_HII_SIBT_EXT4 0x32
368 #define EFI_HII_SIBT_FONT 0x40
371 // Definition of different string information block types
374 typedef struct _EFI_HII_SIBT_DUPLICATE_BLOCK
{
375 EFI_HII_STRING_BLOCK Header
;
376 EFI_STRING_ID StringId
;
377 } EFI_HII_SIBT_DUPLICATE_BLOCK
;
379 typedef struct _EFI_HII_SIBT_END_BLOCK
{
380 EFI_HII_STRING_BLOCK Header
;
381 } EFI_HII_SIBT_END_BLOCK
;
383 typedef struct _EFI_HII_SIBT_EXT1_BLOCK
{
384 EFI_HII_STRING_BLOCK Header
;
387 } EFI_HII_SIBT_EXT1_BLOCK
;
389 typedef struct _EFI_HII_SIBT_EXT2_BLOCK
{
390 EFI_HII_STRING_BLOCK Header
;
393 } EFI_HII_SIBT_EXT2_BLOCK
;
395 typedef struct _EFI_HII_SIBT_EXT4_BLOCK
{
396 EFI_HII_STRING_BLOCK Header
;
399 } EFI_HII_SIBT_EXT4_BLOCK
;
401 typedef struct _EFI_HII_SIBT_FONT_BLOCK
{
402 EFI_HII_SIBT_EXT2_BLOCK Header
;
405 EFI_HII_FONT_STYLE FontStyle
;
407 } EFI_HII_SIBT_FONT_BLOCK
;
409 typedef struct _EFI_HII_SIBT_SKIP1_BLOCK
{
410 EFI_HII_STRING_BLOCK Header
;
412 } EFI_HII_SIBT_SKIP1_BLOCK
;
414 typedef struct _EFI_HII_SIBT_SKIP2_BLOCK
{
415 EFI_HII_STRING_BLOCK Header
;
417 } EFI_HII_SIBT_SKIP2_BLOCK
;
419 typedef struct _EFI_HII_SIBT_STRING_SCSU_BLOCK
{
420 EFI_HII_STRING_BLOCK Header
;
422 } EFI_HII_SIBT_STRING_SCSU_BLOCK
;
424 typedef struct _EFI_HII_SIBT_STRING_SCSU_FONT_BLOCK
{
425 EFI_HII_STRING_BLOCK Header
;
426 UINT8 FontIdentifier
;
428 } EFI_HII_SIBT_STRING_SCSU_FONT_BLOCK
;
430 typedef struct _EFI_HII_SIBT_STRINGS_SCSU_BLOCK
{
431 EFI_HII_STRING_BLOCK Header
;
434 } EFI_HII_SIBT_STRINGS_SCSU_BLOCK
;
436 typedef struct _EFI_HII_SIBT_STRINGS_SCSU_FONT_BLOCK
{
437 EFI_HII_STRING_BLOCK Header
;
438 UINT8 FontIdentifier
;
441 } EFI_HII_SIBT_STRINGS_SCSU_FONT_BLOCK
;
443 typedef struct _EFI_HII_SIBT_STRING_UCS2_BLOCK
{
444 EFI_HII_STRING_BLOCK Header
;
445 CHAR16 StringText
[1];
446 } EFI_HII_SIBT_STRING_UCS2_BLOCK
;
448 typedef struct _EFI_HII_SIBT_STRING_UCS2_FONT_BLOCK
{
449 EFI_HII_STRING_BLOCK Header
;
450 UINT8 FontIdentifier
;
451 CHAR16 StringText
[1];
452 } EFI_HII_SIBT_STRING_UCS2_FONT_BLOCK
;
454 typedef struct _EFI_HII_SIBT_STRINGS_UCS2_BLOCK
{
455 EFI_HII_STRING_BLOCK Header
;
457 CHAR16 StringText
[1];
458 } EFI_HII_SIBT_STRINGS_UCS2_BLOCK
;
460 typedef struct _EFI_HII_SIBT_STRINGS_UCS2_FONT_BLOCK
{
461 EFI_HII_STRING_BLOCK Header
;
462 UINT8 FontIdentifier
;
464 CHAR16 StringText
[1];
465 } EFI_HII_SIBT_STRINGS_UCS2_FONT_BLOCK
;
468 // Definitions for Image Package
472 typedef struct _EFI_HII_IMAGE_PACKAGE_HDR
{
473 EFI_HII_PACKAGE_HEADER Header
;
474 UINT32 ImageInfoOffset
;
475 UINT32 PaletteInfoOffset
;
476 } EFI_HII_IMAGE_PACKAGE_HDR
;
478 typedef struct _EFI_HII_IMAGE_BLOCK
{
480 } EFI_HII_IMAGE_BLOCK
;
483 // Value of different image information block types
485 #define EFI_HII_IIBT_END 0x00
486 #define EFI_HII_IIBT_IMAGE_1BIT 0x10
487 #define EFI_HII_IIBT_IMAGE_1BIT_TRANS 0x11
488 #define EFI_HII_IIBT_IMAGE_4BIT 0x12
489 #define EFI_HII_IIBT_IMAGE_4BIT_TRANS 0x13
490 #define EFI_HII_IIBT_IMAGE_8BIT 0x14
491 #define EFI_HII_IIBT_IMAGE_8BIT_TRANS 0x15
492 #define EFI_HII_IIBT_IMAGE_24BIT 0x16
493 #define EFI_HII_IIBT_IMAGE_24BIT_TRANS 0x17
494 #define EFI_HII_IIBT_IMAGE_JPEG 0x18
495 #define EFI_HII_IIBT_IMAGE_PNG 0x19
496 #define EFI_HII_IIBT_DUPLICATE 0x20
497 #define EFI_HII_IIBT_SKIP2 0x21
498 #define EFI_HII_IIBT_SKIP1 0x22
499 #define EFI_HII_IIBT_EXT1 0x30
500 #define EFI_HII_IIBT_EXT2 0x31
501 #define EFI_HII_IIBT_EXT4 0x32
504 // Definition of different image information block types
507 typedef struct _EFI_HII_IIBT_END_BLOCK
{
508 EFI_HII_IMAGE_BLOCK Header
;
509 } EFI_HII_IIBT_END_BLOCK
;
511 typedef struct _EFI_HII_IIBT_EXT1_BLOCK
{
512 EFI_HII_IMAGE_BLOCK Header
;
515 } EFI_HII_IIBT_EXT1_BLOCK
;
517 typedef struct _EFI_HII_IIBT_EXT2_BLOCK
{
518 EFI_HII_IMAGE_BLOCK Header
;
521 } EFI_HII_IIBT_EXT2_BLOCK
;
523 typedef struct _EFI_HII_IIBT_EXT4_BLOCK
{
524 EFI_HII_IMAGE_BLOCK Header
;
527 } EFI_HII_IIBT_EXT4_BLOCK
;
529 typedef struct _EFI_HII_IIBT_IMAGE_1BIT_BASE
{
533 } EFI_HII_IIBT_IMAGE_1BIT_BASE
;
535 typedef struct _EFI_HII_IIBT_IMAGE_1BIT_BLOCK
{
536 EFI_HII_IMAGE_BLOCK Header
;
538 EFI_HII_IIBT_IMAGE_1BIT_BASE Bitmap
;
539 } EFI_HII_IIBT_IMAGE_1BIT_BLOCK
;
541 typedef struct _EFI_HII_IIBT_IMAGE_1BIT_TRANS_BLOCK
{
542 EFI_HII_IMAGE_BLOCK Header
;
544 EFI_HII_IIBT_IMAGE_1BIT_BASE Bitmap
;
545 } EFI_HII_IIBT_IMAGE_1BIT_TRANS_BLOCK
;
547 typedef struct _EFI_HII_RGB_PIXEL
{
553 typedef struct _EFI_HII_IIBT_IMAGE_24BIT_BASE
{
556 EFI_HII_RGB_PIXEL Bitmap
[1];
557 } EFI_HII_IIBT_IMAGE_24BIT_BASE
;
559 typedef struct _EFI_HII_IIBT_IMAGE_24BIT_BLOCK
{
560 EFI_HII_IMAGE_BLOCK Header
;
561 EFI_HII_IIBT_IMAGE_24BIT_BASE Bitmap
;
562 } EFI_HII_IIBT_IMAGE_24BIT_BLOCK
;
564 typedef struct _EFI_HII_IIBT_IMAGE_24BIT_TRANS_BLOCK
{
565 EFI_HII_IMAGE_BLOCK Header
;
566 EFI_HII_IIBT_IMAGE_24BIT_BASE Bitmap
;
567 } EFI_HII_IIBT_IMAGE_24BIT_TRANS_BLOCK
;
569 typedef struct _EFI_HII_IIBT_IMAGE_4BIT_BASE
{
573 } EFI_HII_IIBT_IMAGE_4BIT_BASE
;
575 typedef struct _EFI_HII_IIBT_IMAGE_4BIT_BLOCK
{
576 EFI_HII_IMAGE_BLOCK Header
;
578 EFI_HII_IIBT_IMAGE_4BIT_BASE Bitmap
;
579 } EFI_HII_IIBT_IMAGE_4BIT_BLOCK
;
581 typedef struct _EFI_HII_IIBT_IMAGE_4BIT_TRANS_BLOCK
{
582 EFI_HII_IMAGE_BLOCK Header
;
584 EFI_HII_IIBT_IMAGE_4BIT_BASE Bitmap
;
585 } EFI_HII_IIBT_IMAGE_4BIT_TRANS_BLOCK
;
587 typedef struct _EFI_HII_IIBT_IMAGE_8BIT_BASE
{
591 } EFI_HII_IIBT_IMAGE_8BIT_BASE
;
593 typedef struct _EFI_HII_IIBT_IMAGE_8BIT_PALETTE_BLOCK
{
594 EFI_HII_IMAGE_BLOCK Header
;
596 EFI_HII_IIBT_IMAGE_8BIT_BASE Bitmap
;
597 } EFI_HII_IIBT_IMAGE_8BIT_BLOCK
;
599 typedef struct _EFI_HII_IIBT_IMAGE_8BIT_TRANS_BLOCK
{
600 EFI_HII_IMAGE_BLOCK Header
;
602 EFI_HII_IIBT_IMAGE_8BIT_BASE Bitmap
;
603 } EFI_HII_IIBT_IMAGE_8BIT_TRAN_BLOCK
;
605 typedef struct _EFI_HII_IIBT_DUPLICATE_BLOCK
{
606 EFI_HII_IMAGE_BLOCK Header
;
607 EFI_IMAGE_ID ImageId
;
608 } EFI_HII_IIBT_DUPLICATE_BLOCK
;
610 typedef struct _EFI_HII_IIBT_JPEG_BLOCK
{
611 EFI_HII_IMAGE_BLOCK Header
;
614 } EFI_HII_IIBT_JPEG_BLOCK
;
616 typedef struct _EFI_HII_IIBT_PNG_BLOCK
{
617 EFI_HII_IMAGE_BLOCK Header
;
620 } EFI_HII_IIBT_PNG_BLOCK
;
622 typedef struct _EFI_HII_IIBT_SKIP1_BLOCK
{
623 EFI_HII_IMAGE_BLOCK Header
;
625 } EFI_HII_IIBT_SKIP1_BLOCK
;
627 typedef struct _EFI_HII_IIBT_SKIP2_BLOCK
{
628 EFI_HII_IMAGE_BLOCK Header
;
630 } EFI_HII_IIBT_SKIP2_BLOCK
;
633 // Definitions for Palette Information
636 typedef struct _EFI_HII_IMAGE_PALETTE_INFO_HEADER
{
638 } EFI_HII_IMAGE_PALETTE_INFO_HEADER
;
640 typedef struct _EFI_HII_IMAGE_PALETTE_INFO
{
642 EFI_HII_RGB_PIXEL PaletteValue
[1];
643 } EFI_HII_IMAGE_PALETTE_INFO
;
646 // Definitions for Forms Package
651 /// The Form package is used to carry form-based encoding data.
653 typedef struct _EFI_HII_FORM_PACKAGE_HDR
{
654 EFI_HII_PACKAGE_HEADER Header
;
655 // EFI_IFR_OP_HEADER OpCodeHeader;
656 // More op-codes follow
657 } EFI_HII_FORM_PACKAGE_HDR
;
672 EFI_QUESTION_ID QuestionId
;
674 EFI_GUID FormSetGuid
;
675 EFI_STRING_ID DevicePath
;
686 EFI_STRING_ID string
; ///< EFI_IFR_TYPE_STRING, EFI_IFR_TYPE_ACTION
687 EFI_HII_REF ref
; ///< EFI_IFR_TYPE_REF
688 // UINT8 buffer[]; ///< EFI_IFR_TYPE_BUFFER
689 } EFI_IFR_TYPE_VALUE
;
694 #define EFI_IFR_FORM_OP 0x01
695 #define EFI_IFR_SUBTITLE_OP 0x02
696 #define EFI_IFR_TEXT_OP 0x03
697 #define EFI_IFR_IMAGE_OP 0x04
698 #define EFI_IFR_ONE_OF_OP 0x05
699 #define EFI_IFR_CHECKBOX_OP 0x06
700 #define EFI_IFR_NUMERIC_OP 0x07
701 #define EFI_IFR_PASSWORD_OP 0x08
702 #define EFI_IFR_ONE_OF_OPTION_OP 0x09
703 #define EFI_IFR_SUPPRESS_IF_OP 0x0A
704 #define EFI_IFR_LOCKED_OP 0x0B
705 #define EFI_IFR_ACTION_OP 0x0C
706 #define EFI_IFR_RESET_BUTTON_OP 0x0D
707 #define EFI_IFR_FORM_SET_OP 0x0E
708 #define EFI_IFR_REF_OP 0x0F
709 #define EFI_IFR_NO_SUBMIT_IF_OP 0x10
710 #define EFI_IFR_INCONSISTENT_IF_OP 0x11
711 #define EFI_IFR_EQ_ID_VAL_OP 0x12
712 #define EFI_IFR_EQ_ID_ID_OP 0x13
713 #define EFI_IFR_EQ_ID_VAL_LIST_OP 0x14
714 #define EFI_IFR_AND_OP 0x15
715 #define EFI_IFR_OR_OP 0x16
716 #define EFI_IFR_NOT_OP 0x17
717 #define EFI_IFR_RULE_OP 0x18
718 #define EFI_IFR_GRAY_OUT_IF_OP 0x19
719 #define EFI_IFR_DATE_OP 0x1A
720 #define EFI_IFR_TIME_OP 0x1B
721 #define EFI_IFR_STRING_OP 0x1C
722 #define EFI_IFR_REFRESH_OP 0x1D
723 #define EFI_IFR_DISABLE_IF_OP 0x1E
724 #define EFI_IFR_ANIMATION_OP 0x1F
725 #define EFI_IFR_TO_LOWER_OP 0x20
726 #define EFI_IFR_TO_UPPER_OP 0x21
727 #define EFI_IFR_MAP_OP 0x22
728 #define EFI_IFR_ORDERED_LIST_OP 0x23
729 #define EFI_IFR_VARSTORE_OP 0x24
730 #define EFI_IFR_VARSTORE_NAME_VALUE_OP 0x25
731 #define EFI_IFR_VARSTORE_EFI_OP 0x26
732 #define EFI_IFR_VARSTORE_DEVICE_OP 0x27
733 #define EFI_IFR_VERSION_OP 0x28
734 #define EFI_IFR_END_OP 0x29
735 #define EFI_IFR_MATCH_OP 0x2A
736 #define EFI_IFR_GET_OP 0x2B
737 #define EFI_IFR_SET_OP 0x2C
738 #define EFI_IFR_READ_OP 0x2D
739 #define EFI_IFR_WRITE_OP 0x2E
740 #define EFI_IFR_EQUAL_OP 0x2F
741 #define EFI_IFR_NOT_EQUAL_OP 0x30
742 #define EFI_IFR_GREATER_THAN_OP 0x31
743 #define EFI_IFR_GREATER_EQUAL_OP 0x32
744 #define EFI_IFR_LESS_THAN_OP 0x33
745 #define EFI_IFR_LESS_EQUAL_OP 0x34
746 #define EFI_IFR_BITWISE_AND_OP 0x35
747 #define EFI_IFR_BITWISE_OR_OP 0x36
748 #define EFI_IFR_BITWISE_NOT_OP 0x37
749 #define EFI_IFR_SHIFT_LEFT_OP 0x38
750 #define EFI_IFR_SHIFT_RIGHT_OP 0x39
751 #define EFI_IFR_ADD_OP 0x3A
752 #define EFI_IFR_SUBTRACT_OP 0x3B
753 #define EFI_IFR_MULTIPLY_OP 0x3C
754 #define EFI_IFR_DIVIDE_OP 0x3D
755 #define EFI_IFR_MODULO_OP 0x3E
756 #define EFI_IFR_RULE_REF_OP 0x3F
757 #define EFI_IFR_QUESTION_REF1_OP 0x40
758 #define EFI_IFR_QUESTION_REF2_OP 0x41
759 #define EFI_IFR_UINT8_OP 0x42
760 #define EFI_IFR_UINT16_OP 0x43
761 #define EFI_IFR_UINT32_OP 0x44
762 #define EFI_IFR_UINT64_OP 0x45
763 #define EFI_IFR_TRUE_OP 0x46
764 #define EFI_IFR_FALSE_OP 0x47
765 #define EFI_IFR_TO_UINT_OP 0x48
766 #define EFI_IFR_TO_STRING_OP 0x49
767 #define EFI_IFR_TO_BOOLEAN_OP 0x4A
768 #define EFI_IFR_MID_OP 0x4B
769 #define EFI_IFR_FIND_OP 0x4C
770 #define EFI_IFR_TOKEN_OP 0x4D
771 #define EFI_IFR_STRING_REF1_OP 0x4E
772 #define EFI_IFR_STRING_REF2_OP 0x4F
773 #define EFI_IFR_CONDITIONAL_OP 0x50
774 #define EFI_IFR_QUESTION_REF3_OP 0x51
775 #define EFI_IFR_ZERO_OP 0x52
776 #define EFI_IFR_ONE_OP 0x53
777 #define EFI_IFR_ONES_OP 0x54
778 #define EFI_IFR_UNDEFINED_OP 0x55
779 #define EFI_IFR_LENGTH_OP 0x56
780 #define EFI_IFR_DUP_OP 0x57
781 #define EFI_IFR_THIS_OP 0x58
782 #define EFI_IFR_SPAN_OP 0x59
783 #define EFI_IFR_VALUE_OP 0x5A
784 #define EFI_IFR_DEFAULT_OP 0x5B
785 #define EFI_IFR_DEFAULTSTORE_OP 0x5C
786 #define EFI_IFR_FORM_MAP_OP 0x5D
787 #define EFI_IFR_CATENATE_OP 0x5E
788 #define EFI_IFR_GUID_OP 0x5F
789 #define EFI_IFR_SECURITY_OP 0x60
790 #define EFI_IFR_MODAL_TAG_OP 0x61
791 #define EFI_IFR_REFRESH_ID_OP 0x62
792 #define EFI_IFR_WARNING_IF_OP 0x63
793 #define EFI_IFR_MATCH2_OP 0x64
796 // Definitions of IFR Standard Headers
800 typedef struct _EFI_IFR_OP_HEADER
{
806 typedef struct _EFI_IFR_STATEMENT_HEADER
{
807 EFI_STRING_ID Prompt
;
809 } EFI_IFR_STATEMENT_HEADER
;
811 typedef struct _EFI_IFR_QUESTION_HEADER
{
812 EFI_IFR_STATEMENT_HEADER Header
;
813 EFI_QUESTION_ID QuestionId
;
814 EFI_VARSTORE_ID VarStoreId
;
816 EFI_STRING_ID VarName
;
820 } EFI_IFR_QUESTION_HEADER
;
823 // Flag values of EFI_IFR_QUESTION_HEADER
825 #define EFI_IFR_FLAG_READ_ONLY 0x01
826 #define EFI_IFR_FLAG_CALLBACK 0x04
827 #define EFI_IFR_FLAG_RESET_REQUIRED 0x10
828 #define EFI_IFR_FLAG_RECONNECT_REQUIRED 0x40
829 #define EFI_IFR_FLAG_OPTIONS_ONLY 0x80
832 // Definition for Opcode Reference
835 typedef struct _EFI_IFR_DEFAULTSTORE
{
836 EFI_IFR_OP_HEADER Header
;
837 EFI_STRING_ID DefaultName
;
839 } EFI_IFR_DEFAULTSTORE
;
842 // Default Identifier of default store
844 #define EFI_HII_DEFAULT_CLASS_STANDARD 0x0000
845 #define EFI_HII_DEFAULT_CLASS_MANUFACTURING 0x0001
846 #define EFI_HII_DEFAULT_CLASS_SAFE 0x0002
847 #define EFI_HII_DEFAULT_CLASS_PLATFORM_BEGIN 0x4000
848 #define EFI_HII_DEFAULT_CLASS_PLATFORM_END 0x7fff
849 #define EFI_HII_DEFAULT_CLASS_HARDWARE_BEGIN 0x8000
850 #define EFI_HII_DEFAULT_CLASS_HARDWARE_END 0xbfff
851 #define EFI_HII_DEFAULT_CLASS_FIRMWARE_BEGIN 0xc000
852 #define EFI_HII_DEFAULT_CLASS_FIRMWARE_END 0xffff
854 typedef struct _EFI_IFR_VARSTORE
{
855 EFI_IFR_OP_HEADER Header
;
857 EFI_VARSTORE_ID VarStoreId
;
862 typedef struct _EFI_IFR_VARSTORE_EFI
{
863 EFI_IFR_OP_HEADER Header
;
864 EFI_VARSTORE_ID VarStoreId
;
869 } EFI_IFR_VARSTORE_EFI
;
871 typedef struct _EFI_IFR_VARSTORE_NAME_VALUE
{
872 EFI_IFR_OP_HEADER Header
;
873 EFI_VARSTORE_ID VarStoreId
;
875 } EFI_IFR_VARSTORE_NAME_VALUE
;
877 typedef struct _EFI_IFR_FORM_SET
{
878 EFI_IFR_OP_HEADER Header
;
880 EFI_STRING_ID FormSetTitle
;
883 // EFI_GUID ClassGuid[];
886 typedef struct _EFI_IFR_END
{
887 EFI_IFR_OP_HEADER Header
;
890 typedef struct _EFI_IFR_FORM
{
891 EFI_IFR_OP_HEADER Header
;
893 EFI_STRING_ID FormTitle
;
896 typedef struct _EFI_IFR_IMAGE
{
897 EFI_IFR_OP_HEADER Header
;
901 typedef struct _EFI_IFR_MODAL_TAG
{
902 EFI_IFR_OP_HEADER Header
;
905 typedef struct _EFI_IFR_LOCKED
{
906 EFI_IFR_OP_HEADER Header
;
909 typedef struct _EFI_IFR_RULE
{
910 EFI_IFR_OP_HEADER Header
;
914 typedef struct _EFI_IFR_DEFAULT
{
915 EFI_IFR_OP_HEADER Header
;
918 EFI_IFR_TYPE_VALUE Value
;
921 typedef struct _EFI_IFR_DEFAULT_2
{
922 EFI_IFR_OP_HEADER Header
;
927 typedef struct _EFI_IFR_VALUE
{
928 EFI_IFR_OP_HEADER Header
;
931 typedef struct _EFI_IFR_SUBTITLE
{
932 EFI_IFR_OP_HEADER Header
;
933 EFI_IFR_STATEMENT_HEADER Statement
;
937 #define EFI_IFR_FLAGS_HORIZONTAL 0x01
939 typedef struct _EFI_IFR_CHECKBOX
{
940 EFI_IFR_OP_HEADER Header
;
941 EFI_IFR_QUESTION_HEADER Question
;
945 #define EFI_IFR_CHECKBOX_DEFAULT 0x01
946 #define EFI_IFR_CHECKBOX_DEFAULT_MFG 0x02
948 typedef struct _EFI_IFR_TEXT
{
949 EFI_IFR_OP_HEADER Header
;
950 EFI_IFR_STATEMENT_HEADER Statement
;
951 EFI_STRING_ID TextTwo
;
954 typedef struct _EFI_IFR_REF
{
955 EFI_IFR_OP_HEADER Header
;
956 EFI_IFR_QUESTION_HEADER Question
;
960 typedef struct _EFI_IFR_REF2
{
961 EFI_IFR_OP_HEADER Header
;
962 EFI_IFR_QUESTION_HEADER Question
;
964 EFI_QUESTION_ID QuestionId
;
967 typedef struct _EFI_IFR_REF3
{
968 EFI_IFR_OP_HEADER Header
;
969 EFI_IFR_QUESTION_HEADER Question
;
971 EFI_QUESTION_ID QuestionId
;
975 typedef struct _EFI_IFR_REF4
{
976 EFI_IFR_OP_HEADER Header
;
977 EFI_IFR_QUESTION_HEADER Question
;
979 EFI_QUESTION_ID QuestionId
;
981 EFI_STRING_ID DevicePath
;
984 typedef struct _EFI_IFR_REF5
{
985 EFI_IFR_OP_HEADER Header
;
986 EFI_IFR_QUESTION_HEADER Question
;
989 typedef struct _EFI_IFR_RESET_BUTTON
{
990 EFI_IFR_OP_HEADER Header
;
991 EFI_IFR_STATEMENT_HEADER Statement
;
992 EFI_DEFAULT_ID DefaultId
;
993 } EFI_IFR_RESET_BUTTON
;
995 typedef struct _EFI_IFR_ACTION
{
996 EFI_IFR_OP_HEADER Header
;
997 EFI_IFR_QUESTION_HEADER Question
;
998 EFI_STRING_ID QuestionConfig
;
1001 typedef struct _EFI_IFR_ACTION_1
{
1002 EFI_IFR_OP_HEADER Header
;
1003 EFI_IFR_QUESTION_HEADER Question
;
1006 typedef struct _EFI_IFR_DATE
{
1007 EFI_IFR_OP_HEADER Header
;
1008 EFI_IFR_QUESTION_HEADER Question
;
1013 // Flags that describe the behavior of the question.
1015 #define EFI_QF_DATE_YEAR_SUPPRESS 0x01
1016 #define EFI_QF_DATE_MONTH_SUPPRESS 0x02
1017 #define EFI_QF_DATE_DAY_SUPPRESS 0x04
1019 #define EFI_QF_DATE_STORAGE 0x30
1020 #define QF_DATE_STORAGE_NORMAL 0x00
1021 #define QF_DATE_STORAGE_TIME 0x10
1022 #define QF_DATE_STORAGE_WAKEUP 0x20
1047 typedef struct _EFI_IFR_NUMERIC
{
1048 EFI_IFR_OP_HEADER Header
;
1049 EFI_IFR_QUESTION_HEADER Question
;
1051 MINMAXSTEP_DATA data
;
1055 // Flags related to the numeric question
1057 #define EFI_IFR_NUMERIC_SIZE 0x03
1058 #define EFI_IFR_NUMERIC_SIZE_1 0x00
1059 #define EFI_IFR_NUMERIC_SIZE_2 0x01
1060 #define EFI_IFR_NUMERIC_SIZE_4 0x02
1061 #define EFI_IFR_NUMERIC_SIZE_8 0x03
1063 #define EFI_IFR_DISPLAY 0x30
1064 #define EFI_IFR_DISPLAY_INT_DEC 0x00
1065 #define EFI_IFR_DISPLAY_UINT_DEC 0x10
1066 #define EFI_IFR_DISPLAY_UINT_HEX 0x20
1068 typedef struct _EFI_IFR_ONE_OF
{
1069 EFI_IFR_OP_HEADER Header
;
1070 EFI_IFR_QUESTION_HEADER Question
;
1072 MINMAXSTEP_DATA data
;
1075 typedef struct _EFI_IFR_STRING
{
1076 EFI_IFR_OP_HEADER Header
;
1077 EFI_IFR_QUESTION_HEADER Question
;
1083 #define EFI_IFR_STRING_MULTI_LINE 0x01
1085 typedef struct _EFI_IFR_PASSWORD
{
1086 EFI_IFR_OP_HEADER Header
;
1087 EFI_IFR_QUESTION_HEADER Question
;
1092 typedef struct _EFI_IFR_ORDERED_LIST
{
1093 EFI_IFR_OP_HEADER Header
;
1094 EFI_IFR_QUESTION_HEADER Question
;
1095 UINT8 MaxContainers
;
1097 } EFI_IFR_ORDERED_LIST
;
1099 #define EFI_IFR_UNIQUE_SET 0x01
1100 #define EFI_IFR_NO_EMPTY_SET 0x02
1102 typedef struct _EFI_IFR_TIME
{
1103 EFI_IFR_OP_HEADER Header
;
1104 EFI_IFR_QUESTION_HEADER Question
;
1109 // A bit-mask that determines which unique settings are active for this opcode.
1111 #define QF_TIME_HOUR_SUPPRESS 0x01
1112 #define QF_TIME_MINUTE_SUPPRESS 0x02
1113 #define QF_TIME_SECOND_SUPPRESS 0x04
1115 #define QF_TIME_STORAGE 0x30
1116 #define QF_TIME_STORAGE_NORMAL 0x00
1117 #define QF_TIME_STORAGE_TIME 0x10
1118 #define QF_TIME_STORAGE_WAKEUP 0x20
1120 typedef struct _EFI_IFR_DISABLE_IF
{
1121 EFI_IFR_OP_HEADER Header
;
1122 } EFI_IFR_DISABLE_IF
;
1124 typedef struct _EFI_IFR_SUPPRESS_IF
{
1125 EFI_IFR_OP_HEADER Header
;
1126 } EFI_IFR_SUPPRESS_IF
;
1128 typedef struct _EFI_IFR_GRAY_OUT_IF
{
1129 EFI_IFR_OP_HEADER Header
;
1130 } EFI_IFR_GRAY_OUT_IF
;
1132 typedef struct _EFI_IFR_INCONSISTENT_IF
{
1133 EFI_IFR_OP_HEADER Header
;
1134 EFI_STRING_ID Error
;
1135 } EFI_IFR_INCONSISTENT_IF
;
1137 typedef struct _EFI_IFR_NO_SUBMIT_IF
{
1138 EFI_IFR_OP_HEADER Header
;
1139 EFI_STRING_ID Error
;
1140 } EFI_IFR_NO_SUBMIT_IF
;
1142 typedef struct _EFI_IFR_WARNING_IF
{
1143 EFI_IFR_OP_HEADER Header
;
1144 EFI_STRING_ID Warning
;
1146 } EFI_IFR_WARNING_IF
;
1148 typedef struct _EFI_IFR_REFRESH
{
1149 EFI_IFR_OP_HEADER Header
;
1150 UINT8 RefreshInterval
;
1153 typedef struct _EFI_IFR_VARSTORE_DEVICE
{
1154 EFI_IFR_OP_HEADER Header
;
1155 EFI_STRING_ID DevicePath
;
1156 } EFI_IFR_VARSTORE_DEVICE
;
1158 typedef struct _EFI_IFR_ONE_OF_OPTION
{
1159 EFI_IFR_OP_HEADER Header
;
1160 EFI_STRING_ID Option
;
1163 EFI_IFR_TYPE_VALUE Value
;
1164 } EFI_IFR_ONE_OF_OPTION
;
1167 // Types of the option's value.
1169 #define EFI_IFR_TYPE_NUM_SIZE_8 0x00
1170 #define EFI_IFR_TYPE_NUM_SIZE_16 0x01
1171 #define EFI_IFR_TYPE_NUM_SIZE_32 0x02
1172 #define EFI_IFR_TYPE_NUM_SIZE_64 0x03
1173 #define EFI_IFR_TYPE_BOOLEAN 0x04
1174 #define EFI_IFR_TYPE_TIME 0x05
1175 #define EFI_IFR_TYPE_DATE 0x06
1176 #define EFI_IFR_TYPE_STRING 0x07
1177 #define EFI_IFR_TYPE_OTHER 0x08
1178 #define EFI_IFR_TYPE_UNDEFINED 0x09
1179 #define EFI_IFR_TYPE_ACTION 0x0A
1180 #define EFI_IFR_TYPE_BUFFER 0x0B
1181 #define EFI_IFR_TYPE_REF 0x0C
1183 #define EFI_IFR_OPTION_DEFAULT 0x10
1184 #define EFI_IFR_OPTION_DEFAULT_MFG 0x20
1186 typedef struct _EFI_IFR_GUID
{
1187 EFI_IFR_OP_HEADER Header
;
1189 //Optional Data Follows
1192 typedef struct _EFI_IFR_REFRESH_ID
{
1193 EFI_IFR_OP_HEADER Header
;
1194 EFI_GUID RefreshEventGroupId
;
1195 } EFI_IFR_REFRESH_ID
;
1197 typedef struct _EFI_IFR_DUP
{
1198 EFI_IFR_OP_HEADER Header
;
1201 typedef struct _EFI_IFR_EQ_ID_ID
{
1202 EFI_IFR_OP_HEADER Header
;
1203 EFI_QUESTION_ID QuestionId1
;
1204 EFI_QUESTION_ID QuestionId2
;
1207 typedef struct _EFI_IFR_EQ_ID_VAL
{
1208 EFI_IFR_OP_HEADER Header
;
1209 EFI_QUESTION_ID QuestionId
;
1211 } EFI_IFR_EQ_ID_VAL
;
1213 typedef struct _EFI_IFR_EQ_ID_VAL_LIST
{
1214 EFI_IFR_OP_HEADER Header
;
1215 EFI_QUESTION_ID QuestionId
;
1217 UINT16 ValueList
[1];
1218 } EFI_IFR_EQ_ID_VAL_LIST
;
1220 typedef struct _EFI_IFR_UINT8
{
1221 EFI_IFR_OP_HEADER Header
;
1225 typedef struct _EFI_IFR_UINT16
{
1226 EFI_IFR_OP_HEADER Header
;
1230 typedef struct _EFI_IFR_UINT32
{
1231 EFI_IFR_OP_HEADER Header
;
1235 typedef struct _EFI_IFR_UINT64
{
1236 EFI_IFR_OP_HEADER Header
;
1240 typedef struct _EFI_IFR_QUESTION_REF1
{
1241 EFI_IFR_OP_HEADER Header
;
1242 EFI_QUESTION_ID QuestionId
;
1243 } EFI_IFR_QUESTION_REF1
;
1245 typedef struct _EFI_IFR_QUESTION_REF2
{
1246 EFI_IFR_OP_HEADER Header
;
1247 } EFI_IFR_QUESTION_REF2
;
1249 typedef struct _EFI_IFR_QUESTION_REF3
{
1250 EFI_IFR_OP_HEADER Header
;
1251 } EFI_IFR_QUESTION_REF3
;
1253 typedef struct _EFI_IFR_QUESTION_REF3_2
{
1254 EFI_IFR_OP_HEADER Header
;
1255 EFI_STRING_ID DevicePath
;
1256 } EFI_IFR_QUESTION_REF3_2
;
1258 typedef struct _EFI_IFR_QUESTION_REF3_3
{
1259 EFI_IFR_OP_HEADER Header
;
1260 EFI_STRING_ID DevicePath
;
1262 } EFI_IFR_QUESTION_REF3_3
;
1264 typedef struct _EFI_IFR_RULE_REF
{
1265 EFI_IFR_OP_HEADER Header
;
1269 typedef struct _EFI_IFR_STRING_REF1
{
1270 EFI_IFR_OP_HEADER Header
;
1271 EFI_STRING_ID StringId
;
1272 } EFI_IFR_STRING_REF1
;
1274 typedef struct _EFI_IFR_STRING_REF2
{
1275 EFI_IFR_OP_HEADER Header
;
1276 } EFI_IFR_STRING_REF2
;
1278 typedef struct _EFI_IFR_THIS
{
1279 EFI_IFR_OP_HEADER Header
;
1282 typedef struct _EFI_IFR_TRUE
{
1283 EFI_IFR_OP_HEADER Header
;
1286 typedef struct _EFI_IFR_FALSE
{
1287 EFI_IFR_OP_HEADER Header
;
1290 typedef struct _EFI_IFR_ONE
{
1291 EFI_IFR_OP_HEADER Header
;
1294 typedef struct _EFI_IFR_ONES
{
1295 EFI_IFR_OP_HEADER Header
;
1298 typedef struct _EFI_IFR_ZERO
{
1299 EFI_IFR_OP_HEADER Header
;
1302 typedef struct _EFI_IFR_UNDEFINED
{
1303 EFI_IFR_OP_HEADER Header
;
1304 } EFI_IFR_UNDEFINED
;
1306 typedef struct _EFI_IFR_VERSION
{
1307 EFI_IFR_OP_HEADER Header
;
1310 typedef struct _EFI_IFR_LENGTH
{
1311 EFI_IFR_OP_HEADER Header
;
1314 typedef struct _EFI_IFR_NOT
{
1315 EFI_IFR_OP_HEADER Header
;
1318 typedef struct _EFI_IFR_BITWISE_NOT
{
1319 EFI_IFR_OP_HEADER Header
;
1320 } EFI_IFR_BITWISE_NOT
;
1322 typedef struct _EFI_IFR_TO_BOOLEAN
{
1323 EFI_IFR_OP_HEADER Header
;
1324 } EFI_IFR_TO_BOOLEAN
;
1327 /// For EFI_IFR_TO_STRING, when converting from
1328 /// unsigned integers, these flags control the format:
1329 /// 0 = unsigned decimal.
1330 /// 1 = signed decimal.
1331 /// 2 = hexadecimal (lower-case alpha).
1332 /// 3 = hexadecimal (upper-case alpha).
1334 #define EFI_IFR_STRING_UNSIGNED_DEC 0
1335 #define EFI_IFR_STRING_SIGNED_DEC 1
1336 #define EFI_IFR_STRING_LOWERCASE_HEX 2
1337 #define EFI_IFR_STRING_UPPERCASE_HEX 3
1341 /// When converting from a buffer, these flags control the format:
1345 #define EFI_IFR_STRING_ASCII 0
1346 #define EFI_IFR_STRING_UNICODE 8
1349 typedef struct _EFI_IFR_TO_STRING
{
1350 EFI_IFR_OP_HEADER Header
;
1352 } EFI_IFR_TO_STRING
;
1354 typedef struct _EFI_IFR_TO_UINT
{
1355 EFI_IFR_OP_HEADER Header
;
1358 typedef struct _EFI_IFR_TO_UPPER
{
1359 EFI_IFR_OP_HEADER Header
;
1362 typedef struct _EFI_IFR_TO_LOWER
{
1363 EFI_IFR_OP_HEADER Header
;
1366 typedef struct _EFI_IFR_ADD
{
1367 EFI_IFR_OP_HEADER Header
;
1370 typedef struct _EFI_IFR_AND
{
1371 EFI_IFR_OP_HEADER Header
;
1374 typedef struct _EFI_IFR_BITWISE_AND
{
1375 EFI_IFR_OP_HEADER Header
;
1376 } EFI_IFR_BITWISE_AND
;
1378 typedef struct _EFI_IFR_BITWISE_OR
{
1379 EFI_IFR_OP_HEADER Header
;
1380 } EFI_IFR_BITWISE_OR
;
1382 typedef struct _EFI_IFR_CATENATE
{
1383 EFI_IFR_OP_HEADER Header
;
1386 typedef struct _EFI_IFR_DIVIDE
{
1387 EFI_IFR_OP_HEADER Header
;
1390 typedef struct _EFI_IFR_EQUAL
{
1391 EFI_IFR_OP_HEADER Header
;
1394 typedef struct _EFI_IFR_GREATER_EQUAL
{
1395 EFI_IFR_OP_HEADER Header
;
1396 } EFI_IFR_GREATER_EQUAL
;
1398 typedef struct _EFI_IFR_GREATER_THAN
{
1399 EFI_IFR_OP_HEADER Header
;
1400 } EFI_IFR_GREATER_THAN
;
1402 typedef struct _EFI_IFR_LESS_EQUAL
{
1403 EFI_IFR_OP_HEADER Header
;
1404 } EFI_IFR_LESS_EQUAL
;
1406 typedef struct _EFI_IFR_LESS_THAN
{
1407 EFI_IFR_OP_HEADER Header
;
1408 } EFI_IFR_LESS_THAN
;
1410 typedef struct _EFI_IFR_MATCH
{
1411 EFI_IFR_OP_HEADER Header
;
1414 typedef struct _EFI_IFR_MATCH2
{
1415 EFI_IFR_OP_HEADER Header
;
1416 EFI_GUID SyntaxType
;
1419 typedef struct _EFI_IFR_MULTIPLY
{
1420 EFI_IFR_OP_HEADER Header
;
1423 typedef struct _EFI_IFR_MODULO
{
1424 EFI_IFR_OP_HEADER Header
;
1427 typedef struct _EFI_IFR_NOT_EQUAL
{
1428 EFI_IFR_OP_HEADER Header
;
1429 } EFI_IFR_NOT_EQUAL
;
1431 typedef struct _EFI_IFR_OR
{
1432 EFI_IFR_OP_HEADER Header
;
1435 typedef struct _EFI_IFR_SHIFT_LEFT
{
1436 EFI_IFR_OP_HEADER Header
;
1437 } EFI_IFR_SHIFT_LEFT
;
1439 typedef struct _EFI_IFR_SHIFT_RIGHT
{
1440 EFI_IFR_OP_HEADER Header
;
1441 } EFI_IFR_SHIFT_RIGHT
;
1443 typedef struct _EFI_IFR_SUBTRACT
{
1444 EFI_IFR_OP_HEADER Header
;
1447 typedef struct _EFI_IFR_CONDITIONAL
{
1448 EFI_IFR_OP_HEADER Header
;
1449 } EFI_IFR_CONDITIONAL
;
1452 // Flags governing the matching criteria of EFI_IFR_FIND
1454 #define EFI_IFR_FF_CASE_SENSITIVE 0x00
1455 #define EFI_IFR_FF_CASE_INSENSITIVE 0x01
1457 typedef struct _EFI_IFR_FIND
{
1458 EFI_IFR_OP_HEADER Header
;
1462 typedef struct _EFI_IFR_MID
{
1463 EFI_IFR_OP_HEADER Header
;
1466 typedef struct _EFI_IFR_TOKEN
{
1467 EFI_IFR_OP_HEADER Header
;
1471 // Flags specifying whether to find the first matching string
1472 // or the first non-matching string.
1474 #define EFI_IFR_FLAGS_FIRST_MATCHING 0x00
1475 #define EFI_IFR_FLAGS_FIRST_NON_MATCHING 0x01
1477 typedef struct _EFI_IFR_SPAN
{
1478 EFI_IFR_OP_HEADER Header
;
1482 typedef struct _EFI_IFR_SECURITY
{
1484 /// Standard opcode header, where Header.Op = EFI_IFR_SECURITY_OP.
1486 EFI_IFR_OP_HEADER Header
;
1488 /// Security permission level.
1490 EFI_GUID Permissions
;
1493 typedef struct _EFI_IFR_FORM_MAP_METHOD
{
1495 /// The string identifier which provides the human-readable name of
1496 /// the configuration method for this standards map form.
1498 EFI_STRING_ID MethodTitle
;
1500 /// Identifier which uniquely specifies the configuration methods
1501 /// associated with this standards map form.
1503 EFI_GUID MethodIdentifier
;
1504 } EFI_IFR_FORM_MAP_METHOD
;
1506 typedef struct _EFI_IFR_FORM_MAP
{
1508 /// The sequence that defines the type of opcode as well as the length
1509 /// of the opcode being defined. Header.OpCode = EFI_IFR_FORM_MAP_OP.
1511 EFI_IFR_OP_HEADER Header
;
1513 /// The unique identifier for this particular form.
1517 /// One or more configuration method's name and unique identifier.
1519 // EFI_IFR_FORM_MAP_METHOD Methods[];
1522 typedef struct _EFI_IFR_SET
{
1524 /// The sequence that defines the type of opcode as well as the length
1525 /// of the opcode being defined. Header.OpCode = EFI_IFR_SET_OP.
1527 EFI_IFR_OP_HEADER Header
;
1529 /// Specifies the identifier of a previously declared variable store to
1530 /// use when storing the question's value.
1532 EFI_VARSTORE_ID VarStoreId
;
1535 /// A 16-bit Buffer Storage offset.
1537 EFI_STRING_ID VarName
;
1539 /// A Name Value or EFI Variable name (VarName).
1544 /// Specifies the type used for storage.
1549 typedef struct _EFI_IFR_GET
{
1551 /// The sequence that defines the type of opcode as well as the length
1552 /// of the opcode being defined. Header.OpCode = EFI_IFR_GET_OP.
1554 EFI_IFR_OP_HEADER Header
;
1556 /// Specifies the identifier of a previously declared variable store to
1557 /// use when retrieving the value.
1559 EFI_VARSTORE_ID VarStoreId
;
1562 /// A 16-bit Buffer Storage offset.
1564 EFI_STRING_ID VarName
;
1566 /// A Name Value or EFI Variable name (VarName).
1571 /// Specifies the type used for storage.
1576 typedef struct _EFI_IFR_READ
{
1577 EFI_IFR_OP_HEADER Header
;
1580 typedef struct _EFI_IFR_WRITE
{
1581 EFI_IFR_OP_HEADER Header
;
1584 typedef struct _EFI_IFR_MAP
{
1585 EFI_IFR_OP_HEADER Header
;
1588 // Definitions for Keyboard Package
1589 // Releated definitions are in Section of EFI_HII_DATABASE_PROTOCOL
1593 /// Each enumeration values maps a physical key on a keyboard.
1705 /// Used to describe a physical key on a keyboard.
1709 /// Unicode character code for the Key.
1713 /// Unicode character code for the key with the shift key being held down.
1715 CHAR16 ShiftedUnicode
;
1717 /// Unicode character code for the key with the Alt-GR being held down.
1719 CHAR16 AltGrUnicode
;
1721 /// Unicode character code for the key with the Alt-GR and shift keys being held down.
1723 CHAR16 ShiftedAltGrUnicode
;
1725 /// Modifier keys are defined to allow for special functionality that is not necessarily
1726 /// accomplished by a printable character. Many of these modifier keys are flags to toggle
1727 /// certain state bits on and off inside of a keyboard driver.
1730 UINT16 AffectedAttribute
;
1731 } EFI_KEY_DESCRIPTOR
;
1734 /// A key which is affected by all the standard shift modifiers.
1735 /// Most keys would be expected to have this bit active.
1737 #define EFI_AFFECTED_BY_STANDARD_SHIFT 0x0001
1740 /// This key is affected by the caps lock so that if a keyboard driver
1741 /// would need to disambiguate between a key which had a "1" defined
1742 /// versus an "a" character. Having this bit turned on would tell
1743 /// the keyboard driver to use the appropriate shifted state or not.
1745 #define EFI_AFFECTED_BY_CAPS_LOCK 0x0002
1748 /// Similar to the case of CAPS lock, if this bit is active, the key
1749 /// is affected by the num lock being turned on.
1751 #define EFI_AFFECTED_BY_NUM_LOCK 0x0004
1754 UINT16 LayoutLength
;
1756 UINT32 LayoutDescriptorStringOffset
;
1757 UINT8 DescriptorCount
;
1758 // EFI_KEY_DESCRIPTOR Descriptors[];
1759 } EFI_HII_KEYBOARD_LAYOUT
;
1762 EFI_HII_PACKAGE_HEADER Header
;
1764 // EFI_HII_KEYBOARD_LAYOUT Layout[];
1765 } EFI_HII_KEYBOARD_PACKAGE_HDR
;
1770 #define EFI_NULL_MODIFIER 0x0000
1771 #define EFI_LEFT_CONTROL_MODIFIER 0x0001
1772 #define EFI_RIGHT_CONTROL_MODIFIER 0x0002
1773 #define EFI_LEFT_ALT_MODIFIER 0x0003
1774 #define EFI_RIGHT_ALT_MODIFIER 0x0004
1775 #define EFI_ALT_GR_MODIFIER 0x0005
1776 #define EFI_INSERT_MODIFIER 0x0006
1777 #define EFI_DELETE_MODIFIER 0x0007
1778 #define EFI_PAGE_DOWN_MODIFIER 0x0008
1779 #define EFI_PAGE_UP_MODIFIER 0x0009
1780 #define EFI_HOME_MODIFIER 0x000A
1781 #define EFI_END_MODIFIER 0x000B
1782 #define EFI_LEFT_SHIFT_MODIFIER 0x000C
1783 #define EFI_RIGHT_SHIFT_MODIFIER 0x000D
1784 #define EFI_CAPS_LOCK_MODIFIER 0x000E
1785 #define EFI_NUM_LOCK_MODIFIER 0x000F
1786 #define EFI_LEFT_ARROW_MODIFIER 0x0010
1787 #define EFI_RIGHT_ARROW_MODIFIER 0x0011
1788 #define EFI_DOWN_ARROW_MODIFIER 0x0012
1789 #define EFI_UP_ARROW_MODIFIER 0x0013
1790 #define EFI_NS_KEY_MODIFIER 0x0014
1791 #define EFI_NS_KEY_DEPENDENCY_MODIFIER 0x0015
1792 #define EFI_FUNCTION_KEY_ONE_MODIFIER 0x0016
1793 #define EFI_FUNCTION_KEY_TWO_MODIFIER 0x0017
1794 #define EFI_FUNCTION_KEY_THREE_MODIFIER 0x0018
1795 #define EFI_FUNCTION_KEY_FOUR_MODIFIER 0x0019
1796 #define EFI_FUNCTION_KEY_FIVE_MODIFIER 0x001A
1797 #define EFI_FUNCTION_KEY_SIX_MODIFIER 0x001B
1798 #define EFI_FUNCTION_KEY_SEVEN_MODIFIER 0x001C
1799 #define EFI_FUNCTION_KEY_EIGHT_MODIFIER 0x001D
1800 #define EFI_FUNCTION_KEY_NINE_MODIFIER 0x001E
1801 #define EFI_FUNCTION_KEY_TEN_MODIFIER 0x001F
1802 #define EFI_FUNCTION_KEY_ELEVEN_MODIFIER 0x0020
1803 #define EFI_FUNCTION_KEY_TWELVE_MODIFIER 0x0021
1806 // Keys that have multiple control functions based on modifier
1807 // settings are handled in the keyboard driver implementation.
1808 // For instance, PRINT_KEY might have a modifier held down and
1809 // is still a nonprinting character, but might have an alternate
1810 // control function like SYSREQUEST
1812 #define EFI_PRINT_MODIFIER 0x0022
1813 #define EFI_SYS_REQUEST_MODIFIER 0x0023
1814 #define EFI_SCROLL_LOCK_MODIFIER 0x0024
1815 #define EFI_PAUSE_MODIFIER 0x0025
1816 #define EFI_BREAK_MODIFIER 0x0026
1818 #define EFI_LEFT_LOGO_MODIFIER 0x0027
1819 #define EFI_RIGHT_LOGO_MODIFIER 0x0028
1820 #define EFI_MENU_MODIFIER 0x0029
1823 /// Animation IFR opcode
1825 typedef struct _EFI_IFR_ANIMATION
{
1827 /// Standard opcode header, where Header.OpCode is
1828 /// EFI_IFR_ANIMATION_OP.
1830 EFI_IFR_OP_HEADER Header
;
1832 /// Animation identifier in the HII database.
1834 EFI_ANIMATION_ID Id
;
1835 } EFI_IFR_ANIMATION
;
1838 /// HII animation package header.
1840 typedef struct _EFI_HII_ANIMATION_PACKAGE_HDR
{
1842 /// Standard package header, where Header.Type = EFI_HII_PACKAGE_ANIMATIONS.
1844 EFI_HII_PACKAGE_HEADER Header
;
1846 /// Offset, relative to this header, of the animation information. If
1847 /// this is zero, then there are no animation sequences in the package.
1849 UINT32 AnimationInfoOffset
;
1850 } EFI_HII_ANIMATION_PACKAGE_HDR
;
1853 /// Animation information is encoded as a series of blocks,
1854 /// with each block prefixed by a single byte header EFI_HII_ANIMATION_BLOCK.
1856 typedef struct _EFI_HII_ANIMATION_BLOCK
{
1858 //UINT8 BlockBody[];
1859 } EFI_HII_ANIMATION_BLOCK
;
1862 /// Animation block types.
1864 #define EFI_HII_AIBT_END 0x00
1865 #define EFI_HII_AIBT_OVERLAY_IMAGES 0x10
1866 #define EFI_HII_AIBT_CLEAR_IMAGES 0x11
1867 #define EFI_HII_AIBT_RESTORE_SCRN 0x12
1868 #define EFI_HII_AIBT_OVERLAY_IMAGES_LOOP 0x18
1869 #define EFI_HII_AIBT_CLEAR_IMAGES_LOOP 0x19
1870 #define EFI_HII_AIBT_RESTORE_SCRN_LOOP 0x1A
1871 #define EFI_HII_AIBT_DUPLICATE 0x20
1872 #define EFI_HII_AIBT_SKIP2 0x21
1873 #define EFI_HII_AIBT_SKIP1 0x22
1874 #define EFI_HII_AIBT_EXT1 0x30
1875 #define EFI_HII_AIBT_EXT2 0x31
1876 #define EFI_HII_AIBT_EXT4 0x32
1879 /// Extended block headers used for variable sized animation records
1880 /// which need an explicit length.
1883 typedef struct _EFI_HII_AIBT_EXT1_BLOCK
{
1885 /// Standard animation header, where Header.BlockType = EFI_HII_AIBT_EXT1.
1887 EFI_HII_ANIMATION_BLOCK Header
;
1893 /// Size of the animation block, in bytes, including the animation block header.
1896 } EFI_HII_AIBT_EXT1_BLOCK
;
1898 typedef struct _EFI_HII_AIBT_EXT2_BLOCK
{
1900 /// Standard animation header, where Header.BlockType = EFI_HII_AIBT_EXT2.
1902 EFI_HII_ANIMATION_BLOCK Header
;
1908 /// Size of the animation block, in bytes, including the animation block header.
1911 } EFI_HII_AIBT_EXT2_BLOCK
;
1913 typedef struct _EFI_HII_AIBT_EXT4_BLOCK
{
1915 /// Standard animation header, where Header.BlockType = EFI_HII_AIBT_EXT4.
1917 EFI_HII_ANIMATION_BLOCK Header
;
1923 /// Size of the animation block, in bytes, including the animation block header.
1926 } EFI_HII_AIBT_EXT4_BLOCK
;
1928 typedef struct _EFI_HII_ANIMATION_CELL
{
1930 /// The X offset from the upper left hand corner of the logical
1931 /// window to position the indexed image.
1935 /// The Y offset from the upper left hand corner of the logical
1936 /// window to position the indexed image.
1940 /// The image to display at the specified offset from the upper left
1941 /// hand corner of the logical window.
1943 EFI_IMAGE_ID ImageId
;
1945 /// The number of milliseconds to delay after displaying the indexed
1946 /// image and before continuing on to the next linked image. If value
1947 /// is zero, no delay.
1950 } EFI_HII_ANIMATION_CELL
;
1953 /// An animation block to describe an animation sequence that does not cycle, and
1954 /// where one image is simply displayed over the previous image.
1956 typedef struct _EFI_HII_AIBT_OVERLAY_IMAGES_BLOCK
{
1958 /// This is image that is to be reference by the image protocols, if the
1959 /// animation function is not supported or disabled. This image can
1960 /// be one particular image from the animation sequence (if any one
1961 /// of the animation frames has a complete image) or an alternate
1962 /// image that can be displayed alone. If the value is zero, no image
1965 EFI_IMAGE_ID DftImageId
;
1967 /// The overall width of the set of images (logical window width).
1971 /// The overall height of the set of images (logical window height).
1975 /// The number of EFI_HII_ANIMATION_CELL contained in the
1976 /// animation sequence.
1980 /// An array of CellCount animation cells.
1982 EFI_HII_ANIMATION_CELL AnimationCell
[1];
1983 } EFI_HII_AIBT_OVERLAY_IMAGES_BLOCK
;
1986 /// An animation block to describe an animation sequence that does not cycle,
1987 /// and where the logical window is cleared to the specified color before
1988 /// the next image is displayed.
1990 typedef struct _EFI_HII_AIBT_CLEAR_IMAGES_BLOCK
{
1992 /// This is image that is to be reference by the image protocols, if the
1993 /// animation function is not supported or disabled. This image can
1994 /// be one particular image from the animation sequence (if any one
1995 /// of the animation frames has a complete image) or an alternate
1996 /// image that can be displayed alone. If the value is zero, no image
1999 EFI_IMAGE_ID DftImageId
;
2001 /// The overall width of the set of images (logical window width).
2005 /// The overall height of the set of images (logical window height).
2009 /// The number of EFI_HII_ANIMATION_CELL contained in the
2010 /// animation sequence.
2014 /// The color to clear the logical window to before displaying the
2017 EFI_HII_RGB_PIXEL BackgndColor
;
2019 /// An array of CellCount animation cells.
2021 EFI_HII_ANIMATION_CELL AnimationCell
[1];
2022 } EFI_HII_AIBT_CLEAR_IMAGES_BLOCK
;
2025 /// An animation block to describe an animation sequence that does not cycle,
2026 /// and where the screen is restored to the original state before the next
2027 /// image is displayed.
2029 typedef struct _EFI_HII_AIBT_RESTORE_SCRN_BLOCK
{
2031 /// This is image that is to be reference by the image protocols, if the
2032 /// animation function is not supported or disabled. This image can
2033 /// be one particular image from the animation sequence (if any one
2034 /// of the animation frames has a complete image) or an alternate
2035 /// image that can be displayed alone. If the value is zero, no image
2038 EFI_IMAGE_ID DftImageId
;
2040 /// The overall width of the set of images (logical window width).
2044 /// The overall height of the set of images (logical window height).
2048 /// The number of EFI_HII_ANIMATION_CELL contained in the
2049 /// animation sequence.
2053 /// An array of CellCount animation cells.
2055 EFI_HII_ANIMATION_CELL AnimationCell
[1];
2056 } EFI_HII_AIBT_RESTORE_SCRN_BLOCK
;
2059 /// An animation block to describe an animation sequence that continuously cycles,
2060 /// and where one image is simply displayed over the previous image.
2062 typedef EFI_HII_AIBT_OVERLAY_IMAGES_BLOCK EFI_HII_AIBT_OVERLAY_IMAGES_LOOP_BLOCK
;
2065 /// An animation block to describe an animation sequence that continuously cycles,
2066 /// and where the logical window is cleared to the specified color before
2067 /// the next image is displayed.
2069 typedef EFI_HII_AIBT_CLEAR_IMAGES_BLOCK EFI_HII_AIBT_CLEAR_IMAGES_LOOP_BLOCK
;
2072 /// An animation block to describe an animation sequence that continuously cycles,
2073 /// and where the screen is restored to the original state before
2074 /// the next image is displayed.
2076 typedef EFI_HII_AIBT_RESTORE_SCRN_BLOCK EFI_HII_AIBT_RESTORE_SCRN_LOOP_BLOCK
;
2079 /// Assigns a new character value to a previously defined animation sequence.
2081 typedef struct _EFI_HII_AIBT_DUPLICATE_BLOCK
{
2083 /// The previously defined animation ID with the exact same
2084 /// animation information.
2086 EFI_ANIMATION_ID AnimationId
;
2087 } EFI_HII_AIBT_DUPLICATE_BLOCK
;
2090 /// Skips animation IDs.
2092 typedef struct _EFI_HII_AIBT_SKIP1_BLOCK
{
2094 /// The unsigned 8-bit value to add to AnimationIdCurrent.
2097 } EFI_HII_AIBT_SKIP1_BLOCK
;
2100 /// Skips animation IDs.
2102 typedef struct _EFI_HII_AIBT_SKIP2_BLOCK
{
2104 /// The unsigned 16-bit value to add to AnimationIdCurrent.
2107 } EFI_HII_AIBT_SKIP2_BLOCK
;
2114 /// References to string tokens must use this macro to enable scanning for
2118 /// STRING_TOKEN is not defined in UEFI specification. But it is placed
2119 /// here for the easy access by C files and VFR source files.
2121 #define STRING_TOKEN(t) t
2124 /// IMAGE_TOKEN is not defined in UEFI specification. But it is placed
2125 /// here for the easy access by C files and VFR source files.
2127 #define IMAGE_TOKEN(t) t