]> git.proxmox.com Git - mirror_edk2.git/blob - MdePkg/Include/Uefi/UefiInternalFormRepresentation.h
cf1e1003143e8ab016f5eb944ab302d680ef511b
[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 - 2010, 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 union {
662 UINT8 u8;
663 UINT16 u16;
664 UINT32 u32;
665 UINT64 u64;
666 BOOLEAN b;
667 EFI_HII_TIME time;
668 EFI_HII_DATE date;
669 EFI_STRING_ID string; ///< EFI_IFR_TYPE_STRING, EFI_IFR_TYPE_ACTION
670 // UINT8 buffer[]; ///< EFI_IFR_TYPE_ORDERED_LIST
671 } EFI_IFR_TYPE_VALUE;
672
673 //
674 // IFR Opcodes
675 //
676 #define EFI_IFR_FORM_OP 0x01
677 #define EFI_IFR_SUBTITLE_OP 0x02
678 #define EFI_IFR_TEXT_OP 0x03
679 #define EFI_IFR_IMAGE_OP 0x04
680 #define EFI_IFR_ONE_OF_OP 0x05
681 #define EFI_IFR_CHECKBOX_OP 0x06
682 #define EFI_IFR_NUMERIC_OP 0x07
683 #define EFI_IFR_PASSWORD_OP 0x08
684 #define EFI_IFR_ONE_OF_OPTION_OP 0x09
685 #define EFI_IFR_SUPPRESS_IF_OP 0x0A
686 #define EFI_IFR_LOCKED_OP 0x0B
687 #define EFI_IFR_ACTION_OP 0x0C
688 #define EFI_IFR_RESET_BUTTON_OP 0x0D
689 #define EFI_IFR_FORM_SET_OP 0x0E
690 #define EFI_IFR_REF_OP 0x0F
691 #define EFI_IFR_NO_SUBMIT_IF_OP 0x10
692 #define EFI_IFR_INCONSISTENT_IF_OP 0x11
693 #define EFI_IFR_EQ_ID_VAL_OP 0x12
694 #define EFI_IFR_EQ_ID_ID_OP 0x13
695 #define EFI_IFR_EQ_ID_LIST_OP 0x14
696 #define EFI_IFR_AND_OP 0x15
697 #define EFI_IFR_OR_OP 0x16
698 #define EFI_IFR_NOT_OP 0x17
699 #define EFI_IFR_RULE_OP 0x18
700 #define EFI_IFR_GRAY_OUT_IF_OP 0x19
701 #define EFI_IFR_DATE_OP 0x1A
702 #define EFI_IFR_TIME_OP 0x1B
703 #define EFI_IFR_STRING_OP 0x1C
704 #define EFI_IFR_REFRESH_OP 0x1D
705 #define EFI_IFR_DISABLE_IF_OP 0x1E
706 #define EFI_IFR_ANIMATION_OP 0x1F
707 #define EFI_IFR_TO_LOWER_OP 0x20
708 #define EFI_IFR_TO_UPPER_OP 0x21
709 #define EFI_IFR_MAP_OP 0x22
710 #define EFI_IFR_ORDERED_LIST_OP 0x23
711 #define EFI_IFR_VARSTORE_OP 0x24
712 #define EFI_IFR_VARSTORE_NAME_VALUE_OP 0x25
713 #define EFI_IFR_VARSTORE_EFI_OP 0x26
714 #define EFI_IFR_VARSTORE_DEVICE_OP 0x27
715 #define EFI_IFR_VERSION_OP 0x28
716 #define EFI_IFR_END_OP 0x29
717 #define EFI_IFR_MATCH_OP 0x2A
718 #define EFI_IFR_GET_OP 0x2B
719 #define EFI_IFR_SET_OP 0x2C
720 #define EFI_IFR_READ_OP 0x2D
721 #define EFI_IFR_WRITE_OP 0x2E
722 #define EFI_IFR_EQUAL_OP 0x2F
723 #define EFI_IFR_NOT_EQUAL_OP 0x30
724 #define EFI_IFR_GREATER_THAN_OP 0x31
725 #define EFI_IFR_GREATER_EQUAL_OP 0x32
726 #define EFI_IFR_LESS_THAN_OP 0x33
727 #define EFI_IFR_LESS_EQUAL_OP 0x34
728 #define EFI_IFR_BITWISE_AND_OP 0x35
729 #define EFI_IFR_BITWISE_OR_OP 0x36
730 #define EFI_IFR_BITWISE_NOT_OP 0x37
731 #define EFI_IFR_SHIFT_LEFT_OP 0x38
732 #define EFI_IFR_SHIFT_RIGHT_OP 0x39
733 #define EFI_IFR_ADD_OP 0x3A
734 #define EFI_IFR_SUBTRACT_OP 0x3B
735 #define EFI_IFR_MULTIPLY_OP 0x3C
736 #define EFI_IFR_DIVIDE_OP 0x3D
737 #define EFI_IFR_MODULO_OP 0x3E
738 #define EFI_IFR_RULE_REF_OP 0x3F
739 #define EFI_IFR_QUESTION_REF1_OP 0x40
740 #define EFI_IFR_QUESTION_REF2_OP 0x41
741 #define EFI_IFR_UINT8_OP 0x42
742 #define EFI_IFR_UINT16_OP 0x43
743 #define EFI_IFR_UINT32_OP 0x44
744 #define EFI_IFR_UINT64_OP 0x45
745 #define EFI_IFR_TRUE_OP 0x46
746 #define EFI_IFR_FALSE_OP 0x47
747 #define EFI_IFR_TO_UINT_OP 0x48
748 #define EFI_IFR_TO_STRING_OP 0x49
749 #define EFI_IFR_TO_BOOLEAN_OP 0x4A
750 #define EFI_IFR_MID_OP 0x4B
751 #define EFI_IFR_FIND_OP 0x4C
752 #define EFI_IFR_TOKEN_OP 0x4D
753 #define EFI_IFR_STRING_REF1_OP 0x4E
754 #define EFI_IFR_STRING_REF2_OP 0x4F
755 #define EFI_IFR_CONDITIONAL_OP 0x50
756 #define EFI_IFR_QUESTION_REF3_OP 0x51
757 #define EFI_IFR_ZERO_OP 0x52
758 #define EFI_IFR_ONE_OP 0x53
759 #define EFI_IFR_ONES_OP 0x54
760 #define EFI_IFR_UNDEFINED_OP 0x55
761 #define EFI_IFR_LENGTH_OP 0x56
762 #define EFI_IFR_DUP_OP 0x57
763 #define EFI_IFR_THIS_OP 0x58
764 #define EFI_IFR_SPAN_OP 0x59
765 #define EFI_IFR_VALUE_OP 0x5A
766 #define EFI_IFR_DEFAULT_OP 0x5B
767 #define EFI_IFR_DEFAULTSTORE_OP 0x5C
768 #define EFI_IFR_FORM_MAP_OP 0x5D
769 #define EFI_IFR_CATENATE_OP 0x5E
770 #define EFI_IFR_GUID_OP 0x5F
771 #define EFI_IFR_SECURITY_OP 0x60
772
773 //
774 // Definitions of IFR Standard Headers
775 // Section 27.3.8.2
776 //
777
778 typedef struct _EFI_IFR_OP_HEADER {
779 UINT8 OpCode;
780 UINT8 Length:7;
781 UINT8 Scope:1;
782 } EFI_IFR_OP_HEADER;
783
784 typedef struct _EFI_IFR_STATEMENT_HEADER {
785 EFI_STRING_ID Prompt;
786 EFI_STRING_ID Help;
787 } EFI_IFR_STATEMENT_HEADER;
788
789 typedef struct _EFI_IFR_QUESTION_HEADER {
790 EFI_IFR_STATEMENT_HEADER Header;
791 EFI_QUESTION_ID QuestionId;
792 EFI_VARSTORE_ID VarStoreId;
793 union {
794 EFI_STRING_ID VarName;
795 UINT16 VarOffset;
796 } VarStoreInfo;
797 UINT8 Flags;
798 } EFI_IFR_QUESTION_HEADER;
799
800 //
801 // Flag values of EFI_IFR_QUESTION_HEADER
802 //
803 #define EFI_IFR_FLAG_READ_ONLY 0x01
804 #define EFI_IFR_FLAG_CALLBACK 0x04
805 #define EFI_IFR_FLAG_RESET_REQUIRED 0x10
806 #define EFI_IFR_FLAG_OPTIONS_ONLY 0x80
807
808 //
809 // Definition for Opcode Reference
810 // Section 27.3.8.3
811 //
812 typedef struct _EFI_IFR_DEFAULTSTORE {
813 EFI_IFR_OP_HEADER Header;
814 EFI_STRING_ID DefaultName;
815 UINT16 DefaultId;
816 } EFI_IFR_DEFAULTSTORE;
817
818 //
819 // Default Identifier of default store
820 //
821 #define EFI_HII_DEFAULT_CLASS_STANDARD 0x0000
822 #define EFI_HII_DEFAULT_CLASS_MANUFACTURING 0x0001
823 #define EFI_HII_DEFAULT_CLASS_SAFE 0x0002
824 #define EFI_HII_DEFAULT_CLASS_PLATFORM_BEGIN 0x4000
825 #define EFI_HII_DEFAULT_CLASS_PLATFORM_END 0x7fff
826 #define EFI_HII_DEFAULT_CLASS_HARDWARE_BEGIN 0x8000
827 #define EFI_HII_DEFAULT_CLASS_HARDWARE_END 0xbfff
828 #define EFI_HII_DEFAULT_CLASS_FIRMWARE_BEGIN 0xc000
829 #define EFI_HII_DEFAULT_CLASS_FIRMWARE_END 0xffff
830
831 typedef struct _EFI_IFR_VARSTORE {
832 EFI_IFR_OP_HEADER Header;
833 EFI_GUID Guid;
834 EFI_VARSTORE_ID VarStoreId;
835 UINT16 Size;
836 UINT8 Name[1];
837 } EFI_IFR_VARSTORE;
838
839 typedef struct _EFI_IFR_VARSTORE_EFI {
840 EFI_IFR_OP_HEADER Header;
841 EFI_VARSTORE_ID VarStoreId;
842 EFI_GUID Guid;
843 UINT32 Attributes;
844 } EFI_IFR_VARSTORE_EFI;
845
846 typedef struct _EFI_IFR_VARSTORE_NAME_VALUE {
847 EFI_IFR_OP_HEADER Header;
848 EFI_VARSTORE_ID VarStoreId;
849 EFI_GUID Guid;
850 } EFI_IFR_VARSTORE_NAME_VALUE;
851
852 typedef struct _EFI_IFR_FORM_SET {
853 EFI_IFR_OP_HEADER Header;
854 EFI_GUID Guid;
855 EFI_STRING_ID FormSetTitle;
856 EFI_STRING_ID Help;
857 UINT8 Flags;
858 // EFI_GUID ClassGuid[];
859 } EFI_IFR_FORM_SET;
860
861 typedef struct _EFI_IFR_END {
862 EFI_IFR_OP_HEADER Header;
863 } EFI_IFR_END;
864
865 typedef struct _EFI_IFR_FORM {
866 EFI_IFR_OP_HEADER Header;
867 UINT16 FormId;
868 EFI_STRING_ID FormTitle;
869 } EFI_IFR_FORM;
870
871 typedef struct _EFI_IFR_IMAGE {
872 EFI_IFR_OP_HEADER Header;
873 EFI_IMAGE_ID Id;
874 } EFI_IFR_IMAGE;
875
876 typedef struct _EFI_IFR_LOCKED {
877 EFI_IFR_OP_HEADER Header;
878 } EFI_IFR_LOCKED;
879
880 typedef struct _EFI_IFR_RULE {
881 EFI_IFR_OP_HEADER Header;
882 UINT8 RuleId;
883 } EFI_IFR_RULE;
884
885 typedef struct _EFI_IFR_DEFAULT {
886 EFI_IFR_OP_HEADER Header;
887 UINT16 DefaultId;
888 UINT8 Type;
889 EFI_IFR_TYPE_VALUE Value;
890 } EFI_IFR_DEFAULT;
891
892 typedef struct _EFI_IFR_VALUE {
893 EFI_IFR_OP_HEADER Header;
894 } EFI_IFR_VALUE;
895
896 typedef struct _EFI_IFR_SUBTITLE {
897 EFI_IFR_OP_HEADER Header;
898 EFI_IFR_STATEMENT_HEADER Statement;
899 UINT8 Flags;
900 } EFI_IFR_SUBTITLE;
901
902 #define EFI_IFR_FLAGS_HORIZONTAL 0x01
903
904 typedef struct _EFI_IFR_CHECKBOX {
905 EFI_IFR_OP_HEADER Header;
906 EFI_IFR_QUESTION_HEADER Question;
907 UINT8 Flags;
908 } EFI_IFR_CHECKBOX;
909
910 #define EFI_IFR_CHECKBOX_DEFAULT 0x01
911 #define EFI_IFR_CHECKBOX_DEFAULT_MFG 0x02
912
913 typedef struct _EFI_IFR_TEXT {
914 EFI_IFR_OP_HEADER Header;
915 EFI_IFR_STATEMENT_HEADER Statement;
916 EFI_STRING_ID TextTwo;
917 } EFI_IFR_TEXT;
918
919 typedef struct _EFI_IFR_REF {
920 EFI_IFR_OP_HEADER Header;
921 EFI_IFR_QUESTION_HEADER Question;
922 EFI_FORM_ID FormId;
923 } EFI_IFR_REF;
924
925 typedef struct _EFI_IFR_REF2 {
926 EFI_IFR_OP_HEADER Header;
927 EFI_IFR_QUESTION_HEADER Question;
928 EFI_FORM_ID FormId;
929 EFI_QUESTION_ID QuestionId;
930 } EFI_IFR_REF2;
931
932 typedef struct _EFI_IFR_REF3 {
933 EFI_IFR_OP_HEADER Header;
934 EFI_IFR_QUESTION_HEADER Question;
935 EFI_FORM_ID FormId;
936 EFI_QUESTION_ID QuestionId;
937 EFI_GUID FormSetId;
938 } EFI_IFR_REF3;
939
940 typedef struct _EFI_IFR_REF4 {
941 EFI_IFR_OP_HEADER Header;
942 EFI_IFR_QUESTION_HEADER Question;
943 EFI_FORM_ID FormId;
944 EFI_QUESTION_ID QuestionId;
945 EFI_GUID FormSetId;
946 EFI_STRING_ID DevicePath;
947 } EFI_IFR_REF4;
948
949 typedef struct _EFI_IFR_RESET_BUTTON {
950 EFI_IFR_OP_HEADER Header;
951 EFI_IFR_STATEMENT_HEADER Statement;
952 EFI_DEFAULT_ID DefaultId;
953 } EFI_IFR_RESET_BUTTON;
954
955 typedef struct _EFI_IFR_ACTION {
956 EFI_IFR_OP_HEADER Header;
957 EFI_IFR_QUESTION_HEADER Question;
958 EFI_STRING_ID QuestionConfig;
959 } EFI_IFR_ACTION;
960
961 typedef struct _EFI_IFR_ACTION_1 {
962 EFI_IFR_OP_HEADER Header;
963 EFI_IFR_QUESTION_HEADER Question;
964 } EFI_IFR_ACTION_1;
965
966 typedef struct _EFI_IFR_DATE {
967 EFI_IFR_OP_HEADER Header;
968 EFI_IFR_QUESTION_HEADER Question;
969 UINT8 Flags;
970 } EFI_IFR_DATE;
971
972 //
973 // Flags that describe the behavior of the question.
974 //
975 #define EFI_QF_DATE_YEAR_SUPPRESS 0x01
976 #define EFI_QF_DATE_MONTH_SUPPRESS 0x02
977 #define EFI_QF_DATE_DAY_SUPPRESS 0x04
978
979 #define EFI_QF_DATE_STORAGE 0x30
980 #define QF_DATE_STORAGE_NORMAL 0x00
981 #define QF_DATE_STORAGE_TIME 0x10
982 #define QF_DATE_STORAGE_WAKEUP 0x20
983
984 typedef union {
985 struct {
986 UINT8 MinValue;
987 UINT8 MaxValue;
988 UINT8 Step;
989 } u8;
990 struct {
991 UINT16 MinValue;
992 UINT16 MaxValue;
993 UINT16 Step;
994 } u16;
995 struct {
996 UINT32 MinValue;
997 UINT32 MaxValue;
998 UINT32 Step;
999 } u32;
1000 struct {
1001 UINT64 MinValue;
1002 UINT64 MaxValue;
1003 UINT64 Step;
1004 } u64;
1005 } MINMAXSTEP_DATA;
1006
1007 typedef struct _EFI_IFR_NUMERIC {
1008 EFI_IFR_OP_HEADER Header;
1009 EFI_IFR_QUESTION_HEADER Question;
1010 UINT8 Flags;
1011 MINMAXSTEP_DATA data;
1012 } EFI_IFR_NUMERIC;
1013
1014 //
1015 // Flags related to the numeric question
1016 //
1017 #define EFI_IFR_NUMERIC_SIZE 0x03
1018 #define EFI_IFR_NUMERIC_SIZE_1 0x00
1019 #define EFI_IFR_NUMERIC_SIZE_2 0x01
1020 #define EFI_IFR_NUMERIC_SIZE_4 0x02
1021 #define EFI_IFR_NUMERIC_SIZE_8 0x03
1022
1023 #define EFI_IFR_DISPLAY 0x30
1024 #define EFI_IFR_DISPLAY_INT_DEC 0x00
1025 #define EFI_IFR_DISPLAY_UINT_DEC 0x10
1026 #define EFI_IFR_DISPLAY_UINT_HEX 0x20
1027
1028 typedef struct _EFI_IFR_ONE_OF {
1029 EFI_IFR_OP_HEADER Header;
1030 EFI_IFR_QUESTION_HEADER Question;
1031 UINT8 Flags;
1032 MINMAXSTEP_DATA data;
1033 } EFI_IFR_ONE_OF;
1034
1035 typedef struct _EFI_IFR_STRING {
1036 EFI_IFR_OP_HEADER Header;
1037 EFI_IFR_QUESTION_HEADER Question;
1038 UINT8 MinSize;
1039 UINT8 MaxSize;
1040 UINT8 Flags;
1041 } EFI_IFR_STRING;
1042
1043 #define EFI_IFR_STRING_MULTI_LINE 0x01
1044
1045 typedef struct _EFI_IFR_PASSWORD {
1046 EFI_IFR_OP_HEADER Header;
1047 EFI_IFR_QUESTION_HEADER Question;
1048 UINT16 MinSize;
1049 UINT16 MaxSize;
1050 } EFI_IFR_PASSWORD;
1051
1052 typedef struct _EFI_IFR_ORDERED_LIST {
1053 EFI_IFR_OP_HEADER Header;
1054 EFI_IFR_QUESTION_HEADER Question;
1055 UINT8 MaxContainers;
1056 UINT8 Flags;
1057 } EFI_IFR_ORDERED_LIST;
1058
1059 #define EFI_IFR_UNIQUE_SET 0x01
1060 #define EFI_IFR_NO_EMPTY_SET 0x02
1061
1062 typedef struct _EFI_IFR_TIME {
1063 EFI_IFR_OP_HEADER Header;
1064 EFI_IFR_QUESTION_HEADER Question;
1065 UINT8 Flags;
1066 } EFI_IFR_TIME;
1067
1068 //
1069 // A bit-mask that determines which unique settings are active for this opcode.
1070 //
1071 #define QF_TIME_HOUR_SUPPRESS 0x01
1072 #define QF_TIME_MINUTE_SUPPRESS 0x02
1073 #define QF_TIME_SECOND_SUPPRESS 0x04
1074
1075 #define QF_TIME_STORAGE 0x30
1076 #define QF_TIME_STORAGE_NORMAL 0x00
1077 #define QF_TIME_STORAGE_TIME 0x10
1078 #define QF_TIME_STORAGE_WAKEUP 0x20
1079
1080 typedef struct _EFI_IFR_DISABLE_IF {
1081 EFI_IFR_OP_HEADER Header;
1082 } EFI_IFR_DISABLE_IF;
1083
1084 typedef struct _EFI_IFR_SUPPRESS_IF {
1085 EFI_IFR_OP_HEADER Header;
1086 } EFI_IFR_SUPPRESS_IF;
1087
1088 typedef struct _EFI_IFR_GRAY_OUT_IF {
1089 EFI_IFR_OP_HEADER Header;
1090 } EFI_IFR_GRAY_OUT_IF;
1091
1092 typedef struct _EFI_IFR_INCONSISTENT_IF {
1093 EFI_IFR_OP_HEADER Header;
1094 EFI_STRING_ID Error;
1095 } EFI_IFR_INCONSISTENT_IF;
1096
1097 typedef struct _EFI_IFR_NO_SUBMIT_IF {
1098 EFI_IFR_OP_HEADER Header;
1099 EFI_STRING_ID Error;
1100 } EFI_IFR_NO_SUBMIT_IF;
1101
1102 typedef struct _EFI_IFR_REFRESH {
1103 EFI_IFR_OP_HEADER Header;
1104 UINT8 RefreshInterval;
1105 } EFI_IFR_REFRESH;
1106
1107 typedef struct _EFI_IFR_VARSTORE_DEVICE {
1108 EFI_IFR_OP_HEADER Header;
1109 EFI_STRING_ID DevicePath;
1110 } EFI_IFR_VARSTORE_DEVICE;
1111
1112 typedef struct _EFI_IFR_ONE_OF_OPTION {
1113 EFI_IFR_OP_HEADER Header;
1114 EFI_STRING_ID Option;
1115 UINT8 Flags;
1116 UINT8 Type;
1117 EFI_IFR_TYPE_VALUE Value;
1118 } EFI_IFR_ONE_OF_OPTION;
1119
1120 //
1121 // Types of the option's value.
1122 //
1123 #define EFI_IFR_TYPE_NUM_SIZE_8 0x00
1124 #define EFI_IFR_TYPE_NUM_SIZE_16 0x01
1125 #define EFI_IFR_TYPE_NUM_SIZE_32 0x02
1126 #define EFI_IFR_TYPE_NUM_SIZE_64 0x03
1127 #define EFI_IFR_TYPE_BOOLEAN 0x04
1128 #define EFI_IFR_TYPE_TIME 0x05
1129 #define EFI_IFR_TYPE_DATE 0x06
1130 #define EFI_IFR_TYPE_STRING 0x07
1131 #define EFI_IFR_TYPE_OTHER 0x08
1132 #define EFI_IFR_TYPE_UNDEFINED 0x09
1133 #define EFI_IFR_TYPE_ACTION 0x0A
1134 #define EFI_IFR_TYPE_BUFFER 0x0B
1135
1136 #define EFI_IFR_OPTION_DEFAULT 0x10
1137 #define EFI_IFR_OPTION_DEFAULT_MFG 0x20
1138
1139 typedef struct _EFI_IFR_GUID {
1140 EFI_IFR_OP_HEADER Header;
1141 EFI_GUID Guid;
1142 //Optional Data Follows
1143 } EFI_IFR_GUID;
1144
1145 typedef struct _EFI_IFR_DUP {
1146 EFI_IFR_OP_HEADER Header;
1147 } EFI_IFR_DUP;
1148
1149 typedef struct _EFI_IFR_EQ_ID_ID {
1150 EFI_IFR_OP_HEADER Header;
1151 EFI_QUESTION_ID QuestionId1;
1152 EFI_QUESTION_ID QuestionId2;
1153 } EFI_IFR_EQ_ID_ID;
1154
1155 typedef struct _EFI_IFR_EQ_ID_VAL {
1156 EFI_IFR_OP_HEADER Header;
1157 EFI_QUESTION_ID QuestionId;
1158 UINT16 Value;
1159 } EFI_IFR_EQ_ID_VAL;
1160
1161 typedef struct _EFI_IFR_EQ_ID_VAL_LIST {
1162 EFI_IFR_OP_HEADER Header;
1163 EFI_QUESTION_ID QuestionId;
1164 UINT16 ListLength;
1165 UINT16 ValueList[1];
1166 } EFI_IFR_EQ_ID_VAL_LIST;
1167
1168 typedef struct _EFI_IFR_UINT8 {
1169 EFI_IFR_OP_HEADER Header;
1170 UINT8 Value;
1171 } EFI_IFR_UINT8;
1172
1173 typedef struct _EFI_IFR_UINT16 {
1174 EFI_IFR_OP_HEADER Header;
1175 UINT16 Value;
1176 } EFI_IFR_UINT16;
1177
1178 typedef struct _EFI_IFR_UINT32 {
1179 EFI_IFR_OP_HEADER Header;
1180 UINT32 Value;
1181 } EFI_IFR_UINT32;
1182
1183 typedef struct _EFI_IFR_UINT64 {
1184 EFI_IFR_OP_HEADER Header;
1185 UINT64 Value;
1186 } EFI_IFR_UINT64;
1187
1188 typedef struct _EFI_IFR_QUESTION_REF1 {
1189 EFI_IFR_OP_HEADER Header;
1190 EFI_QUESTION_ID QuestionId;
1191 } EFI_IFR_QUESTION_REF1;
1192
1193 typedef struct _EFI_IFR_QUESTION_REF2 {
1194 EFI_IFR_OP_HEADER Header;
1195 } EFI_IFR_QUESTION_REF2;
1196
1197 typedef struct _EFI_IFR_QUESTION_REF3 {
1198 EFI_IFR_OP_HEADER Header;
1199 } EFI_IFR_QUESTION_REF3;
1200
1201 typedef struct _EFI_IFR_QUESTION_REF3_2 {
1202 EFI_IFR_OP_HEADER Header;
1203 EFI_STRING_ID DevicePath;
1204 } EFI_IFR_QUESTION_REF3_2;
1205
1206 typedef struct _EFI_IFR_QUESTION_REF3_3 {
1207 EFI_IFR_OP_HEADER Header;
1208 EFI_STRING_ID DevicePath;
1209 EFI_GUID Guid;
1210 } EFI_IFR_QUESTION_REF3_3;
1211
1212 typedef struct _EFI_IFR_RULE_REF {
1213 EFI_IFR_OP_HEADER Header;
1214 UINT8 RuleId;
1215 } EFI_IFR_RULE_REF;
1216
1217 typedef struct _EFI_IFR_STRING_REF1 {
1218 EFI_IFR_OP_HEADER Header;
1219 EFI_STRING_ID StringId;
1220 } EFI_IFR_STRING_REF1;
1221
1222 typedef struct _EFI_IFR_STRING_REF2 {
1223 EFI_IFR_OP_HEADER Header;
1224 } EFI_IFR_STRING_REF2;
1225
1226 typedef struct _EFI_IFR_THIS {
1227 EFI_IFR_OP_HEADER Header;
1228 } EFI_IFR_THIS;
1229
1230 typedef struct _EFI_IFR_TRUE {
1231 EFI_IFR_OP_HEADER Header;
1232 } EFI_IFR_TRUE;
1233
1234 typedef struct _EFI_IFR_FALSE {
1235 EFI_IFR_OP_HEADER Header;
1236 } EFI_IFR_FALSE;
1237
1238 typedef struct _EFI_IFR_ONE {
1239 EFI_IFR_OP_HEADER Header;
1240 } EFI_IFR_ONE;
1241
1242 typedef struct _EFI_IFR_ONES {
1243 EFI_IFR_OP_HEADER Header;
1244 } EFI_IFR_ONES;
1245
1246 typedef struct _EFI_IFR_ZERO {
1247 EFI_IFR_OP_HEADER Header;
1248 } EFI_IFR_ZERO;
1249
1250 typedef struct _EFI_IFR_UNDEFINED {
1251 EFI_IFR_OP_HEADER Header;
1252 } EFI_IFR_UNDEFINED;
1253
1254 typedef struct _EFI_IFR_VERSION {
1255 EFI_IFR_OP_HEADER Header;
1256 } EFI_IFR_VERSION;
1257
1258 typedef struct _EFI_IFR_LENGTH {
1259 EFI_IFR_OP_HEADER Header;
1260 } EFI_IFR_LENGTH;
1261
1262 typedef struct _EFI_IFR_NOT {
1263 EFI_IFR_OP_HEADER Header;
1264 } EFI_IFR_NOT;
1265
1266 typedef struct _EFI_IFR_BITWISE_NOT {
1267 EFI_IFR_OP_HEADER Header;
1268 } EFI_IFR_BITWISE_NOT;
1269
1270 typedef struct _EFI_IFR_TO_BOOLEAN {
1271 EFI_IFR_OP_HEADER Header;
1272 } EFI_IFR_TO_BOOLEAN;
1273
1274 ///
1275 /// For EFI_IFR_TO_STRING, when converting from
1276 /// unsigned integers, these flags control the format:
1277 /// 0 = unsigned decimal.
1278 /// 1 = signed decimal.
1279 /// 2 = hexadecimal (lower-case alpha).
1280 /// 3 = hexadecimal (upper-case alpha).
1281 ///@{
1282 #define EFI_IFR_STRING_UNSIGNED_DEC 0
1283 #define EFI_IFR_STRING_SIGNED_DEC 1
1284 #define EFI_IFR_STRING_LOWERCASE_HEX 2
1285 #define EFI_IFR_STRING_UPPERCASE_HEX 3
1286 ///@}
1287
1288 ///
1289 /// When converting from a buffer, these flags control the format:
1290 /// 0 = ASCII.
1291 /// 8 = Unicode.
1292 ///@{
1293 #define EFI_IFR_STRING_ASCII 0
1294 #define EFI_IFR_STRING_UNICODE 8
1295 ///@}
1296
1297 typedef struct _EFI_IFR_TO_STRING {
1298 EFI_IFR_OP_HEADER Header;
1299 UINT8 Format;
1300 } EFI_IFR_TO_STRING;
1301
1302 typedef struct _EFI_IFR_TO_UINT {
1303 EFI_IFR_OP_HEADER Header;
1304 } EFI_IFR_TO_UINT;
1305
1306 typedef struct _EFI_IFR_TO_UPPER {
1307 EFI_IFR_OP_HEADER Header;
1308 } EFI_IFR_TO_UPPER;
1309
1310 typedef struct _EFI_IFR_TO_LOWER {
1311 EFI_IFR_OP_HEADER Header;
1312 } EFI_IFR_TO_LOWER;
1313
1314 typedef struct _EFI_IFR_ADD {
1315 EFI_IFR_OP_HEADER Header;
1316 } EFI_IFR_ADD;
1317
1318 typedef struct _EFI_IFR_AND {
1319 EFI_IFR_OP_HEADER Header;
1320 } EFI_IFR_AND;
1321
1322 typedef struct _EFI_IFR_BITWISE_AND {
1323 EFI_IFR_OP_HEADER Header;
1324 } EFI_IFR_BITWISE_AND;
1325
1326 typedef struct _EFI_IFR_BITWISE_OR {
1327 EFI_IFR_OP_HEADER Header;
1328 } EFI_IFR_BITWISE_OR;
1329
1330 typedef struct _EFI_IFR_CATENATE {
1331 EFI_IFR_OP_HEADER Header;
1332 } EFI_IFR_CATENATE;
1333
1334 typedef struct _EFI_IFR_DIVIDE {
1335 EFI_IFR_OP_HEADER Header;
1336 } EFI_IFR_DIVIDE;
1337
1338 typedef struct _EFI_IFR_EQUAL {
1339 EFI_IFR_OP_HEADER Header;
1340 } EFI_IFR_EQUAL;
1341
1342 typedef struct _EFI_IFR_GREATER_EQUAL {
1343 EFI_IFR_OP_HEADER Header;
1344 } EFI_IFR_GREATER_EQUAL;
1345
1346 typedef struct _EFI_IFR_GREATER_THAN {
1347 EFI_IFR_OP_HEADER Header;
1348 } EFI_IFR_GREATER_THAN;
1349
1350 typedef struct _EFI_IFR_LESS_EQUAL {
1351 EFI_IFR_OP_HEADER Header;
1352 } EFI_IFR_LESS_EQUAL;
1353
1354 typedef struct _EFI_IFR_LESS_THAN {
1355 EFI_IFR_OP_HEADER Header;
1356 } EFI_IFR_LESS_THAN;
1357
1358 typedef struct _EFI_IFR_MATCH {
1359 EFI_IFR_OP_HEADER Header;
1360 } EFI_IFR_MATCH;
1361
1362 typedef struct _EFI_IFR_MULTIPLY {
1363 EFI_IFR_OP_HEADER Header;
1364 } EFI_IFR_MULTIPLY;
1365
1366 typedef struct _EFI_IFR_MODULO {
1367 EFI_IFR_OP_HEADER Header;
1368 } EFI_IFR_MODULO;
1369
1370 typedef struct _EFI_IFR_NOT_EQUAL {
1371 EFI_IFR_OP_HEADER Header;
1372 } EFI_IFR_NOT_EQUAL;
1373
1374 typedef struct _EFI_IFR_OR {
1375 EFI_IFR_OP_HEADER Header;
1376 } EFI_IFR_OR;
1377
1378 typedef struct _EFI_IFR_SHIFT_LEFT {
1379 EFI_IFR_OP_HEADER Header;
1380 } EFI_IFR_SHIFT_LEFT;
1381
1382 typedef struct _EFI_IFR_SHIFT_RIGHT {
1383 EFI_IFR_OP_HEADER Header;
1384 } EFI_IFR_SHIFT_RIGHT;
1385
1386 typedef struct _EFI_IFR_SUBTRACT {
1387 EFI_IFR_OP_HEADER Header;
1388 } EFI_IFR_SUBTRACT;
1389
1390 typedef struct _EFI_IFR_CONDITIONAL {
1391 EFI_IFR_OP_HEADER Header;
1392 } EFI_IFR_CONDITIONAL;
1393
1394 //
1395 // Flags governing the matching criteria of EFI_IFR_FIND
1396 //
1397 #define EFI_IFR_FF_CASE_SENSITIVE 0x00
1398 #define EFI_IFR_FF_CASE_INSENSITIVE 0x01
1399
1400 typedef struct _EFI_IFR_FIND {
1401 EFI_IFR_OP_HEADER Header;
1402 UINT8 Format;
1403 } EFI_IFR_FIND;
1404
1405 typedef struct _EFI_IFR_MID {
1406 EFI_IFR_OP_HEADER Header;
1407 } EFI_IFR_MID;
1408
1409 typedef struct _EFI_IFR_TOKEN {
1410 EFI_IFR_OP_HEADER Header;
1411 } EFI_IFR_TOKEN;
1412
1413 //
1414 // Flags specifying whether to find the first matching string
1415 // or the first non-matching string.
1416 //
1417 #define EFI_IFR_FLAGS_FIRST_MATCHING 0x00
1418 #define EFI_IFR_FLAGS_FIRST_NON_MATCHING 0x01
1419
1420 typedef struct _EFI_IFR_SPAN {
1421 EFI_IFR_OP_HEADER Header;
1422 UINT8 Flags;
1423 } EFI_IFR_SPAN;
1424
1425 typedef struct _EFI_IFR_SECURITY {
1426 ///
1427 /// Standard opcode header, where Header.Op = EFI_IFR_SECURITY_OP.
1428 ///
1429 EFI_IFR_OP_HEADER Header;
1430 ///
1431 /// Security permission level.
1432 ///
1433 EFI_GUID Permissions;
1434 } EFI_IFR_SECURITY;
1435
1436 typedef struct _EFI_IFR_FORM_MAP_METHOD {
1437 ///
1438 /// The string identifier which provides the human-readable name of
1439 /// the configuration method for this standards map form.
1440 ///
1441 EFI_STRING_ID MethodTitle;
1442 ///
1443 /// Identifier which uniquely specifies the configuration methods
1444 /// associated with this standards map form.
1445 ///
1446 EFI_GUID MethodIdentifier;
1447 } EFI_IFR_FORM_MAP_METHOD;
1448
1449 typedef struct _EFI_IFR_FORM_MAP {
1450 ///
1451 /// The sequence that defines the type of opcode as well as the length
1452 /// of the opcode being defined. Header.OpCode = EFI_IFR_FORM_MAP_OP.
1453 ///
1454 EFI_IFR_OP_HEADER Header;
1455 ///
1456 /// The unique identifier for this particular form.
1457 ///
1458 EFI_FORM_ID FormId;
1459 ///
1460 /// One or more configuration method's name and unique identifier.
1461 ///
1462 // EFI_IFR_FORM_MAP_METHOD Methods[];
1463 } EFI_IFR_FORM_MAP;
1464
1465 typedef struct _EFI_IFR_SET {
1466 ///
1467 /// The sequence that defines the type of opcode as well as the length
1468 /// of the opcode being defined. Header.OpCode = EFI_IFR_SET_OP.
1469 ///
1470 EFI_IFR_OP_HEADER Header;
1471 ///
1472 /// Specifies the identifier of a previously declared variable store to
1473 /// use when storing the question's value.
1474 ///
1475 EFI_VARSTORE_ID VarStoreId;
1476 union {
1477 ///
1478 /// A 16-bit Buffer Storage offset.
1479 ///
1480 EFI_STRING_ID VarName;
1481 ///
1482 /// A Name Value or EFI Variable name (VarName).
1483 ///
1484 UINT16 VarOffset;
1485 } VarStoreInfo;
1486 ///
1487 /// Specifies the type used for storage.
1488 ///
1489 UINT8 VarStoreType;
1490 } EFI_IFR_SET;
1491
1492 typedef struct _EFI_IFR_GET {
1493 ///
1494 /// The sequence that defines the type of opcode as well as the length
1495 /// of the opcode being defined. Header.OpCode = EFI_IFR_GET_OP.
1496 ///
1497 EFI_IFR_OP_HEADER Header;
1498 ///
1499 /// Specifies the identifier of a previously declared variable store to
1500 /// use when retrieving the value.
1501 ///
1502 EFI_VARSTORE_ID VarStoreId;
1503 union {
1504 ///
1505 /// A 16-bit Buffer Storage offset.
1506 ///
1507 EFI_STRING_ID VarName;
1508 ///
1509 /// A Name Value or EFI Variable name (VarName).
1510 ///
1511 UINT16 VarOffset;
1512 } VarStoreInfo;
1513 ///
1514 /// Specifies the type used for storage.
1515 ///
1516 UINT8 VarStoreType;
1517 } EFI_IFR_GET;
1518
1519 typedef struct _EFI_IFR_READ {
1520 EFI_IFR_OP_HEADER Header;
1521 } EFI_IFR_READ;
1522
1523 typedef struct _EFI_IFR_WRITE {
1524 EFI_IFR_OP_HEADER Header;
1525 } EFI_IFR_WRITE;
1526
1527 typedef struct _EFI_IFR_MAP {
1528 EFI_IFR_OP_HEADER Header;
1529 } EFI_IFR_MAP;
1530 //
1531 // Definitions for Keyboard Package
1532 // Releated definitions are in Section of EFI_HII_DATABASE_PROTOCOL
1533 //
1534
1535 ///
1536 /// Each enumeration values maps a physical key on a keyboard.
1537 ///
1538 typedef enum {
1539 EfiKeyLCtrl,
1540 EfiKeyA0,
1541 EfiKeyLAlt,
1542 EfiKeySpaceBar,
1543 EfiKeyA2,
1544 EfiKeyA3,
1545 EfiKeyA4,
1546 EfiKeyRCtrl,
1547 EfiKeyLeftArrow,
1548 EfiKeyDownArrow,
1549 EfiKeyRightArrow,
1550 EfiKeyZero,
1551 EfiKeyPeriod,
1552 EfiKeyEnter,
1553 EfiKeyLShift,
1554 EfiKeyB0,
1555 EfiKeyB1,
1556 EfiKeyB2,
1557 EfiKeyB3,
1558 EfiKeyB4,
1559 EfiKeyB5,
1560 EfiKeyB6,
1561 EfiKeyB7,
1562 EfiKeyB8,
1563 EfiKeyB9,
1564 EfiKeyB10,
1565 EfiKeyRShift,
1566 EfiKeyUpArrow,
1567 EfiKeyOne,
1568 EfiKeyTwo,
1569 EfiKeyThree,
1570 EfiKeyCapsLock,
1571 EfiKeyC1,
1572 EfiKeyC2,
1573 EfiKeyC3,
1574 EfiKeyC4,
1575 EfiKeyC5,
1576 EfiKeyC6,
1577 EfiKeyC7,
1578 EfiKeyC8,
1579 EfiKeyC9,
1580 EfiKeyC10,
1581 EfiKeyC11,
1582 EfiKeyC12,
1583 EfiKeyFour,
1584 EfiKeyFive,
1585 EfiKeySix,
1586 EfiKeyPlus,
1587 EfiKeyTab,
1588 EfiKeyD1,
1589 EfiKeyD2,
1590 EfiKeyD3,
1591 EfiKeyD4,
1592 EfiKeyD5,
1593 EfiKeyD6,
1594 EfiKeyD7,
1595 EfiKeyD8,
1596 EfiKeyD9,
1597 EfiKeyD10,
1598 EfiKeyD11,
1599 EfiKeyD12,
1600 EfiKeyD13,
1601 EfiKeyDel,
1602 EfiKeyEnd,
1603 EfiKeyPgDn,
1604 EfiKeySeven,
1605 EfiKeyEight,
1606 EfiKeyNine,
1607 EfiKeyE0,
1608 EfiKeyE1,
1609 EfiKeyE2,
1610 EfiKeyE3,
1611 EfiKeyE4,
1612 EfiKeyE5,
1613 EfiKeyE6,
1614 EfiKeyE7,
1615 EfiKeyE8,
1616 EfiKeyE9,
1617 EfiKeyE10,
1618 EfiKeyE11,
1619 EfiKeyE12,
1620 EfiKeyBackSpace,
1621 EfiKeyIns,
1622 EfiKeyHome,
1623 EfiKeyPgUp,
1624 EfiKeyNLck,
1625 EfiKeySlash,
1626 EfiKeyAsterisk,
1627 EfiKeyMinus,
1628 EfiKeyEsc,
1629 EfiKeyF1,
1630 EfiKeyF2,
1631 EfiKeyF3,
1632 EfiKeyF4,
1633 EfiKeyF5,
1634 EfiKeyF6,
1635 EfiKeyF7,
1636 EfiKeyF8,
1637 EfiKeyF9,
1638 EfiKeyF10,
1639 EfiKeyF11,
1640 EfiKeyF12,
1641 EfiKeyPrint,
1642 EfiKeySLck,
1643 EfiKeyPause
1644 } EFI_KEY;
1645
1646 typedef struct {
1647 ///
1648 /// Used to describe a physical key on a keyboard.
1649 ///
1650 EFI_KEY Key;
1651 ///
1652 /// Unicode character code for the Key.
1653 ///
1654 CHAR16 Unicode;
1655 ///
1656 /// Unicode character code for the key with the shift key being held down.
1657 ///
1658 CHAR16 ShiftedUnicode;
1659 ///
1660 /// Unicode character code for the key with the Alt-GR being held down.
1661 ///
1662 CHAR16 AltGrUnicode;
1663 ///
1664 /// Unicode character code for the key with the Alt-GR and shift keys being held down.
1665 ///
1666 CHAR16 ShiftedAltGrUnicode;
1667 ///
1668 /// Modifier keys are defined to allow for special functionality that is not necessarily
1669 /// accomplished by a printable character. Many of these modifier keys are flags to toggle
1670 /// certain state bits on and off inside of a keyboard driver.
1671 ///
1672 UINT16 Modifier;
1673 UINT16 AffectedAttribute;
1674 } EFI_KEY_DESCRIPTOR;
1675
1676 ///
1677 /// A key which is affected by all the standard shift modifiers.
1678 /// Most keys would be expected to have this bit active.
1679 ///
1680 #define EFI_AFFECTED_BY_STANDARD_SHIFT 0x0001
1681
1682 ///
1683 /// This key is affected by the caps lock so that if a keyboard driver
1684 /// would need to disambiguate between a key which had a "1" defined
1685 /// versus an "a" character. Having this bit turned on would tell
1686 /// the keyboard driver to use the appropriate shifted state or not.
1687 ///
1688 #define EFI_AFFECTED_BY_CAPS_LOCK 0x0002
1689
1690 ///
1691 /// Similar to the case of CAPS lock, if this bit is active, the key
1692 /// is affected by the num lock being turned on.
1693 ///
1694 #define EFI_AFFECTED_BY_NUM_LOCK 0x0004
1695
1696 typedef struct {
1697 UINT16 LayoutLength;
1698 EFI_GUID Guid;
1699 UINT32 LayoutDescriptorStringOffset;
1700 UINT8 DescriptorCount;
1701 // EFI_KEY_DESCRIPTOR Descriptors[];
1702 } EFI_HII_KEYBOARD_LAYOUT;
1703
1704 typedef struct {
1705 EFI_HII_PACKAGE_HEADER Header;
1706 UINT16 LayoutCount;
1707 // EFI_HII_KEYBOARD_LAYOUT Layout[];
1708 } EFI_HII_KEYBOARD_PACKAGE_HDR;
1709
1710 //
1711 // Modifier values
1712 //
1713 #define EFI_NULL_MODIFIER 0x0000
1714 #define EFI_LEFT_CONTROL_MODIFIER 0x0001
1715 #define EFI_RIGHT_CONTROL_MODIFIER 0x0002
1716 #define EFI_LEFT_ALT_MODIFIER 0x0003
1717 #define EFI_RIGHT_ALT_MODIFIER 0x0004
1718 #define EFI_ALT_GR_MODIFIER 0x0005
1719 #define EFI_INSERT_MODIFIER 0x0006
1720 #define EFI_DELETE_MODIFIER 0x0007
1721 #define EFI_PAGE_DOWN_MODIFIER 0x0008
1722 #define EFI_PAGE_UP_MODIFIER 0x0009
1723 #define EFI_HOME_MODIFIER 0x000A
1724 #define EFI_END_MODIFIER 0x000B
1725 #define EFI_LEFT_SHIFT_MODIFIER 0x000C
1726 #define EFI_RIGHT_SHIFT_MODIFIER 0x000D
1727 #define EFI_CAPS_LOCK_MODIFIER 0x000E
1728 #define EFI_NUM_LOCK_MODIFIER 0x000F
1729 #define EFI_LEFT_ARROW_MODIFIER 0x0010
1730 #define EFI_RIGHT_ARROW_MODIFIER 0x0011
1731 #define EFI_DOWN_ARROW_MODIFIER 0x0012
1732 #define EFI_UP_ARROW_MODIFIER 0x0013
1733 #define EFI_NS_KEY_MODIFIER 0x0014
1734 #define EFI_NS_KEY_DEPENDENCY_MODIFIER 0x0015
1735 #define EFI_FUNCTION_KEY_ONE_MODIFIER 0x0016
1736 #define EFI_FUNCTION_KEY_TWO_MODIFIER 0x0017
1737 #define EFI_FUNCTION_KEY_THREE_MODIFIER 0x0018
1738 #define EFI_FUNCTION_KEY_FOUR_MODIFIER 0x0019
1739 #define EFI_FUNCTION_KEY_FIVE_MODIFIER 0x001A
1740 #define EFI_FUNCTION_KEY_SIX_MODIFIER 0x001B
1741 #define EFI_FUNCTION_KEY_SEVEN_MODIFIER 0x001C
1742 #define EFI_FUNCTION_KEY_EIGHT_MODIFIER 0x001D
1743 #define EFI_FUNCTION_KEY_NINE_MODIFIER 0x001E
1744 #define EFI_FUNCTION_KEY_TEN_MODIFIER 0x001F
1745 #define EFI_FUNCTION_KEY_ELEVEN_MODIFIER 0x0020
1746 #define EFI_FUNCTION_KEY_TWELVE_MODIFIER 0x0021
1747
1748 //
1749 // Keys that have multiple control functions based on modifier
1750 // settings are handled in the keyboard driver implementation.
1751 // For instance, PRINT_KEY might have a modifier held down and
1752 // is still a nonprinting character, but might have an alternate
1753 // control function like SYSREQUEST
1754 //
1755 #define EFI_PRINT_MODIFIER 0x0022
1756 #define EFI_SYS_REQUEST_MODIFIER 0x0023
1757 #define EFI_SCROLL_LOCK_MODIFIER 0x0024
1758 #define EFI_PAUSE_MODIFIER 0x0025
1759 #define EFI_BREAK_MODIFIER 0x0026
1760
1761 #define EFI_LEFT_LOGO_MODIFIER 0x0027
1762 #define EFI_RIGHT_LOGO_MODIFIER 0x0028
1763 #define EFI_MENU_MODIFIER 0x0029
1764
1765 ///
1766 /// Animation IFR opcode
1767 ///
1768 typedef struct _EFI_IFR_ANIMATION {
1769 ///
1770 /// Standard opcode header, where Header.OpCode is
1771 /// EFI_IFR_ANIMATION_OP.
1772 ///
1773 EFI_IFR_OP_HEADER Header;
1774 ///
1775 /// Animation identifier in the HII database.
1776 ///
1777 EFI_ANIMATION_ID Id;
1778 } EFI_IFR_ANIMATION;
1779
1780 ///
1781 /// HII animation package header.
1782 ///
1783 typedef struct _EFI_HII_ANIMATION_PACKAGE_HDR {
1784 ///
1785 /// Standard package header, where Header.Type = EFI_HII_PACKAGE_ANIMATIONS.
1786 ///
1787 EFI_HII_PACKAGE_HEADER Header;
1788 ///
1789 /// Offset, relative to this header, of the animation information. If
1790 /// this is zero, then there are no animation sequences in the package.
1791 ///
1792 UINT32 AnimationInfoOffset;
1793 } EFI_HII_ANIMATION_PACKAGE_HDR;
1794
1795 ///
1796 /// Animation information is encoded as a series of blocks,
1797 /// with each block prefixed by a single byte header EFI_HII_ANIMATION_BLOCK.
1798 ///
1799 typedef struct _EFI_HII_ANIMATION_BLOCK {
1800 UINT8 BlockType;
1801 //UINT8 BlockBody[];
1802 } EFI_HII_ANIMATION_BLOCK;
1803
1804 ///
1805 /// Animation block types.
1806 ///
1807 #define EFI_HII_AIBT_END 0x00
1808 #define EFI_HII_AIBT_OVERLAY_IMAGES 0x10
1809 #define EFI_HII_AIBT_CLEAR_IMAGES 0x11
1810 #define EFI_HII_AIBT_RESTORE_SCRN 0x12
1811 #define EFI_HII_AIBT_OVERLAY_IMAGES_LOOP 0x18
1812 #define EFI_HII_AIBT_CLEAR_IMAGES_LOOP 0x19
1813 #define EFI_HII_AIBT_RESTORE_SCRN_LOOP 0x1A
1814 #define EFI_HII_AIBT_DUPLICATE 0x20
1815 #define EFI_HII_AIBT_SKIP2 0x21
1816 #define EFI_HII_AIBT_SKIP1 0x22
1817 #define EFI_HII_AIBT_EXT1 0x30
1818 #define EFI_HII_AIBT_EXT2 0x31
1819 #define EFI_HII_AIBT_EXT4 0x32
1820
1821 ///
1822 /// Extended block headers used for variable sized animation records
1823 /// which need an explicit length.
1824 ///
1825
1826 typedef struct _EFI_HII_AIBT_EXT1_BLOCK {
1827 ///
1828 /// Standard animation header, where Header.BlockType = EFI_HII_AIBT_EXT1.
1829 ///
1830 EFI_HII_ANIMATION_BLOCK Header;
1831 ///
1832 /// The block type.
1833 ///
1834 UINT8 BlockType2;
1835 ///
1836 /// Size of the animation block, in bytes, including the animation block header.
1837 ///
1838 UINT8 Length;
1839 } EFI_HII_AIBT_EXT1_BLOCK;
1840
1841 typedef struct _EFI_HII_AIBT_EXT2_BLOCK {
1842 ///
1843 /// Standard animation header, where Header.BlockType = EFI_HII_AIBT_EXT2.
1844 ///
1845 EFI_HII_ANIMATION_BLOCK Header;
1846 ///
1847 /// The block type
1848 ///
1849 UINT8 BlockType2;
1850 ///
1851 /// Size of the animation block, in bytes, including the animation block header.
1852 ///
1853 UINT16 Length;
1854 } EFI_HII_AIBT_EXT2_BLOCK;
1855
1856 typedef struct _EFI_HII_AIBT_EXT4_BLOCK {
1857 ///
1858 /// Standard animation header, where Header.BlockType = EFI_HII_AIBT_EXT4.
1859 ///
1860 EFI_HII_ANIMATION_BLOCK Header;
1861 ///
1862 /// The block type
1863 ///
1864 UINT8 BlockType2;
1865 ///
1866 /// Size of the animation block, in bytes, including the animation block header.
1867 ///
1868 UINT32 Length;
1869 } EFI_HII_AIBT_EXT4_BLOCK;
1870
1871 typedef struct _EFI_HII_ANIMATION_CELL {
1872 ///
1873 /// The X offset from the upper left hand corner of the logical
1874 /// window to position the indexed image.
1875 ///
1876 UINT16 OffsetX;
1877 ///
1878 /// The Y offset from the upper left hand corner of the logical
1879 /// window to position the indexed image.
1880 ///
1881 UINT16 OffsetY;
1882 ///
1883 /// The image to display at the specified offset from the upper left
1884 /// hand corner of the logical window.
1885 ///
1886 EFI_IMAGE_ID ImageId;
1887 ///
1888 /// The number of milliseconds to delay after displaying the indexed
1889 /// image and before continuing on to the next linked image. If value
1890 /// is zero, no delay.
1891 ///
1892 UINT16 Delay;
1893 } EFI_HII_ANIMATION_CELL;
1894
1895 ///
1896 /// An animation block to describe an animation sequence that does not cycle, and
1897 /// where one image is simply displayed over the previous image.
1898 ///
1899 typedef struct _EFI_HII_AIBT_OVERLAY_IMAGES_BLOCK {
1900 ///
1901 /// This is image that is to be reference by the image protocols, if the
1902 /// animation function is not supported or disabled. This image can
1903 /// be one particular image from the animation sequence (if any one
1904 /// of the animation frames has a complete image) or an alternate
1905 /// image that can be displayed alone. If the value is zero, no image
1906 /// is displayed.
1907 ///
1908 EFI_IMAGE_ID DftImageId;
1909 ///
1910 /// The overall width of the set of images (logical window width).
1911 ///
1912 UINT16 Width;
1913 ///
1914 /// The overall height of the set of images (logical window height).
1915 ///
1916 UINT16 Height;
1917 ///
1918 /// The number of EFI_HII_ANIMATION_CELL contained in the
1919 /// animation sequence.
1920 ///
1921 UINT16 CellCount;
1922 ///
1923 /// An array of CellCount animation cells.
1924 ///
1925 EFI_HII_ANIMATION_CELL AnimationCell[1];
1926 } EFI_HII_AIBT_OVERLAY_IMAGES_BLOCK;
1927
1928 ///
1929 /// An animation block to describe an animation sequence that does not cycle,
1930 /// and where the logical window is cleared to the specified color before
1931 /// the next image is displayed.
1932 ///
1933 typedef struct _EFI_HII_AIBT_CLEAR_IMAGES_BLOCK {
1934 ///
1935 /// This is image that is to be reference by the image protocols, if the
1936 /// animation function is not supported or disabled. This image can
1937 /// be one particular image from the animation sequence (if any one
1938 /// of the animation frames has a complete image) or an alternate
1939 /// image that can be displayed alone. If the value is zero, no image
1940 /// is displayed.
1941 ///
1942 EFI_IMAGE_ID DftImageId;
1943 ///
1944 /// The overall width of the set of images (logical window width).
1945 ///
1946 UINT16 Width;
1947 ///
1948 /// The overall height of the set of images (logical window height).
1949 ///
1950 UINT16 Height;
1951 ///
1952 /// The number of EFI_HII_ANIMATION_CELL contained in the
1953 /// animation sequence.
1954 ///
1955 UINT16 CellCount;
1956 ///
1957 /// The color to clear the logical window to before displaying the
1958 /// indexed image.
1959 ///
1960 EFI_HII_RGB_PIXEL BackgndColor;
1961 ///
1962 /// An array of CellCount animation cells.
1963 ///
1964 EFI_HII_ANIMATION_CELL AnimationCell[1];
1965 } EFI_HII_AIBT_CLEAR_IMAGES_BLOCK;
1966
1967 ///
1968 /// An animation block to describe an animation sequence that does not cycle,
1969 /// and where the screen is restored to the original state before the next
1970 /// image is displayed.
1971 ///
1972 typedef struct _EFI_HII_AIBT_RESTORE_SCRN_BLOCK {
1973 ///
1974 /// This is image that is to be reference by the image protocols, if the
1975 /// animation function is not supported or disabled. This image can
1976 /// be one particular image from the animation sequence (if any one
1977 /// of the animation frames has a complete image) or an alternate
1978 /// image that can be displayed alone. If the value is zero, no image
1979 /// is displayed.
1980 ///
1981 EFI_IMAGE_ID DftImageId;
1982 ///
1983 /// The overall width of the set of images (logical window width).
1984 ///
1985 UINT16 Width;
1986 ///
1987 /// The overall height of the set of images (logical window height).
1988 ///
1989 UINT16 Height;
1990 ///
1991 /// The number of EFI_HII_ANIMATION_CELL contained in the
1992 /// animation sequence.
1993 ///
1994 UINT16 CellCount;
1995 ///
1996 /// An array of CellCount animation cells.
1997 ///
1998 EFI_HII_ANIMATION_CELL AnimationCell[1];
1999 } EFI_HII_AIBT_RESTORE_SCRN_BLOCK;
2000
2001 ///
2002 /// An animation block to describe an animation sequence that continuously cycles,
2003 /// and where one image is simply displayed over the previous image.
2004 ///
2005 typedef EFI_HII_AIBT_OVERLAY_IMAGES_BLOCK EFI_HII_AIBT_OVERLAY_IMAGES_LOOP_BLOCK;
2006
2007 ///
2008 /// An animation block to describe an animation sequence that continuously cycles,
2009 /// and where the logical window is cleared to the specified color before
2010 /// the next image is displayed.
2011 ///
2012 typedef EFI_HII_AIBT_CLEAR_IMAGES_BLOCK EFI_HII_AIBT_CLEAR_IMAGES_LOOP_BLOCK;
2013
2014 ///
2015 /// An animation block to describe an animation sequence that continuously cycles,
2016 /// and where the screen is restored to the original state before
2017 /// the next image is displayed.
2018 ///
2019 typedef EFI_HII_AIBT_RESTORE_SCRN_BLOCK EFI_HII_AIBT_RESTORE_SCRN_LOOP_BLOCK;
2020
2021 ///
2022 /// Assigns a new character value to a previously defined animation sequence.
2023 ///
2024 typedef struct _EFI_HII_AIBT_DUPLICATE_BLOCK {
2025 ///
2026 /// The previously defined animation ID with the exact same
2027 /// animation information.
2028 ///
2029 EFI_ANIMATION_ID AnimationId;
2030 } EFI_HII_AIBT_DUPLICATE_BLOCK;
2031
2032 ///
2033 /// Skips animation IDs.
2034 ///
2035 typedef struct _EFI_HII_AIBT_SKIP1_BLOCK {
2036 ///
2037 /// The unsigned 8-bit value to add to AnimationIdCurrent.
2038 ///
2039 UINT8 SkipCount;
2040 } EFI_HII_AIBT_SKIP1_BLOCK;
2041
2042 ///
2043 /// Skips animation IDs.
2044 ///
2045 typedef struct _EFI_HII_AIBT_SKIP2_BLOCK {
2046 ///
2047 /// The unsigned 16-bit value to add to AnimationIdCurrent.
2048 ///
2049 UINT16 SkipCount;
2050 } EFI_HII_AIBT_SKIP2_BLOCK;
2051
2052 #pragma pack()
2053
2054
2055
2056 ///
2057 /// References to string tokens must use this macro to enable scanning for
2058 /// token usages.
2059 ///
2060 ///
2061 /// STRING_TOKEN is not defined in UEFI specification. But it is placed
2062 /// here for the easy access by C files and VFR source files.
2063 ///
2064 #define STRING_TOKEN(t) t
2065
2066 #endif