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