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 - 2008, 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__
24 /// The following types are currently defined:
26 typedef UINT32 RELOFST
;
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_FORM 0x02
72 #define EFI_HII_PACKAGE_KEYBOARD_LAYOUT 0x03
73 #define EFI_HII_PACKAGE_STRINGS 0x04
74 #define EFI_HII_PACKAGE_FONTS 0x05
75 #define EFI_HII_PACKAGE_IMAGES 0x06
76 #define EFI_HII_PACKAGE_SIMPLE_FONTS 0x07
77 #define EFI_HII_PACKAGE_DEVICE_PATH 0x08
78 #define EFI_HII_PACKAGE_END 0xDF
79 #define EFI_HII_PACKAGE_TYPE_SYSTEM_BEGIN 0xE0
80 #define EFI_HII_PACKAGE_TYPE_SYSTEM_END 0xFF
83 // Definitions for Simplified Font Package
88 // Contents of EFI_NARROW_GLYPH.Attributes
90 #define EFI_GLYPH_NON_SPACING 0x01
91 #define EFI_GLYPH_WIDE 0x02
92 #define EFI_GLYPH_HEIGHT 19
93 #define EFI_GLYPH_WIDTH 8
98 UINT8 GlyphCol1
[EFI_GLYPH_HEIGHT
];
102 CHAR16 UnicodeWeight
;
104 UINT8 GlyphCol1
[EFI_GLYPH_HEIGHT
];
105 UINT8 GlyphCol2
[EFI_GLYPH_HEIGHT
];
110 /// A simplified font package consists of a font header
111 /// followed by a series of glyph structures.
113 typedef struct _EFI_HII_SIMPLE_FONT_PACKAGE_HDR
{
114 EFI_HII_PACKAGE_HEADER Header
;
115 UINT16 NumberOfNarrowGlyphs
;
116 UINT16 NumberOfWideGlyphs
;
117 // EFI_NARROW_GLYPH NarrowGlyphs[];
118 // EFI_WIDE_GLYPH WideGlyphs[];
119 } EFI_HII_SIMPLE_FONT_PACKAGE_HDR
;
122 // Definitions for Font Package
127 // Value for font style
129 #define EFI_HII_FONT_STYLE_NORMAL 0x00000000
130 #define EFI_HII_FONT_STYLE_BOLD 0x00000001
131 #define EFI_HII_FONT_STYLE_ITALIC 0x00000002
132 #define EFI_HII_FONT_STYLE_EMBOSS 0x00010000
133 #define EFI_HII_FONT_STYLE_OUTLINE 0x00020000
134 #define EFI_HII_FONT_STYLE_SHADOW 0x00040000
135 #define EFI_HII_FONT_STYLE_UNDERLINE 0x00080000
136 #define EFI_HII_FONT_STYLE_DBL_UNDER 0x00100000
138 typedef struct _EFI_HII_GLYPH_INFO
{
144 } EFI_HII_GLYPH_INFO
;
147 /// The fixed header consists of a standard record header and
148 /// then the character values in this section, the flags
149 /// (including the encoding method) and the offsets of the glyph
150 /// information, the glyph bitmaps and the character map.
152 typedef struct _EFI_HII_FONT_PACKAGE_HDR
{
153 EFI_HII_PACKAGE_HEADER Header
;
155 UINT32 GlyphBlockOffset
;
156 EFI_HII_GLYPH_INFO Cell
;
157 EFI_HII_FONT_STYLE FontStyle
;
158 CHAR16 FontFamily
[1];
159 } EFI_HII_FONT_PACKAGE_HDR
;
162 // Value of different glyph info block types
164 #define EFI_HII_GIBT_END 0x00
165 #define EFI_HII_GIBT_GLYPH 0x10
166 #define EFI_HII_GIBT_GLYPHS 0x11
167 #define EFI_HII_GIBT_GLYPH_DEFAULT 0x12
168 #define EFI_HII_GIBT_GLYPHS_DEFAULT 0x13
169 #define EFI_HII_GIBT_DUPLICATE 0x20
170 #define EFI_HII_GIBT_SKIP2 0x21
171 #define EFI_HII_GIBT_SKIP1 0x22
172 #define EFI_HII_GIBT_DEFAULTS 0x23
173 #define EFI_HII_GIBT_EXT1 0x30
174 #define EFI_HII_GIBT_EXT2 0x31
175 #define EFI_HII_GIBT_EXT4 0x32
177 typedef struct _EFI_HII_GLYPH_BLOCK
{
179 } EFI_HII_GLYPH_BLOCK
;
182 // Definition of different glyph info block types
185 typedef struct _EFI_HII_GIBT_DEFAULTS_BLOCK
{
186 EFI_HII_GLYPH_BLOCK Header
;
187 EFI_HII_GLYPH_INFO Cell
;
188 } EFI_HII_GIBT_DEFAULTS_BLOCK
;
190 typedef struct _EFI_HII_GIBT_DUPLICATE_BLOCK
{
191 EFI_HII_GLYPH_BLOCK Header
;
193 } EFI_HII_GIBT_DUPLICATE_BLOCK
;
195 typedef struct _EFI_GLYPH_GIBT_END_BLOCK
{
196 EFI_HII_GLYPH_BLOCK Header
;
197 } EFI_GLYPH_GIBT_END_BLOCK
;
199 typedef struct _EFI_HII_GIBT_EXT1_BLOCK
{
200 EFI_HII_GLYPH_BLOCK Header
;
203 } EFI_HII_GIBT_EXT1_BLOCK
;
205 typedef struct _EFI_HII_GIBT_EXT2_BLOCK
{
206 EFI_HII_GLYPH_BLOCK Header
;
209 } EFI_HII_GIBT_EXT2_BLOCK
;
211 typedef struct _EFI_HII_GIBT_EXT4_BLOCK
{
212 EFI_HII_GLYPH_BLOCK Header
;
215 } EFI_HII_GIBT_EXT4_BLOCK
;
217 typedef struct _EFI_HII_GIBT_GLYPH_BLOCK
{
218 EFI_HII_GLYPH_BLOCK Header
;
219 EFI_HII_GLYPH_INFO Cell
;
221 } EFI_HII_GIBT_GLYPH_BLOCK
;
223 typedef struct _EFI_HII_GIBT_GLYPHS_BLOCK
{
224 EFI_HII_GLYPH_BLOCK Header
;
225 EFI_HII_GLYPH_INFO Cell
;
228 } EFI_HII_GIBT_GLYPHS_BLOCK
;
230 typedef struct _EFI_HII_GIBT_GLYPH_DEFAULT_BLOCK
{
231 EFI_HII_GLYPH_BLOCK Header
;
233 } EFI_HII_GIBT_GLYPH_DEFAULT_BLOCK
;
235 typedef struct _EFI_HII_GIBT_GLYPHS_DEFAULT_BLOCK
{
236 EFI_HII_GLYPH_BLOCK Header
;
239 } EFI_HII_GIBT_GLYPHS_DEFAULT_BLOCK
;
241 typedef struct _EFI_HII_GIBT_SKIP1_BLOCK
{
242 EFI_HII_GLYPH_BLOCK Header
;
244 } EFI_HII_GIBT_SKIP1_BLOCK
;
246 typedef struct _EFI_HII_GIBT_SKIP2_BLOCK
{
247 EFI_HII_GLYPH_BLOCK Header
;
249 } EFI_HII_GIBT_SKIP2_BLOCK
;
252 // Definitions for Device Path Package
257 /// The device path package is used to carry a device path
258 /// associated with the package list.
260 typedef struct _EFI_HII_DEVICE_PATH_PACKAGE
{
261 EFI_HII_PACKAGE_HEADER Header
;
262 // EFI_DEVICE_PATH_PROTOCOL DevicePath[];
263 } EFI_HII_DEVICE_PATH_PACKAGE
;
266 // Definitions for GUID Package
271 /// The GUID package is used to carry data where the format is defined by a GUID.
273 typedef struct _EFI_HII_GUID_PACKAGE_HDR
{
274 EFI_HII_PACKAGE_HEADER Header
;
276 // Data per GUID definition may follow
277 } EFI_HII_GUID_PACKAGE_HDR
;
280 // Definitions for String Package
284 #define UEFI_CONFIG_LANG L"x-UEFI"
285 #define UEFI_CONFIG_LANG2 L"x-i-UEFI"
288 /// The fixed header consists of a standard record header and then the string identifiers
289 /// contained in this section and the offsets of the string and language information.
291 typedef struct _EFI_HII_STRING_PACKAGE_HDR
{
292 EFI_HII_PACKAGE_HEADER Header
;
294 UINT32 StringInfoOffset
;
295 CHAR16 LanguageWindow
[16];
296 EFI_STRING_ID LanguageName
;
298 } EFI_HII_STRING_PACKAGE_HDR
;
302 } EFI_HII_STRING_BLOCK
;
305 // Value of different string information block types
307 #define EFI_HII_SIBT_END 0x00
308 #define EFI_HII_SIBT_STRING_SCSU 0x10
309 #define EFI_HII_SIBT_STRING_SCSU_FONT 0x11
310 #define EFI_HII_SIBT_STRINGS_SCSU 0x12
311 #define EFI_HII_SIBT_STRINGS_SCSU_FONT 0x13
312 #define EFI_HII_SIBT_STRING_UCS2 0x14
313 #define EFI_HII_SIBT_STRING_UCS2_FONT 0x15
314 #define EFI_HII_SIBT_STRINGS_UCS2 0x16
315 #define EFI_HII_SIBT_STRINGS_UCS2_FONT 0x17
316 #define EFI_HII_SIBT_DUPLICATE 0x20
317 #define EFI_HII_SIBT_SKIP2 0x21
318 #define EFI_HII_SIBT_SKIP1 0x22
319 #define EFI_HII_SIBT_EXT1 0x30
320 #define EFI_HII_SIBT_EXT2 0x31
321 #define EFI_HII_SIBT_EXT4 0x32
322 #define EFI_HII_SIBT_FONT 0x40
325 // Definition of different string information block types
328 typedef struct _EFI_HII_SIBT_DUPLICATE_BLOCK
{
329 EFI_HII_STRING_BLOCK Header
;
330 EFI_STRING_ID StringId
;
331 } EFI_HII_SIBT_DUPLICATE_BLOCK
;
333 typedef struct _EFI_HII_SIBT_END_BLOCK
{
334 EFI_HII_STRING_BLOCK Header
;
335 } EFI_HII_SIBT_END_BLOCK
;
337 typedef struct _EFI_HII_SIBT_EXT1_BLOCK
{
338 EFI_HII_STRING_BLOCK Header
;
341 } EFI_HII_SIBT_EXT1_BLOCK
;
343 typedef struct _EFI_HII_SIBT_EXT2_BLOCK
{
344 EFI_HII_STRING_BLOCK Header
;
347 } EFI_HII_SIBT_EXT2_BLOCK
;
349 typedef struct _EFI_HII_SIBT_EXT4_BLOCK
{
350 EFI_HII_STRING_BLOCK Header
;
353 } EFI_HII_SIBT_EXT4_BLOCK
;
355 typedef struct _EFI_HII_SIBT_FONT_BLOCK
{
356 EFI_HII_SIBT_EXT2_BLOCK Header
;
359 EFI_HII_FONT_STYLE FontStyle
;
361 } EFI_HII_SIBT_FONT_BLOCK
;
363 typedef struct _EFI_HII_SIBT_SKIP1_BLOCK
{
364 EFI_HII_STRING_BLOCK Header
;
366 } EFI_HII_SIBT_SKIP1_BLOCK
;
368 typedef struct _EFI_HII_SIBT_SKIP2_BLOCK
{
369 EFI_HII_STRING_BLOCK Header
;
371 } EFI_HII_SIBT_SKIP2_BLOCK
;
373 typedef struct _EFI_HII_SIBT_STRING_SCSU_BLOCK
{
374 EFI_HII_STRING_BLOCK Header
;
376 } EFI_HII_SIBT_STRING_SCSU_BLOCK
;
378 typedef struct _EFI_HII_SIBT_STRING_SCSU_FONT_BLOCK
{
379 EFI_HII_STRING_BLOCK Header
;
380 UINT8 FontIdentifier
;
382 } EFI_HII_SIBT_STRING_SCSU_FONT_BLOCK
;
384 typedef struct _EFI_HII_SIBT_STRINGS_SCSU_BLOCK
{
385 EFI_HII_STRING_BLOCK Header
;
388 } EFI_HII_SIBT_STRINGS_SCSU_BLOCK
;
390 typedef struct _EFI_HII_SIBT_STRINGS_SCSU_FONT_BLOCK
{
391 EFI_HII_STRING_BLOCK Header
;
392 UINT8 FontIdentifier
;
395 } EFI_HII_SIBT_STRINGS_SCSU_FONT_BLOCK
;
397 typedef struct _EFI_HII_SIBT_STRING_UCS2_BLOCK
{
398 EFI_HII_STRING_BLOCK Header
;
399 CHAR16 StringText
[1];
400 } EFI_HII_SIBT_STRING_UCS2_BLOCK
;
402 typedef struct _EFI_HII_SIBT_STRING_UCS2_FONT_BLOCK
{
403 EFI_HII_STRING_BLOCK Header
;
404 UINT8 FontIdentifier
;
405 CHAR16 StringText
[1];
406 } EFI_HII_SIBT_STRING_UCS2_FONT_BLOCK
;
408 typedef struct _EFI_HII_SIBT_STRINGS_UCS2_BLOCK
{
409 EFI_HII_STRING_BLOCK Header
;
411 CHAR16 StringText
[1];
412 } EFI_HII_SIBT_STRINGS_UCS2_BLOCK
;
414 typedef struct _EFI_HII_SIBT_STRINGS_UCS2_FONT_BLOCK
{
415 EFI_HII_STRING_BLOCK Header
;
416 UINT8 FontIdentifier
;
418 CHAR16 StringText
[1];
419 } EFI_HII_SIBT_STRINGS_UCS2_FONT_BLOCK
;
422 // Definitions for Image Package
426 typedef struct _EFI_HII_IMAGE_PACKAGE_HDR
{
427 EFI_HII_PACKAGE_HEADER Header
;
428 UINT32 ImageInfoOffset
;
429 UINT32 PaletteInfoOffset
;
430 } EFI_HII_IMAGE_PACKAGE_HDR
;
432 typedef struct _EFI_HII_IMAGE_BLOCK
{
434 } EFI_HII_IMAGE_BLOCK
;
437 // Value of different image information block types
439 #define EFI_HII_IIBT_END 0x00
440 #define EFI_HII_IIBT_IMAGE_1BIT 0x10
441 #define EFI_HII_IIBT_IMAGE_1BIT_TRANS 0x11
442 #define EFI_HII_IIBT_IMAGE_4BIT 0x12
443 #define EFI_HII_IIBT_IMAGE_4BIT_TRANS 0x13
444 #define EFI_HII_IIBT_IMAGE_8BIT 0x14
445 #define EFI_HII_IIBT_IMAGE_8BIT_TRANS 0x15
446 #define EFI_HII_IIBT_IMAGE_24BIT 0x16
447 #define EFI_HII_IIBT_IMAGE_24BIT_TRANS 0x17
448 #define EFI_HII_IIBT_IMAGE_JPEG 0x18
449 #define EFI_HII_IIBT_DUPLICATE 0x20
450 #define EFI_HII_IIBT_SKIP2 0x21
451 #define EFI_HII_IIBT_SKIP1 0x22
452 #define EFI_HII_IIBT_EXT1 0x30
453 #define EFI_HII_IIBT_EXT2 0x31
454 #define EFI_HII_IIBT_EXT4 0x32
457 // Definition of different image information block types
460 typedef struct _EFI_HII_IIBT_END_BLOCK
{
461 EFI_HII_IMAGE_BLOCK Header
;
462 } EFI_HII_IIBT_END_BLOCK
;
464 typedef struct _EFI_HII_IIBT_EXT1_BLOCK
{
465 EFI_HII_IMAGE_BLOCK Header
;
468 } EFI_HII_IIBT_EXT1_BLOCK
;
470 typedef struct _EFI_HII_IIBT_EXT2_BLOCK
{
471 EFI_HII_IMAGE_BLOCK Header
;
474 } EFI_HII_IIBT_EXT2_BLOCK
;
476 typedef struct _EFI_HII_IIBT_EXT4_BLOCK
{
477 EFI_HII_IMAGE_BLOCK Header
;
480 } EFI_HII_IIBT_EXT4_BLOCK
;
482 typedef struct _EFI_HII_IIBT_IMAGE_1BIT_BASE
{
486 } EFI_HII_IIBT_IMAGE_1BIT_BASE
;
488 typedef struct _EFI_HII_IIBT_IMAGE_1BIT_BLOCK
{
489 EFI_HII_IMAGE_BLOCK Header
;
491 EFI_HII_IIBT_IMAGE_1BIT_BASE Bitmap
;
492 } EFI_HII_IIBT_IMAGE_1BIT_BLOCK
;
494 typedef struct _EFI_HII_IIBT_IMAGE_1BIT_TRANS_BLOCK
{
495 EFI_HII_IMAGE_BLOCK Header
;
497 EFI_HII_IIBT_IMAGE_1BIT_BASE Bitmap
;
498 } EFI_HII_IIBT_IMAGE_1BIT_TRANS_BLOCK
;
500 typedef struct _EFI_HII_RGB_PIXEL
{
506 typedef struct _EFI_HII_IIBT_IMAGE_24BIT_BASE
{
509 EFI_HII_RGB_PIXEL Bitmap
[1];
510 } EFI_HII_IIBT_IMAGE_24BIT_BASE
;
512 typedef struct _EFI_HII_IIBT_IMAGE_24BIT_BLOCK
{
513 EFI_HII_IMAGE_BLOCK Header
;
514 EFI_HII_IIBT_IMAGE_24BIT_BASE Bitmap
;
515 } EFI_HII_IIBT_IMAGE_24BIT_BLOCK
;
517 typedef struct _EFI_HII_IIBT_IMAGE_24BIT_TRANS_BLOCK
{
518 EFI_HII_IMAGE_BLOCK Header
;
519 EFI_HII_IIBT_IMAGE_24BIT_BASE Bitmap
;
520 } EFI_HII_IIBT_IMAGE_24BIT_TRANS_BLOCK
;
522 typedef struct _EFI_HII_IIBT_IMAGE_4BIT_BASE
{
526 } EFI_HII_IIBT_IMAGE_4BIT_BASE
;
528 typedef struct _EFI_HII_IIBT_IMAGE_4BIT_BLOCK
{
529 EFI_HII_IMAGE_BLOCK Header
;
531 EFI_HII_IIBT_IMAGE_4BIT_BASE Bitmap
;
532 } EFI_HII_IIBT_IMAGE_4BIT_BLOCK
;
534 typedef struct _EFI_HII_IIBT_IMAGE_4BIT_TRANS_BLOCK
{
535 EFI_HII_IMAGE_BLOCK Header
;
537 EFI_HII_IIBT_IMAGE_4BIT_BASE Bitmap
;
538 } EFI_HII_IIBT_IMAGE_4BIT_TRANS_BLOCK
;
540 typedef struct _EFI_HII_IIBT_IMAGE_8BIT_BASE
{
544 } EFI_HII_IIBT_IMAGE_8BIT_BASE
;
546 typedef struct _EFI_HII_IIBT_IMAGE_8BIT_PALETTE_BLOCK
{
547 EFI_HII_IMAGE_BLOCK Header
;
549 EFI_HII_IIBT_IMAGE_8BIT_BASE Bitmap
;
550 } EFI_HII_IIBT_IMAGE_8BIT_BLOCK
;
552 typedef struct _EFI_HII_IIBT_IMAGE_8BIT_TRANS_BLOCK
{
553 EFI_HII_IMAGE_BLOCK Header
;
555 EFI_HII_IIBT_IMAGE_8BIT_BASE Bitmap
;
556 } EFI_HII_IIBT_IMAGE_8BIT_TRAN_BLOCK
;
558 typedef struct _EFI_HII_IIBT_DUPLICATE_BLOCK
{
559 EFI_HII_IMAGE_BLOCK Header
;
560 EFI_IMAGE_ID ImageId
;
561 } EFI_HII_IIBT_DUPLICATE_BLOCK
;
563 typedef struct _EFI_HII_IIBT_JPEG_BLOCK
{
564 EFI_HII_IMAGE_BLOCK Header
;
567 } EFI_HII_IIBT_JPEG_BLOCK
;
569 typedef struct _EFI_HII_IIBT_SKIP1_BLOCK
{
570 EFI_HII_IMAGE_BLOCK Header
;
572 } EFI_HII_IIBT_SKIP1_BLOCK
;
574 typedef struct _EFI_HII_IIBT_SKIP2_BLOCK
{
575 EFI_HII_IMAGE_BLOCK Header
;
577 } EFI_HII_IIBT_SKIP2_BLOCK
;
580 // Definitions for Palette Information
583 typedef struct _EFI_HII_IMAGE_PALETTE_INFO_HEADER
{
585 } EFI_HII_IMAGE_PALETTE_INFO_HEADER
;
587 typedef struct _EFI_HII_IMAGE_PALETTE_INFO
{
589 EFI_HII_RGB_PIXEL PaletteValue
[1];
590 } EFI_HII_IMAGE_PALETTE_INFO
;
593 // Definitions for Forms Package
598 /// The Forms package is used to carry forms-based encoding data.
600 typedef struct _EFI_HII_FORM_PACKAGE
{
601 EFI_HII_PACKAGE_HEADER Header
;
602 // EFI_IFR_OP_HEADER OpCodeHeader;
603 // More op-codes follow
604 } EFI_HII_FORM_PACKAGE
;
626 EFI_STRING_ID string
;
627 } EFI_IFR_TYPE_VALUE
;
632 #define EFI_IFR_FORM_OP 0x01
633 #define EFI_IFR_SUBTITLE_OP 0x02
634 #define EFI_IFR_TEXT_OP 0x03
635 #define EFI_IFR_IMAGE_OP 0x04
636 #define EFI_IFR_ONE_OF_OP 0x05
637 #define EFI_IFR_CHECKBOX_OP 0x06
638 #define EFI_IFR_NUMERIC_OP 0x07
639 #define EFI_IFR_PASSWORD_OP 0x08
640 #define EFI_IFR_ONE_OF_OPTION_OP 0x09
641 #define EFI_IFR_SUPPRESS_IF_OP 0x0A
642 #define EFI_IFR_LOCKED_OP 0x0B
643 #define EFI_IFR_ACTION_OP 0x0C
644 #define EFI_IFR_RESET_BUTTON_OP 0x0D
645 #define EFI_IFR_FORM_SET_OP 0x0E
646 #define EFI_IFR_REF_OP 0x0F
647 #define EFI_IFR_NO_SUBMIT_IF_OP 0x10
648 #define EFI_IFR_INCONSISTENT_IF_OP 0x11
649 #define EFI_IFR_EQ_ID_VAL_OP 0x12
650 #define EFI_IFR_EQ_ID_ID_OP 0x13
651 #define EFI_IFR_EQ_ID_LIST_OP 0x14
652 #define EFI_IFR_AND_OP 0x15
653 #define EFI_IFR_OR_OP 0x16
654 #define EFI_IFR_NOT_OP 0x17
655 #define EFI_IFR_RULE_OP 0x18
656 #define EFI_IFR_GRAY_OUT_IF_OP 0x19
657 #define EFI_IFR_DATE_OP 0x1A
658 #define EFI_IFR_TIME_OP 0x1B
659 #define EFI_IFR_STRING_OP 0x1C
660 #define EFI_IFR_REFRESH_OP 0x1D
661 #define EFI_IFR_DISABLE_IF_OP 0x1E
662 #define EFI_IFR_TO_LOWER_OP 0x20
663 #define EFI_IFR_TO_UPPER_OP 0x21
664 #define EFI_IFR_ORDERED_LIST_OP 0x23
665 #define EFI_IFR_VARSTORE_OP 0x24
666 #define EFI_IFR_VARSTORE_NAME_VALUE_OP 0x25
667 #define EFI_IFR_VARSTORE_EFI_OP 0x26
668 #define EFI_IFR_VARSTORE_DEVICE_OP 0x27
669 #define EFI_IFR_VERSION_OP 0x28
670 #define EFI_IFR_END_OP 0x29
671 #define EFI_IFR_MATCH_OP 0x2A
672 #define EFI_IFR_EQUAL_OP 0x2F
673 #define EFI_IFR_NOT_EQUAL_OP 0x30
674 #define EFI_IFR_GREATER_THAN_OP 0x31
675 #define EFI_IFR_GREATER_EQUAL_OP 0x32
676 #define EFI_IFR_LESS_THAN_OP 0x33
677 #define EFI_IFR_LESS_EQUAL_OP 0x34
678 #define EFI_IFR_BITWISE_AND_OP 0x35
679 #define EFI_IFR_BITWISE_OR_OP 0x36
680 #define EFI_IFR_BITWISE_NOT_OP 0x37
681 #define EFI_IFR_SHIFT_LEFT_OP 0x38
682 #define EFI_IFR_SHIFT_RIGHT_OP 0x39
683 #define EFI_IFR_ADD_OP 0x3A
684 #define EFI_IFR_SUBTRACT_OP 0x3B
685 #define EFI_IFR_MULTIPLY_OP 0x3C
686 #define EFI_IFR_DIVIDE_OP 0x3D
687 #define EFI_IFR_MODULO_OP 0x3E
688 #define EFI_IFR_RULE_REF_OP 0x3F
689 #define EFI_IFR_QUESTION_REF1_OP 0x40
690 #define EFI_IFR_QUESTION_REF2_OP 0x41
691 #define EFI_IFR_UINT8_OP 0x42
692 #define EFI_IFR_UINT16_OP 0x43
693 #define EFI_IFR_UINT32_OP 0x44
694 #define EFI_IFR_UINT64_OP 0x45
695 #define EFI_IFR_TRUE_OP 0x46
696 #define EFI_IFR_FALSE_OP 0x47
697 #define EFI_IFR_TO_UINT_OP 0x48
698 #define EFI_IFR_TO_STRING_OP 0x49
699 #define EFI_IFR_TO_BOOLEAN_OP 0x4A
700 #define EFI_IFR_MID_OP 0x4B
701 #define EFI_IFR_FIND_OP 0x4C
702 #define EFI_IFR_TOKEN_OP 0x4D
703 #define EFI_IFR_STRING_REF1_OP 0x4E
704 #define EFI_IFR_STRING_REF2_OP 0x4F
705 #define EFI_IFR_CONDITIONAL_OP 0x50
706 #define EFI_IFR_QUESTION_REF3_OP 0x51
707 #define EFI_IFR_ZERO_OP 0x52
708 #define EFI_IFR_ONE_OP 0x53
709 #define EFI_IFR_ONES_OP 0x54
710 #define EFI_IFR_UNDEFINED_OP 0x55
711 #define EFI_IFR_LENGTH_OP 0x56
712 #define EFI_IFR_DUP_OP 0x57
713 #define EFI_IFR_THIS_OP 0x58
714 #define EFI_IFR_SPAN_OP 0x59
715 #define EFI_IFR_VALUE_OP 0x5A
716 #define EFI_IFR_DEFAULT_OP 0x5B
717 #define EFI_IFR_DEFAULTSTORE_OP 0x5C
718 #define EFI_IFR_CATENATE_OP 0x5E
719 #define EFI_IFR_GUID_OP 0x5F
722 // Definitions of IFR Standard Headers
726 typedef struct _EFI_IFR_OP_HEADER
{
732 typedef struct _EFI_IFR_STATEMENT_HEADER
{
733 EFI_STRING_ID Prompt
;
735 } EFI_IFR_STATEMENT_HEADER
;
737 typedef struct _EFI_IFR_QUESTION_HEADER
{
738 EFI_IFR_STATEMENT_HEADER Header
;
739 EFI_QUESTION_ID QuestionId
;
740 EFI_VARSTORE_ID VarStoreId
;
742 EFI_STRING_ID VarName
;
746 } EFI_IFR_QUESTION_HEADER
;
749 // Flag values of EFI_IFR_QUESTION_HEADER
751 #define EFI_IFR_FLAG_READ_ONLY 0x01
752 #define EFI_IFR_FLAG_CALLBACK 0x04
753 #define EFI_IFR_FLAG_RESET_REQUIRED 0x10
754 #define EFI_IFR_FLAG_OPTIONS_ONLY 0x80
757 // Definition for Opcode Reference
760 typedef struct _EFI_IFR_DEFAULTSTORE
{
761 EFI_IFR_OP_HEADER Header
;
762 EFI_STRING_ID DefaultName
;
764 } EFI_IFR_DEFAULTSTORE
;
767 // Default Identifier of default store
769 #define EFI_HII_DEFAULT_CLASS_STANDARD 0x0000
770 #define EFI_HII_DEFAULT_CLASS_MANUFACTURING 0x0001
771 #define EFI_HII_DEFAULT_CLASS_SAFE 0x0002
772 #define EFI_HII_DEFAULT_CLASS_PLATFORM_BEGIN 0x4000
773 #define EFI_HII_DEFAULT_CLASS_PLATFORM_END 0x7fff
774 #define EFI_HII_DEFAULT_CLASS_HARDWARE_BEGIN 0x8000
775 #define EFI_HII_DEFAULT_CLASS_HARDWARE_END 0xbfff
776 #define EFI_HII_DEFAULT_CLASS_FIRMWARE_BEGIN 0xc000
777 #define EFI_HII_DEFAULT_CLASS_FIRMWARE_END 0xffff
779 typedef struct _EFI_IFR_VARSTORE
{
780 EFI_IFR_OP_HEADER Header
;
782 EFI_VARSTORE_ID VarStoreId
;
787 typedef struct _EFI_IFR_VARSTORE_EFI
{
788 EFI_IFR_OP_HEADER Header
;
789 EFI_VARSTORE_ID VarStoreId
;
792 } EFI_IFR_VARSTORE_EFI
;
794 typedef struct _EFI_IFR_VARSTORE_NAME_VALUE
{
795 EFI_IFR_OP_HEADER Header
;
796 EFI_VARSTORE_ID VarStoreId
;
798 } EFI_IFR_VARSTORE_NAME_VALUE
;
800 typedef struct _EFI_IFR_FORM_SET
{
801 EFI_IFR_OP_HEADER Header
;
803 EFI_STRING_ID FormSetTitle
;
807 typedef struct _EFI_IFR_END
{
808 EFI_IFR_OP_HEADER Header
;
811 typedef struct _EFI_IFR_FORM
{
812 EFI_IFR_OP_HEADER Header
;
814 EFI_STRING_ID FormTitle
;
817 typedef struct _EFI_IFR_IMAGE
{
818 EFI_IFR_OP_HEADER Header
;
822 typedef struct _EFI_IFR_LOCKED
{
823 EFI_IFR_OP_HEADER Header
;
826 typedef struct _EFI_IFR_RULE
{
827 EFI_IFR_OP_HEADER Header
;
831 typedef struct _EFI_IFR_DEFAULT
{
832 EFI_IFR_OP_HEADER Header
;
835 EFI_IFR_TYPE_VALUE Value
;
838 typedef struct _EFI_IFR_VALUE
{
839 EFI_IFR_OP_HEADER Header
;
842 typedef struct _EFI_IFR_SUBTITLE
{
843 EFI_IFR_OP_HEADER Header
;
844 EFI_IFR_STATEMENT_HEADER Statement
;
848 #define EFI_IFR_FLAGS_HORIZONTAL 0x01
850 typedef struct _EFI_IFR_CHECKBOX
{
851 EFI_IFR_OP_HEADER Header
;
852 EFI_IFR_QUESTION_HEADER Question
;
856 #define EFI_IFR_CHECKBOX_DEFAULT 0x01
857 #define EFI_IFR_CHECKBOX_DEFAULT_MFG 0x02
859 typedef struct _EFI_IFR_TEXT
{
860 EFI_IFR_OP_HEADER Header
;
861 EFI_IFR_STATEMENT_HEADER Statement
;
862 EFI_STRING_ID TextTwo
;
865 typedef struct _EFI_IFR_REF
{
866 EFI_IFR_OP_HEADER Header
;
867 EFI_IFR_QUESTION_HEADER Question
;
871 typedef struct _EFI_IFR_REF2
{
872 EFI_IFR_OP_HEADER Header
;
873 EFI_IFR_QUESTION_HEADER Question
;
875 EFI_QUESTION_ID QuestionId
;
878 typedef struct _EFI_IFR_REF3
{
879 EFI_IFR_OP_HEADER Header
;
880 EFI_IFR_QUESTION_HEADER Question
;
882 EFI_QUESTION_ID QuestionId
;
886 typedef struct _EFI_IFR_REF4
{
887 EFI_IFR_OP_HEADER Header
;
888 EFI_IFR_QUESTION_HEADER Question
;
890 EFI_QUESTION_ID QuestionId
;
892 EFI_STRING_ID DevicePath
;
895 typedef struct _EFI_IFR_RESET_BUTTON
{
896 EFI_IFR_OP_HEADER Header
;
897 EFI_IFR_QUESTION_HEADER Question
;
898 EFI_DEFAULT_ID DefaultId
;
899 } EFI_IFR_RESET_BUTTON
;
901 typedef struct _EFI_IFR_ACTION
{
902 EFI_IFR_OP_HEADER Header
;
903 EFI_IFR_QUESTION_HEADER Question
;
904 EFI_STRING_ID QuestionConfig
;
907 typedef struct _EFI_IFR_ACTION_1
{
908 EFI_IFR_OP_HEADER Header
;
909 EFI_IFR_QUESTION_HEADER Question
;
912 typedef struct _EFI_IFR_DATE
{
913 EFI_IFR_OP_HEADER Header
;
914 EFI_IFR_QUESTION_HEADER Question
;
919 // Flags that describe the behavior of the question.
921 #define EFI_QF_DATE_YEAR_SUPPRESS 0x01
922 #define EFI_QF_DATE_MONTH_SUPPRESS 0x02
923 #define EFI_QF_DATE_DAY_SUPPRESS 0x04
925 #define EFI_QF_DATE_STORAGE 0x30
926 #define QF_DATE_STORAGE_NORMAL 0x00
927 #define QF_DATE_STORAGE_TIME 0x10
928 #define QF_DATE_STORAGE_WAKEUP 0x20
953 typedef struct _EFI_IFR_NUMERIC
{
954 EFI_IFR_OP_HEADER Header
;
955 EFI_IFR_QUESTION_HEADER Question
;
957 MINMAXSTEP_DATA data
;
961 // Flags related to the numeric question
963 #define EFI_IFR_NUMERIC_SIZE 0x03
964 #define EFI_IFR_NUMERIC_SIZE_1 0x00
965 #define EFI_IFR_NUMERIC_SIZE_2 0x01
966 #define EFI_IFR_NUMERIC_SIZE_4 0x02
967 #define EFI_IFR_NUMERIC_SIZE_8 0x03
969 #define EFI_IFR_DISPLAY 0x30
970 #define EFI_IFR_DISPLAY_INT_DEC 0x00
971 #define EFI_IFR_DISPLAY_UINT_DEC 0x10
972 #define EFI_IFR_DISPLAY_UINT_HEX 0x20
974 typedef struct _EFI_IFR_ONE_OF
{
975 EFI_IFR_OP_HEADER Header
;
976 EFI_IFR_QUESTION_HEADER Question
;
978 MINMAXSTEP_DATA data
;
981 typedef struct _EFI_IFR_STRING
{
982 EFI_IFR_OP_HEADER Header
;
983 EFI_IFR_QUESTION_HEADER Question
;
989 #define EFI_IFR_STRING_MULTI_LINE 0x01
991 typedef struct _EFI_IFR_PASSWORD
{
992 EFI_IFR_OP_HEADER Header
;
993 EFI_IFR_QUESTION_HEADER Question
;
998 typedef struct _EFI_IFR_ORDERED_LIST
{
999 EFI_IFR_OP_HEADER Header
;
1000 EFI_IFR_QUESTION_HEADER Question
;
1001 UINT8 MaxContainers
;
1003 } EFI_IFR_ORDERED_LIST
;
1005 #define EFI_IFR_UNIQUE_SET 0x01
1006 #define EFI_IFR_NO_EMPTY_SET 0x02
1008 typedef struct _EFI_IFR_TIME
{
1009 EFI_IFR_OP_HEADER Header
;
1010 EFI_IFR_QUESTION_HEADER Question
;
1015 // A bit-mask that determines which unique settings are active for this opcode.
1017 #define QF_TIME_HOUR_SUPPRESS 0x01
1018 #define QF_TIME_MINUTE_SUPPRESS 0x02
1019 #define QF_TIME_SECOND_SUPPRESS 0x04
1021 #define QF_TIME_STORAGE 0x30
1022 #define QF_TIME_STORAGE_NORMAL 0x00
1023 #define QF_TIME_STORAGE_TIME 0x10
1024 #define QF_TIME_STORAGE_WAKEUP 0x20
1026 typedef struct _EFI_IFR_DISABLE_IF
{
1027 EFI_IFR_OP_HEADER Header
;
1028 } EFI_IFR_DISABLE_IF
;
1030 typedef struct _EFI_IFR_SUPPRESS_IF
{
1031 EFI_IFR_OP_HEADER Header
;
1032 } EFI_IFR_SUPPRESS_IF
;
1034 typedef struct _EFI_IFR_GRAY_OUT_IF
{
1035 EFI_IFR_OP_HEADER Header
;
1036 } EFI_IFR_GRAY_OUT_IF
;
1038 typedef struct _EFI_IFR_INCONSISTENT_IF
{
1039 EFI_IFR_OP_HEADER Header
;
1040 EFI_STRING_ID Error
;
1041 } EFI_IFR_INCONSISTENT_IF
;
1043 typedef struct _EFI_IFR_NO_SUBMIT_IF
{
1044 EFI_IFR_OP_HEADER Header
;
1045 EFI_STRING_ID Error
;
1046 } EFI_IFR_NO_SUBMIT_IF
;
1048 typedef struct _EFI_IFR_REFRESH
{
1049 EFI_IFR_OP_HEADER Header
;
1050 UINT8 RefreshInterval
;
1053 typedef struct _EFI_IFR_VARSTORE_DEVICE
{
1054 EFI_IFR_OP_HEADER Header
;
1055 EFI_STRING_ID DevicePath
;
1056 } EFI_IFR_VARSTORE_DEVICE
;
1058 typedef struct _EFI_IFR_ONE_OF_OPTION
{
1059 EFI_IFR_OP_HEADER Header
;
1060 EFI_STRING_ID Option
;
1063 EFI_IFR_TYPE_VALUE Value
;
1064 } EFI_IFR_ONE_OF_OPTION
;
1067 // Types of the option's value.
1069 #define EFI_IFR_TYPE_NUM_SIZE_8 0x00
1070 #define EFI_IFR_TYPE_NUM_SIZE_16 0x01
1071 #define EFI_IFR_TYPE_NUM_SIZE_32 0x02
1072 #define EFI_IFR_TYPE_NUM_SIZE_64 0x03
1073 #define EFI_IFR_TYPE_BOOLEAN 0x04
1074 #define EFI_IFR_TYPE_TIME 0x05
1075 #define EFI_IFR_TYPE_DATE 0x06
1076 #define EFI_IFR_TYPE_STRING 0x07
1077 #define EFI_IFR_TYPE_OTHER 0x08
1079 #define EFI_IFR_OPTION_DEFAULT 0x10
1080 #define EFI_IFR_OPTION_DEFAULT_MFG 0x20
1082 typedef struct _EFI_IFR_GUID
{
1083 EFI_IFR_OP_HEADER Header
;
1085 //Optional Data Follows
1088 typedef struct _EFI_IFR_DUP
{
1089 EFI_IFR_OP_HEADER Header
;
1092 typedef struct _EFI_IFR_EQ_ID_ID
{
1093 EFI_IFR_OP_HEADER Header
;
1094 EFI_QUESTION_ID QuestionId1
;
1095 EFI_QUESTION_ID QuestionId2
;
1098 typedef struct _EFI_IFR_EQ_ID_VAL
{
1099 EFI_IFR_OP_HEADER Header
;
1100 EFI_QUESTION_ID QuestionId
;
1102 } EFI_IFR_EQ_ID_VAL
;
1104 typedef struct _EFI_IFR_EQ_ID_LIST
{
1105 EFI_IFR_OP_HEADER Header
;
1106 EFI_QUESTION_ID QuestionId
;
1108 UINT16 ValueList
[1];
1109 } EFI_IFR_EQ_ID_LIST
;
1111 typedef struct _EFI_IFR_UINT8
{
1112 EFI_IFR_OP_HEADER Header
;
1116 typedef struct _EFI_IFR_UINT16
{
1117 EFI_IFR_OP_HEADER Header
;
1121 typedef struct _EFI_IFR_UINT32
{
1122 EFI_IFR_OP_HEADER Header
;
1126 typedef struct _EFI_IFR_UINT64
{
1127 EFI_IFR_OP_HEADER Header
;
1131 typedef struct _EFI_IFR_QUESTION_REF1
{
1132 EFI_IFR_OP_HEADER Header
;
1133 EFI_QUESTION_ID QuestionId
;
1134 } EFI_IFR_QUESTION_REF1
;
1136 typedef struct _EFI_IFR_QUESTION_REF2
{
1137 EFI_IFR_OP_HEADER Header
;
1138 } EFI_IFR_QUESTION_REF2
;
1140 typedef struct _EFI_IFR_QUESTION_REF3
{
1141 EFI_IFR_OP_HEADER Header
;
1142 } EFI_IFR_QUESTION_REF3
;
1144 typedef struct _EFI_IFR_QUESTION_REF3_2
{
1145 EFI_IFR_OP_HEADER Header
;
1146 EFI_STRING_ID DevicePath
;
1147 } EFI_IFR_QUESTION_REF3_2
;
1149 typedef struct _EFI_IFR_QUESTION_REF3_3
{
1150 EFI_IFR_OP_HEADER Header
;
1151 EFI_STRING_ID DevicePath
;
1153 } EFI_IFR_QUESTION_REF3_3
;
1155 typedef struct _EFI_IFR_RULE_REF
{
1156 EFI_IFR_OP_HEADER Header
;
1160 typedef struct _EFI_IFR_STRING_REF1
{
1161 EFI_IFR_OP_HEADER Header
;
1162 EFI_STRING_ID StringId
;
1163 } EFI_IFR_STRING_REF1
;
1165 typedef struct _EFI_IFR_STRING_REF2
{
1166 EFI_IFR_OP_HEADER Header
;
1167 } EFI_IFR_STRING_REF2
;
1169 typedef struct _EFI_IFR_THIS
{
1170 EFI_IFR_OP_HEADER Header
;
1173 typedef struct _EFI_IFR_TRUE
{
1174 EFI_IFR_OP_HEADER Header
;
1177 typedef struct _EFI_IFR_FALSE
{
1178 EFI_IFR_OP_HEADER Header
;
1181 typedef struct _EFI_IFR_ONE
{
1182 EFI_IFR_OP_HEADER Header
;
1185 typedef struct _EFI_IFR_ONES
{
1186 EFI_IFR_OP_HEADER Header
;
1189 typedef struct _EFI_IFR_ZERO
{
1190 EFI_IFR_OP_HEADER Header
;
1193 typedef struct _EFI_IFR_UNDEFINED
{
1194 EFI_IFR_OP_HEADER Header
;
1195 } EFI_IFR_UNDEFINED
;
1197 typedef struct _EFI_IFR_VERSION
{
1198 EFI_IFR_OP_HEADER Header
;
1201 typedef struct _EFI_IFR_LENGTH
{
1202 EFI_IFR_OP_HEADER Header
;
1205 typedef struct _EFI_IFR_NOT
{
1206 EFI_IFR_OP_HEADER Header
;
1209 typedef struct _EFI_IFR_BITWISE_NOT
{
1210 EFI_IFR_OP_HEADER Header
;
1211 } EFI_IFR_BITWISE_NOT
;
1213 typedef struct _EFI_IFR_TO_BOOLEAN
{
1214 EFI_IFR_OP_HEADER Header
;
1215 } EFI_IFR_TO_BOOLEAN
;
1218 // For EFI_IFR_TO_STRING, when converting from
1219 // unsigned integers, these flags control the format:
1220 // 0 = unsigned decimal
1221 // 1 = signed decimal
1222 // 2 = hexadecimal (lower-case alpha)
1223 // 3 = hexadecimal (upper-case alpha)
1225 #define EFI_IFR_STRING_UNSIGNED_DEC 0
1226 #define EFI_IFR_STRING_SIGNED_DEC 1
1227 #define EFI_IFR_STRING_LOWERCASE_HEX 2
1228 #define EFI_IFR_STRING_UPPERCASE_HEX 3
1230 // When converting from a buffer, these flags control the format:
1234 #define EFI_IFR_STRING_ASCII 0
1235 #define EFI_IFR_STRING_UNICODE 8
1237 typedef struct _EFI_IFR_TO_STRING
{
1238 EFI_IFR_OP_HEADER Header
;
1240 } EFI_IFR_TO_STRING
;
1242 typedef struct _EFI_IFR_TO_UINT
{
1243 EFI_IFR_OP_HEADER Header
;
1246 typedef struct _EFI_IFR_TO_UPPER
{
1247 EFI_IFR_OP_HEADER Header
;
1250 typedef struct _EFI_IFR_TO_LOWER
{
1251 EFI_IFR_OP_HEADER Header
;
1254 typedef struct _EFI_IFR_ADD
{
1255 EFI_IFR_OP_HEADER Header
;
1258 typedef struct _EFI_IFR_AND
{
1259 EFI_IFR_OP_HEADER Header
;
1262 typedef struct _EFI_IFR_BITWISE_AND
{
1263 EFI_IFR_OP_HEADER Header
;
1264 } EFI_IFR_BITWISE_AND
;
1266 typedef struct _EFI_IFR_BITWISE_OR
{
1267 EFI_IFR_OP_HEADER Header
;
1268 } EFI_IFR_BITWISE_OR
;
1270 typedef struct _EFI_IFR_CATENATE
{
1271 EFI_IFR_OP_HEADER Header
;
1274 typedef struct _EFI_IFR_DIVIDE
{
1275 EFI_IFR_OP_HEADER Header
;
1278 typedef struct _EFI_IFR_EQUAL
{
1279 EFI_IFR_OP_HEADER Header
;
1282 typedef struct _EFI_IFR_GREATER_EQUAL
{
1283 EFI_IFR_OP_HEADER Header
;
1284 } EFI_IFR_GREATER_EQUAL
;
1286 typedef struct _EFI_IFR_GREATER_THAN
{
1287 EFI_IFR_OP_HEADER Header
;
1288 } EFI_IFR_GREATER_THAN
;
1290 typedef struct _EFI_IFR_LESS_EQUAL
{
1291 EFI_IFR_OP_HEADER Header
;
1292 } EFI_IFR_LESS_EQUAL
;
1294 typedef struct _EFI_IFR_LESS_THAN
{
1295 EFI_IFR_OP_HEADER Header
;
1296 } EFI_IFR_LESS_THAN
;
1298 typedef struct _EFI_IFR_MATCH
{
1299 EFI_IFR_OP_HEADER Header
;
1302 typedef struct _EFI_IFR_MULTIPLY
{
1303 EFI_IFR_OP_HEADER Header
;
1306 typedef struct _EFI_IFR_MODULO
{
1307 EFI_IFR_OP_HEADER Header
;
1310 typedef struct _EFI_IFR_NOT_EQUAL
{
1311 EFI_IFR_OP_HEADER Header
;
1312 } EFI_IFR_NOT_EQUAL
;
1314 typedef struct _EFI_IFR_OR
{
1315 EFI_IFR_OP_HEADER Header
;
1318 typedef struct _EFI_IFR_SHIFT_LEFT
{
1319 EFI_IFR_OP_HEADER Header
;
1320 } EFI_IFR_SHIFT_LEFT
;
1322 typedef struct _EFI_IFR_SHIFT_RIGHT
{
1323 EFI_IFR_OP_HEADER Header
;
1324 } EFI_IFR_SHIFT_RIGHT
;
1326 typedef struct _EFI_IFR_SUBTRACT
{
1327 EFI_IFR_OP_HEADER Header
;
1330 typedef struct _EFI_IFR_CONDITIONAL
{
1331 EFI_IFR_OP_HEADER Header
;
1332 } EFI_IFR_CONDITIONAL
;
1335 // Flags governing the matching criteria of EFI_IFR_FIND
1337 #define EFI_IFR_FF_CASE_SENSITIVE 0x00
1338 #define EFI_IFR_FF_CASE_INSENSITIVE 0x01
1340 typedef struct _EFI_IFR_FIND
{
1341 EFI_IFR_OP_HEADER Header
;
1345 typedef struct _EFI_IFR_MID
{
1346 EFI_IFR_OP_HEADER Header
;
1349 typedef struct _EFI_IFR_TOKEN
{
1350 EFI_IFR_OP_HEADER Header
;
1354 // Flags specifying whether to find the first matching string
1355 // or the first non-matching string.
1357 #define EFI_IFR_FLAGS_FIRST_MATCHING 0x00
1358 #define EFI_IFR_FLAGS_FIRST_NON_MATCHING 0x01
1360 typedef struct _EFI_IFR_SPAN
{
1361 EFI_IFR_OP_HEADER Header
;
1366 // Definitions for Keyboard Package
1368 // Releated definitions are in Section of EFI_HII_DATABASE_PROTOCOL
1482 CHAR16 ShiftedUnicode
;
1483 CHAR16 AltGrUnicode
;
1484 CHAR16 ShiftedAltGrUnicode
;
1486 UINT16 AffectedAttribute
;
1487 } EFI_KEY_DESCRIPTOR
;
1490 /// A key which is affected by all the standard shift modifiers.
1491 /// Most keys would be expected to have this bit active.
1493 #define EFI_AFFECTED_BY_STANDARD_SHIFT 0x0001
1496 /// This key is affected by the caps lock so that if a keyboard driver
1497 /// would need to disambiguate between a key which had a "1" defined
1498 /// versus a "a" character. Having this bit turned on would tell
1499 /// the keyboard driver to use the appropriate shifted state or not.
1501 #define EFI_AFFECTED_BY_CAPS_LOCK 0x0002
1504 /// Similar to the case of CAPS lock, if this bit is active, the key
1505 /// is affected by the num lock being turned on.
1507 #define EFI_AFFECTED_BY_NUM_LOCK 0x0004
1510 UINT16 LayoutLength
;
1512 UINT32 LayoutDescriptorStringOffset
;
1513 UINT8 DescriptorCount
;
1514 // EFI_KEY_DESCRIPTOR Descriptors[];
1515 } EFI_HII_KEYBOARD_LAYOUT
;
1518 EFI_HII_PACKAGE_HEADER Header
;
1520 // EFI_HII_KEYBOARD_LAYOUT Layout[];
1521 } EFI_HII_KEYBOARD_PACKAGE_HDR
;
1526 #define EFI_NULL_MODIFIER 0x0000
1527 #define EFI_LEFT_CONTROL_MODIFIER 0x0001
1528 #define EFI_RIGHT_CONTROL_MODIFIER 0x0002
1529 #define EFI_LEFT_ALT_MODIFIER 0x0003
1530 #define EFI_RIGHT_ALT_MODIFIER 0x0004
1531 #define EFI_ALT_GR_MODIFIER 0x0005
1532 #define EFI_INSERT_MODIFIER 0x0006
1533 #define EFI_DELETE_MODIFIER 0x0007
1534 #define EFI_PAGE_DOWN_MODIFIER 0x0008
1535 #define EFI_PAGE_UP_MODIFIER 0x0009
1536 #define EFI_HOME_MODIFIER 0x000A
1537 #define EFI_END_MODIFIER 0x000B
1538 #define EFI_LEFT_SHIFT_MODIFIER 0x000C
1539 #define EFI_RIGHT_SHIFT_MODIFIER 0x000D
1540 #define EFI_CAPS_LOCK_MODIFIER 0x000E
1541 #define EFI_NUM_LOCK_MODIFIER 0x000F
1542 #define EFI_LEFT_ARROW_MODIFIER 0x0010
1543 #define EFI_RIGHT_ARROW_MODIFIER 0x0011
1544 #define EFI_DOWN_ARROW_MODIFIER 0x0012
1545 #define EFI_UP_ARROW_MODIFIER 0x0013
1546 #define EFI_NS_KEY_MODIFIER 0x0014
1547 #define EFI_NS_KEY_DEPENDENCY_MODIFIER 0x0015
1548 #define EFI_FUNCTION_KEY_ONE_MODIFIER 0x0016
1549 #define EFI_FUNCTION_KEY_TWO_MODIFIER 0x0017
1550 #define EFI_FUNCTION_KEY_THREE_MODIFIER 0x0018
1551 #define EFI_FUNCTION_KEY_FOUR_MODIFIER 0x0019
1552 #define EFI_FUNCTION_KEY_FIVE_MODIFIER 0x001A
1553 #define EFI_FUNCTION_KEY_SIX_MODIFIER 0x001B
1554 #define EFI_FUNCTION_KEY_SEVEN_MODIFIER 0x001C
1555 #define EFI_FUNCTION_KEY_EIGHT_MODIFIER 0x001D
1556 #define EFI_FUNCTION_KEY_NINE_MODIFIER 0x001E
1557 #define EFI_FUNCTION_KEY_TEN_MODIFIER 0x001F
1558 #define EFI_FUNCTION_KEY_ELEVEN_MODIFIER 0x0020
1559 #define EFI_FUNCTION_KEY_TWELVE_MODIFIER 0x0021
1562 // Keys that have multiple control functions based on modifier
1563 // settings are handled in the keyboard driver implementation.
1564 // For instance PRINT_KEY might have a modifier held down and
1565 // is still a nonprinting character, but might have an alternate
1566 // control function like SYSREQUEST
1568 #define EFI_PRINT_MODIFIER 0x0022
1569 #define EFI_SYS_REQUEST_MODIFIER 0x0023
1570 #define EFI_SCROLL_LOCK_MODIFIER 0x0024
1571 #define EFI_PAUSE_MODIFIER 0x0025
1572 #define EFI_BREAK_MODIFIER 0x0026
1574 #define EFI_LEFT_LOGO_MODIFIER 0x0027
1575 #define EFI_RIGHT_LOGO_MODIFIER 0x0028
1576 #define EFI_MENU_MODIFIER 0x0029
1583 /// References to string tokens must use this macro to enable scanning for
1587 /// STRING_TOKEN is not defined in UEFI specification. But it is placed
1588 /// here for the easy access by C files and VFR source files.
1590 #define STRING_TOKEN(t) t