]> git.proxmox.com Git - mirror_edk2.git/blob - MdePkg/Include/Uefi/UefiInternalFormRepresentation.h
Enable EFI_IFR_DEFAULT2 opcode in browser.
[mirror_edk2.git] / MdePkg / Include / Uefi / UefiInternalFormRepresentation.h
1 /** @file
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
5
6 Copyright (c) 2006 - 2012, Intel Corporation. All rights reserved.<BR>
7 This program and the accompanying materials are licensed and made available under
8 the terms and conditions of the BSD License that accompanies this distribution.
9 The full text of the license may be found at
10 http://opensource.org/licenses/bsd-license.php.
11
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.
14
15 @par Revision Reference:
16 These definitions are from UEFI 2.1 and 2.2.
17
18 **/
19
20 #ifndef __UEFI_INTERNAL_FORMREPRESENTATION_H__
21 #define __UEFI_INTERNAL_FORMREPRESENTATION_H__
22
23 #include <Guid/HiiFormMapMethodGuid.h>
24
25 ///
26 /// The following types are currently defined:
27 ///
28 typedef VOID* EFI_HII_HANDLE;
29 typedef CHAR16* EFI_STRING;
30 typedef UINT16 EFI_IMAGE_ID;
31 typedef UINT16 EFI_QUESTION_ID;
32 typedef UINT16 EFI_STRING_ID;
33 typedef UINT16 EFI_FORM_ID;
34 typedef UINT16 EFI_VARSTORE_ID;
35 typedef UINT16 EFI_ANIMATION_ID;
36
37 typedef UINT16 EFI_DEFAULT_ID;
38
39 typedef UINT32 EFI_HII_FONT_STYLE;
40
41
42
43 #pragma pack(1)
44
45 //
46 // Definitions for Package Lists and Package Headers
47 // Section 27.3.1
48 //
49
50 ///
51 /// The header found at the start of each package list.
52 ///
53 typedef struct {
54 EFI_GUID PackageListGuid;
55 UINT32 PackageLength;
56 } EFI_HII_PACKAGE_LIST_HEADER;
57
58 ///
59 /// The header found at the start of each package.
60 ///
61 typedef struct {
62 UINT32 Length:24;
63 UINT32 Type:8;
64 // UINT8 Data[...];
65 } EFI_HII_PACKAGE_HEADER;
66
67 //
68 // Value of HII package type
69 //
70 #define EFI_HII_PACKAGE_TYPE_ALL 0x00
71 #define EFI_HII_PACKAGE_TYPE_GUID 0x01
72 #define EFI_HII_PACKAGE_FORMS 0x02
73 #define EFI_HII_PACKAGE_STRINGS 0x04
74 #define EFI_HII_PACKAGE_FONTS 0x05
75 #define EFI_HII_PACKAGE_IMAGES 0x06
76 #define EFI_HII_PACKAGE_SIMPLE_FONTS 0x07
77 #define EFI_HII_PACKAGE_DEVICE_PATH 0x08
78 #define EFI_HII_PACKAGE_KEYBOARD_LAYOUT 0x09
79 #define EFI_HII_PACKAGE_ANIMATIONS 0x0A
80 #define EFI_HII_PACKAGE_END 0xDF
81 #define EFI_HII_PACKAGE_TYPE_SYSTEM_BEGIN 0xE0
82 #define EFI_HII_PACKAGE_TYPE_SYSTEM_END 0xFF
83
84 //
85 // Definitions for Simplified Font Package
86 //
87
88 ///
89 /// Contents of EFI_NARROW_GLYPH.Attributes.
90 ///@{
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
95 ///@}
96
97 ///
98 /// The EFI_NARROW_GLYPH has a preferred dimension (w x h) of 8 x 19 pixels.
99 ///
100 typedef struct {
101 ///
102 /// The Unicode representation of the glyph. The term weight is the
103 /// technical term for a character code.
104 ///
105 CHAR16 UnicodeWeight;
106 ///
107 /// The data element containing the glyph definitions.
108 ///
109 UINT8 Attributes;
110 ///
111 /// The column major glyph representation of the character. Bits
112 /// with values of one indicate that the corresponding pixel is to be
113 /// on when normally displayed; those with zero are off.
114 ///
115 UINT8 GlyphCol1[EFI_GLYPH_HEIGHT];
116 } EFI_NARROW_GLYPH;
117
118 ///
119 /// The EFI_WIDE_GLYPH has a preferred dimension (w x h) of 16 x 19 pixels, which is large enough
120 /// to accommodate logographic characters.
121 ///
122 typedef struct {
123 ///
124 /// The Unicode representation of the glyph. The term weight is the
125 /// technical term for a character code.
126 ///
127 CHAR16 UnicodeWeight;
128 ///
129 /// The data element containing the glyph definitions.
130 ///
131 UINT8 Attributes;
132 ///
133 /// The column major glyph representation of the character. Bits
134 /// with values of one indicate that the corresponding pixel is to be
135 /// on when normally displayed; those with zero are off.
136 ///
137 UINT8 GlyphCol1[EFI_GLYPH_HEIGHT];
138 ///
139 /// The column major glyph representation of the character. Bits
140 /// with values of one indicate that the corresponding pixel is to be
141 /// on when normally displayed; those with zero are off.
142 ///
143 UINT8 GlyphCol2[EFI_GLYPH_HEIGHT];
144 ///
145 /// Ensures that sizeof (EFI_WIDE_GLYPH) is twice the
146 /// sizeof (EFI_NARROW_GLYPH). The contents of Pad must
147 /// be zero.
148 ///
149 UINT8 Pad[3];
150 } EFI_WIDE_GLYPH;
151
152 ///
153 /// A simplified font package consists of a font header
154 /// followed by a series of glyph structures.
155 ///
156 typedef struct _EFI_HII_SIMPLE_FONT_PACKAGE_HDR {
157 EFI_HII_PACKAGE_HEADER Header;
158 UINT16 NumberOfNarrowGlyphs;
159 UINT16 NumberOfWideGlyphs;
160 // EFI_NARROW_GLYPH NarrowGlyphs[];
161 // EFI_WIDE_GLYPH WideGlyphs[];
162 } EFI_HII_SIMPLE_FONT_PACKAGE_HDR;
163
164 //
165 // Definitions for Font Package
166 // Section 27.3.3
167 //
168
169 //
170 // Value for font style
171 //
172 #define EFI_HII_FONT_STYLE_NORMAL 0x00000000
173 #define EFI_HII_FONT_STYLE_BOLD 0x00000001
174 #define EFI_HII_FONT_STYLE_ITALIC 0x00000002
175 #define EFI_HII_FONT_STYLE_EMBOSS 0x00010000
176 #define EFI_HII_FONT_STYLE_OUTLINE 0x00020000
177 #define EFI_HII_FONT_STYLE_SHADOW 0x00040000
178 #define EFI_HII_FONT_STYLE_UNDERLINE 0x00080000
179 #define EFI_HII_FONT_STYLE_DBL_UNDER 0x00100000
180
181 typedef struct _EFI_HII_GLYPH_INFO {
182 UINT16 Width;
183 UINT16 Height;
184 INT16 OffsetX;
185 INT16 OffsetY;
186 INT16 AdvanceX;
187 } EFI_HII_GLYPH_INFO;
188
189 ///
190 /// The fixed header consists of a standard record header,
191 /// then the character values in this section, the flags
192 /// (including the encoding method) and the offsets of the glyph
193 /// information, the glyph bitmaps and the character map.
194 ///
195 typedef struct _EFI_HII_FONT_PACKAGE_HDR {
196 EFI_HII_PACKAGE_HEADER Header;
197 UINT32 HdrSize;
198 UINT32 GlyphBlockOffset;
199 EFI_HII_GLYPH_INFO Cell;
200 EFI_HII_FONT_STYLE FontStyle;
201 CHAR16 FontFamily[1];
202 } EFI_HII_FONT_PACKAGE_HDR;
203
204 //
205 // Value of different glyph info block types
206 //
207 #define EFI_HII_GIBT_END 0x00
208 #define EFI_HII_GIBT_GLYPH 0x10
209 #define EFI_HII_GIBT_GLYPHS 0x11
210 #define EFI_HII_GIBT_GLYPH_DEFAULT 0x12
211 #define EFI_HII_GIBT_GLYPHS_DEFAULT 0x13
212 #define EFI_HII_GIBT_DUPLICATE 0x20
213 #define EFI_HII_GIBT_SKIP2 0x21
214 #define EFI_HII_GIBT_SKIP1 0x22
215 #define EFI_HII_GIBT_DEFAULTS 0x23
216 #define EFI_HII_GIBT_EXT1 0x30
217 #define EFI_HII_GIBT_EXT2 0x31
218 #define EFI_HII_GIBT_EXT4 0x32
219
220 typedef struct _EFI_HII_GLYPH_BLOCK {
221 UINT8 BlockType;
222 } EFI_HII_GLYPH_BLOCK;
223
224 //
225 // Definition of different glyph info block types
226 //
227
228 typedef struct _EFI_HII_GIBT_DEFAULTS_BLOCK {
229 EFI_HII_GLYPH_BLOCK Header;
230 EFI_HII_GLYPH_INFO Cell;
231 } EFI_HII_GIBT_DEFAULTS_BLOCK;
232
233 typedef struct _EFI_HII_GIBT_DUPLICATE_BLOCK {
234 EFI_HII_GLYPH_BLOCK Header;
235 CHAR16 CharValue;
236 } EFI_HII_GIBT_DUPLICATE_BLOCK;
237
238 typedef struct _EFI_GLYPH_GIBT_END_BLOCK {
239 EFI_HII_GLYPH_BLOCK Header;
240 } EFI_GLYPH_GIBT_END_BLOCK;
241
242 typedef struct _EFI_HII_GIBT_EXT1_BLOCK {
243 EFI_HII_GLYPH_BLOCK Header;
244 UINT8 BlockType2;
245 UINT8 Length;
246 } EFI_HII_GIBT_EXT1_BLOCK;
247
248 typedef struct _EFI_HII_GIBT_EXT2_BLOCK {
249 EFI_HII_GLYPH_BLOCK Header;
250 UINT8 BlockType2;
251 UINT16 Length;
252 } EFI_HII_GIBT_EXT2_BLOCK;
253
254 typedef struct _EFI_HII_GIBT_EXT4_BLOCK {
255 EFI_HII_GLYPH_BLOCK Header;
256 UINT8 BlockType2;
257 UINT32 Length;
258 } EFI_HII_GIBT_EXT4_BLOCK;
259
260 typedef struct _EFI_HII_GIBT_GLYPH_BLOCK {
261 EFI_HII_GLYPH_BLOCK Header;
262 EFI_HII_GLYPH_INFO Cell;
263 UINT8 BitmapData[1];
264 } EFI_HII_GIBT_GLYPH_BLOCK;
265
266 typedef struct _EFI_HII_GIBT_GLYPHS_BLOCK {
267 EFI_HII_GLYPH_BLOCK Header;
268 EFI_HII_GLYPH_INFO Cell;
269 UINT16 Count;
270 UINT8 BitmapData[1];
271 } EFI_HII_GIBT_GLYPHS_BLOCK;
272
273 typedef struct _EFI_HII_GIBT_GLYPH_DEFAULT_BLOCK {
274 EFI_HII_GLYPH_BLOCK Header;
275 UINT8 BitmapData[1];
276 } EFI_HII_GIBT_GLYPH_DEFAULT_BLOCK;
277
278 typedef struct _EFI_HII_GIBT_GLYPHS_DEFAULT_BLOCK {
279 EFI_HII_GLYPH_BLOCK Header;
280 UINT16 Count;
281 UINT8 BitmapData[1];
282 } EFI_HII_GIBT_GLYPHS_DEFAULT_BLOCK;
283
284 typedef struct _EFI_HII_GIBT_SKIP1_BLOCK {
285 EFI_HII_GLYPH_BLOCK Header;
286 UINT8 SkipCount;
287 } EFI_HII_GIBT_SKIP1_BLOCK;
288
289 typedef struct _EFI_HII_GIBT_SKIP2_BLOCK {
290 EFI_HII_GLYPH_BLOCK Header;
291 UINT16 SkipCount;
292 } EFI_HII_GIBT_SKIP2_BLOCK;
293
294 //
295 // Definitions for Device Path Package
296 // Section 27.3.4
297 //
298
299 ///
300 /// The device path package is used to carry a device path
301 /// associated with the package list.
302 ///
303 typedef struct _EFI_HII_DEVICE_PATH_PACKAGE_HDR {
304 EFI_HII_PACKAGE_HEADER Header;
305 // EFI_DEVICE_PATH_PROTOCOL DevicePath[];
306 } EFI_HII_DEVICE_PATH_PACKAGE_HDR;
307
308 //
309 // Definitions for GUID Package
310 // Section 27.3.5
311 //
312
313 ///
314 /// The GUID package is used to carry data where the format is defined by a GUID.
315 ///
316 typedef struct _EFI_HII_GUID_PACKAGE_HDR {
317 EFI_HII_PACKAGE_HEADER Header;
318 EFI_GUID Guid;
319 // Data per GUID definition may follow
320 } EFI_HII_GUID_PACKAGE_HDR;
321
322 //
323 // Definitions for String Package
324 // Section 27.3.6
325 //
326
327 #define UEFI_CONFIG_LANG "x-UEFI"
328 #define UEFI_CONFIG_LANG_2 "x-i-UEFI"
329
330 ///
331 /// The fixed header consists of a standard record header and then the string identifiers
332 /// contained in this section and the offsets of the string and language information.
333 ///
334 typedef struct _EFI_HII_STRING_PACKAGE_HDR {
335 EFI_HII_PACKAGE_HEADER Header;
336 UINT32 HdrSize;
337 UINT32 StringInfoOffset;
338 CHAR16 LanguageWindow[16];
339 EFI_STRING_ID LanguageName;
340 CHAR8 Language[1];
341 } EFI_HII_STRING_PACKAGE_HDR;
342
343 typedef struct {
344 UINT8 BlockType;
345 } EFI_HII_STRING_BLOCK;
346
347 //
348 // Value of different string information block types
349 //
350 #define EFI_HII_SIBT_END 0x00
351 #define EFI_HII_SIBT_STRING_SCSU 0x10
352 #define EFI_HII_SIBT_STRING_SCSU_FONT 0x11
353 #define EFI_HII_SIBT_STRINGS_SCSU 0x12
354 #define EFI_HII_SIBT_STRINGS_SCSU_FONT 0x13
355 #define EFI_HII_SIBT_STRING_UCS2 0x14
356 #define EFI_HII_SIBT_STRING_UCS2_FONT 0x15
357 #define EFI_HII_SIBT_STRINGS_UCS2 0x16
358 #define EFI_HII_SIBT_STRINGS_UCS2_FONT 0x17
359 #define EFI_HII_SIBT_DUPLICATE 0x20
360 #define EFI_HII_SIBT_SKIP2 0x21
361 #define EFI_HII_SIBT_SKIP1 0x22
362 #define EFI_HII_SIBT_EXT1 0x30
363 #define EFI_HII_SIBT_EXT2 0x31
364 #define EFI_HII_SIBT_EXT4 0x32
365 #define EFI_HII_SIBT_FONT 0x40
366
367 //
368 // Definition of different string information block types
369 //
370
371 typedef struct _EFI_HII_SIBT_DUPLICATE_BLOCK {
372 EFI_HII_STRING_BLOCK Header;
373 EFI_STRING_ID StringId;
374 } EFI_HII_SIBT_DUPLICATE_BLOCK;
375
376 typedef struct _EFI_HII_SIBT_END_BLOCK {
377 EFI_HII_STRING_BLOCK Header;
378 } EFI_HII_SIBT_END_BLOCK;
379
380 typedef struct _EFI_HII_SIBT_EXT1_BLOCK {
381 EFI_HII_STRING_BLOCK Header;
382 UINT8 BlockType2;
383 UINT8 Length;
384 } EFI_HII_SIBT_EXT1_BLOCK;
385
386 typedef struct _EFI_HII_SIBT_EXT2_BLOCK {
387 EFI_HII_STRING_BLOCK Header;
388 UINT8 BlockType2;
389 UINT16 Length;
390 } EFI_HII_SIBT_EXT2_BLOCK;
391
392 typedef struct _EFI_HII_SIBT_EXT4_BLOCK {
393 EFI_HII_STRING_BLOCK Header;
394 UINT8 BlockType2;
395 UINT32 Length;
396 } EFI_HII_SIBT_EXT4_BLOCK;
397
398 typedef struct _EFI_HII_SIBT_FONT_BLOCK {
399 EFI_HII_SIBT_EXT2_BLOCK Header;
400 UINT8 FontId;
401 UINT16 FontSize;
402 EFI_HII_FONT_STYLE FontStyle;
403 CHAR16 FontName[1];
404 } EFI_HII_SIBT_FONT_BLOCK;
405
406 typedef struct _EFI_HII_SIBT_SKIP1_BLOCK {
407 EFI_HII_STRING_BLOCK Header;
408 UINT8 SkipCount;
409 } EFI_HII_SIBT_SKIP1_BLOCK;
410
411 typedef struct _EFI_HII_SIBT_SKIP2_BLOCK {
412 EFI_HII_STRING_BLOCK Header;
413 UINT16 SkipCount;
414 } EFI_HII_SIBT_SKIP2_BLOCK;
415
416 typedef struct _EFI_HII_SIBT_STRING_SCSU_BLOCK {
417 EFI_HII_STRING_BLOCK Header;
418 UINT8 StringText[1];
419 } EFI_HII_SIBT_STRING_SCSU_BLOCK;
420
421 typedef struct _EFI_HII_SIBT_STRING_SCSU_FONT_BLOCK {
422 EFI_HII_STRING_BLOCK Header;
423 UINT8 FontIdentifier;
424 UINT8 StringText[1];
425 } EFI_HII_SIBT_STRING_SCSU_FONT_BLOCK;
426
427 typedef struct _EFI_HII_SIBT_STRINGS_SCSU_BLOCK {
428 EFI_HII_STRING_BLOCK Header;
429 UINT16 StringCount;
430 UINT8 StringText[1];
431 } EFI_HII_SIBT_STRINGS_SCSU_BLOCK;
432
433 typedef struct _EFI_HII_SIBT_STRINGS_SCSU_FONT_BLOCK {
434 EFI_HII_STRING_BLOCK Header;
435 UINT8 FontIdentifier;
436 UINT16 StringCount;
437 UINT8 StringText[1];
438 } EFI_HII_SIBT_STRINGS_SCSU_FONT_BLOCK;
439
440 typedef struct _EFI_HII_SIBT_STRING_UCS2_BLOCK {
441 EFI_HII_STRING_BLOCK Header;
442 CHAR16 StringText[1];
443 } EFI_HII_SIBT_STRING_UCS2_BLOCK;
444
445 typedef struct _EFI_HII_SIBT_STRING_UCS2_FONT_BLOCK {
446 EFI_HII_STRING_BLOCK Header;
447 UINT8 FontIdentifier;
448 CHAR16 StringText[1];
449 } EFI_HII_SIBT_STRING_UCS2_FONT_BLOCK;
450
451 typedef struct _EFI_HII_SIBT_STRINGS_UCS2_BLOCK {
452 EFI_HII_STRING_BLOCK Header;
453 UINT16 StringCount;
454 CHAR16 StringText[1];
455 } EFI_HII_SIBT_STRINGS_UCS2_BLOCK;
456
457 typedef struct _EFI_HII_SIBT_STRINGS_UCS2_FONT_BLOCK {
458 EFI_HII_STRING_BLOCK Header;
459 UINT8 FontIdentifier;
460 UINT16 StringCount;
461 CHAR16 StringText[1];
462 } EFI_HII_SIBT_STRINGS_UCS2_FONT_BLOCK;
463
464 //
465 // Definitions for Image Package
466 // Section 27.3.7
467 //
468
469 typedef struct _EFI_HII_IMAGE_PACKAGE_HDR {
470 EFI_HII_PACKAGE_HEADER Header;
471 UINT32 ImageInfoOffset;
472 UINT32 PaletteInfoOffset;
473 } EFI_HII_IMAGE_PACKAGE_HDR;
474
475 typedef struct _EFI_HII_IMAGE_BLOCK {
476 UINT8 BlockType;
477 } EFI_HII_IMAGE_BLOCK;
478
479 //
480 // Value of different image information block types
481 //
482 #define EFI_HII_IIBT_END 0x00
483 #define EFI_HII_IIBT_IMAGE_1BIT 0x10
484 #define EFI_HII_IIBT_IMAGE_1BIT_TRANS 0x11
485 #define EFI_HII_IIBT_IMAGE_4BIT 0x12
486 #define EFI_HII_IIBT_IMAGE_4BIT_TRANS 0x13
487 #define EFI_HII_IIBT_IMAGE_8BIT 0x14
488 #define EFI_HII_IIBT_IMAGE_8BIT_TRANS 0x15
489 #define EFI_HII_IIBT_IMAGE_24BIT 0x16
490 #define EFI_HII_IIBT_IMAGE_24BIT_TRANS 0x17
491 #define EFI_HII_IIBT_IMAGE_JPEG 0x18
492 #define EFI_HII_IIBT_DUPLICATE 0x20
493 #define EFI_HII_IIBT_SKIP2 0x21
494 #define EFI_HII_IIBT_SKIP1 0x22
495 #define EFI_HII_IIBT_EXT1 0x30
496 #define EFI_HII_IIBT_EXT2 0x31
497 #define EFI_HII_IIBT_EXT4 0x32
498
499 //
500 // Definition of different image information block types
501 //
502
503 typedef struct _EFI_HII_IIBT_END_BLOCK {
504 EFI_HII_IMAGE_BLOCK Header;
505 } EFI_HII_IIBT_END_BLOCK;
506
507 typedef struct _EFI_HII_IIBT_EXT1_BLOCK {
508 EFI_HII_IMAGE_BLOCK Header;
509 UINT8 BlockType2;
510 UINT8 Length;
511 } EFI_HII_IIBT_EXT1_BLOCK;
512
513 typedef struct _EFI_HII_IIBT_EXT2_BLOCK {
514 EFI_HII_IMAGE_BLOCK Header;
515 UINT8 BlockType2;
516 UINT16 Length;
517 } EFI_HII_IIBT_EXT2_BLOCK;
518
519 typedef struct _EFI_HII_IIBT_EXT4_BLOCK {
520 EFI_HII_IMAGE_BLOCK Header;
521 UINT8 BlockType2;
522 UINT32 Length;
523 } EFI_HII_IIBT_EXT4_BLOCK;
524
525 typedef struct _EFI_HII_IIBT_IMAGE_1BIT_BASE {
526 UINT16 Width;
527 UINT16 Height;
528 UINT8 Data[1];
529 } EFI_HII_IIBT_IMAGE_1BIT_BASE;
530
531 typedef struct _EFI_HII_IIBT_IMAGE_1BIT_BLOCK {
532 EFI_HII_IMAGE_BLOCK Header;
533 UINT8 PaletteIndex;
534 EFI_HII_IIBT_IMAGE_1BIT_BASE Bitmap;
535 } EFI_HII_IIBT_IMAGE_1BIT_BLOCK;
536
537 typedef struct _EFI_HII_IIBT_IMAGE_1BIT_TRANS_BLOCK {
538 EFI_HII_IMAGE_BLOCK Header;
539 UINT8 PaletteIndex;
540 EFI_HII_IIBT_IMAGE_1BIT_BASE Bitmap;
541 } EFI_HII_IIBT_IMAGE_1BIT_TRANS_BLOCK;
542
543 typedef struct _EFI_HII_RGB_PIXEL {
544 UINT8 b;
545 UINT8 g;
546 UINT8 r;
547 } EFI_HII_RGB_PIXEL;
548
549 typedef struct _EFI_HII_IIBT_IMAGE_24BIT_BASE {
550 UINT16 Width;
551 UINT16 Height;
552 EFI_HII_RGB_PIXEL Bitmap[1];
553 } EFI_HII_IIBT_IMAGE_24BIT_BASE;
554
555 typedef struct _EFI_HII_IIBT_IMAGE_24BIT_BLOCK {
556 EFI_HII_IMAGE_BLOCK Header;
557 EFI_HII_IIBT_IMAGE_24BIT_BASE Bitmap;
558 } EFI_HII_IIBT_IMAGE_24BIT_BLOCK;
559
560 typedef struct _EFI_HII_IIBT_IMAGE_24BIT_TRANS_BLOCK {
561 EFI_HII_IMAGE_BLOCK Header;
562 EFI_HII_IIBT_IMAGE_24BIT_BASE Bitmap;
563 } EFI_HII_IIBT_IMAGE_24BIT_TRANS_BLOCK;
564
565 typedef struct _EFI_HII_IIBT_IMAGE_4BIT_BASE {
566 UINT16 Width;
567 UINT16 Height;
568 UINT8 Data[1];
569 } EFI_HII_IIBT_IMAGE_4BIT_BASE;
570
571 typedef struct _EFI_HII_IIBT_IMAGE_4BIT_BLOCK {
572 EFI_HII_IMAGE_BLOCK Header;
573 UINT8 PaletteIndex;
574 EFI_HII_IIBT_IMAGE_4BIT_BASE Bitmap;
575 } EFI_HII_IIBT_IMAGE_4BIT_BLOCK;
576
577 typedef struct _EFI_HII_IIBT_IMAGE_4BIT_TRANS_BLOCK {
578 EFI_HII_IMAGE_BLOCK Header;
579 UINT8 PaletteIndex;
580 EFI_HII_IIBT_IMAGE_4BIT_BASE Bitmap;
581 } EFI_HII_IIBT_IMAGE_4BIT_TRANS_BLOCK;
582
583 typedef struct _EFI_HII_IIBT_IMAGE_8BIT_BASE {
584 UINT16 Width;
585 UINT16 Height;
586 UINT8 Data[1];
587 } EFI_HII_IIBT_IMAGE_8BIT_BASE;
588
589 typedef struct _EFI_HII_IIBT_IMAGE_8BIT_PALETTE_BLOCK {
590 EFI_HII_IMAGE_BLOCK Header;
591 UINT8 PaletteIndex;
592 EFI_HII_IIBT_IMAGE_8BIT_BASE Bitmap;
593 } EFI_HII_IIBT_IMAGE_8BIT_BLOCK;
594
595 typedef struct _EFI_HII_IIBT_IMAGE_8BIT_TRANS_BLOCK {
596 EFI_HII_IMAGE_BLOCK Header;
597 UINT8 PaletteIndex;
598 EFI_HII_IIBT_IMAGE_8BIT_BASE Bitmap;
599 } EFI_HII_IIBT_IMAGE_8BIT_TRAN_BLOCK;
600
601 typedef struct _EFI_HII_IIBT_DUPLICATE_BLOCK {
602 EFI_HII_IMAGE_BLOCK Header;
603 EFI_IMAGE_ID ImageId;
604 } EFI_HII_IIBT_DUPLICATE_BLOCK;
605
606 typedef struct _EFI_HII_IIBT_JPEG_BLOCK {
607 EFI_HII_IMAGE_BLOCK Header;
608 UINT32 Size;
609 UINT8 Data[1];
610 } EFI_HII_IIBT_JPEG_BLOCK;
611
612 typedef struct _EFI_HII_IIBT_SKIP1_BLOCK {
613 EFI_HII_IMAGE_BLOCK Header;
614 UINT8 SkipCount;
615 } EFI_HII_IIBT_SKIP1_BLOCK;
616
617 typedef struct _EFI_HII_IIBT_SKIP2_BLOCK {
618 EFI_HII_IMAGE_BLOCK Header;
619 UINT16 SkipCount;
620 } EFI_HII_IIBT_SKIP2_BLOCK;
621
622 //
623 // Definitions for Palette Information
624 //
625
626 typedef struct _EFI_HII_IMAGE_PALETTE_INFO_HEADER {
627 UINT16 PaletteCount;
628 } EFI_HII_IMAGE_PALETTE_INFO_HEADER;
629
630 typedef struct _EFI_HII_IMAGE_PALETTE_INFO {
631 UINT16 PaletteSize;
632 EFI_HII_RGB_PIXEL PaletteValue[1];
633 } EFI_HII_IMAGE_PALETTE_INFO;
634
635 //
636 // Definitions for Forms Package
637 // Section 27.3.8
638 //
639
640 ///
641 /// The Form package is used to carry form-based encoding data.
642 ///
643 typedef struct _EFI_HII_FORM_PACKAGE_HDR {
644 EFI_HII_PACKAGE_HEADER Header;
645 // EFI_IFR_OP_HEADER OpCodeHeader;
646 // More op-codes follow
647 } EFI_HII_FORM_PACKAGE_HDR;
648
649 typedef struct {
650 UINT8 Hour;
651 UINT8 Minute;
652 UINT8 Second;
653 } EFI_HII_TIME;
654
655 typedef struct {
656 UINT16 Year;
657 UINT8 Month;
658 UINT8 Day;
659 } EFI_HII_DATE;
660
661 typedef struct {
662 EFI_QUESTION_ID QuestionId;
663 EFI_FORM_ID FormId;
664 EFI_GUID FormSetGuid;
665 EFI_STRING_ID DevicePath;
666 } EFI_HII_REF;
667
668 typedef union {
669 UINT8 u8;
670 UINT16 u16;
671 UINT32 u32;
672 UINT64 u64;
673 BOOLEAN b;
674 EFI_HII_TIME time;
675 EFI_HII_DATE date;
676 EFI_STRING_ID string; ///< EFI_IFR_TYPE_STRING, EFI_IFR_TYPE_ACTION
677 EFI_HII_REF ref; ///< EFI_IFR_TYPE_REF
678 // UINT8 buffer[]; ///< EFI_IFR_TYPE_BUFFER
679 } EFI_IFR_TYPE_VALUE;
680
681 //
682 // IFR Opcodes
683 //
684 #define EFI_IFR_FORM_OP 0x01
685 #define EFI_IFR_SUBTITLE_OP 0x02
686 #define EFI_IFR_TEXT_OP 0x03
687 #define EFI_IFR_IMAGE_OP 0x04
688 #define EFI_IFR_ONE_OF_OP 0x05
689 #define EFI_IFR_CHECKBOX_OP 0x06
690 #define EFI_IFR_NUMERIC_OP 0x07
691 #define EFI_IFR_PASSWORD_OP 0x08
692 #define EFI_IFR_ONE_OF_OPTION_OP 0x09
693 #define EFI_IFR_SUPPRESS_IF_OP 0x0A
694 #define EFI_IFR_LOCKED_OP 0x0B
695 #define EFI_IFR_ACTION_OP 0x0C
696 #define EFI_IFR_RESET_BUTTON_OP 0x0D
697 #define EFI_IFR_FORM_SET_OP 0x0E
698 #define EFI_IFR_REF_OP 0x0F
699 #define EFI_IFR_NO_SUBMIT_IF_OP 0x10
700 #define EFI_IFR_INCONSISTENT_IF_OP 0x11
701 #define EFI_IFR_EQ_ID_VAL_OP 0x12
702 #define EFI_IFR_EQ_ID_ID_OP 0x13
703 #define EFI_IFR_EQ_ID_VAL_LIST_OP 0x14
704 #define EFI_IFR_AND_OP 0x15
705 #define EFI_IFR_OR_OP 0x16
706 #define EFI_IFR_NOT_OP 0x17
707 #define EFI_IFR_RULE_OP 0x18
708 #define EFI_IFR_GRAY_OUT_IF_OP 0x19
709 #define EFI_IFR_DATE_OP 0x1A
710 #define EFI_IFR_TIME_OP 0x1B
711 #define EFI_IFR_STRING_OP 0x1C
712 #define EFI_IFR_REFRESH_OP 0x1D
713 #define EFI_IFR_DISABLE_IF_OP 0x1E
714 #define EFI_IFR_ANIMATION_OP 0x1F
715 #define EFI_IFR_TO_LOWER_OP 0x20
716 #define EFI_IFR_TO_UPPER_OP 0x21
717 #define EFI_IFR_MAP_OP 0x22
718 #define EFI_IFR_ORDERED_LIST_OP 0x23
719 #define EFI_IFR_VARSTORE_OP 0x24
720 #define EFI_IFR_VARSTORE_NAME_VALUE_OP 0x25
721 #define EFI_IFR_VARSTORE_EFI_OP 0x26
722 #define EFI_IFR_VARSTORE_DEVICE_OP 0x27
723 #define EFI_IFR_VERSION_OP 0x28
724 #define EFI_IFR_END_OP 0x29
725 #define EFI_IFR_MATCH_OP 0x2A
726 #define EFI_IFR_GET_OP 0x2B
727 #define EFI_IFR_SET_OP 0x2C
728 #define EFI_IFR_READ_OP 0x2D
729 #define EFI_IFR_WRITE_OP 0x2E
730 #define EFI_IFR_EQUAL_OP 0x2F
731 #define EFI_IFR_NOT_EQUAL_OP 0x30
732 #define EFI_IFR_GREATER_THAN_OP 0x31
733 #define EFI_IFR_GREATER_EQUAL_OP 0x32
734 #define EFI_IFR_LESS_THAN_OP 0x33
735 #define EFI_IFR_LESS_EQUAL_OP 0x34
736 #define EFI_IFR_BITWISE_AND_OP 0x35
737 #define EFI_IFR_BITWISE_OR_OP 0x36
738 #define EFI_IFR_BITWISE_NOT_OP 0x37
739 #define EFI_IFR_SHIFT_LEFT_OP 0x38
740 #define EFI_IFR_SHIFT_RIGHT_OP 0x39
741 #define EFI_IFR_ADD_OP 0x3A
742 #define EFI_IFR_SUBTRACT_OP 0x3B
743 #define EFI_IFR_MULTIPLY_OP 0x3C
744 #define EFI_IFR_DIVIDE_OP 0x3D
745 #define EFI_IFR_MODULO_OP 0x3E
746 #define EFI_IFR_RULE_REF_OP 0x3F
747 #define EFI_IFR_QUESTION_REF1_OP 0x40
748 #define EFI_IFR_QUESTION_REF2_OP 0x41
749 #define EFI_IFR_UINT8_OP 0x42
750 #define EFI_IFR_UINT16_OP 0x43
751 #define EFI_IFR_UINT32_OP 0x44
752 #define EFI_IFR_UINT64_OP 0x45
753 #define EFI_IFR_TRUE_OP 0x46
754 #define EFI_IFR_FALSE_OP 0x47
755 #define EFI_IFR_TO_UINT_OP 0x48
756 #define EFI_IFR_TO_STRING_OP 0x49
757 #define EFI_IFR_TO_BOOLEAN_OP 0x4A
758 #define EFI_IFR_MID_OP 0x4B
759 #define EFI_IFR_FIND_OP 0x4C
760 #define EFI_IFR_TOKEN_OP 0x4D
761 #define EFI_IFR_STRING_REF1_OP 0x4E
762 #define EFI_IFR_STRING_REF2_OP 0x4F
763 #define EFI_IFR_CONDITIONAL_OP 0x50
764 #define EFI_IFR_QUESTION_REF3_OP 0x51
765 #define EFI_IFR_ZERO_OP 0x52
766 #define EFI_IFR_ONE_OP 0x53
767 #define EFI_IFR_ONES_OP 0x54
768 #define EFI_IFR_UNDEFINED_OP 0x55
769 #define EFI_IFR_LENGTH_OP 0x56
770 #define EFI_IFR_DUP_OP 0x57
771 #define EFI_IFR_THIS_OP 0x58
772 #define EFI_IFR_SPAN_OP 0x59
773 #define EFI_IFR_VALUE_OP 0x5A
774 #define EFI_IFR_DEFAULT_OP 0x5B
775 #define EFI_IFR_DEFAULTSTORE_OP 0x5C
776 #define EFI_IFR_FORM_MAP_OP 0x5D
777 #define EFI_IFR_CATENATE_OP 0x5E
778 #define EFI_IFR_GUID_OP 0x5F
779 #define EFI_IFR_SECURITY_OP 0x60
780 #define EFI_IFR_MODAL_TAG_OP 0x61
781 #define EFI_IFR_REFRESH_ID_OP 0x62
782
783 //
784 // Definitions of IFR Standard Headers
785 // Section 27.3.8.2
786 //
787
788 typedef struct _EFI_IFR_OP_HEADER {
789 UINT8 OpCode;
790 UINT8 Length:7;
791 UINT8 Scope:1;
792 } EFI_IFR_OP_HEADER;
793
794 typedef struct _EFI_IFR_STATEMENT_HEADER {
795 EFI_STRING_ID Prompt;
796 EFI_STRING_ID Help;
797 } EFI_IFR_STATEMENT_HEADER;
798
799 typedef struct _EFI_IFR_QUESTION_HEADER {
800 EFI_IFR_STATEMENT_HEADER Header;
801 EFI_QUESTION_ID QuestionId;
802 EFI_VARSTORE_ID VarStoreId;
803 union {
804 EFI_STRING_ID VarName;
805 UINT16 VarOffset;
806 } VarStoreInfo;
807 UINT8 Flags;
808 } EFI_IFR_QUESTION_HEADER;
809
810 //
811 // Flag values of EFI_IFR_QUESTION_HEADER
812 //
813 #define EFI_IFR_FLAG_READ_ONLY 0x01
814 #define EFI_IFR_FLAG_CALLBACK 0x04
815 #define EFI_IFR_FLAG_RESET_REQUIRED 0x10
816 #define EFI_IFR_FLAG_OPTIONS_ONLY 0x80
817
818 //
819 // Definition for Opcode Reference
820 // Section 27.3.8.3
821 //
822 typedef struct _EFI_IFR_DEFAULTSTORE {
823 EFI_IFR_OP_HEADER Header;
824 EFI_STRING_ID DefaultName;
825 UINT16 DefaultId;
826 } EFI_IFR_DEFAULTSTORE;
827
828 //
829 // Default Identifier of default store
830 //
831 #define EFI_HII_DEFAULT_CLASS_STANDARD 0x0000
832 #define EFI_HII_DEFAULT_CLASS_MANUFACTURING 0x0001
833 #define EFI_HII_DEFAULT_CLASS_SAFE 0x0002
834 #define EFI_HII_DEFAULT_CLASS_PLATFORM_BEGIN 0x4000
835 #define EFI_HII_DEFAULT_CLASS_PLATFORM_END 0x7fff
836 #define EFI_HII_DEFAULT_CLASS_HARDWARE_BEGIN 0x8000
837 #define EFI_HII_DEFAULT_CLASS_HARDWARE_END 0xbfff
838 #define EFI_HII_DEFAULT_CLASS_FIRMWARE_BEGIN 0xc000
839 #define EFI_HII_DEFAULT_CLASS_FIRMWARE_END 0xffff
840
841 typedef struct _EFI_IFR_VARSTORE {
842 EFI_IFR_OP_HEADER Header;
843 EFI_GUID Guid;
844 EFI_VARSTORE_ID VarStoreId;
845 UINT16 Size;
846 UINT8 Name[1];
847 } EFI_IFR_VARSTORE;
848
849 typedef struct _EFI_IFR_VARSTORE_EFI {
850 EFI_IFR_OP_HEADER Header;
851 EFI_VARSTORE_ID VarStoreId;
852 EFI_GUID Guid;
853 UINT32 Attributes;
854 UINT16 Size;
855 UINT8 Name[1];
856 } EFI_IFR_VARSTORE_EFI;
857
858 typedef struct _EFI_IFR_VARSTORE_NAME_VALUE {
859 EFI_IFR_OP_HEADER Header;
860 EFI_VARSTORE_ID VarStoreId;
861 EFI_GUID Guid;
862 } EFI_IFR_VARSTORE_NAME_VALUE;
863
864 typedef struct _EFI_IFR_FORM_SET {
865 EFI_IFR_OP_HEADER Header;
866 EFI_GUID Guid;
867 EFI_STRING_ID FormSetTitle;
868 EFI_STRING_ID Help;
869 UINT8 Flags;
870 // EFI_GUID ClassGuid[];
871 } EFI_IFR_FORM_SET;
872
873 typedef struct _EFI_IFR_END {
874 EFI_IFR_OP_HEADER Header;
875 } EFI_IFR_END;
876
877 typedef struct _EFI_IFR_FORM {
878 EFI_IFR_OP_HEADER Header;
879 UINT16 FormId;
880 EFI_STRING_ID FormTitle;
881 } EFI_IFR_FORM;
882
883 typedef struct _EFI_IFR_IMAGE {
884 EFI_IFR_OP_HEADER Header;
885 EFI_IMAGE_ID Id;
886 } EFI_IFR_IMAGE;
887
888 typedef struct _EFI_IFR_MODAL {
889 EFI_IFR_OP_HEADER Header;
890 } EFI_IFR_MODAL;
891
892 typedef struct _EFI_IFR_LOCKED {
893 EFI_IFR_OP_HEADER Header;
894 } EFI_IFR_LOCKED;
895
896 typedef struct _EFI_IFR_RULE {
897 EFI_IFR_OP_HEADER Header;
898 UINT8 RuleId;
899 } EFI_IFR_RULE;
900
901 typedef struct _EFI_IFR_DEFAULT {
902 EFI_IFR_OP_HEADER Header;
903 UINT16 DefaultId;
904 UINT8 Type;
905 EFI_IFR_TYPE_VALUE Value;
906 } EFI_IFR_DEFAULT;
907
908 typedef struct _EFI_IFR_DEFAULT_2 {
909 EFI_IFR_OP_HEADER Header;
910 UINT16 DefaultId;
911 UINT8 Type;
912 } EFI_IFR_DEFAULT_2;
913
914 typedef struct _EFI_IFR_VALUE {
915 EFI_IFR_OP_HEADER Header;
916 } EFI_IFR_VALUE;
917
918 typedef struct _EFI_IFR_SUBTITLE {
919 EFI_IFR_OP_HEADER Header;
920 EFI_IFR_STATEMENT_HEADER Statement;
921 UINT8 Flags;
922 } EFI_IFR_SUBTITLE;
923
924 #define EFI_IFR_FLAGS_HORIZONTAL 0x01
925
926 typedef struct _EFI_IFR_CHECKBOX {
927 EFI_IFR_OP_HEADER Header;
928 EFI_IFR_QUESTION_HEADER Question;
929 UINT8 Flags;
930 } EFI_IFR_CHECKBOX;
931
932 #define EFI_IFR_CHECKBOX_DEFAULT 0x01
933 #define EFI_IFR_CHECKBOX_DEFAULT_MFG 0x02
934
935 typedef struct _EFI_IFR_TEXT {
936 EFI_IFR_OP_HEADER Header;
937 EFI_IFR_STATEMENT_HEADER Statement;
938 EFI_STRING_ID TextTwo;
939 } EFI_IFR_TEXT;
940
941 typedef struct _EFI_IFR_REF {
942 EFI_IFR_OP_HEADER Header;
943 EFI_IFR_QUESTION_HEADER Question;
944 EFI_FORM_ID FormId;
945 } EFI_IFR_REF;
946
947 typedef struct _EFI_IFR_REF2 {
948 EFI_IFR_OP_HEADER Header;
949 EFI_IFR_QUESTION_HEADER Question;
950 EFI_FORM_ID FormId;
951 EFI_QUESTION_ID QuestionId;
952 } EFI_IFR_REF2;
953
954 typedef struct _EFI_IFR_REF3 {
955 EFI_IFR_OP_HEADER Header;
956 EFI_IFR_QUESTION_HEADER Question;
957 EFI_FORM_ID FormId;
958 EFI_QUESTION_ID QuestionId;
959 EFI_GUID FormSetId;
960 } EFI_IFR_REF3;
961
962 typedef struct _EFI_IFR_REF4 {
963 EFI_IFR_OP_HEADER Header;
964 EFI_IFR_QUESTION_HEADER Question;
965 EFI_FORM_ID FormId;
966 EFI_QUESTION_ID QuestionId;
967 EFI_GUID FormSetId;
968 EFI_STRING_ID DevicePath;
969 } EFI_IFR_REF4;
970
971 typedef struct _EFI_IFR_REF5 {
972 EFI_IFR_OP_HEADER Header;
973 EFI_IFR_QUESTION_HEADER Question;
974 } EFI_IFR_REF5;
975
976 typedef struct _EFI_IFR_RESET_BUTTON {
977 EFI_IFR_OP_HEADER Header;
978 EFI_IFR_STATEMENT_HEADER Statement;
979 EFI_DEFAULT_ID DefaultId;
980 } EFI_IFR_RESET_BUTTON;
981
982 typedef struct _EFI_IFR_ACTION {
983 EFI_IFR_OP_HEADER Header;
984 EFI_IFR_QUESTION_HEADER Question;
985 EFI_STRING_ID QuestionConfig;
986 } EFI_IFR_ACTION;
987
988 typedef struct _EFI_IFR_ACTION_1 {
989 EFI_IFR_OP_HEADER Header;
990 EFI_IFR_QUESTION_HEADER Question;
991 } EFI_IFR_ACTION_1;
992
993 typedef struct _EFI_IFR_DATE {
994 EFI_IFR_OP_HEADER Header;
995 EFI_IFR_QUESTION_HEADER Question;
996 UINT8 Flags;
997 } EFI_IFR_DATE;
998
999 //
1000 // Flags that describe the behavior of the question.
1001 //
1002 #define EFI_QF_DATE_YEAR_SUPPRESS 0x01
1003 #define EFI_QF_DATE_MONTH_SUPPRESS 0x02
1004 #define EFI_QF_DATE_DAY_SUPPRESS 0x04
1005
1006 #define EFI_QF_DATE_STORAGE 0x30
1007 #define QF_DATE_STORAGE_NORMAL 0x00
1008 #define QF_DATE_STORAGE_TIME 0x10
1009 #define QF_DATE_STORAGE_WAKEUP 0x20
1010
1011 typedef union {
1012 struct {
1013 UINT8 MinValue;
1014 UINT8 MaxValue;
1015 UINT8 Step;
1016 } u8;
1017 struct {
1018 UINT16 MinValue;
1019 UINT16 MaxValue;
1020 UINT16 Step;
1021 } u16;
1022 struct {
1023 UINT32 MinValue;
1024 UINT32 MaxValue;
1025 UINT32 Step;
1026 } u32;
1027 struct {
1028 UINT64 MinValue;
1029 UINT64 MaxValue;
1030 UINT64 Step;
1031 } u64;
1032 } MINMAXSTEP_DATA;
1033
1034 typedef struct _EFI_IFR_NUMERIC {
1035 EFI_IFR_OP_HEADER Header;
1036 EFI_IFR_QUESTION_HEADER Question;
1037 UINT8 Flags;
1038 MINMAXSTEP_DATA data;
1039 } EFI_IFR_NUMERIC;
1040
1041 //
1042 // Flags related to the numeric question
1043 //
1044 #define EFI_IFR_NUMERIC_SIZE 0x03
1045 #define EFI_IFR_NUMERIC_SIZE_1 0x00
1046 #define EFI_IFR_NUMERIC_SIZE_2 0x01
1047 #define EFI_IFR_NUMERIC_SIZE_4 0x02
1048 #define EFI_IFR_NUMERIC_SIZE_8 0x03
1049
1050 #define EFI_IFR_DISPLAY 0x30
1051 #define EFI_IFR_DISPLAY_INT_DEC 0x00
1052 #define EFI_IFR_DISPLAY_UINT_DEC 0x10
1053 #define EFI_IFR_DISPLAY_UINT_HEX 0x20
1054
1055 typedef struct _EFI_IFR_ONE_OF {
1056 EFI_IFR_OP_HEADER Header;
1057 EFI_IFR_QUESTION_HEADER Question;
1058 UINT8 Flags;
1059 MINMAXSTEP_DATA data;
1060 } EFI_IFR_ONE_OF;
1061
1062 typedef struct _EFI_IFR_STRING {
1063 EFI_IFR_OP_HEADER Header;
1064 EFI_IFR_QUESTION_HEADER Question;
1065 UINT8 MinSize;
1066 UINT8 MaxSize;
1067 UINT8 Flags;
1068 } EFI_IFR_STRING;
1069
1070 #define EFI_IFR_STRING_MULTI_LINE 0x01
1071
1072 typedef struct _EFI_IFR_PASSWORD {
1073 EFI_IFR_OP_HEADER Header;
1074 EFI_IFR_QUESTION_HEADER Question;
1075 UINT16 MinSize;
1076 UINT16 MaxSize;
1077 } EFI_IFR_PASSWORD;
1078
1079 typedef struct _EFI_IFR_ORDERED_LIST {
1080 EFI_IFR_OP_HEADER Header;
1081 EFI_IFR_QUESTION_HEADER Question;
1082 UINT8 MaxContainers;
1083 UINT8 Flags;
1084 } EFI_IFR_ORDERED_LIST;
1085
1086 #define EFI_IFR_UNIQUE_SET 0x01
1087 #define EFI_IFR_NO_EMPTY_SET 0x02
1088
1089 typedef struct _EFI_IFR_TIME {
1090 EFI_IFR_OP_HEADER Header;
1091 EFI_IFR_QUESTION_HEADER Question;
1092 UINT8 Flags;
1093 } EFI_IFR_TIME;
1094
1095 //
1096 // A bit-mask that determines which unique settings are active for this opcode.
1097 //
1098 #define QF_TIME_HOUR_SUPPRESS 0x01
1099 #define QF_TIME_MINUTE_SUPPRESS 0x02
1100 #define QF_TIME_SECOND_SUPPRESS 0x04
1101
1102 #define QF_TIME_STORAGE 0x30
1103 #define QF_TIME_STORAGE_NORMAL 0x00
1104 #define QF_TIME_STORAGE_TIME 0x10
1105 #define QF_TIME_STORAGE_WAKEUP 0x20
1106
1107 typedef struct _EFI_IFR_DISABLE_IF {
1108 EFI_IFR_OP_HEADER Header;
1109 } EFI_IFR_DISABLE_IF;
1110
1111 typedef struct _EFI_IFR_SUPPRESS_IF {
1112 EFI_IFR_OP_HEADER Header;
1113 } EFI_IFR_SUPPRESS_IF;
1114
1115 typedef struct _EFI_IFR_GRAY_OUT_IF {
1116 EFI_IFR_OP_HEADER Header;
1117 } EFI_IFR_GRAY_OUT_IF;
1118
1119 typedef struct _EFI_IFR_INCONSISTENT_IF {
1120 EFI_IFR_OP_HEADER Header;
1121 EFI_STRING_ID Error;
1122 } EFI_IFR_INCONSISTENT_IF;
1123
1124 typedef struct _EFI_IFR_NO_SUBMIT_IF {
1125 EFI_IFR_OP_HEADER Header;
1126 EFI_STRING_ID Error;
1127 } EFI_IFR_NO_SUBMIT_IF;
1128
1129 typedef struct _EFI_IFR_REFRESH {
1130 EFI_IFR_OP_HEADER Header;
1131 UINT8 RefreshInterval;
1132 } EFI_IFR_REFRESH;
1133
1134 typedef struct _EFI_IFR_VARSTORE_DEVICE {
1135 EFI_IFR_OP_HEADER Header;
1136 EFI_STRING_ID DevicePath;
1137 } EFI_IFR_VARSTORE_DEVICE;
1138
1139 typedef struct _EFI_IFR_ONE_OF_OPTION {
1140 EFI_IFR_OP_HEADER Header;
1141 EFI_STRING_ID Option;
1142 UINT8 Flags;
1143 UINT8 Type;
1144 EFI_IFR_TYPE_VALUE Value;
1145 } EFI_IFR_ONE_OF_OPTION;
1146
1147 //
1148 // Types of the option's value.
1149 //
1150 #define EFI_IFR_TYPE_NUM_SIZE_8 0x00
1151 #define EFI_IFR_TYPE_NUM_SIZE_16 0x01
1152 #define EFI_IFR_TYPE_NUM_SIZE_32 0x02
1153 #define EFI_IFR_TYPE_NUM_SIZE_64 0x03
1154 #define EFI_IFR_TYPE_BOOLEAN 0x04
1155 #define EFI_IFR_TYPE_TIME 0x05
1156 #define EFI_IFR_TYPE_DATE 0x06
1157 #define EFI_IFR_TYPE_STRING 0x07
1158 #define EFI_IFR_TYPE_OTHER 0x08
1159 #define EFI_IFR_TYPE_UNDEFINED 0x09
1160 #define EFI_IFR_TYPE_ACTION 0x0A
1161 #define EFI_IFR_TYPE_BUFFER 0x0B
1162 #define EFI_IFR_TYPE_REF 0x0C
1163
1164 #define EFI_IFR_OPTION_DEFAULT 0x10
1165 #define EFI_IFR_OPTION_DEFAULT_MFG 0x20
1166
1167 typedef struct _EFI_IFR_GUID {
1168 EFI_IFR_OP_HEADER Header;
1169 EFI_GUID Guid;
1170 //Optional Data Follows
1171 } EFI_IFR_GUID;
1172
1173 typedef struct _EFI_IFR_REFRESH_ID {
1174 EFI_IFR_OP_HEADER Header;
1175 EFI_GUID RefreshEventGroupId;
1176 } EFI_IFR_REFRESH_ID;
1177
1178 typedef struct _EFI_IFR_DUP {
1179 EFI_IFR_OP_HEADER Header;
1180 } EFI_IFR_DUP;
1181
1182 typedef struct _EFI_IFR_EQ_ID_ID {
1183 EFI_IFR_OP_HEADER Header;
1184 EFI_QUESTION_ID QuestionId1;
1185 EFI_QUESTION_ID QuestionId2;
1186 } EFI_IFR_EQ_ID_ID;
1187
1188 typedef struct _EFI_IFR_EQ_ID_VAL {
1189 EFI_IFR_OP_HEADER Header;
1190 EFI_QUESTION_ID QuestionId;
1191 UINT16 Value;
1192 } EFI_IFR_EQ_ID_VAL;
1193
1194 typedef struct _EFI_IFR_EQ_ID_VAL_LIST {
1195 EFI_IFR_OP_HEADER Header;
1196 EFI_QUESTION_ID QuestionId;
1197 UINT16 ListLength;
1198 UINT16 ValueList[1];
1199 } EFI_IFR_EQ_ID_VAL_LIST;
1200
1201 typedef struct _EFI_IFR_UINT8 {
1202 EFI_IFR_OP_HEADER Header;
1203 UINT8 Value;
1204 } EFI_IFR_UINT8;
1205
1206 typedef struct _EFI_IFR_UINT16 {
1207 EFI_IFR_OP_HEADER Header;
1208 UINT16 Value;
1209 } EFI_IFR_UINT16;
1210
1211 typedef struct _EFI_IFR_UINT32 {
1212 EFI_IFR_OP_HEADER Header;
1213 UINT32 Value;
1214 } EFI_IFR_UINT32;
1215
1216 typedef struct _EFI_IFR_UINT64 {
1217 EFI_IFR_OP_HEADER Header;
1218 UINT64 Value;
1219 } EFI_IFR_UINT64;
1220
1221 typedef struct _EFI_IFR_QUESTION_REF1 {
1222 EFI_IFR_OP_HEADER Header;
1223 EFI_QUESTION_ID QuestionId;
1224 } EFI_IFR_QUESTION_REF1;
1225
1226 typedef struct _EFI_IFR_QUESTION_REF2 {
1227 EFI_IFR_OP_HEADER Header;
1228 } EFI_IFR_QUESTION_REF2;
1229
1230 typedef struct _EFI_IFR_QUESTION_REF3 {
1231 EFI_IFR_OP_HEADER Header;
1232 } EFI_IFR_QUESTION_REF3;
1233
1234 typedef struct _EFI_IFR_QUESTION_REF3_2 {
1235 EFI_IFR_OP_HEADER Header;
1236 EFI_STRING_ID DevicePath;
1237 } EFI_IFR_QUESTION_REF3_2;
1238
1239 typedef struct _EFI_IFR_QUESTION_REF3_3 {
1240 EFI_IFR_OP_HEADER Header;
1241 EFI_STRING_ID DevicePath;
1242 EFI_GUID Guid;
1243 } EFI_IFR_QUESTION_REF3_3;
1244
1245 typedef struct _EFI_IFR_RULE_REF {
1246 EFI_IFR_OP_HEADER Header;
1247 UINT8 RuleId;
1248 } EFI_IFR_RULE_REF;
1249
1250 typedef struct _EFI_IFR_STRING_REF1 {
1251 EFI_IFR_OP_HEADER Header;
1252 EFI_STRING_ID StringId;
1253 } EFI_IFR_STRING_REF1;
1254
1255 typedef struct _EFI_IFR_STRING_REF2 {
1256 EFI_IFR_OP_HEADER Header;
1257 } EFI_IFR_STRING_REF2;
1258
1259 typedef struct _EFI_IFR_THIS {
1260 EFI_IFR_OP_HEADER Header;
1261 } EFI_IFR_THIS;
1262
1263 typedef struct _EFI_IFR_TRUE {
1264 EFI_IFR_OP_HEADER Header;
1265 } EFI_IFR_TRUE;
1266
1267 typedef struct _EFI_IFR_FALSE {
1268 EFI_IFR_OP_HEADER Header;
1269 } EFI_IFR_FALSE;
1270
1271 typedef struct _EFI_IFR_ONE {
1272 EFI_IFR_OP_HEADER Header;
1273 } EFI_IFR_ONE;
1274
1275 typedef struct _EFI_IFR_ONES {
1276 EFI_IFR_OP_HEADER Header;
1277 } EFI_IFR_ONES;
1278
1279 typedef struct _EFI_IFR_ZERO {
1280 EFI_IFR_OP_HEADER Header;
1281 } EFI_IFR_ZERO;
1282
1283 typedef struct _EFI_IFR_UNDEFINED {
1284 EFI_IFR_OP_HEADER Header;
1285 } EFI_IFR_UNDEFINED;
1286
1287 typedef struct _EFI_IFR_VERSION {
1288 EFI_IFR_OP_HEADER Header;
1289 } EFI_IFR_VERSION;
1290
1291 typedef struct _EFI_IFR_LENGTH {
1292 EFI_IFR_OP_HEADER Header;
1293 } EFI_IFR_LENGTH;
1294
1295 typedef struct _EFI_IFR_NOT {
1296 EFI_IFR_OP_HEADER Header;
1297 } EFI_IFR_NOT;
1298
1299 typedef struct _EFI_IFR_BITWISE_NOT {
1300 EFI_IFR_OP_HEADER Header;
1301 } EFI_IFR_BITWISE_NOT;
1302
1303 typedef struct _EFI_IFR_TO_BOOLEAN {
1304 EFI_IFR_OP_HEADER Header;
1305 } EFI_IFR_TO_BOOLEAN;
1306
1307 ///
1308 /// For EFI_IFR_TO_STRING, when converting from
1309 /// unsigned integers, these flags control the format:
1310 /// 0 = unsigned decimal.
1311 /// 1 = signed decimal.
1312 /// 2 = hexadecimal (lower-case alpha).
1313 /// 3 = hexadecimal (upper-case alpha).
1314 ///@{
1315 #define EFI_IFR_STRING_UNSIGNED_DEC 0
1316 #define EFI_IFR_STRING_SIGNED_DEC 1
1317 #define EFI_IFR_STRING_LOWERCASE_HEX 2
1318 #define EFI_IFR_STRING_UPPERCASE_HEX 3
1319 ///@}
1320
1321 ///
1322 /// When converting from a buffer, these flags control the format:
1323 /// 0 = ASCII.
1324 /// 8 = Unicode.
1325 ///@{
1326 #define EFI_IFR_STRING_ASCII 0
1327 #define EFI_IFR_STRING_UNICODE 8
1328 ///@}
1329
1330 typedef struct _EFI_IFR_TO_STRING {
1331 EFI_IFR_OP_HEADER Header;
1332 UINT8 Format;
1333 } EFI_IFR_TO_STRING;
1334
1335 typedef struct _EFI_IFR_TO_UINT {
1336 EFI_IFR_OP_HEADER Header;
1337 } EFI_IFR_TO_UINT;
1338
1339 typedef struct _EFI_IFR_TO_UPPER {
1340 EFI_IFR_OP_HEADER Header;
1341 } EFI_IFR_TO_UPPER;
1342
1343 typedef struct _EFI_IFR_TO_LOWER {
1344 EFI_IFR_OP_HEADER Header;
1345 } EFI_IFR_TO_LOWER;
1346
1347 typedef struct _EFI_IFR_ADD {
1348 EFI_IFR_OP_HEADER Header;
1349 } EFI_IFR_ADD;
1350
1351 typedef struct _EFI_IFR_AND {
1352 EFI_IFR_OP_HEADER Header;
1353 } EFI_IFR_AND;
1354
1355 typedef struct _EFI_IFR_BITWISE_AND {
1356 EFI_IFR_OP_HEADER Header;
1357 } EFI_IFR_BITWISE_AND;
1358
1359 typedef struct _EFI_IFR_BITWISE_OR {
1360 EFI_IFR_OP_HEADER Header;
1361 } EFI_IFR_BITWISE_OR;
1362
1363 typedef struct _EFI_IFR_CATENATE {
1364 EFI_IFR_OP_HEADER Header;
1365 } EFI_IFR_CATENATE;
1366
1367 typedef struct _EFI_IFR_DIVIDE {
1368 EFI_IFR_OP_HEADER Header;
1369 } EFI_IFR_DIVIDE;
1370
1371 typedef struct _EFI_IFR_EQUAL {
1372 EFI_IFR_OP_HEADER Header;
1373 } EFI_IFR_EQUAL;
1374
1375 typedef struct _EFI_IFR_GREATER_EQUAL {
1376 EFI_IFR_OP_HEADER Header;
1377 } EFI_IFR_GREATER_EQUAL;
1378
1379 typedef struct _EFI_IFR_GREATER_THAN {
1380 EFI_IFR_OP_HEADER Header;
1381 } EFI_IFR_GREATER_THAN;
1382
1383 typedef struct _EFI_IFR_LESS_EQUAL {
1384 EFI_IFR_OP_HEADER Header;
1385 } EFI_IFR_LESS_EQUAL;
1386
1387 typedef struct _EFI_IFR_LESS_THAN {
1388 EFI_IFR_OP_HEADER Header;
1389 } EFI_IFR_LESS_THAN;
1390
1391 typedef struct _EFI_IFR_MATCH {
1392 EFI_IFR_OP_HEADER Header;
1393 } EFI_IFR_MATCH;
1394
1395 typedef struct _EFI_IFR_MULTIPLY {
1396 EFI_IFR_OP_HEADER Header;
1397 } EFI_IFR_MULTIPLY;
1398
1399 typedef struct _EFI_IFR_MODULO {
1400 EFI_IFR_OP_HEADER Header;
1401 } EFI_IFR_MODULO;
1402
1403 typedef struct _EFI_IFR_NOT_EQUAL {
1404 EFI_IFR_OP_HEADER Header;
1405 } EFI_IFR_NOT_EQUAL;
1406
1407 typedef struct _EFI_IFR_OR {
1408 EFI_IFR_OP_HEADER Header;
1409 } EFI_IFR_OR;
1410
1411 typedef struct _EFI_IFR_SHIFT_LEFT {
1412 EFI_IFR_OP_HEADER Header;
1413 } EFI_IFR_SHIFT_LEFT;
1414
1415 typedef struct _EFI_IFR_SHIFT_RIGHT {
1416 EFI_IFR_OP_HEADER Header;
1417 } EFI_IFR_SHIFT_RIGHT;
1418
1419 typedef struct _EFI_IFR_SUBTRACT {
1420 EFI_IFR_OP_HEADER Header;
1421 } EFI_IFR_SUBTRACT;
1422
1423 typedef struct _EFI_IFR_CONDITIONAL {
1424 EFI_IFR_OP_HEADER Header;
1425 } EFI_IFR_CONDITIONAL;
1426
1427 //
1428 // Flags governing the matching criteria of EFI_IFR_FIND
1429 //
1430 #define EFI_IFR_FF_CASE_SENSITIVE 0x00
1431 #define EFI_IFR_FF_CASE_INSENSITIVE 0x01
1432
1433 typedef struct _EFI_IFR_FIND {
1434 EFI_IFR_OP_HEADER Header;
1435 UINT8 Format;
1436 } EFI_IFR_FIND;
1437
1438 typedef struct _EFI_IFR_MID {
1439 EFI_IFR_OP_HEADER Header;
1440 } EFI_IFR_MID;
1441
1442 typedef struct _EFI_IFR_TOKEN {
1443 EFI_IFR_OP_HEADER Header;
1444 } EFI_IFR_TOKEN;
1445
1446 //
1447 // Flags specifying whether to find the first matching string
1448 // or the first non-matching string.
1449 //
1450 #define EFI_IFR_FLAGS_FIRST_MATCHING 0x00
1451 #define EFI_IFR_FLAGS_FIRST_NON_MATCHING 0x01
1452
1453 typedef struct _EFI_IFR_SPAN {
1454 EFI_IFR_OP_HEADER Header;
1455 UINT8 Flags;
1456 } EFI_IFR_SPAN;
1457
1458 typedef struct _EFI_IFR_SECURITY {
1459 ///
1460 /// Standard opcode header, where Header.Op = EFI_IFR_SECURITY_OP.
1461 ///
1462 EFI_IFR_OP_HEADER Header;
1463 ///
1464 /// Security permission level.
1465 ///
1466 EFI_GUID Permissions;
1467 } EFI_IFR_SECURITY;
1468
1469 typedef struct _EFI_IFR_FORM_MAP_METHOD {
1470 ///
1471 /// The string identifier which provides the human-readable name of
1472 /// the configuration method for this standards map form.
1473 ///
1474 EFI_STRING_ID MethodTitle;
1475 ///
1476 /// Identifier which uniquely specifies the configuration methods
1477 /// associated with this standards map form.
1478 ///
1479 EFI_GUID MethodIdentifier;
1480 } EFI_IFR_FORM_MAP_METHOD;
1481
1482 typedef struct _EFI_IFR_FORM_MAP {
1483 ///
1484 /// The sequence that defines the type of opcode as well as the length
1485 /// of the opcode being defined. Header.OpCode = EFI_IFR_FORM_MAP_OP.
1486 ///
1487 EFI_IFR_OP_HEADER Header;
1488 ///
1489 /// The unique identifier for this particular form.
1490 ///
1491 EFI_FORM_ID FormId;
1492 ///
1493 /// One or more configuration method's name and unique identifier.
1494 ///
1495 // EFI_IFR_FORM_MAP_METHOD Methods[];
1496 } EFI_IFR_FORM_MAP;
1497
1498 typedef struct _EFI_IFR_SET {
1499 ///
1500 /// The sequence that defines the type of opcode as well as the length
1501 /// of the opcode being defined. Header.OpCode = EFI_IFR_SET_OP.
1502 ///
1503 EFI_IFR_OP_HEADER Header;
1504 ///
1505 /// Specifies the identifier of a previously declared variable store to
1506 /// use when storing the question's value.
1507 ///
1508 EFI_VARSTORE_ID VarStoreId;
1509 union {
1510 ///
1511 /// A 16-bit Buffer Storage offset.
1512 ///
1513 EFI_STRING_ID VarName;
1514 ///
1515 /// A Name Value or EFI Variable name (VarName).
1516 ///
1517 UINT16 VarOffset;
1518 } VarStoreInfo;
1519 ///
1520 /// Specifies the type used for storage.
1521 ///
1522 UINT8 VarStoreType;
1523 } EFI_IFR_SET;
1524
1525 typedef struct _EFI_IFR_GET {
1526 ///
1527 /// The sequence that defines the type of opcode as well as the length
1528 /// of the opcode being defined. Header.OpCode = EFI_IFR_GET_OP.
1529 ///
1530 EFI_IFR_OP_HEADER Header;
1531 ///
1532 /// Specifies the identifier of a previously declared variable store to
1533 /// use when retrieving the value.
1534 ///
1535 EFI_VARSTORE_ID VarStoreId;
1536 union {
1537 ///
1538 /// A 16-bit Buffer Storage offset.
1539 ///
1540 EFI_STRING_ID VarName;
1541 ///
1542 /// A Name Value or EFI Variable name (VarName).
1543 ///
1544 UINT16 VarOffset;
1545 } VarStoreInfo;
1546 ///
1547 /// Specifies the type used for storage.
1548 ///
1549 UINT8 VarStoreType;
1550 } EFI_IFR_GET;
1551
1552 typedef struct _EFI_IFR_READ {
1553 EFI_IFR_OP_HEADER Header;
1554 } EFI_IFR_READ;
1555
1556 typedef struct _EFI_IFR_WRITE {
1557 EFI_IFR_OP_HEADER Header;
1558 } EFI_IFR_WRITE;
1559
1560 typedef struct _EFI_IFR_MAP {
1561 EFI_IFR_OP_HEADER Header;
1562 } EFI_IFR_MAP;
1563 //
1564 // Definitions for Keyboard Package
1565 // Releated definitions are in Section of EFI_HII_DATABASE_PROTOCOL
1566 //
1567
1568 ///
1569 /// Each enumeration values maps a physical key on a keyboard.
1570 ///
1571 typedef enum {
1572 EfiKeyLCtrl,
1573 EfiKeyA0,
1574 EfiKeyLAlt,
1575 EfiKeySpaceBar,
1576 EfiKeyA2,
1577 EfiKeyA3,
1578 EfiKeyA4,
1579 EfiKeyRCtrl,
1580 EfiKeyLeftArrow,
1581 EfiKeyDownArrow,
1582 EfiKeyRightArrow,
1583 EfiKeyZero,
1584 EfiKeyPeriod,
1585 EfiKeyEnter,
1586 EfiKeyLShift,
1587 EfiKeyB0,
1588 EfiKeyB1,
1589 EfiKeyB2,
1590 EfiKeyB3,
1591 EfiKeyB4,
1592 EfiKeyB5,
1593 EfiKeyB6,
1594 EfiKeyB7,
1595 EfiKeyB8,
1596 EfiKeyB9,
1597 EfiKeyB10,
1598 EfiKeyRShift,
1599 EfiKeyUpArrow,
1600 EfiKeyOne,
1601 EfiKeyTwo,
1602 EfiKeyThree,
1603 EfiKeyCapsLock,
1604 EfiKeyC1,
1605 EfiKeyC2,
1606 EfiKeyC3,
1607 EfiKeyC4,
1608 EfiKeyC5,
1609 EfiKeyC6,
1610 EfiKeyC7,
1611 EfiKeyC8,
1612 EfiKeyC9,
1613 EfiKeyC10,
1614 EfiKeyC11,
1615 EfiKeyC12,
1616 EfiKeyFour,
1617 EfiKeyFive,
1618 EfiKeySix,
1619 EfiKeyPlus,
1620 EfiKeyTab,
1621 EfiKeyD1,
1622 EfiKeyD2,
1623 EfiKeyD3,
1624 EfiKeyD4,
1625 EfiKeyD5,
1626 EfiKeyD6,
1627 EfiKeyD7,
1628 EfiKeyD8,
1629 EfiKeyD9,
1630 EfiKeyD10,
1631 EfiKeyD11,
1632 EfiKeyD12,
1633 EfiKeyD13,
1634 EfiKeyDel,
1635 EfiKeyEnd,
1636 EfiKeyPgDn,
1637 EfiKeySeven,
1638 EfiKeyEight,
1639 EfiKeyNine,
1640 EfiKeyE0,
1641 EfiKeyE1,
1642 EfiKeyE2,
1643 EfiKeyE3,
1644 EfiKeyE4,
1645 EfiKeyE5,
1646 EfiKeyE6,
1647 EfiKeyE7,
1648 EfiKeyE8,
1649 EfiKeyE9,
1650 EfiKeyE10,
1651 EfiKeyE11,
1652 EfiKeyE12,
1653 EfiKeyBackSpace,
1654 EfiKeyIns,
1655 EfiKeyHome,
1656 EfiKeyPgUp,
1657 EfiKeyNLck,
1658 EfiKeySlash,
1659 EfiKeyAsterisk,
1660 EfiKeyMinus,
1661 EfiKeyEsc,
1662 EfiKeyF1,
1663 EfiKeyF2,
1664 EfiKeyF3,
1665 EfiKeyF4,
1666 EfiKeyF5,
1667 EfiKeyF6,
1668 EfiKeyF7,
1669 EfiKeyF8,
1670 EfiKeyF9,
1671 EfiKeyF10,
1672 EfiKeyF11,
1673 EfiKeyF12,
1674 EfiKeyPrint,
1675 EfiKeySLck,
1676 EfiKeyPause
1677 } EFI_KEY;
1678
1679 typedef struct {
1680 ///
1681 /// Used to describe a physical key on a keyboard.
1682 ///
1683 EFI_KEY Key;
1684 ///
1685 /// Unicode character code for the Key.
1686 ///
1687 CHAR16 Unicode;
1688 ///
1689 /// Unicode character code for the key with the shift key being held down.
1690 ///
1691 CHAR16 ShiftedUnicode;
1692 ///
1693 /// Unicode character code for the key with the Alt-GR being held down.
1694 ///
1695 CHAR16 AltGrUnicode;
1696 ///
1697 /// Unicode character code for the key with the Alt-GR and shift keys being held down.
1698 ///
1699 CHAR16 ShiftedAltGrUnicode;
1700 ///
1701 /// Modifier keys are defined to allow for special functionality that is not necessarily
1702 /// accomplished by a printable character. Many of these modifier keys are flags to toggle
1703 /// certain state bits on and off inside of a keyboard driver.
1704 ///
1705 UINT16 Modifier;
1706 UINT16 AffectedAttribute;
1707 } EFI_KEY_DESCRIPTOR;
1708
1709 ///
1710 /// A key which is affected by all the standard shift modifiers.
1711 /// Most keys would be expected to have this bit active.
1712 ///
1713 #define EFI_AFFECTED_BY_STANDARD_SHIFT 0x0001
1714
1715 ///
1716 /// This key is affected by the caps lock so that if a keyboard driver
1717 /// would need to disambiguate between a key which had a "1" defined
1718 /// versus an "a" character. Having this bit turned on would tell
1719 /// the keyboard driver to use the appropriate shifted state or not.
1720 ///
1721 #define EFI_AFFECTED_BY_CAPS_LOCK 0x0002
1722
1723 ///
1724 /// Similar to the case of CAPS lock, if this bit is active, the key
1725 /// is affected by the num lock being turned on.
1726 ///
1727 #define EFI_AFFECTED_BY_NUM_LOCK 0x0004
1728
1729 typedef struct {
1730 UINT16 LayoutLength;
1731 EFI_GUID Guid;
1732 UINT32 LayoutDescriptorStringOffset;
1733 UINT8 DescriptorCount;
1734 // EFI_KEY_DESCRIPTOR Descriptors[];
1735 } EFI_HII_KEYBOARD_LAYOUT;
1736
1737 typedef struct {
1738 EFI_HII_PACKAGE_HEADER Header;
1739 UINT16 LayoutCount;
1740 // EFI_HII_KEYBOARD_LAYOUT Layout[];
1741 } EFI_HII_KEYBOARD_PACKAGE_HDR;
1742
1743 //
1744 // Modifier values
1745 //
1746 #define EFI_NULL_MODIFIER 0x0000
1747 #define EFI_LEFT_CONTROL_MODIFIER 0x0001
1748 #define EFI_RIGHT_CONTROL_MODIFIER 0x0002
1749 #define EFI_LEFT_ALT_MODIFIER 0x0003
1750 #define EFI_RIGHT_ALT_MODIFIER 0x0004
1751 #define EFI_ALT_GR_MODIFIER 0x0005
1752 #define EFI_INSERT_MODIFIER 0x0006
1753 #define EFI_DELETE_MODIFIER 0x0007
1754 #define EFI_PAGE_DOWN_MODIFIER 0x0008
1755 #define EFI_PAGE_UP_MODIFIER 0x0009
1756 #define EFI_HOME_MODIFIER 0x000A
1757 #define EFI_END_MODIFIER 0x000B
1758 #define EFI_LEFT_SHIFT_MODIFIER 0x000C
1759 #define EFI_RIGHT_SHIFT_MODIFIER 0x000D
1760 #define EFI_CAPS_LOCK_MODIFIER 0x000E
1761 #define EFI_NUM_LOCK_MODIFIER 0x000F
1762 #define EFI_LEFT_ARROW_MODIFIER 0x0010
1763 #define EFI_RIGHT_ARROW_MODIFIER 0x0011
1764 #define EFI_DOWN_ARROW_MODIFIER 0x0012
1765 #define EFI_UP_ARROW_MODIFIER 0x0013
1766 #define EFI_NS_KEY_MODIFIER 0x0014
1767 #define EFI_NS_KEY_DEPENDENCY_MODIFIER 0x0015
1768 #define EFI_FUNCTION_KEY_ONE_MODIFIER 0x0016
1769 #define EFI_FUNCTION_KEY_TWO_MODIFIER 0x0017
1770 #define EFI_FUNCTION_KEY_THREE_MODIFIER 0x0018
1771 #define EFI_FUNCTION_KEY_FOUR_MODIFIER 0x0019
1772 #define EFI_FUNCTION_KEY_FIVE_MODIFIER 0x001A
1773 #define EFI_FUNCTION_KEY_SIX_MODIFIER 0x001B
1774 #define EFI_FUNCTION_KEY_SEVEN_MODIFIER 0x001C
1775 #define EFI_FUNCTION_KEY_EIGHT_MODIFIER 0x001D
1776 #define EFI_FUNCTION_KEY_NINE_MODIFIER 0x001E
1777 #define EFI_FUNCTION_KEY_TEN_MODIFIER 0x001F
1778 #define EFI_FUNCTION_KEY_ELEVEN_MODIFIER 0x0020
1779 #define EFI_FUNCTION_KEY_TWELVE_MODIFIER 0x0021
1780
1781 //
1782 // Keys that have multiple control functions based on modifier
1783 // settings are handled in the keyboard driver implementation.
1784 // For instance, PRINT_KEY might have a modifier held down and
1785 // is still a nonprinting character, but might have an alternate
1786 // control function like SYSREQUEST
1787 //
1788 #define EFI_PRINT_MODIFIER 0x0022
1789 #define EFI_SYS_REQUEST_MODIFIER 0x0023
1790 #define EFI_SCROLL_LOCK_MODIFIER 0x0024
1791 #define EFI_PAUSE_MODIFIER 0x0025
1792 #define EFI_BREAK_MODIFIER 0x0026
1793
1794 #define EFI_LEFT_LOGO_MODIFIER 0x0027
1795 #define EFI_RIGHT_LOGO_MODIFIER 0x0028
1796 #define EFI_MENU_MODIFIER 0x0029
1797
1798 ///
1799 /// Animation IFR opcode
1800 ///
1801 typedef struct _EFI_IFR_ANIMATION {
1802 ///
1803 /// Standard opcode header, where Header.OpCode is
1804 /// EFI_IFR_ANIMATION_OP.
1805 ///
1806 EFI_IFR_OP_HEADER Header;
1807 ///
1808 /// Animation identifier in the HII database.
1809 ///
1810 EFI_ANIMATION_ID Id;
1811 } EFI_IFR_ANIMATION;
1812
1813 ///
1814 /// HII animation package header.
1815 ///
1816 typedef struct _EFI_HII_ANIMATION_PACKAGE_HDR {
1817 ///
1818 /// Standard package header, where Header.Type = EFI_HII_PACKAGE_ANIMATIONS.
1819 ///
1820 EFI_HII_PACKAGE_HEADER Header;
1821 ///
1822 /// Offset, relative to this header, of the animation information. If
1823 /// this is zero, then there are no animation sequences in the package.
1824 ///
1825 UINT32 AnimationInfoOffset;
1826 } EFI_HII_ANIMATION_PACKAGE_HDR;
1827
1828 ///
1829 /// Animation information is encoded as a series of blocks,
1830 /// with each block prefixed by a single byte header EFI_HII_ANIMATION_BLOCK.
1831 ///
1832 typedef struct _EFI_HII_ANIMATION_BLOCK {
1833 UINT8 BlockType;
1834 //UINT8 BlockBody[];
1835 } EFI_HII_ANIMATION_BLOCK;
1836
1837 ///
1838 /// Animation block types.
1839 ///
1840 #define EFI_HII_AIBT_END 0x00
1841 #define EFI_HII_AIBT_OVERLAY_IMAGES 0x10
1842 #define EFI_HII_AIBT_CLEAR_IMAGES 0x11
1843 #define EFI_HII_AIBT_RESTORE_SCRN 0x12
1844 #define EFI_HII_AIBT_OVERLAY_IMAGES_LOOP 0x18
1845 #define EFI_HII_AIBT_CLEAR_IMAGES_LOOP 0x19
1846 #define EFI_HII_AIBT_RESTORE_SCRN_LOOP 0x1A
1847 #define EFI_HII_AIBT_DUPLICATE 0x20
1848 #define EFI_HII_AIBT_SKIP2 0x21
1849 #define EFI_HII_AIBT_SKIP1 0x22
1850 #define EFI_HII_AIBT_EXT1 0x30
1851 #define EFI_HII_AIBT_EXT2 0x31
1852 #define EFI_HII_AIBT_EXT4 0x32
1853
1854 ///
1855 /// Extended block headers used for variable sized animation records
1856 /// which need an explicit length.
1857 ///
1858
1859 typedef struct _EFI_HII_AIBT_EXT1_BLOCK {
1860 ///
1861 /// Standard animation header, where Header.BlockType = EFI_HII_AIBT_EXT1.
1862 ///
1863 EFI_HII_ANIMATION_BLOCK Header;
1864 ///
1865 /// The block type.
1866 ///
1867 UINT8 BlockType2;
1868 ///
1869 /// Size of the animation block, in bytes, including the animation block header.
1870 ///
1871 UINT8 Length;
1872 } EFI_HII_AIBT_EXT1_BLOCK;
1873
1874 typedef struct _EFI_HII_AIBT_EXT2_BLOCK {
1875 ///
1876 /// Standard animation header, where Header.BlockType = EFI_HII_AIBT_EXT2.
1877 ///
1878 EFI_HII_ANIMATION_BLOCK Header;
1879 ///
1880 /// The block type
1881 ///
1882 UINT8 BlockType2;
1883 ///
1884 /// Size of the animation block, in bytes, including the animation block header.
1885 ///
1886 UINT16 Length;
1887 } EFI_HII_AIBT_EXT2_BLOCK;
1888
1889 typedef struct _EFI_HII_AIBT_EXT4_BLOCK {
1890 ///
1891 /// Standard animation header, where Header.BlockType = EFI_HII_AIBT_EXT4.
1892 ///
1893 EFI_HII_ANIMATION_BLOCK Header;
1894 ///
1895 /// The block type
1896 ///
1897 UINT8 BlockType2;
1898 ///
1899 /// Size of the animation block, in bytes, including the animation block header.
1900 ///
1901 UINT32 Length;
1902 } EFI_HII_AIBT_EXT4_BLOCK;
1903
1904 typedef struct _EFI_HII_ANIMATION_CELL {
1905 ///
1906 /// The X offset from the upper left hand corner of the logical
1907 /// window to position the indexed image.
1908 ///
1909 UINT16 OffsetX;
1910 ///
1911 /// The Y offset from the upper left hand corner of the logical
1912 /// window to position the indexed image.
1913 ///
1914 UINT16 OffsetY;
1915 ///
1916 /// The image to display at the specified offset from the upper left
1917 /// hand corner of the logical window.
1918 ///
1919 EFI_IMAGE_ID ImageId;
1920 ///
1921 /// The number of milliseconds to delay after displaying the indexed
1922 /// image and before continuing on to the next linked image. If value
1923 /// is zero, no delay.
1924 ///
1925 UINT16 Delay;
1926 } EFI_HII_ANIMATION_CELL;
1927
1928 ///
1929 /// An animation block to describe an animation sequence that does not cycle, and
1930 /// where one image is simply displayed over the previous image.
1931 ///
1932 typedef struct _EFI_HII_AIBT_OVERLAY_IMAGES_BLOCK {
1933 ///
1934 /// This is image that is to be reference by the image protocols, if the
1935 /// animation function is not supported or disabled. This image can
1936 /// be one particular image from the animation sequence (if any one
1937 /// of the animation frames has a complete image) or an alternate
1938 /// image that can be displayed alone. If the value is zero, no image
1939 /// is displayed.
1940 ///
1941 EFI_IMAGE_ID DftImageId;
1942 ///
1943 /// The overall width of the set of images (logical window width).
1944 ///
1945 UINT16 Width;
1946 ///
1947 /// The overall height of the set of images (logical window height).
1948 ///
1949 UINT16 Height;
1950 ///
1951 /// The number of EFI_HII_ANIMATION_CELL contained in the
1952 /// animation sequence.
1953 ///
1954 UINT16 CellCount;
1955 ///
1956 /// An array of CellCount animation cells.
1957 ///
1958 EFI_HII_ANIMATION_CELL AnimationCell[1];
1959 } EFI_HII_AIBT_OVERLAY_IMAGES_BLOCK;
1960
1961 ///
1962 /// An animation block to describe an animation sequence that does not cycle,
1963 /// and where the logical window is cleared to the specified color before
1964 /// the next image is displayed.
1965 ///
1966 typedef struct _EFI_HII_AIBT_CLEAR_IMAGES_BLOCK {
1967 ///
1968 /// This is image that is to be reference by the image protocols, if the
1969 /// animation function is not supported or disabled. This image can
1970 /// be one particular image from the animation sequence (if any one
1971 /// of the animation frames has a complete image) or an alternate
1972 /// image that can be displayed alone. If the value is zero, no image
1973 /// is displayed.
1974 ///
1975 EFI_IMAGE_ID DftImageId;
1976 ///
1977 /// The overall width of the set of images (logical window width).
1978 ///
1979 UINT16 Width;
1980 ///
1981 /// The overall height of the set of images (logical window height).
1982 ///
1983 UINT16 Height;
1984 ///
1985 /// The number of EFI_HII_ANIMATION_CELL contained in the
1986 /// animation sequence.
1987 ///
1988 UINT16 CellCount;
1989 ///
1990 /// The color to clear the logical window to before displaying the
1991 /// indexed image.
1992 ///
1993 EFI_HII_RGB_PIXEL BackgndColor;
1994 ///
1995 /// An array of CellCount animation cells.
1996 ///
1997 EFI_HII_ANIMATION_CELL AnimationCell[1];
1998 } EFI_HII_AIBT_CLEAR_IMAGES_BLOCK;
1999
2000 ///
2001 /// An animation block to describe an animation sequence that does not cycle,
2002 /// and where the screen is restored to the original state before the next
2003 /// image is displayed.
2004 ///
2005 typedef struct _EFI_HII_AIBT_RESTORE_SCRN_BLOCK {
2006 ///
2007 /// This is image that is to be reference by the image protocols, if the
2008 /// animation function is not supported or disabled. This image can
2009 /// be one particular image from the animation sequence (if any one
2010 /// of the animation frames has a complete image) or an alternate
2011 /// image that can be displayed alone. If the value is zero, no image
2012 /// is displayed.
2013 ///
2014 EFI_IMAGE_ID DftImageId;
2015 ///
2016 /// The overall width of the set of images (logical window width).
2017 ///
2018 UINT16 Width;
2019 ///
2020 /// The overall height of the set of images (logical window height).
2021 ///
2022 UINT16 Height;
2023 ///
2024 /// The number of EFI_HII_ANIMATION_CELL contained in the
2025 /// animation sequence.
2026 ///
2027 UINT16 CellCount;
2028 ///
2029 /// An array of CellCount animation cells.
2030 ///
2031 EFI_HII_ANIMATION_CELL AnimationCell[1];
2032 } EFI_HII_AIBT_RESTORE_SCRN_BLOCK;
2033
2034 ///
2035 /// An animation block to describe an animation sequence that continuously cycles,
2036 /// and where one image is simply displayed over the previous image.
2037 ///
2038 typedef EFI_HII_AIBT_OVERLAY_IMAGES_BLOCK EFI_HII_AIBT_OVERLAY_IMAGES_LOOP_BLOCK;
2039
2040 ///
2041 /// An animation block to describe an animation sequence that continuously cycles,
2042 /// and where the logical window is cleared to the specified color before
2043 /// the next image is displayed.
2044 ///
2045 typedef EFI_HII_AIBT_CLEAR_IMAGES_BLOCK EFI_HII_AIBT_CLEAR_IMAGES_LOOP_BLOCK;
2046
2047 ///
2048 /// An animation block to describe an animation sequence that continuously cycles,
2049 /// and where the screen is restored to the original state before
2050 /// the next image is displayed.
2051 ///
2052 typedef EFI_HII_AIBT_RESTORE_SCRN_BLOCK EFI_HII_AIBT_RESTORE_SCRN_LOOP_BLOCK;
2053
2054 ///
2055 /// Assigns a new character value to a previously defined animation sequence.
2056 ///
2057 typedef struct _EFI_HII_AIBT_DUPLICATE_BLOCK {
2058 ///
2059 /// The previously defined animation ID with the exact same
2060 /// animation information.
2061 ///
2062 EFI_ANIMATION_ID AnimationId;
2063 } EFI_HII_AIBT_DUPLICATE_BLOCK;
2064
2065 ///
2066 /// Skips animation IDs.
2067 ///
2068 typedef struct _EFI_HII_AIBT_SKIP1_BLOCK {
2069 ///
2070 /// The unsigned 8-bit value to add to AnimationIdCurrent.
2071 ///
2072 UINT8 SkipCount;
2073 } EFI_HII_AIBT_SKIP1_BLOCK;
2074
2075 ///
2076 /// Skips animation IDs.
2077 ///
2078 typedef struct _EFI_HII_AIBT_SKIP2_BLOCK {
2079 ///
2080 /// The unsigned 16-bit value to add to AnimationIdCurrent.
2081 ///
2082 UINT16 SkipCount;
2083 } EFI_HII_AIBT_SKIP2_BLOCK;
2084
2085 #pragma pack()
2086
2087
2088
2089 ///
2090 /// References to string tokens must use this macro to enable scanning for
2091 /// token usages.
2092 ///
2093 ///
2094 /// STRING_TOKEN is not defined in UEFI specification. But it is placed
2095 /// here for the easy access by C files and VFR source files.
2096 ///
2097 #define STRING_TOKEN(t) t
2098
2099 #endif