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