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 - 2009, Intel Corporation
7 All rights reserved. This program and the accompanying materials
8 are licensed and made available under the terms and conditions of the BSD License
9 which accompanies this distribution. The full text of the license may be found at
10 http://opensource.org/licenses/bsd-license.php
12 THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
13 WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
15 @par Revision Reference:
16 These definitions are from UEFI2.1.
20 #ifndef __UEFI_INTERNAL_FORMREPRESENTATION_H__
21 #define __UEFI_INTERNAL_FORMREPRESENTATION_H__
23 #include <Guid/HiiFormMapMethodGuid.h>
26 /// The following types are currently defined:
28 typedef VOID
* EFI_HII_HANDLE
;
29 typedef CHAR16
* EFI_STRING
;
30 typedef UINT16 EFI_IMAGE_ID
;
31 typedef UINT16 EFI_QUESTION_ID
;
32 typedef UINT16 EFI_STRING_ID
;
33 typedef UINT16 EFI_FORM_ID
;
34 typedef UINT16 EFI_VARSTORE_ID
;
36 typedef UINT16 EFI_DEFAULT_ID
;
38 typedef UINT32 EFI_HII_FONT_STYLE
;
45 // Definitions for Package Lists and Package Headers
50 /// The header found at the start of each package list.
53 EFI_GUID PackageListGuid
;
55 } EFI_HII_PACKAGE_LIST_HEADER
;
58 /// The header found at the start of each package.
64 } EFI_HII_PACKAGE_HEADER
;
67 // Value of HII package type
69 #define EFI_HII_PACKAGE_TYPE_ALL 0x00
70 #define EFI_HII_PACKAGE_TYPE_GUID 0x01
71 #define EFI_HII_PACKAGE_FORMS 0x02
72 #define EFI_HII_PACKAGE_STRINGS 0x04
73 #define EFI_HII_PACKAGE_FONTS 0x05
74 #define EFI_HII_PACKAGE_IMAGES 0x06
75 #define EFI_HII_PACKAGE_SIMPLE_FONTS 0x07
76 #define EFI_HII_PACKAGE_DEVICE_PATH 0x08
77 #define EFI_HII_PACKAGE_KEYBOARD_LAYOUT 0x09
78 #define EFI_HII_PACKAGE_ANIMATIONS 0x0A
79 #define EFI_HII_PACKAGE_END 0xDF
80 #define EFI_HII_PACKAGE_TYPE_SYSTEM_BEGIN 0xE0
81 #define EFI_HII_PACKAGE_TYPE_SYSTEM_END 0xFF
84 // Definitions for Simplified Font Package
89 // Contents of EFI_NARROW_GLYPH.Attributes
91 #define EFI_GLYPH_NON_SPACING 0x01
92 #define EFI_GLYPH_WIDE 0x02
93 #define EFI_GLYPH_HEIGHT 19
94 #define EFI_GLYPH_WIDTH 8
99 UINT8 GlyphCol1
[EFI_GLYPH_HEIGHT
];
103 CHAR16 UnicodeWeight
;
105 UINT8 GlyphCol1
[EFI_GLYPH_HEIGHT
];
106 UINT8 GlyphCol2
[EFI_GLYPH_HEIGHT
];
111 /// A simplified font package consists of a font header
112 /// followed by a series of glyph structures.
114 typedef struct _EFI_HII_SIMPLE_FONT_PACKAGE_HDR
{
115 EFI_HII_PACKAGE_HEADER Header
;
116 UINT16 NumberOfNarrowGlyphs
;
117 UINT16 NumberOfWideGlyphs
;
118 // EFI_NARROW_GLYPH NarrowGlyphs[];
119 // EFI_WIDE_GLYPH WideGlyphs[];
120 } EFI_HII_SIMPLE_FONT_PACKAGE_HDR
;
123 // Definitions for Font Package
128 // Value for font style
130 #define EFI_HII_FONT_STYLE_NORMAL 0x00000000
131 #define EFI_HII_FONT_STYLE_BOLD 0x00000001
132 #define EFI_HII_FONT_STYLE_ITALIC 0x00000002
133 #define EFI_HII_FONT_STYLE_EMBOSS 0x00010000
134 #define EFI_HII_FONT_STYLE_OUTLINE 0x00020000
135 #define EFI_HII_FONT_STYLE_SHADOW 0x00040000
136 #define EFI_HII_FONT_STYLE_UNDERLINE 0x00080000
137 #define EFI_HII_FONT_STYLE_DBL_UNDER 0x00100000
139 typedef struct _EFI_HII_GLYPH_INFO
{
145 } EFI_HII_GLYPH_INFO
;
148 /// The fixed header consists of a standard record header and
149 /// then the character values in this section, the flags
150 /// (including the encoding method) and the offsets of the glyph
151 /// information, the glyph bitmaps and the character map.
153 typedef struct _EFI_HII_FONT_PACKAGE_HDR
{
154 EFI_HII_PACKAGE_HEADER Header
;
156 UINT32 GlyphBlockOffset
;
157 EFI_HII_GLYPH_INFO Cell
;
158 EFI_HII_FONT_STYLE FontStyle
;
159 CHAR16 FontFamily
[1];
160 } EFI_HII_FONT_PACKAGE_HDR
;
163 // Value of different glyph info block types
165 #define EFI_HII_GIBT_END 0x00
166 #define EFI_HII_GIBT_GLYPH 0x10
167 #define EFI_HII_GIBT_GLYPHS 0x11
168 #define EFI_HII_GIBT_GLYPH_DEFAULT 0x12
169 #define EFI_HII_GIBT_GLYPHS_DEFAULT 0x13
170 #define EFI_HII_GIBT_DUPLICATE 0x20
171 #define EFI_HII_GIBT_SKIP2 0x21
172 #define EFI_HII_GIBT_SKIP1 0x22
173 #define EFI_HII_GIBT_DEFAULTS 0x23
174 #define EFI_HII_GIBT_EXT1 0x30
175 #define EFI_HII_GIBT_EXT2 0x31
176 #define EFI_HII_GIBT_EXT4 0x32
178 typedef struct _EFI_HII_GLYPH_BLOCK
{
180 } EFI_HII_GLYPH_BLOCK
;
183 // Definition of different glyph info block types
186 typedef struct _EFI_HII_GIBT_DEFAULTS_BLOCK
{
187 EFI_HII_GLYPH_BLOCK Header
;
188 EFI_HII_GLYPH_INFO Cell
;
189 } EFI_HII_GIBT_DEFAULTS_BLOCK
;
191 typedef struct _EFI_HII_GIBT_DUPLICATE_BLOCK
{
192 EFI_HII_GLYPH_BLOCK Header
;
194 } EFI_HII_GIBT_DUPLICATE_BLOCK
;
196 typedef struct _EFI_GLYPH_GIBT_END_BLOCK
{
197 EFI_HII_GLYPH_BLOCK Header
;
198 } EFI_GLYPH_GIBT_END_BLOCK
;
200 typedef struct _EFI_HII_GIBT_EXT1_BLOCK
{
201 EFI_HII_GLYPH_BLOCK Header
;
204 } EFI_HII_GIBT_EXT1_BLOCK
;
206 typedef struct _EFI_HII_GIBT_EXT2_BLOCK
{
207 EFI_HII_GLYPH_BLOCK Header
;
210 } EFI_HII_GIBT_EXT2_BLOCK
;
212 typedef struct _EFI_HII_GIBT_EXT4_BLOCK
{
213 EFI_HII_GLYPH_BLOCK Header
;
216 } EFI_HII_GIBT_EXT4_BLOCK
;
218 typedef struct _EFI_HII_GIBT_GLYPH_BLOCK
{
219 EFI_HII_GLYPH_BLOCK Header
;
220 EFI_HII_GLYPH_INFO Cell
;
222 } EFI_HII_GIBT_GLYPH_BLOCK
;
224 typedef struct _EFI_HII_GIBT_GLYPHS_BLOCK
{
225 EFI_HII_GLYPH_BLOCK Header
;
226 EFI_HII_GLYPH_INFO Cell
;
229 } EFI_HII_GIBT_GLYPHS_BLOCK
;
231 typedef struct _EFI_HII_GIBT_GLYPH_DEFAULT_BLOCK
{
232 EFI_HII_GLYPH_BLOCK Header
;
234 } EFI_HII_GIBT_GLYPH_DEFAULT_BLOCK
;
236 typedef struct _EFI_HII_GIBT_GLYPHS_DEFAULT_BLOCK
{
237 EFI_HII_GLYPH_BLOCK Header
;
240 } EFI_HII_GIBT_GLYPHS_DEFAULT_BLOCK
;
242 typedef struct _EFI_HII_GIBT_SKIP1_BLOCK
{
243 EFI_HII_GLYPH_BLOCK Header
;
245 } EFI_HII_GIBT_SKIP1_BLOCK
;
247 typedef struct _EFI_HII_GIBT_SKIP2_BLOCK
{
248 EFI_HII_GLYPH_BLOCK Header
;
250 } EFI_HII_GIBT_SKIP2_BLOCK
;
253 // Definitions for Device Path Package
258 /// The device path package is used to carry a device path
259 /// associated with the package list.
261 typedef struct _EFI_HII_DEVICE_PATH_PACKAGE_HDR
{
262 EFI_HII_PACKAGE_HEADER Header
;
263 // EFI_DEVICE_PATH_PROTOCOL DevicePath[];
264 } EFI_HII_DEVICE_PATH_PACKAGE_HDR
;
267 // Definitions for GUID Package
272 /// The GUID package is used to carry data where the format is defined by a GUID.
274 typedef struct _EFI_HII_GUID_PACKAGE_HDR
{
275 EFI_HII_PACKAGE_HEADER Header
;
277 // Data per GUID definition may follow
278 } EFI_HII_GUID_PACKAGE_HDR
;
281 // Definitions for String Package
285 #define UEFI_CONFIG_LANG "x-UEFI"
286 #define UEFI_CONFIG_LANG2 "x-i-UEFI"
289 /// The fixed header consists of a standard record header and then the string identifiers
290 /// contained in this section and the offsets of the string and language information.
292 typedef struct _EFI_HII_STRING_PACKAGE_HDR
{
293 EFI_HII_PACKAGE_HEADER Header
;
295 UINT32 StringInfoOffset
;
296 CHAR16 LanguageWindow
[16];
297 EFI_STRING_ID LanguageName
;
299 } EFI_HII_STRING_PACKAGE_HDR
;
303 } EFI_HII_STRING_BLOCK
;
306 // Value of different string information block types
308 #define EFI_HII_SIBT_END 0x00
309 #define EFI_HII_SIBT_STRING_SCSU 0x10
310 #define EFI_HII_SIBT_STRING_SCSU_FONT 0x11
311 #define EFI_HII_SIBT_STRINGS_SCSU 0x12
312 #define EFI_HII_SIBT_STRINGS_SCSU_FONT 0x13
313 #define EFI_HII_SIBT_STRING_UCS2 0x14
314 #define EFI_HII_SIBT_STRING_UCS2_FONT 0x15
315 #define EFI_HII_SIBT_STRINGS_UCS2 0x16
316 #define EFI_HII_SIBT_STRINGS_UCS2_FONT 0x17
317 #define EFI_HII_SIBT_DUPLICATE 0x20
318 #define EFI_HII_SIBT_SKIP2 0x21
319 #define EFI_HII_SIBT_SKIP1 0x22
320 #define EFI_HII_SIBT_EXT1 0x30
321 #define EFI_HII_SIBT_EXT2 0x31
322 #define EFI_HII_SIBT_EXT4 0x32
323 #define EFI_HII_SIBT_FONT 0x40
326 // Definition of different string information block types
329 typedef struct _EFI_HII_SIBT_DUPLICATE_BLOCK
{
330 EFI_HII_STRING_BLOCK Header
;
331 EFI_STRING_ID StringId
;
332 } EFI_HII_SIBT_DUPLICATE_BLOCK
;
334 typedef struct _EFI_HII_SIBT_END_BLOCK
{
335 EFI_HII_STRING_BLOCK Header
;
336 } EFI_HII_SIBT_END_BLOCK
;
338 typedef struct _EFI_HII_SIBT_EXT1_BLOCK
{
339 EFI_HII_STRING_BLOCK Header
;
342 } EFI_HII_SIBT_EXT1_BLOCK
;
344 typedef struct _EFI_HII_SIBT_EXT2_BLOCK
{
345 EFI_HII_STRING_BLOCK Header
;
348 } EFI_HII_SIBT_EXT2_BLOCK
;
350 typedef struct _EFI_HII_SIBT_EXT4_BLOCK
{
351 EFI_HII_STRING_BLOCK Header
;
354 } EFI_HII_SIBT_EXT4_BLOCK
;
356 typedef struct _EFI_HII_SIBT_FONT_BLOCK
{
357 EFI_HII_SIBT_EXT2_BLOCK Header
;
360 EFI_HII_FONT_STYLE FontStyle
;
362 } EFI_HII_SIBT_FONT_BLOCK
;
364 typedef struct _EFI_HII_SIBT_SKIP1_BLOCK
{
365 EFI_HII_STRING_BLOCK Header
;
367 } EFI_HII_SIBT_SKIP1_BLOCK
;
369 typedef struct _EFI_HII_SIBT_SKIP2_BLOCK
{
370 EFI_HII_STRING_BLOCK Header
;
372 } EFI_HII_SIBT_SKIP2_BLOCK
;
374 typedef struct _EFI_HII_SIBT_STRING_SCSU_BLOCK
{
375 EFI_HII_STRING_BLOCK Header
;
377 } EFI_HII_SIBT_STRING_SCSU_BLOCK
;
379 typedef struct _EFI_HII_SIBT_STRING_SCSU_FONT_BLOCK
{
380 EFI_HII_STRING_BLOCK Header
;
381 UINT8 FontIdentifier
;
383 } EFI_HII_SIBT_STRING_SCSU_FONT_BLOCK
;
385 typedef struct _EFI_HII_SIBT_STRINGS_SCSU_BLOCK
{
386 EFI_HII_STRING_BLOCK Header
;
389 } EFI_HII_SIBT_STRINGS_SCSU_BLOCK
;
391 typedef struct _EFI_HII_SIBT_STRINGS_SCSU_FONT_BLOCK
{
392 EFI_HII_STRING_BLOCK Header
;
393 UINT8 FontIdentifier
;
396 } EFI_HII_SIBT_STRINGS_SCSU_FONT_BLOCK
;
398 typedef struct _EFI_HII_SIBT_STRING_UCS2_BLOCK
{
399 EFI_HII_STRING_BLOCK Header
;
400 CHAR16 StringText
[1];
401 } EFI_HII_SIBT_STRING_UCS2_BLOCK
;
403 typedef struct _EFI_HII_SIBT_STRING_UCS2_FONT_BLOCK
{
404 EFI_HII_STRING_BLOCK Header
;
405 UINT8 FontIdentifier
;
406 CHAR16 StringText
[1];
407 } EFI_HII_SIBT_STRING_UCS2_FONT_BLOCK
;
409 typedef struct _EFI_HII_SIBT_STRINGS_UCS2_BLOCK
{
410 EFI_HII_STRING_BLOCK Header
;
412 CHAR16 StringText
[1];
413 } EFI_HII_SIBT_STRINGS_UCS2_BLOCK
;
415 typedef struct _EFI_HII_SIBT_STRINGS_UCS2_FONT_BLOCK
{
416 EFI_HII_STRING_BLOCK Header
;
417 UINT8 FontIdentifier
;
419 CHAR16 StringText
[1];
420 } EFI_HII_SIBT_STRINGS_UCS2_FONT_BLOCK
;
423 // Definitions for Image Package
427 typedef struct _EFI_HII_IMAGE_PACKAGE_HDR
{
428 EFI_HII_PACKAGE_HEADER Header
;
429 UINT32 ImageInfoOffset
;
430 UINT32 PaletteInfoOffset
;
431 } EFI_HII_IMAGE_PACKAGE_HDR
;
433 typedef struct _EFI_HII_IMAGE_BLOCK
{
435 } EFI_HII_IMAGE_BLOCK
;
438 // Value of different image information block types
440 #define EFI_HII_IIBT_END 0x00
441 #define EFI_HII_IIBT_IMAGE_1BIT 0x10
442 #define EFI_HII_IIBT_IMAGE_1BIT_TRANS 0x11
443 #define EFI_HII_IIBT_IMAGE_4BIT 0x12
444 #define EFI_HII_IIBT_IMAGE_4BIT_TRANS 0x13
445 #define EFI_HII_IIBT_IMAGE_8BIT 0x14
446 #define EFI_HII_IIBT_IMAGE_8BIT_TRANS 0x15
447 #define EFI_HII_IIBT_IMAGE_24BIT 0x16
448 #define EFI_HII_IIBT_IMAGE_24BIT_TRANS 0x17
449 #define EFI_HII_IIBT_IMAGE_JPEG 0x18
450 #define EFI_HII_IIBT_DUPLICATE 0x20
451 #define EFI_HII_IIBT_SKIP2 0x21
452 #define EFI_HII_IIBT_SKIP1 0x22
453 #define EFI_HII_IIBT_EXT1 0x30
454 #define EFI_HII_IIBT_EXT2 0x31
455 #define EFI_HII_IIBT_EXT4 0x32
458 // Definition of different image information block types
461 typedef struct _EFI_HII_IIBT_END_BLOCK
{
462 EFI_HII_IMAGE_BLOCK Header
;
463 } EFI_HII_IIBT_END_BLOCK
;
465 typedef struct _EFI_HII_IIBT_EXT1_BLOCK
{
466 EFI_HII_IMAGE_BLOCK Header
;
469 } EFI_HII_IIBT_EXT1_BLOCK
;
471 typedef struct _EFI_HII_IIBT_EXT2_BLOCK
{
472 EFI_HII_IMAGE_BLOCK Header
;
475 } EFI_HII_IIBT_EXT2_BLOCK
;
477 typedef struct _EFI_HII_IIBT_EXT4_BLOCK
{
478 EFI_HII_IMAGE_BLOCK Header
;
481 } EFI_HII_IIBT_EXT4_BLOCK
;
483 typedef struct _EFI_HII_IIBT_IMAGE_1BIT_BASE
{
487 } EFI_HII_IIBT_IMAGE_1BIT_BASE
;
489 typedef struct _EFI_HII_IIBT_IMAGE_1BIT_BLOCK
{
490 EFI_HII_IMAGE_BLOCK Header
;
492 EFI_HII_IIBT_IMAGE_1BIT_BASE Bitmap
;
493 } EFI_HII_IIBT_IMAGE_1BIT_BLOCK
;
495 typedef struct _EFI_HII_IIBT_IMAGE_1BIT_TRANS_BLOCK
{
496 EFI_HII_IMAGE_BLOCK Header
;
498 EFI_HII_IIBT_IMAGE_1BIT_BASE Bitmap
;
499 } EFI_HII_IIBT_IMAGE_1BIT_TRANS_BLOCK
;
501 typedef struct _EFI_HII_RGB_PIXEL
{
507 typedef struct _EFI_HII_IIBT_IMAGE_24BIT_BASE
{
510 EFI_HII_RGB_PIXEL Bitmap
[1];
511 } EFI_HII_IIBT_IMAGE_24BIT_BASE
;
513 typedef struct _EFI_HII_IIBT_IMAGE_24BIT_BLOCK
{
514 EFI_HII_IMAGE_BLOCK Header
;
515 EFI_HII_IIBT_IMAGE_24BIT_BASE Bitmap
;
516 } EFI_HII_IIBT_IMAGE_24BIT_BLOCK
;
518 typedef struct _EFI_HII_IIBT_IMAGE_24BIT_TRANS_BLOCK
{
519 EFI_HII_IMAGE_BLOCK Header
;
520 EFI_HII_IIBT_IMAGE_24BIT_BASE Bitmap
;
521 } EFI_HII_IIBT_IMAGE_24BIT_TRANS_BLOCK
;
523 typedef struct _EFI_HII_IIBT_IMAGE_4BIT_BASE
{
527 } EFI_HII_IIBT_IMAGE_4BIT_BASE
;
529 typedef struct _EFI_HII_IIBT_IMAGE_4BIT_BLOCK
{
530 EFI_HII_IMAGE_BLOCK Header
;
532 EFI_HII_IIBT_IMAGE_4BIT_BASE Bitmap
;
533 } EFI_HII_IIBT_IMAGE_4BIT_BLOCK
;
535 typedef struct _EFI_HII_IIBT_IMAGE_4BIT_TRANS_BLOCK
{
536 EFI_HII_IMAGE_BLOCK Header
;
538 EFI_HII_IIBT_IMAGE_4BIT_BASE Bitmap
;
539 } EFI_HII_IIBT_IMAGE_4BIT_TRANS_BLOCK
;
541 typedef struct _EFI_HII_IIBT_IMAGE_8BIT_BASE
{
545 } EFI_HII_IIBT_IMAGE_8BIT_BASE
;
547 typedef struct _EFI_HII_IIBT_IMAGE_8BIT_PALETTE_BLOCK
{
548 EFI_HII_IMAGE_BLOCK Header
;
550 EFI_HII_IIBT_IMAGE_8BIT_BASE Bitmap
;
551 } EFI_HII_IIBT_IMAGE_8BIT_BLOCK
;
553 typedef struct _EFI_HII_IIBT_IMAGE_8BIT_TRANS_BLOCK
{
554 EFI_HII_IMAGE_BLOCK Header
;
556 EFI_HII_IIBT_IMAGE_8BIT_BASE Bitmap
;
557 } EFI_HII_IIBT_IMAGE_8BIT_TRAN_BLOCK
;
559 typedef struct _EFI_HII_IIBT_DUPLICATE_BLOCK
{
560 EFI_HII_IMAGE_BLOCK Header
;
561 EFI_IMAGE_ID ImageId
;
562 } EFI_HII_IIBT_DUPLICATE_BLOCK
;
564 typedef struct _EFI_HII_IIBT_JPEG_BLOCK
{
565 EFI_HII_IMAGE_BLOCK Header
;
568 } EFI_HII_IIBT_JPEG_BLOCK
;
570 typedef struct _EFI_HII_IIBT_SKIP1_BLOCK
{
571 EFI_HII_IMAGE_BLOCK Header
;
573 } EFI_HII_IIBT_SKIP1_BLOCK
;
575 typedef struct _EFI_HII_IIBT_SKIP2_BLOCK
{
576 EFI_HII_IMAGE_BLOCK Header
;
578 } EFI_HII_IIBT_SKIP2_BLOCK
;
581 // Definitions for Palette Information
584 typedef struct _EFI_HII_IMAGE_PALETTE_INFO_HEADER
{
586 } EFI_HII_IMAGE_PALETTE_INFO_HEADER
;
588 typedef struct _EFI_HII_IMAGE_PALETTE_INFO
{
590 EFI_HII_RGB_PIXEL PaletteValue
[1];
591 } EFI_HII_IMAGE_PALETTE_INFO
;
594 // Definitions for Forms Package
599 /// The Form package is used to carry form-based encoding data.
601 typedef struct _EFI_HII_FORM_PACKAGE_HDR
{
602 EFI_HII_PACKAGE_HEADER Header
;
603 // EFI_IFR_OP_HEADER OpCodeHeader;
604 // More op-codes follow
605 } EFI_HII_FORM_PACKAGE_HDR
;
627 EFI_STRING_ID string
; ///< EFI_IFR_TYPE_STRING, EFI_IFR_TYPE_ACTION
628 // UINT8 buffer[]; ///< EFI_IFR_TYPE_ORDERED_LIST
629 } EFI_IFR_TYPE_VALUE
;
634 #define EFI_IFR_FORM_OP 0x01
635 #define EFI_IFR_SUBTITLE_OP 0x02
636 #define EFI_IFR_TEXT_OP 0x03
637 #define EFI_IFR_IMAGE_OP 0x04
638 #define EFI_IFR_ONE_OF_OP 0x05
639 #define EFI_IFR_CHECKBOX_OP 0x06
640 #define EFI_IFR_NUMERIC_OP 0x07
641 #define EFI_IFR_PASSWORD_OP 0x08
642 #define EFI_IFR_ONE_OF_OPTION_OP 0x09
643 #define EFI_IFR_SUPPRESS_IF_OP 0x0A
644 #define EFI_IFR_LOCKED_OP 0x0B
645 #define EFI_IFR_ACTION_OP 0x0C
646 #define EFI_IFR_RESET_BUTTON_OP 0x0D
647 #define EFI_IFR_FORM_SET_OP 0x0E
648 #define EFI_IFR_REF_OP 0x0F
649 #define EFI_IFR_NO_SUBMIT_IF_OP 0x10
650 #define EFI_IFR_INCONSISTENT_IF_OP 0x11
651 #define EFI_IFR_EQ_ID_VAL_OP 0x12
652 #define EFI_IFR_EQ_ID_ID_OP 0x13
653 #define EFI_IFR_EQ_ID_LIST_OP 0x14
654 #define EFI_IFR_AND_OP 0x15
655 #define EFI_IFR_OR_OP 0x16
656 #define EFI_IFR_NOT_OP 0x17
657 #define EFI_IFR_RULE_OP 0x18
658 #define EFI_IFR_GRAY_OUT_IF_OP 0x19
659 #define EFI_IFR_DATE_OP 0x1A
660 #define EFI_IFR_TIME_OP 0x1B
661 #define EFI_IFR_STRING_OP 0x1C
662 #define EFI_IFR_REFRESH_OP 0x1D
663 #define EFI_IFR_DISABLE_IF_OP 0x1E
664 #define EFI_IFR_TO_LOWER_OP 0x20
665 #define EFI_IFR_TO_UPPER_OP 0x21
666 #define EFI_IFR_MAP_OP 0x22
667 #define EFI_IFR_ORDERED_LIST_OP 0x23
668 #define EFI_IFR_VARSTORE_OP 0x24
669 #define EFI_IFR_VARSTORE_NAME_VALUE_OP 0x25
670 #define EFI_IFR_VARSTORE_EFI_OP 0x26
671 #define EFI_IFR_VARSTORE_DEVICE_OP 0x27
672 #define EFI_IFR_VERSION_OP 0x28
673 #define EFI_IFR_END_OP 0x29
674 #define EFI_IFR_MATCH_OP 0x2A
675 #define EFI_IFR_SET_OP 0x2C
676 #define EFI_IFR_GET_OP 0x2B
677 #define EFI_IFR_READ_OP 0x2D
678 #define EFI_IFR_WRITE_OP 0x2E
679 #define EFI_IFR_EQUAL_OP 0x2F
680 #define EFI_IFR_NOT_EQUAL_OP 0x30
681 #define EFI_IFR_GREATER_THAN_OP 0x31
682 #define EFI_IFR_GREATER_EQUAL_OP 0x32
683 #define EFI_IFR_LESS_THAN_OP 0x33
684 #define EFI_IFR_LESS_EQUAL_OP 0x34
685 #define EFI_IFR_BITWISE_AND_OP 0x35
686 #define EFI_IFR_BITWISE_OR_OP 0x36
687 #define EFI_IFR_BITWISE_NOT_OP 0x37
688 #define EFI_IFR_SHIFT_LEFT_OP 0x38
689 #define EFI_IFR_SHIFT_RIGHT_OP 0x39
690 #define EFI_IFR_ADD_OP 0x3A
691 #define EFI_IFR_SUBTRACT_OP 0x3B
692 #define EFI_IFR_MULTIPLY_OP 0x3C
693 #define EFI_IFR_DIVIDE_OP 0x3D
694 #define EFI_IFR_MODULO_OP 0x3E
695 #define EFI_IFR_RULE_REF_OP 0x3F
696 #define EFI_IFR_QUESTION_REF1_OP 0x40
697 #define EFI_IFR_QUESTION_REF2_OP 0x41
698 #define EFI_IFR_UINT8_OP 0x42
699 #define EFI_IFR_UINT16_OP 0x43
700 #define EFI_IFR_UINT32_OP 0x44
701 #define EFI_IFR_UINT64_OP 0x45
702 #define EFI_IFR_TRUE_OP 0x46
703 #define EFI_IFR_FALSE_OP 0x47
704 #define EFI_IFR_TO_UINT_OP 0x48
705 #define EFI_IFR_TO_STRING_OP 0x49
706 #define EFI_IFR_TO_BOOLEAN_OP 0x4A
707 #define EFI_IFR_MID_OP 0x4B
708 #define EFI_IFR_FIND_OP 0x4C
709 #define EFI_IFR_TOKEN_OP 0x4D
710 #define EFI_IFR_STRING_REF1_OP 0x4E
711 #define EFI_IFR_STRING_REF2_OP 0x4F
712 #define EFI_IFR_CONDITIONAL_OP 0x50
713 #define EFI_IFR_QUESTION_REF3_OP 0x51
714 #define EFI_IFR_ZERO_OP 0x52
715 #define EFI_IFR_ONE_OP 0x53
716 #define EFI_IFR_ONES_OP 0x54
717 #define EFI_IFR_UNDEFINED_OP 0x55
718 #define EFI_IFR_LENGTH_OP 0x56
719 #define EFI_IFR_DUP_OP 0x57
720 #define EFI_IFR_THIS_OP 0x58
721 #define EFI_IFR_SPAN_OP 0x59
722 #define EFI_IFR_VALUE_OP 0x5A
723 #define EFI_IFR_DEFAULT_OP 0x5B
724 #define EFI_IFR_DEFAULTSTORE_OP 0x5C
725 #define EFI_IFR_FORM_MAP_OP 0x5D
726 #define EFI_IFR_CATENATE_OP 0x5E
727 #define EFI_IFR_GUID_OP 0x5F
728 #define EFI_IFR_SECURITY_OP 0x60
731 // Definitions of IFR Standard Headers
735 typedef struct _EFI_IFR_OP_HEADER
{
741 typedef struct _EFI_IFR_STATEMENT_HEADER
{
742 EFI_STRING_ID Prompt
;
744 } EFI_IFR_STATEMENT_HEADER
;
746 typedef struct _EFI_IFR_QUESTION_HEADER
{
747 EFI_IFR_STATEMENT_HEADER Header
;
748 EFI_QUESTION_ID QuestionId
;
749 EFI_VARSTORE_ID VarStoreId
;
751 EFI_STRING_ID VarName
;
755 } EFI_IFR_QUESTION_HEADER
;
758 // Flag values of EFI_IFR_QUESTION_HEADER
760 #define EFI_IFR_FLAG_READ_ONLY 0x01
761 #define EFI_IFR_FLAG_CALLBACK 0x04
762 #define EFI_IFR_FLAG_RESET_REQUIRED 0x10
763 #define EFI_IFR_FLAG_OPTIONS_ONLY 0x80
766 // Definition for Opcode Reference
769 typedef struct _EFI_IFR_DEFAULTSTORE
{
770 EFI_IFR_OP_HEADER Header
;
771 EFI_STRING_ID DefaultName
;
773 } EFI_IFR_DEFAULTSTORE
;
776 // Default Identifier of default store
778 #define EFI_HII_DEFAULT_CLASS_STANDARD 0x0000
779 #define EFI_HII_DEFAULT_CLASS_MANUFACTURING 0x0001
780 #define EFI_HII_DEFAULT_CLASS_SAFE 0x0002
781 #define EFI_HII_DEFAULT_CLASS_PLATFORM_BEGIN 0x4000
782 #define EFI_HII_DEFAULT_CLASS_PLATFORM_END 0x7fff
783 #define EFI_HII_DEFAULT_CLASS_HARDWARE_BEGIN 0x8000
784 #define EFI_HII_DEFAULT_CLASS_HARDWARE_END 0xbfff
785 #define EFI_HII_DEFAULT_CLASS_FIRMWARE_BEGIN 0xc000
786 #define EFI_HII_DEFAULT_CLASS_FIRMWARE_END 0xffff
788 typedef struct _EFI_IFR_VARSTORE
{
789 EFI_IFR_OP_HEADER Header
;
791 EFI_VARSTORE_ID VarStoreId
;
796 typedef struct _EFI_IFR_VARSTORE_EFI
{
797 EFI_IFR_OP_HEADER Header
;
798 EFI_VARSTORE_ID VarStoreId
;
801 } EFI_IFR_VARSTORE_EFI
;
803 typedef struct _EFI_IFR_VARSTORE_NAME_VALUE
{
804 EFI_IFR_OP_HEADER Header
;
805 EFI_VARSTORE_ID VarStoreId
;
807 } EFI_IFR_VARSTORE_NAME_VALUE
;
809 typedef struct _EFI_IFR_FORM_SET
{
810 EFI_IFR_OP_HEADER Header
;
812 EFI_STRING_ID FormSetTitle
;
815 // EFI_GUID ClassGuid[];
818 typedef struct _EFI_IFR_END
{
819 EFI_IFR_OP_HEADER Header
;
822 typedef struct _EFI_IFR_FORM
{
823 EFI_IFR_OP_HEADER Header
;
825 EFI_STRING_ID FormTitle
;
828 typedef struct _EFI_IFR_IMAGE
{
829 EFI_IFR_OP_HEADER Header
;
833 typedef struct _EFI_IFR_LOCKED
{
834 EFI_IFR_OP_HEADER Header
;
837 typedef struct _EFI_IFR_RULE
{
838 EFI_IFR_OP_HEADER Header
;
842 typedef struct _EFI_IFR_DEFAULT
{
843 EFI_IFR_OP_HEADER Header
;
846 EFI_IFR_TYPE_VALUE Value
;
849 typedef struct _EFI_IFR_VALUE
{
850 EFI_IFR_OP_HEADER Header
;
853 typedef struct _EFI_IFR_SUBTITLE
{
854 EFI_IFR_OP_HEADER Header
;
855 EFI_IFR_STATEMENT_HEADER Statement
;
859 #define EFI_IFR_FLAGS_HORIZONTAL 0x01
861 typedef struct _EFI_IFR_CHECKBOX
{
862 EFI_IFR_OP_HEADER Header
;
863 EFI_IFR_QUESTION_HEADER Question
;
867 #define EFI_IFR_CHECKBOX_DEFAULT 0x01
868 #define EFI_IFR_CHECKBOX_DEFAULT_MFG 0x02
870 typedef struct _EFI_IFR_TEXT
{
871 EFI_IFR_OP_HEADER Header
;
872 EFI_IFR_STATEMENT_HEADER Statement
;
873 EFI_STRING_ID TextTwo
;
876 typedef struct _EFI_IFR_REF
{
877 EFI_IFR_OP_HEADER Header
;
878 EFI_IFR_QUESTION_HEADER Question
;
882 typedef struct _EFI_IFR_REF2
{
883 EFI_IFR_OP_HEADER Header
;
884 EFI_IFR_QUESTION_HEADER Question
;
886 EFI_QUESTION_ID QuestionId
;
889 typedef struct _EFI_IFR_REF3
{
890 EFI_IFR_OP_HEADER Header
;
891 EFI_IFR_QUESTION_HEADER Question
;
893 EFI_QUESTION_ID QuestionId
;
897 typedef struct _EFI_IFR_REF4
{
898 EFI_IFR_OP_HEADER Header
;
899 EFI_IFR_QUESTION_HEADER Question
;
901 EFI_QUESTION_ID QuestionId
;
903 EFI_STRING_ID DevicePath
;
906 typedef struct _EFI_IFR_RESET_BUTTON
{
907 EFI_IFR_OP_HEADER Header
;
908 EFI_IFR_STATEMENT_HEADER Statement
;
909 EFI_DEFAULT_ID DefaultId
;
910 } EFI_IFR_RESET_BUTTON
;
912 typedef struct _EFI_IFR_ACTION
{
913 EFI_IFR_OP_HEADER Header
;
914 EFI_IFR_QUESTION_HEADER Question
;
915 EFI_STRING_ID QuestionConfig
;
918 typedef struct _EFI_IFR_ACTION_1
{
919 EFI_IFR_OP_HEADER Header
;
920 EFI_IFR_QUESTION_HEADER Question
;
923 typedef struct _EFI_IFR_DATE
{
924 EFI_IFR_OP_HEADER Header
;
925 EFI_IFR_QUESTION_HEADER Question
;
930 // Flags that describe the behavior of the question.
932 #define EFI_QF_DATE_YEAR_SUPPRESS 0x01
933 #define EFI_QF_DATE_MONTH_SUPPRESS 0x02
934 #define EFI_QF_DATE_DAY_SUPPRESS 0x04
936 #define EFI_QF_DATE_STORAGE 0x30
937 #define QF_DATE_STORAGE_NORMAL 0x00
938 #define QF_DATE_STORAGE_TIME 0x10
939 #define QF_DATE_STORAGE_WAKEUP 0x20
964 typedef struct _EFI_IFR_NUMERIC
{
965 EFI_IFR_OP_HEADER Header
;
966 EFI_IFR_QUESTION_HEADER Question
;
968 MINMAXSTEP_DATA data
;
972 // Flags related to the numeric question
974 #define EFI_IFR_NUMERIC_SIZE 0x03
975 #define EFI_IFR_NUMERIC_SIZE_1 0x00
976 #define EFI_IFR_NUMERIC_SIZE_2 0x01
977 #define EFI_IFR_NUMERIC_SIZE_4 0x02
978 #define EFI_IFR_NUMERIC_SIZE_8 0x03
980 #define EFI_IFR_DISPLAY 0x30
981 #define EFI_IFR_DISPLAY_INT_DEC 0x00
982 #define EFI_IFR_DISPLAY_UINT_DEC 0x10
983 #define EFI_IFR_DISPLAY_UINT_HEX 0x20
985 typedef struct _EFI_IFR_ONE_OF
{
986 EFI_IFR_OP_HEADER Header
;
987 EFI_IFR_QUESTION_HEADER Question
;
989 MINMAXSTEP_DATA data
;
992 typedef struct _EFI_IFR_STRING
{
993 EFI_IFR_OP_HEADER Header
;
994 EFI_IFR_QUESTION_HEADER Question
;
1000 #define EFI_IFR_STRING_MULTI_LINE 0x01
1002 typedef struct _EFI_IFR_PASSWORD
{
1003 EFI_IFR_OP_HEADER Header
;
1004 EFI_IFR_QUESTION_HEADER Question
;
1009 typedef struct _EFI_IFR_ORDERED_LIST
{
1010 EFI_IFR_OP_HEADER Header
;
1011 EFI_IFR_QUESTION_HEADER Question
;
1012 UINT8 MaxContainers
;
1014 } EFI_IFR_ORDERED_LIST
;
1016 #define EFI_IFR_UNIQUE_SET 0x01
1017 #define EFI_IFR_NO_EMPTY_SET 0x02
1019 typedef struct _EFI_IFR_TIME
{
1020 EFI_IFR_OP_HEADER Header
;
1021 EFI_IFR_QUESTION_HEADER Question
;
1026 // A bit-mask that determines which unique settings are active for this opcode.
1028 #define QF_TIME_HOUR_SUPPRESS 0x01
1029 #define QF_TIME_MINUTE_SUPPRESS 0x02
1030 #define QF_TIME_SECOND_SUPPRESS 0x04
1032 #define QF_TIME_STORAGE 0x30
1033 #define QF_TIME_STORAGE_NORMAL 0x00
1034 #define QF_TIME_STORAGE_TIME 0x10
1035 #define QF_TIME_STORAGE_WAKEUP 0x20
1037 typedef struct _EFI_IFR_DISABLE_IF
{
1038 EFI_IFR_OP_HEADER Header
;
1039 } EFI_IFR_DISABLE_IF
;
1041 typedef struct _EFI_IFR_SUPPRESS_IF
{
1042 EFI_IFR_OP_HEADER Header
;
1043 } EFI_IFR_SUPPRESS_IF
;
1045 typedef struct _EFI_IFR_GRAY_OUT_IF
{
1046 EFI_IFR_OP_HEADER Header
;
1047 } EFI_IFR_GRAY_OUT_IF
;
1049 typedef struct _EFI_IFR_INCONSISTENT_IF
{
1050 EFI_IFR_OP_HEADER Header
;
1051 EFI_STRING_ID Error
;
1052 } EFI_IFR_INCONSISTENT_IF
;
1054 typedef struct _EFI_IFR_NO_SUBMIT_IF
{
1055 EFI_IFR_OP_HEADER Header
;
1056 EFI_STRING_ID Error
;
1057 } EFI_IFR_NO_SUBMIT_IF
;
1059 typedef struct _EFI_IFR_REFRESH
{
1060 EFI_IFR_OP_HEADER Header
;
1061 UINT8 RefreshInterval
;
1064 typedef struct _EFI_IFR_VARSTORE_DEVICE
{
1065 EFI_IFR_OP_HEADER Header
;
1066 EFI_STRING_ID DevicePath
;
1067 } EFI_IFR_VARSTORE_DEVICE
;
1069 typedef struct _EFI_IFR_ONE_OF_OPTION
{
1070 EFI_IFR_OP_HEADER Header
;
1071 EFI_STRING_ID Option
;
1074 EFI_IFR_TYPE_VALUE Value
;
1075 } EFI_IFR_ONE_OF_OPTION
;
1078 // Types of the option's value.
1080 #define EFI_IFR_TYPE_NUM_SIZE_8 0x00
1081 #define EFI_IFR_TYPE_NUM_SIZE_16 0x01
1082 #define EFI_IFR_TYPE_NUM_SIZE_32 0x02
1083 #define EFI_IFR_TYPE_NUM_SIZE_64 0x03
1084 #define EFI_IFR_TYPE_BOOLEAN 0x04
1085 #define EFI_IFR_TYPE_TIME 0x05
1086 #define EFI_IFR_TYPE_DATE 0x06
1087 #define EFI_IFR_TYPE_STRING 0x07
1088 #define EFI_IFR_TYPE_OTHER 0x08
1089 #define EFI_IFR_TYPE_UNDEFINED 0x09
1090 #define EFI_IFR_TYPE_ACTION 0x0A
1091 #define EFI_IFR_TYPE_BUFFER 0x0B
1093 #define EFI_IFR_OPTION_DEFAULT 0x10
1094 #define EFI_IFR_OPTION_DEFAULT_MFG 0x20
1096 typedef struct _EFI_IFR_GUID
{
1097 EFI_IFR_OP_HEADER Header
;
1099 //Optional Data Follows
1102 typedef struct _EFI_IFR_DUP
{
1103 EFI_IFR_OP_HEADER Header
;
1106 typedef struct _EFI_IFR_EQ_ID_ID
{
1107 EFI_IFR_OP_HEADER Header
;
1108 EFI_QUESTION_ID QuestionId1
;
1109 EFI_QUESTION_ID QuestionId2
;
1112 typedef struct _EFI_IFR_EQ_ID_VAL
{
1113 EFI_IFR_OP_HEADER Header
;
1114 EFI_QUESTION_ID QuestionId
;
1116 } EFI_IFR_EQ_ID_VAL
;
1118 typedef struct _EFI_IFR_EQ_ID_VAL_LIST
{
1119 EFI_IFR_OP_HEADER Header
;
1120 EFI_QUESTION_ID QuestionId
;
1122 UINT16 ValueList
[1];
1123 } EFI_IFR_EQ_ID_VAL_LIST
;
1125 typedef struct _EFI_IFR_UINT8
{
1126 EFI_IFR_OP_HEADER Header
;
1130 typedef struct _EFI_IFR_UINT16
{
1131 EFI_IFR_OP_HEADER Header
;
1135 typedef struct _EFI_IFR_UINT32
{
1136 EFI_IFR_OP_HEADER Header
;
1140 typedef struct _EFI_IFR_UINT64
{
1141 EFI_IFR_OP_HEADER Header
;
1145 typedef struct _EFI_IFR_QUESTION_REF1
{
1146 EFI_IFR_OP_HEADER Header
;
1147 EFI_QUESTION_ID QuestionId
;
1148 } EFI_IFR_QUESTION_REF1
;
1150 typedef struct _EFI_IFR_QUESTION_REF2
{
1151 EFI_IFR_OP_HEADER Header
;
1152 } EFI_IFR_QUESTION_REF2
;
1154 typedef struct _EFI_IFR_QUESTION_REF3
{
1155 EFI_IFR_OP_HEADER Header
;
1156 } EFI_IFR_QUESTION_REF3
;
1158 typedef struct _EFI_IFR_QUESTION_REF3_2
{
1159 EFI_IFR_OP_HEADER Header
;
1160 EFI_STRING_ID DevicePath
;
1161 } EFI_IFR_QUESTION_REF3_2
;
1163 typedef struct _EFI_IFR_QUESTION_REF3_3
{
1164 EFI_IFR_OP_HEADER Header
;
1165 EFI_STRING_ID DevicePath
;
1167 } EFI_IFR_QUESTION_REF3_3
;
1169 typedef struct _EFI_IFR_RULE_REF
{
1170 EFI_IFR_OP_HEADER Header
;
1174 typedef struct _EFI_IFR_STRING_REF1
{
1175 EFI_IFR_OP_HEADER Header
;
1176 EFI_STRING_ID StringId
;
1177 } EFI_IFR_STRING_REF1
;
1179 typedef struct _EFI_IFR_STRING_REF2
{
1180 EFI_IFR_OP_HEADER Header
;
1181 } EFI_IFR_STRING_REF2
;
1183 typedef struct _EFI_IFR_THIS
{
1184 EFI_IFR_OP_HEADER Header
;
1187 typedef struct _EFI_IFR_TRUE
{
1188 EFI_IFR_OP_HEADER Header
;
1191 typedef struct _EFI_IFR_FALSE
{
1192 EFI_IFR_OP_HEADER Header
;
1195 typedef struct _EFI_IFR_ONE
{
1196 EFI_IFR_OP_HEADER Header
;
1199 typedef struct _EFI_IFR_ONES
{
1200 EFI_IFR_OP_HEADER Header
;
1203 typedef struct _EFI_IFR_ZERO
{
1204 EFI_IFR_OP_HEADER Header
;
1207 typedef struct _EFI_IFR_UNDEFINED
{
1208 EFI_IFR_OP_HEADER Header
;
1209 } EFI_IFR_UNDEFINED
;
1211 typedef struct _EFI_IFR_VERSION
{
1212 EFI_IFR_OP_HEADER Header
;
1215 typedef struct _EFI_IFR_LENGTH
{
1216 EFI_IFR_OP_HEADER Header
;
1219 typedef struct _EFI_IFR_NOT
{
1220 EFI_IFR_OP_HEADER Header
;
1223 typedef struct _EFI_IFR_BITWISE_NOT
{
1224 EFI_IFR_OP_HEADER Header
;
1225 } EFI_IFR_BITWISE_NOT
;
1227 typedef struct _EFI_IFR_TO_BOOLEAN
{
1228 EFI_IFR_OP_HEADER Header
;
1229 } EFI_IFR_TO_BOOLEAN
;
1232 // For EFI_IFR_TO_STRING, when converting from
1233 // unsigned integers, these flags control the format:
1234 // 0 = unsigned decimal
1235 // 1 = signed decimal
1236 // 2 = hexadecimal (lower-case alpha)
1237 // 3 = hexadecimal (upper-case alpha)
1239 #define EFI_IFR_STRING_UNSIGNED_DEC 0
1240 #define EFI_IFR_STRING_SIGNED_DEC 1
1241 #define EFI_IFR_STRING_LOWERCASE_HEX 2
1242 #define EFI_IFR_STRING_UPPERCASE_HEX 3
1244 // When converting from a buffer, these flags control the format:
1248 #define EFI_IFR_STRING_ASCII 0
1249 #define EFI_IFR_STRING_UNICODE 8
1251 typedef struct _EFI_IFR_TO_STRING
{
1252 EFI_IFR_OP_HEADER Header
;
1254 } EFI_IFR_TO_STRING
;
1256 typedef struct _EFI_IFR_TO_UINT
{
1257 EFI_IFR_OP_HEADER Header
;
1260 typedef struct _EFI_IFR_TO_UPPER
{
1261 EFI_IFR_OP_HEADER Header
;
1264 typedef struct _EFI_IFR_TO_LOWER
{
1265 EFI_IFR_OP_HEADER Header
;
1268 typedef struct _EFI_IFR_ADD
{
1269 EFI_IFR_OP_HEADER Header
;
1272 typedef struct _EFI_IFR_AND
{
1273 EFI_IFR_OP_HEADER Header
;
1276 typedef struct _EFI_IFR_BITWISE_AND
{
1277 EFI_IFR_OP_HEADER Header
;
1278 } EFI_IFR_BITWISE_AND
;
1280 typedef struct _EFI_IFR_BITWISE_OR
{
1281 EFI_IFR_OP_HEADER Header
;
1282 } EFI_IFR_BITWISE_OR
;
1284 typedef struct _EFI_IFR_CATENATE
{
1285 EFI_IFR_OP_HEADER Header
;
1288 typedef struct _EFI_IFR_DIVIDE
{
1289 EFI_IFR_OP_HEADER Header
;
1292 typedef struct _EFI_IFR_EQUAL
{
1293 EFI_IFR_OP_HEADER Header
;
1296 typedef struct _EFI_IFR_GREATER_EQUAL
{
1297 EFI_IFR_OP_HEADER Header
;
1298 } EFI_IFR_GREATER_EQUAL
;
1300 typedef struct _EFI_IFR_GREATER_THAN
{
1301 EFI_IFR_OP_HEADER Header
;
1302 } EFI_IFR_GREATER_THAN
;
1304 typedef struct _EFI_IFR_LESS_EQUAL
{
1305 EFI_IFR_OP_HEADER Header
;
1306 } EFI_IFR_LESS_EQUAL
;
1308 typedef struct _EFI_IFR_LESS_THAN
{
1309 EFI_IFR_OP_HEADER Header
;
1310 } EFI_IFR_LESS_THAN
;
1312 typedef struct _EFI_IFR_MATCH
{
1313 EFI_IFR_OP_HEADER Header
;
1316 typedef struct _EFI_IFR_MULTIPLY
{
1317 EFI_IFR_OP_HEADER Header
;
1320 typedef struct _EFI_IFR_MODULO
{
1321 EFI_IFR_OP_HEADER Header
;
1324 typedef struct _EFI_IFR_NOT_EQUAL
{
1325 EFI_IFR_OP_HEADER Header
;
1326 } EFI_IFR_NOT_EQUAL
;
1328 typedef struct _EFI_IFR_OR
{
1329 EFI_IFR_OP_HEADER Header
;
1332 typedef struct _EFI_IFR_SHIFT_LEFT
{
1333 EFI_IFR_OP_HEADER Header
;
1334 } EFI_IFR_SHIFT_LEFT
;
1336 typedef struct _EFI_IFR_SHIFT_RIGHT
{
1337 EFI_IFR_OP_HEADER Header
;
1338 } EFI_IFR_SHIFT_RIGHT
;
1340 typedef struct _EFI_IFR_SUBTRACT
{
1341 EFI_IFR_OP_HEADER Header
;
1344 typedef struct _EFI_IFR_CONDITIONAL
{
1345 EFI_IFR_OP_HEADER Header
;
1346 } EFI_IFR_CONDITIONAL
;
1349 // Flags governing the matching criteria of EFI_IFR_FIND
1351 #define EFI_IFR_FF_CASE_SENSITIVE 0x00
1352 #define EFI_IFR_FF_CASE_INSENSITIVE 0x01
1354 typedef struct _EFI_IFR_FIND
{
1355 EFI_IFR_OP_HEADER Header
;
1359 typedef struct _EFI_IFR_MID
{
1360 EFI_IFR_OP_HEADER Header
;
1363 typedef struct _EFI_IFR_TOKEN
{
1364 EFI_IFR_OP_HEADER Header
;
1368 // Flags specifying whether to find the first matching string
1369 // or the first non-matching string.
1371 #define EFI_IFR_FLAGS_FIRST_MATCHING 0x00
1372 #define EFI_IFR_FLAGS_FIRST_NON_MATCHING 0x01
1374 typedef struct _EFI_IFR_SPAN
{
1375 EFI_IFR_OP_HEADER Header
;
1379 typedef struct _EFI_IFR_SECURITY
{
1381 /// Standard opcode header, where Header.Op = EFI_IFR_SECURITY_OP.
1383 EFI_IFR_OP_HEADER Header
;
1385 /// Security permission level.
1387 EFI_GUID Permissions
;
1390 typedef struct _EFI_IFR_FORM_MAP_METHOD
{
1392 /// The string identifier which provides the human-readable name of
1393 /// the configuration method for this standards map form.
1395 EFI_STRING_ID MethodTitle
;
1397 /// Identifier which uniquely specifies the configuration methods
1398 /// associated with this standards map form.
1400 EFI_GUID MethodIdentifier
;
1401 } EFI_IFR_FORM_MAP_METHOD
;
1403 typedef struct _EFI_IFR_FORM_MAP
{
1405 /// The sequence that defines the type of opcode as well as the length
1406 /// of the opcode being defined. Header.OpCode = EFI_IFR_FORM_MAP_OP.
1408 EFI_IFR_OP_HEADER Header
;
1410 /// The unique identifier for this particular form.
1414 /// One or more configuration method's name and unique identifier.
1416 EFI_IFR_FORM_MAP_METHOD Methods
[1];
1419 typedef struct _EFI_IFR_SET
{
1421 /// The sequence that defines the type of opcode as well as the length
1422 /// of the opcode being defined. Header.OpCode = EFI_IFR_SET_OP.
1424 EFI_IFR_OP_HEADER Header
;
1426 /// Specifies the identifier of a previously declared variable store to
1427 /// use when storing the question's value.
1429 EFI_VARSTORE_ID VarStoreId
;
1432 /// A 16-bit Buffer Storage offset.
1434 EFI_STRING_ID VarName
;
1436 /// A Name Value or EFI Variable name (VarName).
1442 typedef struct _EFI_IFR_GET
{
1444 /// The sequence that defines the type of opcode as well as the length
1445 /// of the opcode being defined. Header.OpCode = EFI_IFR_GET_OP.
1447 EFI_IFR_OP_HEADER Header
;
1449 /// Specifies the identifier of a previously declared variable store to
1450 /// use when retrieving the value.
1452 EFI_VARSTORE_ID VarStoreId
;
1455 /// A 16-bit Buffer Storage offset.
1457 EFI_STRING_ID VarName
;
1459 /// A Name Value or EFI Variable name (VarName).
1464 /// Specifies the type used for storage.
1469 typedef struct _EFI_IFR_READ
{
1470 EFI_IFR_OP_HEADER Header
;
1473 typedef struct _EFI_IFR_WRITE
{
1474 EFI_IFR_OP_HEADER Header
;
1477 typedef struct _EFI_IFR_MAP
{
1478 EFI_IFR_OP_HEADER Header
;
1481 // Definitions for Keyboard Package
1482 // Releated definitions are in Section of EFI_HII_DATABASE_PROTOCOL
1486 /// Each enumeration values maps a physical key on a keyboard.
1599 CHAR16 ShiftedUnicode
;
1600 CHAR16 AltGrUnicode
;
1601 CHAR16 ShiftedAltGrUnicode
;
1603 UINT16 AffectedAttribute
;
1604 } EFI_KEY_DESCRIPTOR
;
1607 /// A key which is affected by all the standard shift modifiers.
1608 /// Most keys would be expected to have this bit active.
1610 #define EFI_AFFECTED_BY_STANDARD_SHIFT 0x0001
1613 /// This key is affected by the caps lock so that if a keyboard driver
1614 /// would need to disambiguate between a key which had a "1" defined
1615 /// versus an "a" character. Having this bit turned on would tell
1616 /// the keyboard driver to use the appropriate shifted state or not.
1618 #define EFI_AFFECTED_BY_CAPS_LOCK 0x0002
1621 /// Similar to the case of CAPS lock, if this bit is active, the key
1622 /// is affected by the num lock being turned on.
1624 #define EFI_AFFECTED_BY_NUM_LOCK 0x0004
1627 UINT16 LayoutLength
;
1629 UINT32 LayoutDescriptorStringOffset
;
1630 UINT8 DescriptorCount
;
1631 // EFI_KEY_DESCRIPTOR Descriptors[];
1632 } EFI_HII_KEYBOARD_LAYOUT
;
1635 EFI_HII_PACKAGE_HEADER Header
;
1637 // EFI_HII_KEYBOARD_LAYOUT Layout[];
1638 } EFI_HII_KEYBOARD_PACKAGE_HDR
;
1643 #define EFI_NULL_MODIFIER 0x0000
1644 #define EFI_LEFT_CONTROL_MODIFIER 0x0001
1645 #define EFI_RIGHT_CONTROL_MODIFIER 0x0002
1646 #define EFI_LEFT_ALT_MODIFIER 0x0003
1647 #define EFI_RIGHT_ALT_MODIFIER 0x0004
1648 #define EFI_ALT_GR_MODIFIER 0x0005
1649 #define EFI_INSERT_MODIFIER 0x0006
1650 #define EFI_DELETE_MODIFIER 0x0007
1651 #define EFI_PAGE_DOWN_MODIFIER 0x0008
1652 #define EFI_PAGE_UP_MODIFIER 0x0009
1653 #define EFI_HOME_MODIFIER 0x000A
1654 #define EFI_END_MODIFIER 0x000B
1655 #define EFI_LEFT_SHIFT_MODIFIER 0x000C
1656 #define EFI_RIGHT_SHIFT_MODIFIER 0x000D
1657 #define EFI_CAPS_LOCK_MODIFIER 0x000E
1658 #define EFI_NUM_LOCK_MODIFIER 0x000F
1659 #define EFI_LEFT_ARROW_MODIFIER 0x0010
1660 #define EFI_RIGHT_ARROW_MODIFIER 0x0011
1661 #define EFI_DOWN_ARROW_MODIFIER 0x0012
1662 #define EFI_UP_ARROW_MODIFIER 0x0013
1663 #define EFI_NS_KEY_MODIFIER 0x0014
1664 #define EFI_NS_KEY_DEPENDENCY_MODIFIER 0x0015
1665 #define EFI_FUNCTION_KEY_ONE_MODIFIER 0x0016
1666 #define EFI_FUNCTION_KEY_TWO_MODIFIER 0x0017
1667 #define EFI_FUNCTION_KEY_THREE_MODIFIER 0x0018
1668 #define EFI_FUNCTION_KEY_FOUR_MODIFIER 0x0019
1669 #define EFI_FUNCTION_KEY_FIVE_MODIFIER 0x001A
1670 #define EFI_FUNCTION_KEY_SIX_MODIFIER 0x001B
1671 #define EFI_FUNCTION_KEY_SEVEN_MODIFIER 0x001C
1672 #define EFI_FUNCTION_KEY_EIGHT_MODIFIER 0x001D
1673 #define EFI_FUNCTION_KEY_NINE_MODIFIER 0x001E
1674 #define EFI_FUNCTION_KEY_TEN_MODIFIER 0x001F
1675 #define EFI_FUNCTION_KEY_ELEVEN_MODIFIER 0x0020
1676 #define EFI_FUNCTION_KEY_TWELVE_MODIFIER 0x0021
1679 // Keys that have multiple control functions based on modifier
1680 // settings are handled in the keyboard driver implementation.
1681 // For instance, PRINT_KEY might have a modifier held down and
1682 // is still a nonprinting character, but might have an alternate
1683 // control function like SYSREQUEST
1685 #define EFI_PRINT_MODIFIER 0x0022
1686 #define EFI_SYS_REQUEST_MODIFIER 0x0023
1687 #define EFI_SCROLL_LOCK_MODIFIER 0x0024
1688 #define EFI_PAUSE_MODIFIER 0x0025
1689 #define EFI_BREAK_MODIFIER 0x0026
1691 #define EFI_LEFT_LOGO_MODIFIER 0x0027
1692 #define EFI_RIGHT_LOGO_MODIFIER 0x0028
1693 #define EFI_MENU_MODIFIER 0x0029
1700 /// References to string tokens must use this macro to enable scanning for
1704 /// STRING_TOKEN is not defined in UEFI specification. But it is placed
1705 /// here for the easy access by C files and VFR source files.
1707 #define STRING_TOKEN(t) t