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_REST_STYLE 0x20
829 #define EFI_IFR_FLAG_RECONNECT_REQUIRED 0x40
830 #define EFI_IFR_FLAG_OPTIONS_ONLY 0x80
833 // Definition for Opcode Reference
836 typedef struct _EFI_IFR_DEFAULTSTORE
{
837 EFI_IFR_OP_HEADER Header
;
838 EFI_STRING_ID DefaultName
;
840 } EFI_IFR_DEFAULTSTORE
;
843 // Default Identifier of default store
845 #define EFI_HII_DEFAULT_CLASS_STANDARD 0x0000
846 #define EFI_HII_DEFAULT_CLASS_MANUFACTURING 0x0001
847 #define EFI_HII_DEFAULT_CLASS_SAFE 0x0002
848 #define EFI_HII_DEFAULT_CLASS_PLATFORM_BEGIN 0x4000
849 #define EFI_HII_DEFAULT_CLASS_PLATFORM_END 0x7fff
850 #define EFI_HII_DEFAULT_CLASS_HARDWARE_BEGIN 0x8000
851 #define EFI_HII_DEFAULT_CLASS_HARDWARE_END 0xbfff
852 #define EFI_HII_DEFAULT_CLASS_FIRMWARE_BEGIN 0xc000
853 #define EFI_HII_DEFAULT_CLASS_FIRMWARE_END 0xffff
855 typedef struct _EFI_IFR_VARSTORE
{
856 EFI_IFR_OP_HEADER Header
;
858 EFI_VARSTORE_ID VarStoreId
;
863 typedef struct _EFI_IFR_VARSTORE_EFI
{
864 EFI_IFR_OP_HEADER Header
;
865 EFI_VARSTORE_ID VarStoreId
;
870 } EFI_IFR_VARSTORE_EFI
;
872 typedef struct _EFI_IFR_VARSTORE_NAME_VALUE
{
873 EFI_IFR_OP_HEADER Header
;
874 EFI_VARSTORE_ID VarStoreId
;
876 } EFI_IFR_VARSTORE_NAME_VALUE
;
878 typedef struct _EFI_IFR_FORM_SET
{
879 EFI_IFR_OP_HEADER Header
;
881 EFI_STRING_ID FormSetTitle
;
884 // EFI_GUID ClassGuid[];
887 typedef struct _EFI_IFR_END
{
888 EFI_IFR_OP_HEADER Header
;
891 typedef struct _EFI_IFR_FORM
{
892 EFI_IFR_OP_HEADER Header
;
894 EFI_STRING_ID FormTitle
;
897 typedef struct _EFI_IFR_IMAGE
{
898 EFI_IFR_OP_HEADER Header
;
902 typedef struct _EFI_IFR_MODAL_TAG
{
903 EFI_IFR_OP_HEADER Header
;
906 typedef struct _EFI_IFR_LOCKED
{
907 EFI_IFR_OP_HEADER Header
;
910 typedef struct _EFI_IFR_RULE
{
911 EFI_IFR_OP_HEADER Header
;
915 typedef struct _EFI_IFR_DEFAULT
{
916 EFI_IFR_OP_HEADER Header
;
919 EFI_IFR_TYPE_VALUE Value
;
922 typedef struct _EFI_IFR_DEFAULT_2
{
923 EFI_IFR_OP_HEADER Header
;
928 typedef struct _EFI_IFR_VALUE
{
929 EFI_IFR_OP_HEADER Header
;
932 typedef struct _EFI_IFR_SUBTITLE
{
933 EFI_IFR_OP_HEADER Header
;
934 EFI_IFR_STATEMENT_HEADER Statement
;
938 #define EFI_IFR_FLAGS_HORIZONTAL 0x01
940 typedef struct _EFI_IFR_CHECKBOX
{
941 EFI_IFR_OP_HEADER Header
;
942 EFI_IFR_QUESTION_HEADER Question
;
946 #define EFI_IFR_CHECKBOX_DEFAULT 0x01
947 #define EFI_IFR_CHECKBOX_DEFAULT_MFG 0x02
949 typedef struct _EFI_IFR_TEXT
{
950 EFI_IFR_OP_HEADER Header
;
951 EFI_IFR_STATEMENT_HEADER Statement
;
952 EFI_STRING_ID TextTwo
;
955 typedef struct _EFI_IFR_REF
{
956 EFI_IFR_OP_HEADER Header
;
957 EFI_IFR_QUESTION_HEADER Question
;
961 typedef struct _EFI_IFR_REF2
{
962 EFI_IFR_OP_HEADER Header
;
963 EFI_IFR_QUESTION_HEADER Question
;
965 EFI_QUESTION_ID QuestionId
;
968 typedef struct _EFI_IFR_REF3
{
969 EFI_IFR_OP_HEADER Header
;
970 EFI_IFR_QUESTION_HEADER Question
;
972 EFI_QUESTION_ID QuestionId
;
976 typedef struct _EFI_IFR_REF4
{
977 EFI_IFR_OP_HEADER Header
;
978 EFI_IFR_QUESTION_HEADER Question
;
980 EFI_QUESTION_ID QuestionId
;
982 EFI_STRING_ID DevicePath
;
985 typedef struct _EFI_IFR_REF5
{
986 EFI_IFR_OP_HEADER Header
;
987 EFI_IFR_QUESTION_HEADER Question
;
990 typedef struct _EFI_IFR_RESET_BUTTON
{
991 EFI_IFR_OP_HEADER Header
;
992 EFI_IFR_STATEMENT_HEADER Statement
;
993 EFI_DEFAULT_ID DefaultId
;
994 } EFI_IFR_RESET_BUTTON
;
996 typedef struct _EFI_IFR_ACTION
{
997 EFI_IFR_OP_HEADER Header
;
998 EFI_IFR_QUESTION_HEADER Question
;
999 EFI_STRING_ID QuestionConfig
;
1002 typedef struct _EFI_IFR_ACTION_1
{
1003 EFI_IFR_OP_HEADER Header
;
1004 EFI_IFR_QUESTION_HEADER Question
;
1007 typedef struct _EFI_IFR_DATE
{
1008 EFI_IFR_OP_HEADER Header
;
1009 EFI_IFR_QUESTION_HEADER Question
;
1014 // Flags that describe the behavior of the question.
1016 #define EFI_QF_DATE_YEAR_SUPPRESS 0x01
1017 #define EFI_QF_DATE_MONTH_SUPPRESS 0x02
1018 #define EFI_QF_DATE_DAY_SUPPRESS 0x04
1020 #define EFI_QF_DATE_STORAGE 0x30
1021 #define QF_DATE_STORAGE_NORMAL 0x00
1022 #define QF_DATE_STORAGE_TIME 0x10
1023 #define QF_DATE_STORAGE_WAKEUP 0x20
1048 typedef struct _EFI_IFR_NUMERIC
{
1049 EFI_IFR_OP_HEADER Header
;
1050 EFI_IFR_QUESTION_HEADER Question
;
1052 MINMAXSTEP_DATA data
;
1056 // Flags related to the numeric question
1058 #define EFI_IFR_NUMERIC_SIZE 0x03
1059 #define EFI_IFR_NUMERIC_SIZE_1 0x00
1060 #define EFI_IFR_NUMERIC_SIZE_2 0x01
1061 #define EFI_IFR_NUMERIC_SIZE_4 0x02
1062 #define EFI_IFR_NUMERIC_SIZE_8 0x03
1064 #define EFI_IFR_DISPLAY 0x30
1065 #define EFI_IFR_DISPLAY_INT_DEC 0x00
1066 #define EFI_IFR_DISPLAY_UINT_DEC 0x10
1067 #define EFI_IFR_DISPLAY_UINT_HEX 0x20
1069 typedef struct _EFI_IFR_ONE_OF
{
1070 EFI_IFR_OP_HEADER Header
;
1071 EFI_IFR_QUESTION_HEADER Question
;
1073 MINMAXSTEP_DATA data
;
1076 typedef struct _EFI_IFR_STRING
{
1077 EFI_IFR_OP_HEADER Header
;
1078 EFI_IFR_QUESTION_HEADER Question
;
1084 #define EFI_IFR_STRING_MULTI_LINE 0x01
1086 typedef struct _EFI_IFR_PASSWORD
{
1087 EFI_IFR_OP_HEADER Header
;
1088 EFI_IFR_QUESTION_HEADER Question
;
1093 typedef struct _EFI_IFR_ORDERED_LIST
{
1094 EFI_IFR_OP_HEADER Header
;
1095 EFI_IFR_QUESTION_HEADER Question
;
1096 UINT8 MaxContainers
;
1098 } EFI_IFR_ORDERED_LIST
;
1100 #define EFI_IFR_UNIQUE_SET 0x01
1101 #define EFI_IFR_NO_EMPTY_SET 0x02
1103 typedef struct _EFI_IFR_TIME
{
1104 EFI_IFR_OP_HEADER Header
;
1105 EFI_IFR_QUESTION_HEADER Question
;
1110 // A bit-mask that determines which unique settings are active for this opcode.
1112 #define QF_TIME_HOUR_SUPPRESS 0x01
1113 #define QF_TIME_MINUTE_SUPPRESS 0x02
1114 #define QF_TIME_SECOND_SUPPRESS 0x04
1116 #define QF_TIME_STORAGE 0x30
1117 #define QF_TIME_STORAGE_NORMAL 0x00
1118 #define QF_TIME_STORAGE_TIME 0x10
1119 #define QF_TIME_STORAGE_WAKEUP 0x20
1121 typedef struct _EFI_IFR_DISABLE_IF
{
1122 EFI_IFR_OP_HEADER Header
;
1123 } EFI_IFR_DISABLE_IF
;
1125 typedef struct _EFI_IFR_SUPPRESS_IF
{
1126 EFI_IFR_OP_HEADER Header
;
1127 } EFI_IFR_SUPPRESS_IF
;
1129 typedef struct _EFI_IFR_GRAY_OUT_IF
{
1130 EFI_IFR_OP_HEADER Header
;
1131 } EFI_IFR_GRAY_OUT_IF
;
1133 typedef struct _EFI_IFR_INCONSISTENT_IF
{
1134 EFI_IFR_OP_HEADER Header
;
1135 EFI_STRING_ID Error
;
1136 } EFI_IFR_INCONSISTENT_IF
;
1138 typedef struct _EFI_IFR_NO_SUBMIT_IF
{
1139 EFI_IFR_OP_HEADER Header
;
1140 EFI_STRING_ID Error
;
1141 } EFI_IFR_NO_SUBMIT_IF
;
1143 typedef struct _EFI_IFR_WARNING_IF
{
1144 EFI_IFR_OP_HEADER Header
;
1145 EFI_STRING_ID Warning
;
1147 } EFI_IFR_WARNING_IF
;
1149 typedef struct _EFI_IFR_REFRESH
{
1150 EFI_IFR_OP_HEADER Header
;
1151 UINT8 RefreshInterval
;
1154 typedef struct _EFI_IFR_VARSTORE_DEVICE
{
1155 EFI_IFR_OP_HEADER Header
;
1156 EFI_STRING_ID DevicePath
;
1157 } EFI_IFR_VARSTORE_DEVICE
;
1159 typedef struct _EFI_IFR_ONE_OF_OPTION
{
1160 EFI_IFR_OP_HEADER Header
;
1161 EFI_STRING_ID Option
;
1164 EFI_IFR_TYPE_VALUE Value
;
1165 } EFI_IFR_ONE_OF_OPTION
;
1168 // Types of the option's value.
1170 #define EFI_IFR_TYPE_NUM_SIZE_8 0x00
1171 #define EFI_IFR_TYPE_NUM_SIZE_16 0x01
1172 #define EFI_IFR_TYPE_NUM_SIZE_32 0x02
1173 #define EFI_IFR_TYPE_NUM_SIZE_64 0x03
1174 #define EFI_IFR_TYPE_BOOLEAN 0x04
1175 #define EFI_IFR_TYPE_TIME 0x05
1176 #define EFI_IFR_TYPE_DATE 0x06
1177 #define EFI_IFR_TYPE_STRING 0x07
1178 #define EFI_IFR_TYPE_OTHER 0x08
1179 #define EFI_IFR_TYPE_UNDEFINED 0x09
1180 #define EFI_IFR_TYPE_ACTION 0x0A
1181 #define EFI_IFR_TYPE_BUFFER 0x0B
1182 #define EFI_IFR_TYPE_REF 0x0C
1184 #define EFI_IFR_OPTION_DEFAULT 0x10
1185 #define EFI_IFR_OPTION_DEFAULT_MFG 0x20
1187 typedef struct _EFI_IFR_GUID
{
1188 EFI_IFR_OP_HEADER Header
;
1190 //Optional Data Follows
1193 typedef struct _EFI_IFR_REFRESH_ID
{
1194 EFI_IFR_OP_HEADER Header
;
1195 EFI_GUID RefreshEventGroupId
;
1196 } EFI_IFR_REFRESH_ID
;
1198 typedef struct _EFI_IFR_DUP
{
1199 EFI_IFR_OP_HEADER Header
;
1202 typedef struct _EFI_IFR_EQ_ID_ID
{
1203 EFI_IFR_OP_HEADER Header
;
1204 EFI_QUESTION_ID QuestionId1
;
1205 EFI_QUESTION_ID QuestionId2
;
1208 typedef struct _EFI_IFR_EQ_ID_VAL
{
1209 EFI_IFR_OP_HEADER Header
;
1210 EFI_QUESTION_ID QuestionId
;
1212 } EFI_IFR_EQ_ID_VAL
;
1214 typedef struct _EFI_IFR_EQ_ID_VAL_LIST
{
1215 EFI_IFR_OP_HEADER Header
;
1216 EFI_QUESTION_ID QuestionId
;
1218 UINT16 ValueList
[1];
1219 } EFI_IFR_EQ_ID_VAL_LIST
;
1221 typedef struct _EFI_IFR_UINT8
{
1222 EFI_IFR_OP_HEADER Header
;
1226 typedef struct _EFI_IFR_UINT16
{
1227 EFI_IFR_OP_HEADER Header
;
1231 typedef struct _EFI_IFR_UINT32
{
1232 EFI_IFR_OP_HEADER Header
;
1236 typedef struct _EFI_IFR_UINT64
{
1237 EFI_IFR_OP_HEADER Header
;
1241 typedef struct _EFI_IFR_QUESTION_REF1
{
1242 EFI_IFR_OP_HEADER Header
;
1243 EFI_QUESTION_ID QuestionId
;
1244 } EFI_IFR_QUESTION_REF1
;
1246 typedef struct _EFI_IFR_QUESTION_REF2
{
1247 EFI_IFR_OP_HEADER Header
;
1248 } EFI_IFR_QUESTION_REF2
;
1250 typedef struct _EFI_IFR_QUESTION_REF3
{
1251 EFI_IFR_OP_HEADER Header
;
1252 } EFI_IFR_QUESTION_REF3
;
1254 typedef struct _EFI_IFR_QUESTION_REF3_2
{
1255 EFI_IFR_OP_HEADER Header
;
1256 EFI_STRING_ID DevicePath
;
1257 } EFI_IFR_QUESTION_REF3_2
;
1259 typedef struct _EFI_IFR_QUESTION_REF3_3
{
1260 EFI_IFR_OP_HEADER Header
;
1261 EFI_STRING_ID DevicePath
;
1263 } EFI_IFR_QUESTION_REF3_3
;
1265 typedef struct _EFI_IFR_RULE_REF
{
1266 EFI_IFR_OP_HEADER Header
;
1270 typedef struct _EFI_IFR_STRING_REF1
{
1271 EFI_IFR_OP_HEADER Header
;
1272 EFI_STRING_ID StringId
;
1273 } EFI_IFR_STRING_REF1
;
1275 typedef struct _EFI_IFR_STRING_REF2
{
1276 EFI_IFR_OP_HEADER Header
;
1277 } EFI_IFR_STRING_REF2
;
1279 typedef struct _EFI_IFR_THIS
{
1280 EFI_IFR_OP_HEADER Header
;
1283 typedef struct _EFI_IFR_TRUE
{
1284 EFI_IFR_OP_HEADER Header
;
1287 typedef struct _EFI_IFR_FALSE
{
1288 EFI_IFR_OP_HEADER Header
;
1291 typedef struct _EFI_IFR_ONE
{
1292 EFI_IFR_OP_HEADER Header
;
1295 typedef struct _EFI_IFR_ONES
{
1296 EFI_IFR_OP_HEADER Header
;
1299 typedef struct _EFI_IFR_ZERO
{
1300 EFI_IFR_OP_HEADER Header
;
1303 typedef struct _EFI_IFR_UNDEFINED
{
1304 EFI_IFR_OP_HEADER Header
;
1305 } EFI_IFR_UNDEFINED
;
1307 typedef struct _EFI_IFR_VERSION
{
1308 EFI_IFR_OP_HEADER Header
;
1311 typedef struct _EFI_IFR_LENGTH
{
1312 EFI_IFR_OP_HEADER Header
;
1315 typedef struct _EFI_IFR_NOT
{
1316 EFI_IFR_OP_HEADER Header
;
1319 typedef struct _EFI_IFR_BITWISE_NOT
{
1320 EFI_IFR_OP_HEADER Header
;
1321 } EFI_IFR_BITWISE_NOT
;
1323 typedef struct _EFI_IFR_TO_BOOLEAN
{
1324 EFI_IFR_OP_HEADER Header
;
1325 } EFI_IFR_TO_BOOLEAN
;
1328 /// For EFI_IFR_TO_STRING, when converting from
1329 /// unsigned integers, these flags control the format:
1330 /// 0 = unsigned decimal.
1331 /// 1 = signed decimal.
1332 /// 2 = hexadecimal (lower-case alpha).
1333 /// 3 = hexadecimal (upper-case alpha).
1335 #define EFI_IFR_STRING_UNSIGNED_DEC 0
1336 #define EFI_IFR_STRING_SIGNED_DEC 1
1337 #define EFI_IFR_STRING_LOWERCASE_HEX 2
1338 #define EFI_IFR_STRING_UPPERCASE_HEX 3
1342 /// When converting from a buffer, these flags control the format:
1346 #define EFI_IFR_STRING_ASCII 0
1347 #define EFI_IFR_STRING_UNICODE 8
1350 typedef struct _EFI_IFR_TO_STRING
{
1351 EFI_IFR_OP_HEADER Header
;
1353 } EFI_IFR_TO_STRING
;
1355 typedef struct _EFI_IFR_TO_UINT
{
1356 EFI_IFR_OP_HEADER Header
;
1359 typedef struct _EFI_IFR_TO_UPPER
{
1360 EFI_IFR_OP_HEADER Header
;
1363 typedef struct _EFI_IFR_TO_LOWER
{
1364 EFI_IFR_OP_HEADER Header
;
1367 typedef struct _EFI_IFR_ADD
{
1368 EFI_IFR_OP_HEADER Header
;
1371 typedef struct _EFI_IFR_AND
{
1372 EFI_IFR_OP_HEADER Header
;
1375 typedef struct _EFI_IFR_BITWISE_AND
{
1376 EFI_IFR_OP_HEADER Header
;
1377 } EFI_IFR_BITWISE_AND
;
1379 typedef struct _EFI_IFR_BITWISE_OR
{
1380 EFI_IFR_OP_HEADER Header
;
1381 } EFI_IFR_BITWISE_OR
;
1383 typedef struct _EFI_IFR_CATENATE
{
1384 EFI_IFR_OP_HEADER Header
;
1387 typedef struct _EFI_IFR_DIVIDE
{
1388 EFI_IFR_OP_HEADER Header
;
1391 typedef struct _EFI_IFR_EQUAL
{
1392 EFI_IFR_OP_HEADER Header
;
1395 typedef struct _EFI_IFR_GREATER_EQUAL
{
1396 EFI_IFR_OP_HEADER Header
;
1397 } EFI_IFR_GREATER_EQUAL
;
1399 typedef struct _EFI_IFR_GREATER_THAN
{
1400 EFI_IFR_OP_HEADER Header
;
1401 } EFI_IFR_GREATER_THAN
;
1403 typedef struct _EFI_IFR_LESS_EQUAL
{
1404 EFI_IFR_OP_HEADER Header
;
1405 } EFI_IFR_LESS_EQUAL
;
1407 typedef struct _EFI_IFR_LESS_THAN
{
1408 EFI_IFR_OP_HEADER Header
;
1409 } EFI_IFR_LESS_THAN
;
1411 typedef struct _EFI_IFR_MATCH
{
1412 EFI_IFR_OP_HEADER Header
;
1415 typedef struct _EFI_IFR_MATCH2
{
1416 EFI_IFR_OP_HEADER Header
;
1417 EFI_GUID SyntaxType
;
1420 typedef struct _EFI_IFR_MULTIPLY
{
1421 EFI_IFR_OP_HEADER Header
;
1424 typedef struct _EFI_IFR_MODULO
{
1425 EFI_IFR_OP_HEADER Header
;
1428 typedef struct _EFI_IFR_NOT_EQUAL
{
1429 EFI_IFR_OP_HEADER Header
;
1430 } EFI_IFR_NOT_EQUAL
;
1432 typedef struct _EFI_IFR_OR
{
1433 EFI_IFR_OP_HEADER Header
;
1436 typedef struct _EFI_IFR_SHIFT_LEFT
{
1437 EFI_IFR_OP_HEADER Header
;
1438 } EFI_IFR_SHIFT_LEFT
;
1440 typedef struct _EFI_IFR_SHIFT_RIGHT
{
1441 EFI_IFR_OP_HEADER Header
;
1442 } EFI_IFR_SHIFT_RIGHT
;
1444 typedef struct _EFI_IFR_SUBTRACT
{
1445 EFI_IFR_OP_HEADER Header
;
1448 typedef struct _EFI_IFR_CONDITIONAL
{
1449 EFI_IFR_OP_HEADER Header
;
1450 } EFI_IFR_CONDITIONAL
;
1453 // Flags governing the matching criteria of EFI_IFR_FIND
1455 #define EFI_IFR_FF_CASE_SENSITIVE 0x00
1456 #define EFI_IFR_FF_CASE_INSENSITIVE 0x01
1458 typedef struct _EFI_IFR_FIND
{
1459 EFI_IFR_OP_HEADER Header
;
1463 typedef struct _EFI_IFR_MID
{
1464 EFI_IFR_OP_HEADER Header
;
1467 typedef struct _EFI_IFR_TOKEN
{
1468 EFI_IFR_OP_HEADER Header
;
1472 // Flags specifying whether to find the first matching string
1473 // or the first non-matching string.
1475 #define EFI_IFR_FLAGS_FIRST_MATCHING 0x00
1476 #define EFI_IFR_FLAGS_FIRST_NON_MATCHING 0x01
1478 typedef struct _EFI_IFR_SPAN
{
1479 EFI_IFR_OP_HEADER Header
;
1483 typedef struct _EFI_IFR_SECURITY
{
1485 /// Standard opcode header, where Header.Op = EFI_IFR_SECURITY_OP.
1487 EFI_IFR_OP_HEADER Header
;
1489 /// Security permission level.
1491 EFI_GUID Permissions
;
1494 typedef struct _EFI_IFR_FORM_MAP_METHOD
{
1496 /// The string identifier which provides the human-readable name of
1497 /// the configuration method for this standards map form.
1499 EFI_STRING_ID MethodTitle
;
1501 /// Identifier which uniquely specifies the configuration methods
1502 /// associated with this standards map form.
1504 EFI_GUID MethodIdentifier
;
1505 } EFI_IFR_FORM_MAP_METHOD
;
1507 typedef struct _EFI_IFR_FORM_MAP
{
1509 /// The sequence that defines the type of opcode as well as the length
1510 /// of the opcode being defined. Header.OpCode = EFI_IFR_FORM_MAP_OP.
1512 EFI_IFR_OP_HEADER Header
;
1514 /// The unique identifier for this particular form.
1518 /// One or more configuration method's name and unique identifier.
1520 // EFI_IFR_FORM_MAP_METHOD Methods[];
1523 typedef struct _EFI_IFR_SET
{
1525 /// The sequence that defines the type of opcode as well as the length
1526 /// of the opcode being defined. Header.OpCode = EFI_IFR_SET_OP.
1528 EFI_IFR_OP_HEADER Header
;
1530 /// Specifies the identifier of a previously declared variable store to
1531 /// use when storing the question's value.
1533 EFI_VARSTORE_ID VarStoreId
;
1536 /// A 16-bit Buffer Storage offset.
1538 EFI_STRING_ID VarName
;
1540 /// A Name Value or EFI Variable name (VarName).
1545 /// Specifies the type used for storage.
1550 typedef struct _EFI_IFR_GET
{
1552 /// The sequence that defines the type of opcode as well as the length
1553 /// of the opcode being defined. Header.OpCode = EFI_IFR_GET_OP.
1555 EFI_IFR_OP_HEADER Header
;
1557 /// Specifies the identifier of a previously declared variable store to
1558 /// use when retrieving the value.
1560 EFI_VARSTORE_ID VarStoreId
;
1563 /// A 16-bit Buffer Storage offset.
1565 EFI_STRING_ID VarName
;
1567 /// A Name Value or EFI Variable name (VarName).
1572 /// Specifies the type used for storage.
1577 typedef struct _EFI_IFR_READ
{
1578 EFI_IFR_OP_HEADER Header
;
1581 typedef struct _EFI_IFR_WRITE
{
1582 EFI_IFR_OP_HEADER Header
;
1585 typedef struct _EFI_IFR_MAP
{
1586 EFI_IFR_OP_HEADER Header
;
1589 // Definitions for Keyboard Package
1590 // Releated definitions are in Section of EFI_HII_DATABASE_PROTOCOL
1594 /// Each enumeration values maps a physical key on a keyboard.
1706 /// Used to describe a physical key on a keyboard.
1710 /// Unicode character code for the Key.
1714 /// Unicode character code for the key with the shift key being held down.
1716 CHAR16 ShiftedUnicode
;
1718 /// Unicode character code for the key with the Alt-GR being held down.
1720 CHAR16 AltGrUnicode
;
1722 /// Unicode character code for the key with the Alt-GR and shift keys being held down.
1724 CHAR16 ShiftedAltGrUnicode
;
1726 /// Modifier keys are defined to allow for special functionality that is not necessarily
1727 /// accomplished by a printable character. Many of these modifier keys are flags to toggle
1728 /// certain state bits on and off inside of a keyboard driver.
1731 UINT16 AffectedAttribute
;
1732 } EFI_KEY_DESCRIPTOR
;
1735 /// A key which is affected by all the standard shift modifiers.
1736 /// Most keys would be expected to have this bit active.
1738 #define EFI_AFFECTED_BY_STANDARD_SHIFT 0x0001
1741 /// This key is affected by the caps lock so that if a keyboard driver
1742 /// would need to disambiguate between a key which had a "1" defined
1743 /// versus an "a" character. Having this bit turned on would tell
1744 /// the keyboard driver to use the appropriate shifted state or not.
1746 #define EFI_AFFECTED_BY_CAPS_LOCK 0x0002
1749 /// Similar to the case of CAPS lock, if this bit is active, the key
1750 /// is affected by the num lock being turned on.
1752 #define EFI_AFFECTED_BY_NUM_LOCK 0x0004
1755 UINT16 LayoutLength
;
1757 UINT32 LayoutDescriptorStringOffset
;
1758 UINT8 DescriptorCount
;
1759 // EFI_KEY_DESCRIPTOR Descriptors[];
1760 } EFI_HII_KEYBOARD_LAYOUT
;
1763 EFI_HII_PACKAGE_HEADER Header
;
1765 // EFI_HII_KEYBOARD_LAYOUT Layout[];
1766 } EFI_HII_KEYBOARD_PACKAGE_HDR
;
1771 #define EFI_NULL_MODIFIER 0x0000
1772 #define EFI_LEFT_CONTROL_MODIFIER 0x0001
1773 #define EFI_RIGHT_CONTROL_MODIFIER 0x0002
1774 #define EFI_LEFT_ALT_MODIFIER 0x0003
1775 #define EFI_RIGHT_ALT_MODIFIER 0x0004
1776 #define EFI_ALT_GR_MODIFIER 0x0005
1777 #define EFI_INSERT_MODIFIER 0x0006
1778 #define EFI_DELETE_MODIFIER 0x0007
1779 #define EFI_PAGE_DOWN_MODIFIER 0x0008
1780 #define EFI_PAGE_UP_MODIFIER 0x0009
1781 #define EFI_HOME_MODIFIER 0x000A
1782 #define EFI_END_MODIFIER 0x000B
1783 #define EFI_LEFT_SHIFT_MODIFIER 0x000C
1784 #define EFI_RIGHT_SHIFT_MODIFIER 0x000D
1785 #define EFI_CAPS_LOCK_MODIFIER 0x000E
1786 #define EFI_NUM_LOCK_MODIFIER 0x000F
1787 #define EFI_LEFT_ARROW_MODIFIER 0x0010
1788 #define EFI_RIGHT_ARROW_MODIFIER 0x0011
1789 #define EFI_DOWN_ARROW_MODIFIER 0x0012
1790 #define EFI_UP_ARROW_MODIFIER 0x0013
1791 #define EFI_NS_KEY_MODIFIER 0x0014
1792 #define EFI_NS_KEY_DEPENDENCY_MODIFIER 0x0015
1793 #define EFI_FUNCTION_KEY_ONE_MODIFIER 0x0016
1794 #define EFI_FUNCTION_KEY_TWO_MODIFIER 0x0017
1795 #define EFI_FUNCTION_KEY_THREE_MODIFIER 0x0018
1796 #define EFI_FUNCTION_KEY_FOUR_MODIFIER 0x0019
1797 #define EFI_FUNCTION_KEY_FIVE_MODIFIER 0x001A
1798 #define EFI_FUNCTION_KEY_SIX_MODIFIER 0x001B
1799 #define EFI_FUNCTION_KEY_SEVEN_MODIFIER 0x001C
1800 #define EFI_FUNCTION_KEY_EIGHT_MODIFIER 0x001D
1801 #define EFI_FUNCTION_KEY_NINE_MODIFIER 0x001E
1802 #define EFI_FUNCTION_KEY_TEN_MODIFIER 0x001F
1803 #define EFI_FUNCTION_KEY_ELEVEN_MODIFIER 0x0020
1804 #define EFI_FUNCTION_KEY_TWELVE_MODIFIER 0x0021
1807 // Keys that have multiple control functions based on modifier
1808 // settings are handled in the keyboard driver implementation.
1809 // For instance, PRINT_KEY might have a modifier held down and
1810 // is still a nonprinting character, but might have an alternate
1811 // control function like SYSREQUEST
1813 #define EFI_PRINT_MODIFIER 0x0022
1814 #define EFI_SYS_REQUEST_MODIFIER 0x0023
1815 #define EFI_SCROLL_LOCK_MODIFIER 0x0024
1816 #define EFI_PAUSE_MODIFIER 0x0025
1817 #define EFI_BREAK_MODIFIER 0x0026
1819 #define EFI_LEFT_LOGO_MODIFIER 0x0027
1820 #define EFI_RIGHT_LOGO_MODIFIER 0x0028
1821 #define EFI_MENU_MODIFIER 0x0029
1824 /// Animation IFR opcode
1826 typedef struct _EFI_IFR_ANIMATION
{
1828 /// Standard opcode header, where Header.OpCode is
1829 /// EFI_IFR_ANIMATION_OP.
1831 EFI_IFR_OP_HEADER Header
;
1833 /// Animation identifier in the HII database.
1835 EFI_ANIMATION_ID Id
;
1836 } EFI_IFR_ANIMATION
;
1839 /// HII animation package header.
1841 typedef struct _EFI_HII_ANIMATION_PACKAGE_HDR
{
1843 /// Standard package header, where Header.Type = EFI_HII_PACKAGE_ANIMATIONS.
1845 EFI_HII_PACKAGE_HEADER Header
;
1847 /// Offset, relative to this header, of the animation information. If
1848 /// this is zero, then there are no animation sequences in the package.
1850 UINT32 AnimationInfoOffset
;
1851 } EFI_HII_ANIMATION_PACKAGE_HDR
;
1854 /// Animation information is encoded as a series of blocks,
1855 /// with each block prefixed by a single byte header EFI_HII_ANIMATION_BLOCK.
1857 typedef struct _EFI_HII_ANIMATION_BLOCK
{
1859 //UINT8 BlockBody[];
1860 } EFI_HII_ANIMATION_BLOCK
;
1863 /// Animation block types.
1865 #define EFI_HII_AIBT_END 0x00
1866 #define EFI_HII_AIBT_OVERLAY_IMAGES 0x10
1867 #define EFI_HII_AIBT_CLEAR_IMAGES 0x11
1868 #define EFI_HII_AIBT_RESTORE_SCRN 0x12
1869 #define EFI_HII_AIBT_OVERLAY_IMAGES_LOOP 0x18
1870 #define EFI_HII_AIBT_CLEAR_IMAGES_LOOP 0x19
1871 #define EFI_HII_AIBT_RESTORE_SCRN_LOOP 0x1A
1872 #define EFI_HII_AIBT_DUPLICATE 0x20
1873 #define EFI_HII_AIBT_SKIP2 0x21
1874 #define EFI_HII_AIBT_SKIP1 0x22
1875 #define EFI_HII_AIBT_EXT1 0x30
1876 #define EFI_HII_AIBT_EXT2 0x31
1877 #define EFI_HII_AIBT_EXT4 0x32
1880 /// Extended block headers used for variable sized animation records
1881 /// which need an explicit length.
1884 typedef struct _EFI_HII_AIBT_EXT1_BLOCK
{
1886 /// Standard animation header, where Header.BlockType = EFI_HII_AIBT_EXT1.
1888 EFI_HII_ANIMATION_BLOCK Header
;
1894 /// Size of the animation block, in bytes, including the animation block header.
1897 } EFI_HII_AIBT_EXT1_BLOCK
;
1899 typedef struct _EFI_HII_AIBT_EXT2_BLOCK
{
1901 /// Standard animation header, where Header.BlockType = EFI_HII_AIBT_EXT2.
1903 EFI_HII_ANIMATION_BLOCK Header
;
1909 /// Size of the animation block, in bytes, including the animation block header.
1912 } EFI_HII_AIBT_EXT2_BLOCK
;
1914 typedef struct _EFI_HII_AIBT_EXT4_BLOCK
{
1916 /// Standard animation header, where Header.BlockType = EFI_HII_AIBT_EXT4.
1918 EFI_HII_ANIMATION_BLOCK Header
;
1924 /// Size of the animation block, in bytes, including the animation block header.
1927 } EFI_HII_AIBT_EXT4_BLOCK
;
1929 typedef struct _EFI_HII_ANIMATION_CELL
{
1931 /// The X offset from the upper left hand corner of the logical
1932 /// window to position the indexed image.
1936 /// The Y offset from the upper left hand corner of the logical
1937 /// window to position the indexed image.
1941 /// The image to display at the specified offset from the upper left
1942 /// hand corner of the logical window.
1944 EFI_IMAGE_ID ImageId
;
1946 /// The number of milliseconds to delay after displaying the indexed
1947 /// image and before continuing on to the next linked image. If value
1948 /// is zero, no delay.
1951 } EFI_HII_ANIMATION_CELL
;
1954 /// An animation block to describe an animation sequence that does not cycle, and
1955 /// where one image is simply displayed over the previous image.
1957 typedef struct _EFI_HII_AIBT_OVERLAY_IMAGES_BLOCK
{
1959 /// This is image that is to be reference by the image protocols, if the
1960 /// animation function is not supported or disabled. This image can
1961 /// be one particular image from the animation sequence (if any one
1962 /// of the animation frames has a complete image) or an alternate
1963 /// image that can be displayed alone. If the value is zero, no image
1966 EFI_IMAGE_ID DftImageId
;
1968 /// The overall width of the set of images (logical window width).
1972 /// The overall height of the set of images (logical window height).
1976 /// The number of EFI_HII_ANIMATION_CELL contained in the
1977 /// animation sequence.
1981 /// An array of CellCount animation cells.
1983 EFI_HII_ANIMATION_CELL AnimationCell
[1];
1984 } EFI_HII_AIBT_OVERLAY_IMAGES_BLOCK
;
1987 /// An animation block to describe an animation sequence that does not cycle,
1988 /// and where the logical window is cleared to the specified color before
1989 /// the next image is displayed.
1991 typedef struct _EFI_HII_AIBT_CLEAR_IMAGES_BLOCK
{
1993 /// This is image that is to be reference by the image protocols, if the
1994 /// animation function is not supported or disabled. This image can
1995 /// be one particular image from the animation sequence (if any one
1996 /// of the animation frames has a complete image) or an alternate
1997 /// image that can be displayed alone. If the value is zero, no image
2000 EFI_IMAGE_ID DftImageId
;
2002 /// The overall width of the set of images (logical window width).
2006 /// The overall height of the set of images (logical window height).
2010 /// The number of EFI_HII_ANIMATION_CELL contained in the
2011 /// animation sequence.
2015 /// The color to clear the logical window to before displaying the
2018 EFI_HII_RGB_PIXEL BackgndColor
;
2020 /// An array of CellCount animation cells.
2022 EFI_HII_ANIMATION_CELL AnimationCell
[1];
2023 } EFI_HII_AIBT_CLEAR_IMAGES_BLOCK
;
2026 /// An animation block to describe an animation sequence that does not cycle,
2027 /// and where the screen is restored to the original state before the next
2028 /// image is displayed.
2030 typedef struct _EFI_HII_AIBT_RESTORE_SCRN_BLOCK
{
2032 /// This is image that is to be reference by the image protocols, if the
2033 /// animation function is not supported or disabled. This image can
2034 /// be one particular image from the animation sequence (if any one
2035 /// of the animation frames has a complete image) or an alternate
2036 /// image that can be displayed alone. If the value is zero, no image
2039 EFI_IMAGE_ID DftImageId
;
2041 /// The overall width of the set of images (logical window width).
2045 /// The overall height of the set of images (logical window height).
2049 /// The number of EFI_HII_ANIMATION_CELL contained in the
2050 /// animation sequence.
2054 /// An array of CellCount animation cells.
2056 EFI_HII_ANIMATION_CELL AnimationCell
[1];
2057 } EFI_HII_AIBT_RESTORE_SCRN_BLOCK
;
2060 /// An animation block to describe an animation sequence that continuously cycles,
2061 /// and where one image is simply displayed over the previous image.
2063 typedef EFI_HII_AIBT_OVERLAY_IMAGES_BLOCK EFI_HII_AIBT_OVERLAY_IMAGES_LOOP_BLOCK
;
2066 /// An animation block to describe an animation sequence that continuously cycles,
2067 /// and where the logical window is cleared to the specified color before
2068 /// the next image is displayed.
2070 typedef EFI_HII_AIBT_CLEAR_IMAGES_BLOCK EFI_HII_AIBT_CLEAR_IMAGES_LOOP_BLOCK
;
2073 /// An animation block to describe an animation sequence that continuously cycles,
2074 /// and where the screen is restored to the original state before
2075 /// the next image is displayed.
2077 typedef EFI_HII_AIBT_RESTORE_SCRN_BLOCK EFI_HII_AIBT_RESTORE_SCRN_LOOP_BLOCK
;
2080 /// Assigns a new character value to a previously defined animation sequence.
2082 typedef struct _EFI_HII_AIBT_DUPLICATE_BLOCK
{
2084 /// The previously defined animation ID with the exact same
2085 /// animation information.
2087 EFI_ANIMATION_ID AnimationId
;
2088 } EFI_HII_AIBT_DUPLICATE_BLOCK
;
2091 /// Skips animation IDs.
2093 typedef struct _EFI_HII_AIBT_SKIP1_BLOCK
{
2095 /// The unsigned 8-bit value to add to AnimationIdCurrent.
2098 } EFI_HII_AIBT_SKIP1_BLOCK
;
2101 /// Skips animation IDs.
2103 typedef struct _EFI_HII_AIBT_SKIP2_BLOCK
{
2105 /// The unsigned 16-bit value to add to AnimationIdCurrent.
2108 } EFI_HII_AIBT_SKIP2_BLOCK
;
2115 /// References to string tokens must use this macro to enable scanning for
2119 /// STRING_TOKEN is not defined in UEFI specification. But it is placed
2120 /// here for the easy access by C files and VFR source files.
2122 #define STRING_TOKEN(t) t
2125 /// IMAGE_TOKEN is not defined in UEFI specification. But it is placed
2126 /// here for the easy access by C files and VFR source files.
2128 #define IMAGE_TOKEN(t) t