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   @par Revision Reference:
7   These definitions are from UEFI2.1.
8 
9   Copyright (c) 2006 - 2015, Intel Corporation. All rights reserved.<BR>
10 
11   This program and the accompanying materials are licensed and made available
12   under the terms and conditions of the BSD License which accompanies this
13   distribution.  The full text of the license may be found at
14     http://opensource.org/licenses/bsd-license.php
15 
16   THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
17   WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
18 
19 **/
20 
21 #ifndef __UEFI_INTERNAL_FORMREPRESENTATION_H__
22 #define __UEFI_INTERNAL_FORMREPRESENTATION_H__
23 
24 
25 #define EFI_HII_PLATFORM_SETUP_FORMSET_GUID \
26   { 0x93039971, 0x8545, 0x4b04, { 0xb4, 0x5e, 0x32, 0xeb, 0x83, 0x26, 0x4, 0xe } }
27 
28 //
29 // The following types are currently defined:
30 //
31 typedef UINT32  RELOFST;
32 
33 typedef VOID*   EFI_HII_HANDLE;
34 typedef CHAR16* EFI_STRING;
35 typedef UINT16  EFI_IMAGE_ID;
36 typedef UINT16  EFI_QUESTION_ID;
37 typedef UINT16  EFI_STRING_ID;
38 typedef UINT16  EFI_FORM_ID;
39 typedef UINT16  EFI_VARSTORE_ID;
40 typedef UINT16  EFI_DEFAULT_ID;
41 typedef UINT32  EFI_HII_FONT_STYLE;
42 
43 
44 
45 #pragma pack(1)
46 
47 
48 //
49 // HII package list
50 //
51 typedef struct {
52   EFI_GUID               PackageListGuid;
53   UINT32                 PackageLength;
54 } EFI_HII_PACKAGE_LIST_HEADER;
55 
56 /**
57 
58   Each package starts with a header, as defined above, which
59   indicates the size and type of the package. When added to a
60   pointer pointing to the start of the header, Length points at
61   the next package. The package lists form a package list when
62   concatenated together and terminated with an
63   EFI_HII_PACKAGE_HEADER with a Type of EFI_HII_PACKAGE_END. The
64   type EFI_HII_PACKAGE_TYPE_GUID is used for vendor-defined HII
65   packages, whose contents are determined by the Guid. The range
66   of package types starting with EFI_HII_PACKAGE_TYPE_SYSTEM_BEGIN
67   through EFI_HII_PACKAGE_TYPE_SYSTEM_END are reserved for system
68   firmware implementers.
69 
70   @param Length The size of the package in bytes.
71 
72   @param Type   The package type. See EFI_HII_PACKAGE_TYPE_x,
73                 below.
74 
75   @param Data   The package data, the format of which is
76                 determined by Type.
77 
78 **/
79 typedef struct {
80   UINT32  Length:24;
81   UINT32  Type:8;
82   // UINT8  Data[...];
83 } EFI_HII_PACKAGE_HEADER;
84 
85 //
86 // EFI_HII_PACKAGE_TYPE_x.
87 //
88 #define EFI_HII_PACKAGE_TYPE_ALL             0x00
89 #define EFI_HII_PACKAGE_TYPE_GUID            0x01
90 #define EFI_HII_PACKAGE_FORM                 0x02
91 #define EFI_HII_PACKAGE_KEYBOARD_LAYOUT      0x03
92 #define EFI_HII_PACKAGE_STRINGS              0x04
93 #define EFI_HII_PACKAGE_FONTS                0x05
94 #define EFI_HII_PACKAGE_IMAGES               0x06
95 #define EFI_HII_PACKAGE_SIMPLE_FONTS         0x07
96 #define EFI_HII_PACKAGE_DEVICE_PATH          0x08
97 #define EFI_HII_PACKAGE_END                  0xDF
98 #define EFI_HII_PACKAGE_TYPE_SYSTEM_BEGIN    0xE0
99 #define EFI_HII_PACKAGE_TYPE_SYSTEM_END      0xFF
100 
101 //
102 // Simplified Font Package
103 //
104 
105 #define EFI_GLYPH_HEIGHT                     19
106 #define EFI_GLYPH_WIDTH                      8
107 //
108 // Contents of EFI_NARROW_GLYPH.Attributes
109 //
110 #define EFI_GLYPH_NON_SPACING                0x01
111 #define EFI_GLYPH_WIDE                       0x02
112 
113 typedef struct {
114   CHAR16                 UnicodeWeight;
115   UINT8                  Attributes;
116   UINT8                  GlyphCol1[EFI_GLYPH_HEIGHT];
117 } EFI_NARROW_GLYPH;
118 
119 typedef struct {
120   CHAR16                 UnicodeWeight;
121   UINT8                  Attributes;
122   UINT8                  GlyphCol1[EFI_GLYPH_HEIGHT];
123   UINT8                  GlyphCol2[EFI_GLYPH_HEIGHT];
124   UINT8                  Pad[3];
125 } EFI_WIDE_GLYPH;
126 
127 
128 typedef struct _EFI_HII_SIMPLE_FONT_PACKAGE_HDR {
129   EFI_HII_PACKAGE_HEADER Header;
130   UINT16                 NumberOfNarrowGlyphs;
131   UINT16                 NumberOfWideGlyphs;
132   // EFI_NARROW_GLYPH       NarrowGlyphs[];
133   // EFI_WIDE_GLYPH         WideGlyphs[];
134 } EFI_HII_SIMPLE_FONT_PACKAGE_HDR;
135 
136 //
137 // Font Package
138 //
139 
140 #define EFI_HII_FONT_STYLE_BOLD              0x00000001
141 #define EFI_HII_FONT_STYLE_ITALIC            0x00000002
142 #define EFI_HII_FONT_STYLE_EMBOSS            0x00010000
143 #define EFI_HII_FONT_STYLE_OUTLINE           0x00020000
144 #define EFI_HII_FONT_STYLE_SHADOW            0x00040000
145 #define EFI_HII_FONT_STYLE_UNDERLINE         0x00080000
146 #define EFI_HII_FONT_STYLE_DBL_UNDER         0x00100000
147 
148 typedef struct _EFI_HII_GLYPH_INFO {
149   UINT16                 Width;
150   UINT16                 Height;
151   INT16                  OffsetX;
152   INT16                  OffsetY;
153   INT16                  AdvanceX;
154 } EFI_HII_GLYPH_INFO;
155 
156 typedef struct _EFI_HII_FONT_PACKAGE_HDR {
157   EFI_HII_PACKAGE_HEADER Header;
158   UINT32                 HdrSize;
159   UINT32                 GlyphBlockOffset;
160   EFI_HII_GLYPH_INFO     Cell;
161   EFI_HII_FONT_STYLE     FontStyle;
162   CHAR16                 FontFamily[1];
163 } EFI_HII_FONT_PACKAGE_HDR;
164 
165 #define EFI_HII_GIBT_END                  0x00
166 #define EFI_HII_GIBT_GLYPH                0x10
167 #define EFI_HII_GIBT_GLYPHS               0x11
168 #define EFI_HII_GIBT_GLYPH_DEFAULT        0x12
169 #define EFI_HII_GIBT_GLYPHS_DEFAULT       0x13
170 #define EFI_HII_GIBT_DUPLICATE            0x20
171 #define EFI_HII_GIBT_SKIP2                0x21
172 #define EFI_HII_GIBT_SKIP1                0x22
173 #define EFI_HII_GIBT_DEFAULTS             0x23
174 #define EFI_HII_GIBT_EXT1                 0x30
175 #define EFI_HII_GIBT_EXT2                 0x31
176 #define EFI_HII_GIBT_EXT4                 0x32
177 
178 typedef struct _EFI_HII_GLYPH_BLOCK {
179   UINT8                  BlockType;
180 } EFI_HII_GLYPH_BLOCK;
181 
182 typedef struct _EFI_HII_GIBT_DEFAULTS_BLOCK {
183   EFI_HII_GLYPH_BLOCK    Header;
184   EFI_HII_GLYPH_INFO     Cell;
185 } EFI_HII_GIBT_DEFAULTS_BLOCK;
186 
187 typedef struct _EFI_HII_GIBT_DUPLICATE_BLOCK {
188   EFI_HII_GLYPH_BLOCK    Header;
189   CHAR16                 CharValue;
190 } EFI_HII_GIBT_DUPLICATE_BLOCK;
191 
192 typedef struct _EFI_GLYPH_GIBT_END_BLOCK {
193   EFI_HII_GLYPH_BLOCK    Header;
194 } EFI_GLYPH_GIBT_END_BLOCK;
195 
196 typedef struct _EFI_HII_GIBT_EXT1_BLOCK {
197   EFI_HII_GLYPH_BLOCK    Header;
198   UINT8                  BlockType2;
199   UINT8                  Length;
200 } EFI_HII_GIBT_EXT1_BLOCK;
201 
202 typedef struct _EFI_HII_GIBT_EXT2_BLOCK {
203   EFI_HII_GLYPH_BLOCK    Header;
204   UINT8                  BlockType2;
205   UINT16                 Length;
206 } EFI_HII_GIBT_EXT2_BLOCK;
207 
208 typedef struct _EFI_HII_GIBT_EXT4_BLOCK {
209   EFI_HII_GLYPH_BLOCK    Header;
210   UINT8                  BlockType2;
211   UINT32                 Length;
212 } EFI_HII_GIBT_EXT4_BLOCK;
213 
214 typedef struct _EFI_HII_GIBT_GLYPH_BLOCK {
215   EFI_HII_GLYPH_BLOCK    Header;
216   EFI_HII_GLYPH_INFO     Cell;
217   UINT8                  BitmapData[1]; // the number of bytes per bitmap can be calculated by ((Cell.Width+7)/8)*Cell.Height
218 } EFI_HII_GIBT_GLYPH_BLOCK;
219 
220 typedef struct _EFI_HII_GIBT_GLYPHS_BLOCK {
221   EFI_HII_GLYPH_BLOCK    Header;
222   EFI_HII_GLYPH_INFO     Cell;
223   UINT16                 Count;
224   UINT8                  BitmapData[1]; // the number of bytes per bitmap can be calculated by ((Cell.Width+7)/8)*Cell.Height
225 } EFI_HII_GIBT_GLYPHS_BLOCK;
226 
227 typedef struct _EFI_HII_GIBT_GLYPH_DEFAULT_BLOCK {
228   EFI_HII_GLYPH_BLOCK    Header;
229   UINT8                  BitmapData[1]; // the number of bytes per bitmap can be calculated by ((Global.Cell.Width+7)/8)*Global.Cell.Height
230 } EFI_HII_GIBT_GLYPH_DEFAULT_BLOCK;
231 
232 typedef struct _EFI_HII_GIBT_GLYPHS_DEFAULT_BLOCK {
233   EFI_HII_GLYPH_BLOCK    Header;
234   UINT16                 Count;
235   UINT8                  BitmapData[1]; // the number of bytes per bitmap can be calculated by ((Global.Cell.Width+7)/8)*Global.Cell.Height
236 } EFI_HII_GIBT_GLYPHS_DEFAULT_BLOCK;
237 
238 typedef struct _EFI_HII_GIBT_SKIP1_BLOCK {
239   EFI_HII_GLYPH_BLOCK    Header;
240   UINT8                  SkipCount;
241 } EFI_HII_GIBT_SKIP1_BLOCK;
242 
243 typedef struct _EFI_HII_GIBT_SKIP2_BLOCK {
244   EFI_HII_GLYPH_BLOCK    Header;
245   UINT16                 SkipCount;
246 } EFI_HII_GIBT_SKIP2_BLOCK;
247 
248 //
249 // Device Path Package
250 //
251 typedef struct _EFI_HII_DEVICE_PATH_PACKAGE {
252   EFI_HII_PACKAGE_HEADER   Header;
253   // EFI_DEVICE_PATH_PROTOCOL DevicePath[];
254 } EFI_HII_DEVICE_PATH_PACKAGE;
255 
256 //
257 // GUID Package
258 //
259 typedef struct _EFI_HII_GUID_PACKAGE_HDR {
260   EFI_HII_PACKAGE_HEADER  Header;
261   EFI_GUID                Guid;
262   // Data per GUID definition may follow
263 } EFI_HII_GUID_PACKAGE_HDR;
264 
265 //
266 // String Package
267 //
268 
269 #define UEFI_CONFIG_LANG  "x-UEFI"
270 #define UEFI_CONFIG_LANG2 "x-i-UEFI"
271 
272 typedef struct _EFI_HII_STRING_PACKAGE_HDR {
273   EFI_HII_PACKAGE_HEADER  Header;
274   UINT32                  HdrSize;
275   UINT32                  StringInfoOffset;
276   CHAR16                  LanguageWindow[16];
277   EFI_STRING_ID           LanguageName;
278   CHAR8                   Language[1];
279 } EFI_HII_STRING_PACKAGE_HDR;
280 
281 typedef struct {
282   UINT8                   BlockType;
283 } EFI_HII_STRING_BLOCK;
284 
285 #define EFI_HII_SIBT_END                     0x00
286 #define EFI_HII_SIBT_STRING_SCSU             0x10
287 #define EFI_HII_SIBT_STRING_SCSU_FONT        0x11
288 #define EFI_HII_SIBT_STRINGS_SCSU            0x12
289 #define EFI_HII_SIBT_STRINGS_SCSU_FONT       0x13
290 #define EFI_HII_SIBT_STRING_UCS2             0x14
291 #define EFI_HII_SIBT_STRING_UCS2_FONT        0x15
292 #define EFI_HII_SIBT_STRINGS_UCS2            0x16
293 #define EFI_HII_SIBT_STRINGS_UCS2_FONT       0x17
294 #define EFI_HII_SIBT_DUPLICATE               0x20
295 #define EFI_HII_SIBT_SKIP2                   0x21
296 #define EFI_HII_SIBT_SKIP1                   0x22
297 #define EFI_HII_SIBT_EXT1                    0x30
298 #define EFI_HII_SIBT_EXT2                    0x31
299 #define EFI_HII_SIBT_EXT4                    0x32
300 #define EFI_HII_SIBT_FONT                    0x40
301 
302 typedef struct _EFI_HII_SIBT_DUPLICATE_BLOCK {
303   EFI_HII_STRING_BLOCK    Header;
304   EFI_STRING_ID           StringId;
305 } EFI_HII_SIBT_DUPLICATE_BLOCK;
306 
307 typedef struct _EFI_HII_SIBT_END_BLOCK {
308   EFI_HII_STRING_BLOCK    Header;
309 } EFI_HII_SIBT_END_BLOCK;
310 
311 typedef struct _EFI_HII_SIBT_EXT1_BLOCK {
312   EFI_HII_STRING_BLOCK    Header;
313   UINT8                   BlockType2;
314   UINT8                   Length;
315 } EFI_HII_SIBT_EXT1_BLOCK;
316 
317 typedef struct _EFI_HII_SIBT_EXT2_BLOCK {
318   EFI_HII_STRING_BLOCK    Header;
319   UINT8                   BlockType2;
320   UINT16                  Length;
321 } EFI_HII_SIBT_EXT2_BLOCK;
322 
323 typedef struct _EFI_HII_SIBT_EXT4_BLOCK {
324   EFI_HII_STRING_BLOCK    Header;
325   UINT8                   BlockType2;
326   UINT32                  Length;
327 } EFI_HII_SIBT_EXT4_BLOCK;
328 
329 typedef struct _EFI_HII_SIBT_FONT_BLOCK {
330   EFI_HII_SIBT_EXT2_BLOCK Header;
331   UINT8                   FontId;
332   UINT16                  FontSize;
333   EFI_HII_FONT_STYLE      FontStyle;
334   CHAR16                  FontName[1];
335 } EFI_HII_SIBT_FONT_BLOCK;
336 
337 typedef struct _EFI_HII_SIBT_SKIP1_BLOCK {
338   EFI_HII_STRING_BLOCK    Header;
339   UINT8                   SkipCount;
340 } EFI_HII_SIBT_SKIP1_BLOCK;
341 
342 typedef struct _EFI_HII_SIBT_SKIP2_BLOCK {
343   EFI_HII_STRING_BLOCK    Header;
344   UINT16                  SkipCount;
345 } EFI_HII_SIBT_SKIP2_BLOCK;
346 
347 typedef struct _EFI_HII_SIBT_STRING_SCSU_BLOCK {
348   EFI_HII_STRING_BLOCK    Header;
349   UINT8                   StringText[1];
350 } EFI_HII_SIBT_STRING_SCSU_BLOCK;
351 
352 typedef struct _EFI_HII_SIBT_STRING_SCSU_FONT_BLOCK {
353   EFI_HII_STRING_BLOCK    Header;
354   UINT8                   FontIdentifier;
355   UINT8                   StringText[1];
356 } EFI_HII_SIBT_STRING_SCSU_FONT_BLOCK;
357 
358 typedef struct _EFI_HII_SIBT_STRINGS_SCSU_BLOCK {
359   EFI_HII_STRING_BLOCK    Header;
360   UINT16                  StringCount;
361   UINT8                   StringText[1];
362 } EFI_HII_SIBT_STRINGS_SCSU_BLOCK;
363 
364 typedef struct _EFI_HII_SIBT_STRINGS_SCSU_FONT_BLOCK {
365   EFI_HII_STRING_BLOCK    Header;
366   UINT8                   FontIdentifier;
367   UINT16                  StringCount;
368   UINT8                   StringText[1];
369 } EFI_HII_SIBT_STRINGS_SCSU_FONT_BLOCK;
370 
371 typedef struct _EFI_HII_SIBT_STRING_UCS2_BLOCK {
372   EFI_HII_STRING_BLOCK    Header;
373   CHAR16                  StringText[1];
374 } EFI_HII_SIBT_STRING_UCS2_BLOCK;
375 
376 typedef struct _EFI_HII_SIBT_STRING_UCS2_FONT_BLOCK {
377   EFI_HII_STRING_BLOCK    Header;
378   UINT8                   FontIdentifier;
379   CHAR16                  StringText[1];
380 } EFI_HII_SIBT_STRING_UCS2_FONT_BLOCK;
381 
382 typedef struct _EFI_HII_SIBT_STRINGS_UCS2_BLOCK {
383   EFI_HII_STRING_BLOCK    Header;
384   UINT16                  StringCount;
385   CHAR16                  StringText[1];
386 } EFI_HII_SIBT_STRINGS_UCS2_BLOCK;
387 
388 typedef struct _EFI_HII_SIBT_STRINGS_UCS2_FONT_BLOCK {
389   EFI_HII_STRING_BLOCK    Header;
390   UINT8                   FontIdentifier;
391   UINT16                  StringCount;
392   CHAR16                  StringText[1];
393 } EFI_HII_SIBT_STRINGS_UCS2_FONT_BLOCK;
394 
395 //
396 // Image Packages
397 //
398 
399 typedef struct _EFI_HII_IMAGE_PACKAGE_HDR {
400   EFI_HII_PACKAGE_HEADER  Header;
401   UINT32                  ImageInfoOffset;
402   UINT32                  PaletteInfoOffset;
403 } EFI_HII_IMAGE_PACKAGE_HDR;
404 
405 typedef struct _EFI_HII_IMAGE_BLOCK {
406   UINT8                   BlockType;
407 } EFI_HII_IMAGE_BLOCK;
408 
409 #define EFI_HII_IIBT_END               0x00
410 #define EFI_HII_IIBT_IMAGE_1BIT        0x10
411 #define EFI_HII_IIBT_IMAGE_1BIT_TRANS  0x11
412 #define EFI_HII_IIBT_IMAGE_4BIT        0x12
413 #define EFI_HII_IIBT_IMAGE_4BIT_TRANS  0x13
414 #define EFI_HII_IIBT_IMAGE_8BIT        0x14
415 #define EFI_HII_IIBT_IMAGE_8BIT_TRANS  0x15
416 #define EFI_HII_IIBT_IMAGE_24BIT       0x16
417 #define EFI_HII_IIBT_IMAGE_24BIT_TRANS 0x17
418 #define EFI_HII_IIBT_IMAGE_JPEG        0x18
419 #define EFI_HII_IIBT_DUPLICATE         0x20
420 #define EFI_HII_IIBT_SKIP2             0x21
421 #define EFI_HII_IIBT_SKIP1             0x22
422 #define EFI_HII_IIBT_EXT1              0x30
423 #define EFI_HII_IIBT_EXT2              0x31
424 #define EFI_HII_IIBT_EXT4              0x32
425 
426 typedef struct _EFI_HII_IIBT_END_BLOCK {
427   EFI_HII_IMAGE_BLOCK          Header;
428 } EFI_HII_IIBT_END_BLOCK;
429 
430 typedef struct _EFI_HII_IIBT_EXT1_BLOCK {
431   EFI_HII_IMAGE_BLOCK          Header;
432   UINT8                        BlockType2;
433   UINT8                        Length;
434 } EFI_HII_IIBT_EXT1_BLOCK;
435 
436 typedef struct _EFI_HII_IIBT_EXT2_BLOCK {
437   EFI_HII_IMAGE_BLOCK          Header;
438   UINT8                        BlockType2;
439   UINT16                       Length;
440 } EFI_HII_IIBT_EXT2_BLOCK;
441 
442 typedef struct _EFI_HII_IIBT_EXT4_BLOCK {
443   EFI_HII_IMAGE_BLOCK          Header;
444   UINT8                        BlockType2;
445   UINT32                       Length;
446 } EFI_HII_IIBT_EXT4_BLOCK;
447 
448 typedef struct _EFI_HII_IIBT_IMAGE_1BIT_BASE {
449   UINT16                       Width;
450   UINT16                       Height;
451   UINT8                        Data[1];
452 } EFI_HII_IIBT_IMAGE_1BIT_BASE;
453 
454 typedef struct _EFI_HII_IIBT_IMAGE_1BIT_BLOCK {
455   EFI_HII_IMAGE_BLOCK          Header;
456   UINT8                        PaletteIndex;
457   EFI_HII_IIBT_IMAGE_1BIT_BASE Bitmap;
458 } EFI_HII_IIBT_IMAGE_1BIT_BLOCK;
459 
460 typedef struct _EFI_HII_IIBT_IMAGE_1BIT_TRANS_BLOCK {
461   EFI_HII_IMAGE_BLOCK          Header;
462   UINT8                        PaletteIndex;
463   EFI_HII_IIBT_IMAGE_1BIT_BASE Bitmap;
464 } EFI_HII_IIBT_IMAGE_1BIT_TRANS_BLOCK;
465 
466 typedef struct _EFI_HII_RGB_PIXEL {
467   UINT8                        b;
468   UINT8                        g;
469   UINT8                        r;
470 } EFI_HII_RGB_PIXEL;
471 
472 typedef struct _EFI_HII_IIBT_IMAGE_24BIT_BASE {
473   UINT16                       Width;
474   UINT16                       Height;
475   EFI_HII_RGB_PIXEL            Bitmap[1];
476 } EFI_HII_IIBT_IMAGE_24BIT_BASE;
477 
478 typedef struct _EFI_HII_IIBT_IMAGE_24BIT_BLOCK {
479   EFI_HII_IMAGE_BLOCK           Header;
480   EFI_HII_IIBT_IMAGE_24BIT_BASE Bitmap;
481 } EFI_HII_IIBT_IMAGE_24BIT_BLOCK;
482 
483 typedef struct _EFI_HII_IIBT_IMAGE_24BIT_TRANS_BLOCK {
484   EFI_HII_IMAGE_BLOCK           Header;
485   EFI_HII_IIBT_IMAGE_24BIT_BASE Bitmap;
486 } EFI_HII_IIBT_IMAGE_24BIT_TRANS_BLOCK;
487 
488 typedef struct _EFI_HII_IIBT_IMAGE_4BIT_BASE {
489   UINT16                       Width;
490   UINT16                       Height;
491   UINT8                        Data[1];
492 } EFI_HII_IIBT_IMAGE_4BIT_BASE;
493 
494 typedef struct _EFI_HII_IIBT_IMAGE_4BIT_BLOCK {
495   EFI_HII_IMAGE_BLOCK          Header;
496   UINT8                        PaletteIndex;
497   EFI_HII_IIBT_IMAGE_4BIT_BASE Bitmap;
498 } EFI_HII_IIBT_IMAGE_4BIT_BLOCK;
499 
500 typedef struct _EFI_HII_IIBT_IMAGE_4BIT_TRANS_BLOCK {
501   EFI_HII_IMAGE_BLOCK          Header;
502   UINT8                        PaletteIndex;
503   EFI_HII_IIBT_IMAGE_4BIT_BASE Bitmap;
504 } EFI_HII_IIBT_IMAGE_4BIT_TRANS_BLOCK;
505 
506 typedef struct _EFI_HII_IIBT_IMAGE_8BIT_BASE {
507   UINT16                       Width;
508   UINT16                       Height;
509   UINT8                        Data[1];
510 } EFI_HII_IIBT_IMAGE_8BIT_BASE;
511 
512 typedef struct _EFI_HII_IIBT_IMAGE_8BIT_PALETTE_BLOCK {
513   EFI_HII_IMAGE_BLOCK          Header;
514   UINT8                        PaletteIndex;
515   EFI_HII_IIBT_IMAGE_8BIT_BASE Bitmap;
516 } EFI_HII_IIBT_IMAGE_8BIT_BLOCK;
517 
518 typedef struct _EFI_HII_IIBT_IMAGE_8BIT_TRANS_BLOCK {
519   EFI_HII_IMAGE_BLOCK          Header;
520   UINT8                        PaletteIndex;
521   EFI_HII_IIBT_IMAGE_8BIT_BASE Bitmap;
522 } EFI_HII_IIBT_IMAGE_8BIT_TRAN_BLOCK;
523 
524 typedef struct _EFI_HII_IIBT_DUPLICATE_BLOCK {
525   EFI_HII_IMAGE_BLOCK          Header;
526   EFI_IMAGE_ID                 ImageId;
527 } EFI_HII_IIBT_DUPLICATE_BLOCK;
528 
529 typedef struct _EFI_HII_IIBT_JPEG_BLOCK {
530   EFI_HII_IMAGE_BLOCK          Header;
531   UINT32                       Size;
532   UINT8                        Data[1];
533 } EFI_HII_IIBT_JPEG_BLOCK;
534 
535 typedef struct _EFI_HII_IIBT_SKIP1_BLOCK {
536   EFI_HII_IMAGE_BLOCK          Header;
537   UINT8                        SkipCount;
538 } EFI_HII_IIBT_SKIP1_BLOCK;
539 
540 typedef struct _EFI_HII_IIBT_SKIP2_BLOCK {
541   EFI_HII_IMAGE_BLOCK          Header;
542   UINT16                       SkipCount;
543 } EFI_HII_IIBT_SKIP2_BLOCK;
544 
545 typedef struct _EFI_HII_IMAGE_PALETTE_INFO_HEADER {
546   UINT16                       PaletteCount;
547 } EFI_HII_IMAGE_PALETTE_INFO_HEADER;
548 
549 typedef struct _EFI_HII_IMAGE_PALETTE_INFO {
550   UINT16                       PaletteSize;
551   EFI_HII_RGB_PIXEL            PaletteValue[1];
552 } EFI_HII_IMAGE_PALETTE_INFO;
553 
554 //
555 // Forms Package
556 //
557 
558 typedef struct _EFI_HII_FORM_PACKAGE {
559   EFI_HII_PACKAGE_HEADER       Header;
560   // EFI_IFR_OP_HEADER         OpCodeHeader;
561   // More op-codes follow
562 } EFI_HII_FORM_PACKAGE;
563 
564 typedef struct {
565   UINT8 Hour;
566   UINT8 Minute;
567   UINT8 Second;
568 } EFI_HII_TIME;
569 
570 typedef struct {
571   UINT16 Year;
572   UINT8  Month;
573   UINT8  Day;
574 } EFI_HII_DATE;
575 
576 typedef struct {
577   EFI_QUESTION_ID QuestionId;
578   EFI_FORM_ID     FormId;
579   EFI_GUID        FormSetGuid;
580   EFI_STRING_ID   DevicePath;
581 } EFI_HII_REF;
582 
583 typedef union {
584   UINT8           u8;
585   UINT16          u16;
586   UINT32          u32;
587   UINT64          u64;
588   BOOLEAN         b;
589   EFI_HII_TIME    time;
590   EFI_HII_DATE    date;
591   EFI_STRING_ID   string;
592   EFI_HII_REF     ref;
593 } EFI_IFR_TYPE_VALUE;
594 
595 #define EFI_IFR_FORM_OP                0x01
596 #define EFI_IFR_SUBTITLE_OP            0x02
597 #define EFI_IFR_TEXT_OP                0x03
598 #define EFI_IFR_IMAGE_OP               0x04
599 #define EFI_IFR_ONE_OF_OP              0x05
600 #define EFI_IFR_CHECKBOX_OP            0x06
601 #define EFI_IFR_NUMERIC_OP             0x07
602 #define EFI_IFR_PASSWORD_OP            0x08
603 #define EFI_IFR_ONE_OF_OPTION_OP       0x09
604 #define EFI_IFR_SUPPRESS_IF_OP         0x0A
605 #define EFI_IFR_LOCKED_OP              0x0B
606 #define EFI_IFR_ACTION_OP              0x0C
607 #define EFI_IFR_RESET_BUTTON_OP        0x0D
608 #define EFI_IFR_FORM_SET_OP            0x0E
609 #define EFI_IFR_REF_OP                 0x0F
610 #define EFI_IFR_NO_SUBMIT_IF_OP        0x10
611 #define EFI_IFR_INCONSISTENT_IF_OP     0x11
612 #define EFI_IFR_EQ_ID_VAL_OP           0x12
613 #define EFI_IFR_EQ_ID_ID_OP            0x13
614 #define EFI_IFR_EQ_ID_VAL_LIST_OP      0x14
615 #define EFI_IFR_AND_OP                 0x15
616 #define EFI_IFR_OR_OP                  0x16
617 #define EFI_IFR_NOT_OP                 0x17
618 #define EFI_IFR_RULE_OP                0x18
619 #define EFI_IFR_GRAY_OUT_IF_OP         0x19
620 #define EFI_IFR_DATE_OP                0x1A
621 #define EFI_IFR_TIME_OP                0x1B
622 #define EFI_IFR_STRING_OP              0x1C
623 #define EFI_IFR_REFRESH_OP             0x1D
624 #define EFI_IFR_DISABLE_IF_OP          0x1E
625 #define EFI_IFR_TO_LOWER_OP            0x20
626 #define EFI_IFR_TO_UPPER_OP            0x21
627 #define EFI_IFR_MAP_OP                 0x22
628 #define EFI_IFR_ORDERED_LIST_OP        0x23
629 #define EFI_IFR_VARSTORE_OP            0x24
630 #define EFI_IFR_VARSTORE_NAME_VALUE_OP 0x25
631 #define EFI_IFR_VARSTORE_EFI_OP        0x26
632 #define EFI_IFR_VARSTORE_DEVICE_OP     0x27
633 #define EFI_IFR_VERSION_OP             0x28
634 #define EFI_IFR_END_OP                 0x29
635 #define EFI_IFR_MATCH_OP               0x2A
636 #define EFI_IFR_GET_OP                 0x2B
637 #define EFI_IFR_SET_OP                 0x2C
638 #define EFI_IFR_READ_OP                0x2D
639 #define EFI_IFR_WRITE_OP               0x2E
640 #define EFI_IFR_EQUAL_OP               0x2F
641 #define EFI_IFR_NOT_EQUAL_OP           0x30
642 #define EFI_IFR_GREATER_THAN_OP        0x31
643 #define EFI_IFR_GREATER_EQUAL_OP       0x32
644 #define EFI_IFR_LESS_THAN_OP           0x33
645 #define EFI_IFR_LESS_EQUAL_OP          0x34
646 #define EFI_IFR_BITWISE_AND_OP         0x35
647 #define EFI_IFR_BITWISE_OR_OP          0x36
648 #define EFI_IFR_BITWISE_NOT_OP         0x37
649 #define EFI_IFR_SHIFT_LEFT_OP          0x38
650 #define EFI_IFR_SHIFT_RIGHT_OP         0x39
651 #define EFI_IFR_ADD_OP                 0x3A
652 #define EFI_IFR_SUBTRACT_OP            0x3B
653 #define EFI_IFR_MULTIPLY_OP            0x3C
654 #define EFI_IFR_DIVIDE_OP              0x3D
655 #define EFI_IFR_MODULO_OP              0x3E
656 #define EFI_IFR_RULE_REF_OP            0x3F
657 #define EFI_IFR_QUESTION_REF1_OP       0x40
658 #define EFI_IFR_QUESTION_REF2_OP       0x41
659 #define EFI_IFR_UINT8_OP               0x42
660 #define EFI_IFR_UINT16_OP              0x43
661 #define EFI_IFR_UINT32_OP              0x44
662 #define EFI_IFR_UINT64_OP              0x45
663 #define EFI_IFR_TRUE_OP                0x46
664 #define EFI_IFR_FALSE_OP               0x47
665 #define EFI_IFR_TO_UINT_OP             0x48
666 #define EFI_IFR_TO_STRING_OP           0x49
667 #define EFI_IFR_TO_BOOLEAN_OP          0x4A
668 #define EFI_IFR_MID_OP                 0x4B
669 #define EFI_IFR_FIND_OP                0x4C
670 #define EFI_IFR_TOKEN_OP               0x4D
671 #define EFI_IFR_STRING_REF1_OP         0x4E
672 #define EFI_IFR_STRING_REF2_OP         0x4F
673 #define EFI_IFR_CONDITIONAL_OP         0x50
674 #define EFI_IFR_QUESTION_REF3_OP       0x51
675 #define EFI_IFR_ZERO_OP                0x52
676 #define EFI_IFR_ONE_OP                 0x53
677 #define EFI_IFR_ONES_OP                0x54
678 #define EFI_IFR_UNDEFINED_OP           0x55
679 #define EFI_IFR_LENGTH_OP              0x56
680 #define EFI_IFR_DUP_OP                 0x57
681 #define EFI_IFR_THIS_OP                0x58
682 #define EFI_IFR_SPAN_OP                0x59
683 #define EFI_IFR_VALUE_OP               0x5A
684 #define EFI_IFR_DEFAULT_OP             0x5B
685 #define EFI_IFR_DEFAULTSTORE_OP        0x5C
686 #define EFI_IFR_FORM_MAP_OP            0x5D
687 #define EFI_IFR_CATENATE_OP            0x5E
688 #define EFI_IFR_GUID_OP                0x5F
689 #define EFI_IFR_SECURITY_OP            0x60
690 #define EFI_IFR_MODAL_TAG_OP           0x61
691 #define EFI_IFR_REFRESH_ID_OP          0x62
692 #define EFI_IFR_WARNING_IF_OP          0x63
693 #define EFI_IFR_MATCH2_OP              0x64
694 
695 
696 typedef struct _EFI_IFR_OP_HEADER {
697   UINT8                    OpCode;
698   UINT8                    Length:7;
699   UINT8                    Scope:1;
700 } EFI_IFR_OP_HEADER;
701 
702 typedef struct _EFI_IFR_STATEMENT_HEADER {
703   EFI_STRING_ID            Prompt;
704   EFI_STRING_ID            Help;
705 } EFI_IFR_STATEMENT_HEADER;
706 
707 typedef struct _EFI_IFR_QUESTION_HEADER {
708   EFI_IFR_STATEMENT_HEADER Header;
709   EFI_QUESTION_ID          QuestionId;
710   EFI_VARSTORE_ID          VarStoreId;
711   union {
712     EFI_STRING_ID          VarName;
713     UINT16                 VarOffset;
714   }                        VarStoreInfo;
715   UINT8                    Flags;
716 } EFI_IFR_QUESTION_HEADER;
717 
718 #define EFI_IFR_FLAG_READ_ONLY          0x01
719 #define EFI_IFR_FLAG_CALLBACK           0x04
720 #define EFI_IFR_FLAG_RESET_REQUIRED     0x10
721 #define EFI_IFR_FLAG_RECONNECT_REQUIRED 0x40
722 #define EFI_IFR_FLAG_OPTIONS_ONLY       0x80
723 
724 typedef struct _EFI_IFR_DEFAULTSTORE {
725   EFI_IFR_OP_HEADER        Header;
726   EFI_STRING_ID            DefaultName;
727   UINT16                   DefaultId;
728 } EFI_IFR_DEFAULTSTORE;
729 
730 #define EFI_HII_DEFAULT_CLASS_STANDARD       0x0000
731 #define EFI_HII_DEFAULT_CLASS_MANUFACTURING  0x0001
732 #define EFI_HII_DEFAULT_CLASS_SAFE           0x0002
733 #define EFI_HII_DEFAULT_CLASS_PLATFORM_BEGIN 0x4000
734 #define EFI_HII_DEFAULT_CLASS_PLATFORM_END   0x7fff
735 #define EFI_HII_DEFAULT_CLASS_HARDWARE_BEGIN 0x8000
736 #define EFI_HII_DEFAULT_CLASS_HARDWARE_END   0xbfff
737 #define EFI_HII_DEFAULT_CLASS_FIRMWARE_BEGIN 0xc000
738 #define EFI_HII_DEFAULT_CLASS_FIRMWARE_END   0xffff
739 
740 typedef struct _EFI_IFR_VARSTORE {
741   EFI_IFR_OP_HEADER        Header;
742   EFI_GUID                 Guid;
743   EFI_VARSTORE_ID          VarStoreId;
744   UINT16                   Size;
745   UINT8                    Name[1];
746 } EFI_IFR_VARSTORE;
747 
748 typedef struct _EFI_IFR_VARSTORE_EFI {
749   EFI_IFR_OP_HEADER        Header;
750   EFI_VARSTORE_ID          VarStoreId;
751   EFI_GUID                 Guid;
752   UINT32                   Attributes;
753   UINT16                   Size;
754   UINT8                    Name[1];
755 } EFI_IFR_VARSTORE_EFI;
756 
757 typedef struct _EFI_IFR_VARSTORE_NAME_VALUE {
758   EFI_IFR_OP_HEADER        Header;
759   EFI_VARSTORE_ID          VarStoreId;
760   EFI_GUID                 Guid;
761 } EFI_IFR_VARSTORE_NAME_VALUE;
762 
763 typedef struct _EFI_IFR_FORM_SET {
764   EFI_IFR_OP_HEADER        Header;
765   EFI_GUID                 Guid;
766   EFI_STRING_ID            FormSetTitle;
767   EFI_STRING_ID            Help;
768   UINT8                    Flags;
769   // EFI_GUID              ClassGuid[];
770 } EFI_IFR_FORM_SET;
771 
772 typedef struct _EFI_IFR_END {
773   EFI_IFR_OP_HEADER        Header;
774 } EFI_IFR_END;
775 
776 typedef struct _EFI_IFR_FORM {
777   EFI_IFR_OP_HEADER        Header;
778   UINT16                   FormId;
779   EFI_STRING_ID            FormTitle;
780 } EFI_IFR_FORM;
781 
782 typedef struct _EFI_IFR_IMAGE {
783   EFI_IFR_OP_HEADER        Header;
784   EFI_IMAGE_ID             Id;
785 } EFI_IFR_IMAGE;
786 
787 typedef struct _EFI_IFR_MODAL_TAG {
788   EFI_IFR_OP_HEADER        Header;
789 } EFI_IFR_MODAL_TAG;
790 
791 typedef struct _EFI_IFR_LOCKED {
792   EFI_IFR_OP_HEADER        Header;
793 } EFI_IFR_LOCKED;
794 
795 typedef struct _EFI_IFR_RULE {
796   EFI_IFR_OP_HEADER        Header;
797   UINT8                    RuleId;
798 } EFI_IFR_RULE;
799 
800 typedef struct _EFI_IFR_DEFAULT {
801   EFI_IFR_OP_HEADER        Header;
802   UINT16                   DefaultId;
803   UINT8                    Type;
804   EFI_IFR_TYPE_VALUE       Value;
805 } EFI_IFR_DEFAULT;
806 
807 typedef struct _EFI_IFR_DEFAULT_2 {
808   EFI_IFR_OP_HEADER        Header;
809   UINT16                   DefaultId;
810   UINT8                    Type;
811 } EFI_IFR_DEFAULT_2;
812 
813 typedef struct _EFI_IFR_VALUE {
814   EFI_IFR_OP_HEADER        Header;
815 } EFI_IFR_VALUE;
816 
817 typedef struct _EFI_IFR_SUBTITLE {
818   EFI_IFR_OP_HEADER        Header;
819   EFI_IFR_STATEMENT_HEADER Statement;
820   UINT8                    Flags;
821 } EFI_IFR_SUBTITLE;
822 
823 #define EFI_IFR_FLAGS_HORIZONTAL       0x01
824 
825 typedef struct _EFI_IFR_CHECKBOX {
826   EFI_IFR_OP_HEADER        Header;
827   EFI_IFR_QUESTION_HEADER  Question;
828   UINT8                    Flags;
829 } EFI_IFR_CHECKBOX;
830 
831 #define EFI_IFR_CHECKBOX_DEFAULT       0x01
832 #define EFI_IFR_CHECKBOX_DEFAULT_MFG   0x02
833 
834 typedef struct _EFI_IFR_TEXT {
835   EFI_IFR_OP_HEADER        Header;
836   EFI_IFR_STATEMENT_HEADER Statement;
837   EFI_STRING_ID            TextTwo;
838 } EFI_IFR_TEXT;
839 
840 typedef struct _EFI_IFR_REF {
841   EFI_IFR_OP_HEADER        Header;
842   EFI_IFR_QUESTION_HEADER  Question;
843   EFI_FORM_ID              FormId;
844 } EFI_IFR_REF;
845 
846 typedef struct _EFI_IFR_REF2 {
847   EFI_IFR_OP_HEADER        Header;
848   EFI_IFR_QUESTION_HEADER  Question;
849   EFI_FORM_ID              FormId;
850   EFI_QUESTION_ID          QuestionId;
851 } EFI_IFR_REF2;
852 
853 typedef struct _EFI_IFR_REF3 {
854   EFI_IFR_OP_HEADER        Header;
855   EFI_IFR_QUESTION_HEADER  Question;
856   EFI_FORM_ID              FormId;
857   EFI_QUESTION_ID          QuestionId;
858   EFI_GUID                 FormSetId;
859 } EFI_IFR_REF3;
860 
861 typedef struct _EFI_IFR_REF4 {
862   EFI_IFR_OP_HEADER        Header;
863   EFI_IFR_QUESTION_HEADER  Question;
864   EFI_FORM_ID              FormId;
865   EFI_QUESTION_ID          QuestionId;
866   EFI_GUID                 FormSetId;
867   EFI_STRING_ID            DevicePath;
868 } EFI_IFR_REF4;
869 
870 typedef struct _EFI_IFR_REF5 {
871   EFI_IFR_OP_HEADER        Header;
872   EFI_IFR_QUESTION_HEADER  Question;
873 } EFI_IFR_REF5;
874 
875 typedef struct _EFI_IFR_RESET_BUTTON {
876   EFI_IFR_OP_HEADER        Header;
877   EFI_IFR_STATEMENT_HEADER Statement;
878   EFI_DEFAULT_ID           DefaultId;
879 } EFI_IFR_RESET_BUTTON;
880 
881 typedef struct _EFI_IFR_ACTION {
882   EFI_IFR_OP_HEADER        Header;
883   EFI_IFR_QUESTION_HEADER  Question;
884   EFI_STRING_ID            QuestionConfig;
885 } EFI_IFR_ACTION;
886 
887 typedef struct _EFI_IFR_ACTION_1 {
888   EFI_IFR_OP_HEADER        Header;
889   EFI_IFR_QUESTION_HEADER  Question;
890 } EFI_IFR_ACTION_1;
891 
892 typedef struct _EFI_IFR_DATE {
893   EFI_IFR_OP_HEADER        Header;
894   EFI_IFR_QUESTION_HEADER  Question;
895   UINT8                    Flags;
896 } EFI_IFR_DATE;
897 
898 #define EFI_QF_DATE_YEAR_SUPPRESS      0x01
899 #define EFI_QF_DATE_MONTH_SUPPRESS     0x02
900 #define EFI_QF_DATE_DAY_SUPPRESS       0x04
901 
902 #define EFI_QF_DATE_STORAGE            0x30
903 #define     QF_DATE_STORAGE_NORMAL     0x00
904 #define     QF_DATE_STORAGE_TIME       0x10
905 #define     QF_DATE_STORAGE_WAKEUP     0x20
906 
907 typedef union {
908   struct {
909     UINT8 MinValue;
910     UINT8 MaxValue;
911     UINT8 Step;
912   } u8;
913   struct {
914     UINT16 MinValue;
915     UINT16 MaxValue;
916     UINT16 Step;
917   } u16;
918   struct {
919     UINT32 MinValue;
920     UINT32 MaxValue;
921     UINT32 Step;
922   } u32;
923   struct {
924     UINT64 MinValue;
925     UINT64 MaxValue;
926     UINT64 Step;
927   } u64;
928 } MINMAXSTEP_DATA;
929 
930 typedef struct _EFI_IFR_NUMERIC {
931   EFI_IFR_OP_HEADER        Header;
932   EFI_IFR_QUESTION_HEADER  Question;
933   UINT8                    Flags;
934   MINMAXSTEP_DATA          data;
935 } EFI_IFR_NUMERIC;
936 
937 #define EFI_IFR_NUMERIC_SIZE           0x03
938 #define EFI_IFR_NUMERIC_SIZE_1         0x00
939 #define EFI_IFR_NUMERIC_SIZE_2         0x01
940 #define EFI_IFR_NUMERIC_SIZE_4         0x02
941 #define EFI_IFR_NUMERIC_SIZE_8         0x03
942 
943 #define EFI_IFR_DISPLAY                0x30
944 #define EFI_IFR_DISPLAY_INT_DEC        0x00
945 #define EFI_IFR_DISPLAY_UINT_DEC       0x10
946 #define EFI_IFR_DISPLAY_UINT_HEX       0x20
947 
948 typedef struct _EFI_IFR_ONE_OF {
949   EFI_IFR_OP_HEADER        Header;
950   EFI_IFR_QUESTION_HEADER  Question;
951   UINT8                    Flags;
952   MINMAXSTEP_DATA          data;
953 } EFI_IFR_ONE_OF;
954 
955 typedef struct _EFI_IFR_STRING {
956   EFI_IFR_OP_HEADER        Header;
957   EFI_IFR_QUESTION_HEADER  Question;
958   UINT8                    MinSize;
959   UINT8                    MaxSize;
960   UINT8                    Flags;
961 } EFI_IFR_STRING;
962 
963 #define EFI_IFR_STRING_MULTI_LINE      0x01
964 
965 typedef struct _EFI_IFR_PASSWORD {
966   EFI_IFR_OP_HEADER        Header;
967   EFI_IFR_QUESTION_HEADER  Question;
968   UINT16                   MinSize;
969   UINT16                   MaxSize;
970 } EFI_IFR_PASSWORD;
971 
972 typedef struct _EFI_IFR_ORDERED_LIST {
973   EFI_IFR_OP_HEADER        Header;
974   EFI_IFR_QUESTION_HEADER  Question;
975   UINT8                    MaxContainers;
976   UINT8                    Flags;
977 } EFI_IFR_ORDERED_LIST;
978 
979 #define EFI_IFR_UNIQUE_SET             0x01
980 #define EFI_IFR_NO_EMPTY_SET           0x02
981 
982 typedef struct _EFI_IFR_TIME {
983   EFI_IFR_OP_HEADER        Header;
984   EFI_IFR_QUESTION_HEADER  Question;
985   UINT8                    Flags;
986 } EFI_IFR_TIME;
987 
988 #define QF_TIME_HOUR_SUPPRESS          0x01
989 #define QF_TIME_MINUTE_SUPPRESS        0x02
990 #define QF_TIME_SECOND_SUPPRESS        0x04
991 
992 #define QF_TIME_STORAGE                0x30
993 #define QF_TIME_STORAGE_NORMAL         0x00
994 #define QF_TIME_STORAGE_TIME           0x10
995 #define QF_TIME_STORAGE_WAKEUP         0x20
996 
997 typedef struct _EFI_IFR_DISABLE_IF {
998   EFI_IFR_OP_HEADER        Header;
999 } EFI_IFR_DISABLE_IF;
1000 
1001 typedef struct _EFI_IFR_SUPPRESS_IF {
1002   EFI_IFR_OP_HEADER        Header;
1003 } EFI_IFR_SUPPRESS_IF;
1004 
1005 typedef struct _EFI_IFR_GRAY_OUT_IF {
1006   EFI_IFR_OP_HEADER        Header;
1007 } EFI_IFR_GRAY_OUT_IF;
1008 
1009 typedef struct _EFI_IFR_INCONSISTENT_IF {
1010   EFI_IFR_OP_HEADER        Header;
1011   EFI_STRING_ID            Error;
1012 } EFI_IFR_INCONSISTENT_IF;
1013 
1014 typedef struct _EFI_IFR_NO_SUBMIT_IF {
1015   EFI_IFR_OP_HEADER        Header;
1016   EFI_STRING_ID            Error;
1017 } EFI_IFR_NO_SUBMIT_IF;
1018 
1019 typedef struct _EFI_IFR_WARNING_IF {
1020   EFI_IFR_OP_HEADER        Header;
1021   EFI_STRING_ID            Warning;
1022   UINT8                    TimeOut;
1023 } EFI_IFR_WARNING_IF;
1024 
1025 typedef struct _EFI_IFR_REFRESH {
1026   EFI_IFR_OP_HEADER        Header;
1027   UINT8                    RefreshInterval;
1028 } EFI_IFR_REFRESH;
1029 
1030 typedef struct _EFI_IFR_REFRESH_ID {
1031   EFI_IFR_OP_HEADER Header;
1032   EFI_GUID          RefreshEventGroupId;
1033 } EFI_IFR_REFRESH_ID;
1034 
1035 typedef struct _EFI_IFR_VARSTORE_DEVICE {
1036   EFI_IFR_OP_HEADER        Header;
1037   EFI_STRING_ID            DevicePath;
1038 } EFI_IFR_VARSTORE_DEVICE;
1039 
1040 typedef struct _EFI_IFR_ONE_OF_OPTION {
1041   EFI_IFR_OP_HEADER        Header;
1042   EFI_STRING_ID            Option;
1043   UINT8                    Flags;
1044   UINT8                    Type;
1045   EFI_IFR_TYPE_VALUE       Value;
1046 } EFI_IFR_ONE_OF_OPTION;
1047 
1048 #define EFI_IFR_TYPE_NUM_SIZE_8        0x00
1049 #define EFI_IFR_TYPE_NUM_SIZE_16       0x01
1050 #define EFI_IFR_TYPE_NUM_SIZE_32       0x02
1051 #define EFI_IFR_TYPE_NUM_SIZE_64       0x03
1052 #define EFI_IFR_TYPE_BOOLEAN           0x04
1053 #define EFI_IFR_TYPE_TIME              0x05
1054 #define EFI_IFR_TYPE_DATE              0x06
1055 #define EFI_IFR_TYPE_STRING            0x07
1056 #define EFI_IFR_TYPE_OTHER             0x08
1057 #define EFI_IFR_TYPE_UNDEFINED         0x09
1058 #define EFI_IFR_TYPE_ACTION            0x0A
1059 #define EFI_IFR_TYPE_BUFFER            0x0B
1060 #define EFI_IFR_TYPE_REF               0x0C
1061 
1062 #define EFI_IFR_OPTION_DEFAULT         0x10
1063 #define EFI_IFR_OPTION_DEFAULT_MFG     0x20
1064 
1065 typedef struct _EFI_IFR_GUID {
1066   EFI_IFR_OP_HEADER        Header;
1067   EFI_GUID                 Guid;
1068   //Optional Data Follows
1069 } EFI_IFR_GUID;
1070 
1071 typedef struct _EFI_IFR_DUP {
1072   EFI_IFR_OP_HEADER        Header;
1073 } EFI_IFR_DUP;
1074 
1075 typedef struct _EFI_IFR_EQ_ID_ID {
1076   EFI_IFR_OP_HEADER        Header;
1077   EFI_QUESTION_ID          QuestionId1;
1078   EFI_QUESTION_ID          QuestionId2;
1079 } EFI_IFR_EQ_ID_ID;
1080 
1081 typedef struct _EFI_IFR_EQ_ID_VAL {
1082   EFI_IFR_OP_HEADER        Header;
1083   EFI_QUESTION_ID          QuestionId;
1084   UINT16                   Value;
1085 } EFI_IFR_EQ_ID_VAL;
1086 
1087 typedef struct _EFI_IFR_EQ_ID_VAL_LIST {
1088   EFI_IFR_OP_HEADER        Header;
1089   EFI_QUESTION_ID          QuestionId;
1090   UINT16                   ListLength;
1091   UINT16                   ValueList[1];
1092 } EFI_IFR_EQ_ID_VAL_LIST;
1093 
1094 typedef struct _EFI_IFR_QUESTION_REF1 {
1095   EFI_IFR_OP_HEADER        Header;
1096   EFI_QUESTION_ID          QuestionId;
1097 } EFI_IFR_QUESTION_REF1;
1098 
1099 typedef struct _EFI_IFR_UINT8 {
1100   EFI_IFR_OP_HEADER        Header;
1101   UINT8 Value;
1102 } EFI_IFR_UINT8;
1103 
1104 typedef struct _EFI_IFR_UINT16 {
1105   EFI_IFR_OP_HEADER        Header;
1106   UINT16                   Value;
1107 } EFI_IFR_UINT16;
1108 
1109 typedef struct _EFI_IFR_QUESTION_REF2 {
1110   EFI_IFR_OP_HEADER        Header;
1111 } EFI_IFR_QUESTION_REF2;
1112 
1113 typedef struct _EFI_IFR_UINT32 {
1114   EFI_IFR_OP_HEADER        Header;
1115   UINT32                   Value;
1116 } EFI_IFR_UINT32;
1117 
1118 typedef struct _EFI_IFR_UINT64 {
1119   EFI_IFR_OP_HEADER        Header;
1120   UINT64 Value;
1121 } EFI_IFR_UINT64;
1122 
1123 typedef struct _EFI_IFR_QUESTION_REF3 {
1124   EFI_IFR_OP_HEADER        Header;
1125 } EFI_IFR_QUESTION_REF3;
1126 
1127 typedef struct _EFI_IFR_QUESTION_REF3_2 {
1128   EFI_IFR_OP_HEADER        Header;
1129   EFI_STRING_ID            DevicePath;
1130 } EFI_IFR_QUESTION_REF3_2;
1131 
1132 typedef struct _EFI_IFR_QUESTION_REF3_3 {
1133   EFI_IFR_OP_HEADER        Header;
1134   EFI_STRING_ID            DevicePath;
1135   EFI_GUID                 Guid;
1136 } EFI_IFR_QUESTION_REF3_3;
1137 
1138 typedef struct _EFI_IFR_RULE_REF {
1139   EFI_IFR_OP_HEADER        Header;
1140   UINT8                    RuleId;
1141 } EFI_IFR_RULE_REF;
1142 
1143 typedef struct _EFI_IFR_STRING_REF1 {
1144   EFI_IFR_OP_HEADER        Header;
1145   EFI_STRING_ID            StringId;
1146 } EFI_IFR_STRING_REF1;
1147 
1148 typedef struct _EFI_IFR_STRING_REF2 {
1149   EFI_IFR_OP_HEADER        Header;
1150 } EFI_IFR_STRING_REF2;
1151 
1152 typedef struct _EFI_IFR_THIS {
1153   EFI_IFR_OP_HEADER        Header;
1154 } EFI_IFR_THIS;
1155 
1156 typedef struct _EFI_IFR_TRUE {
1157   EFI_IFR_OP_HEADER        Header;
1158 } EFI_IFR_TRUE;
1159 
1160 typedef struct _EFI_IFR_FALSE {
1161   EFI_IFR_OP_HEADER        Header;
1162 } EFI_IFR_FALSE;
1163 
1164 typedef struct _EFI_IFR_ONE {
1165   EFI_IFR_OP_HEADER        Header;
1166 } EFI_IFR_ONE;
1167 
1168 typedef struct _EFI_IFR_ONES {
1169   EFI_IFR_OP_HEADER        Header;
1170 } EFI_IFR_ONES;
1171 
1172 typedef struct _EFI_IFR_ZERO {
1173   EFI_IFR_OP_HEADER        Header;
1174 } EFI_IFR_ZERO;
1175 
1176 typedef struct _EFI_IFR_UNDEFINED {
1177   EFI_IFR_OP_HEADER        Header;
1178 } EFI_IFR_UNDEFINED;
1179 
1180 typedef struct _EFI_IFR_VERSION {
1181   EFI_IFR_OP_HEADER        Header;
1182 } EFI_IFR_VERSION;
1183 
1184 typedef struct _EFI_IFR_LENGTH {
1185   EFI_IFR_OP_HEADER        Header;
1186 } EFI_IFR_LENGTH;
1187 
1188 typedef struct _EFI_IFR_NOT {
1189   EFI_IFR_OP_HEADER        Header;
1190 } EFI_IFR_NOT;
1191 
1192 typedef struct _EFI_IFR_BITWISE_NOT {
1193   EFI_IFR_OP_HEADER        Header;
1194 } EFI_IFR_BITWISE_NOT;
1195 
1196 typedef struct _EFI_IFR_TO_BOOLEAN {
1197   EFI_IFR_OP_HEADER        Header;
1198 } EFI_IFR_TO_BOOLEAN;
1199 
1200 #define EFI_IFR_STRING_UNSIGNED_DEC      0
1201 #define EFI_IFR_STRING_SIGNED_DEC        1
1202 #define EFI_IFR_STRING_LOWERCASE_HEX     2
1203 #define EFI_IFR_STRING_UPPERCASE_HEX     3
1204 
1205 #define EFI_IFR_STRING_ASCII             0
1206 #define EFI_IFR_STRING_UNICODE           8
1207 
1208 typedef struct _EFI_IFR_TO_STRING {
1209   EFI_IFR_OP_HEADER        Header;
1210   UINT8                    Format;
1211 } EFI_IFR_TO_STRING;
1212 
1213 typedef struct _EFI_IFR_TO_UINT {
1214   EFI_IFR_OP_HEADER        Header;
1215 } EFI_IFR_TO_UINT;
1216 
1217 typedef struct _EFI_IFR_TO_UPPER {
1218   EFI_IFR_OP_HEADER        Header;
1219 } EFI_IFR_TO_UPPER;
1220 
1221 typedef struct _EFI_IFR_TO_LOWER {
1222   EFI_IFR_OP_HEADER        Header;
1223 } EFI_IFR_TO_LOWER;
1224 
1225 typedef struct _EFI_IFR_ADD {
1226   EFI_IFR_OP_HEADER        Header;
1227 } EFI_IFR_ADD;
1228 
1229 typedef struct _EFI_IFR_AND {
1230   EFI_IFR_OP_HEADER        Header;
1231 } EFI_IFR_AND;
1232 
1233 typedef struct _EFI_IFR_BITWISE_AND {
1234   EFI_IFR_OP_HEADER        Header;
1235 } EFI_IFR_BITWISE_AND;
1236 
1237 typedef struct _EFI_IFR_BITWISE_OR {
1238   EFI_IFR_OP_HEADER        Header;
1239 } EFI_IFR_BITWISE_OR;
1240 
1241 typedef struct _EFI_IFR_CATENATE {
1242   EFI_IFR_OP_HEADER        Header;
1243 } EFI_IFR_CATENATE;
1244 
1245 typedef struct _EFI_IFR_DIVIDE {
1246   EFI_IFR_OP_HEADER        Header;
1247 } EFI_IFR_DIVIDE;
1248 
1249 typedef struct _EFI_IFR_EQUAL {
1250   EFI_IFR_OP_HEADER        Header;
1251 } EFI_IFR_EQUAL;
1252 
1253 typedef struct _EFI_IFR_GREATER_EQUAL {
1254   EFI_IFR_OP_HEADER        Header;
1255 } EFI_IFR_GREATER_EQUAL;
1256 
1257 typedef struct _EFI_IFR_GREATER_THAN {
1258   EFI_IFR_OP_HEADER        Header;
1259 } EFI_IFR_GREATER_THAN;
1260 
1261 typedef struct _EFI_IFR_LESS_EQUAL {
1262   EFI_IFR_OP_HEADER        Header;
1263 } EFI_IFR_LESS_EQUAL;
1264 
1265 typedef struct _EFI_IFR_LESS_THAN {
1266   EFI_IFR_OP_HEADER        Header;
1267 } EFI_IFR_LESS_THAN;
1268 
1269 typedef struct _EFI_IFR_MATCH {
1270   EFI_IFR_OP_HEADER        Header;
1271 } EFI_IFR_MATCH;
1272 
1273 typedef struct _EFI_IFR_MATCH2 {
1274   EFI_IFR_OP_HEADER        Header;
1275   EFI_GUID                 SyntaxType;
1276 } EFI_IFR_MATCH2;
1277 
1278 typedef struct _EFI_IFR_MULTIPLY {
1279   EFI_IFR_OP_HEADER        Header;
1280 } EFI_IFR_MULTIPLY;
1281 
1282 typedef struct _EFI_IFR_MODULO {
1283   EFI_IFR_OP_HEADER        Header;
1284 } EFI_IFR_MODULO;
1285 
1286 typedef struct _EFI_IFR_NOT_EQUAL {
1287   EFI_IFR_OP_HEADER        Header;
1288 } EFI_IFR_NOT_EQUAL;
1289 
1290 typedef struct _EFI_IFR_OR {
1291   EFI_IFR_OP_HEADER        Header;
1292 } EFI_IFR_OR;
1293 
1294 typedef struct _EFI_IFR_SHIFT_LEFT {
1295   EFI_IFR_OP_HEADER        Header;
1296 } EFI_IFR_SHIFT_LEFT;
1297 
1298 typedef struct _EFI_IFR_SHIFT_RIGHT {
1299   EFI_IFR_OP_HEADER        Header;
1300 } EFI_IFR_SHIFT_RIGHT;
1301 
1302 typedef struct _EFI_IFR_SUBTRACT {
1303   EFI_IFR_OP_HEADER        Header;
1304 } EFI_IFR_SUBTRACT;
1305 
1306 typedef struct _EFI_IFR_CONDITIONAL {
1307   EFI_IFR_OP_HEADER        Header;
1308 } EFI_IFR_CONDITIONAL;
1309 
1310 #define EFI_IFR_FF_CASE_SENSITIVE    0x00
1311 #define EFI_IFR_FF_CASE_INSENSITIVE  0x01
1312 
1313 typedef struct _EFI_IFR_FIND {
1314   EFI_IFR_OP_HEADER        Header;
1315   UINT8                    Format;
1316 } EFI_IFR_FIND;
1317 
1318 typedef struct _EFI_IFR_MID {
1319   EFI_IFR_OP_HEADER        Header;
1320 } EFI_IFR_MID;
1321 
1322 typedef struct _EFI_IFR_TOKEN {
1323   EFI_IFR_OP_HEADER        Header;
1324 } EFI_IFR_TOKEN;
1325 
1326 #define EFI_IFR_FLAGS_FIRST_MATCHING     0x00
1327 #define EFI_IFR_FLAGS_FIRST_NON_MATCHING 0x01
1328 
1329 typedef struct _EFI_IFR_SPAN {
1330   EFI_IFR_OP_HEADER        Header;
1331   UINT8                    Flags;
1332 } EFI_IFR_SPAN;
1333 
1334 typedef struct _EFI_IFR_SECURITY {
1335   ///
1336   /// Standard opcode header, where Header.Op = EFI_IFR_SECURITY_OP.
1337   ///
1338   EFI_IFR_OP_HEADER        Header;
1339   ///
1340   /// Security permission level.
1341   ///
1342   EFI_GUID                 Permissions;
1343 } EFI_IFR_SECURITY;
1344 
1345 typedef struct _EFI_IFR_FORM_MAP_METHOD {
1346   ///
1347   /// The string identifier which provides the human-readable name of
1348   /// the configuration method for this standards map form.
1349   ///
1350   EFI_STRING_ID            MethodTitle;
1351   ///
1352   /// Identifier which uniquely specifies the configuration methods
1353   /// associated with this standards map form.
1354   ///
1355   EFI_GUID                 MethodIdentifier;
1356 } EFI_IFR_FORM_MAP_METHOD;
1357 
1358 typedef struct _EFI_IFR_FORM_MAP {
1359   ///
1360   /// The sequence that defines the type of opcode as well as the length
1361   /// of the opcode being defined. Header.OpCode = EFI_IFR_FORM_MAP_OP.
1362   ///
1363   EFI_IFR_OP_HEADER        Header;
1364   ///
1365   /// The unique identifier for this particular form.
1366   ///
1367   EFI_FORM_ID              FormId;
1368   ///
1369   /// One or more configuration method's name and unique identifier.
1370   ///
1371   // EFI_IFR_FORM_MAP_METHOD  Methods[];
1372 } EFI_IFR_FORM_MAP;
1373 
1374 typedef struct _EFI_IFR_SET {
1375   ///
1376   /// The sequence that defines the type of opcode as well as the length
1377   /// of the opcode being defined. Header.OpCode = EFI_IFR_SET_OP.
1378   ///
1379   EFI_IFR_OP_HEADER  Header;
1380   ///
1381   /// Specifies the identifier of a previously declared variable store to
1382   /// use when storing the question's value.
1383   ///
1384   EFI_VARSTORE_ID    VarStoreId;
1385   union {
1386     ///
1387     /// A 16-bit Buffer Storage offset.
1388     ///
1389     EFI_STRING_ID    VarName;
1390     ///
1391     /// A Name Value or EFI Variable name (VarName).
1392     ///
1393     UINT16           VarOffset;
1394   }                  VarStoreInfo;
1395   ///
1396   /// Specifies the type used for storage.
1397   ///
1398   UINT8              VarStoreType;
1399 } EFI_IFR_SET;
1400 
1401 typedef struct _EFI_IFR_GET {
1402   ///
1403   /// The sequence that defines the type of opcode as well as the length
1404   /// of the opcode being defined. Header.OpCode = EFI_IFR_GET_OP.
1405   ///
1406   EFI_IFR_OP_HEADER  Header;
1407   ///
1408   /// Specifies the identifier of a previously declared variable store to
1409   /// use when retrieving the value.
1410   ///
1411   EFI_VARSTORE_ID    VarStoreId;
1412   union {
1413     ///
1414     /// A 16-bit Buffer Storage offset.
1415     ///
1416     EFI_STRING_ID    VarName;
1417     ///
1418     /// A Name Value or EFI Variable name (VarName).
1419     ///
1420     UINT16           VarOffset;
1421   }                  VarStoreInfo;
1422   ///
1423   /// Specifies the type used for storage.
1424   ///
1425   UINT8              VarStoreType;
1426 } EFI_IFR_GET;
1427 
1428 typedef struct _EFI_IFR_READ {
1429   EFI_IFR_OP_HEADER       Header;
1430 } EFI_IFR_READ;
1431 
1432 typedef struct _EFI_IFR_WRITE {
1433   EFI_IFR_OP_HEADER      Header;
1434 } EFI_IFR_WRITE;
1435 
1436 typedef struct _EFI_IFR_MAP {
1437   EFI_IFR_OP_HEADER      Header;
1438 } EFI_IFR_MAP;
1439 //
1440 // Keyboard Package
1441 //
1442 
1443 typedef enum {
1444   EfiKeyLCtrl,
1445   EfiKeyA0,
1446   EfiKeyLAlt,
1447   EfiKeySpaceBar,
1448   EfiKeyA2,
1449   EfiKeyA3,
1450   EfiKeyA4,
1451   EfiKeyRCtrl,
1452   EfiKeyLeftArrow,
1453   EfiKeyDownArrow,
1454   EfiKeyRightArrow,
1455   EfiKeyZero,
1456   EfiKeyPeriod,
1457   EfiKeyEnter,
1458   EfiKeyLShift,
1459   EfiKeyB0,
1460   EfiKeyB1,
1461   EfiKeyB2,
1462   EfiKeyB3,
1463   EfiKeyB4,
1464   EfiKeyB5,
1465   EfiKeyB6,
1466   EfiKeyB7,
1467   EfiKeyB8,
1468   EfiKeyB9,
1469   EfiKeyB10,
1470   EfiKeyRshift,
1471   EfiKeyUpArrow,
1472   EfiKeyOne,
1473   EfiKeyTwo,
1474   EfiKeyThree,
1475   EfiKeyCapsLock,
1476   EfiKeyC1,
1477   EfiKeyC2,
1478   EfiKeyC3,
1479   EfiKeyC4,
1480   EfiKeyC5,
1481   EfiKeyC6,
1482   EfiKeyC7,
1483   EfiKeyC8,
1484   EfiKeyC9,
1485   EfiKeyC10,
1486   EfiKeyC11,
1487   EfiKeyC12,
1488   EfiKeyFour,
1489   EfiKeyFive,
1490   EfiKeySix,
1491   EfiKeyPlus,
1492   EfiKeyTab,
1493   EfiKeyD1,
1494   EfiKeyD2,
1495   EfiKeyD3,
1496   EfiKeyD4,
1497   EfiKeyD5,
1498   EfiKeyD6,
1499   EfiKeyD7,
1500   EfiKeyD8,
1501   EfiKeyD9,
1502   EfiKeyD10,
1503   EfiKeyD11,
1504   EfiKeyD12,
1505   EfiKeyD13,
1506   EfiKeyDel,
1507   EfiKeyEnd,
1508   EfiKeyPgDn,
1509   EfiKeySeven,
1510   EfiKeyEight,
1511   EfiKeyNine,
1512   EfiKeyE0,
1513   EfiKeyE1,
1514   EfiKeyE2,
1515   EfiKeyE3,
1516   EfiKeyE4,
1517   EfiKeyE5,
1518   EfiKeyE6,
1519   EfiKeyE7,
1520   EfiKeyE8,
1521   EfiKeyE9,
1522   EfiKeyE10,
1523   EfiKeyE11,
1524   EfiKeyE12,
1525   EfiKeyBackSpace,
1526   EfiKeyIns,
1527   EfiKeyHome,
1528   EfiKeyPgUp,
1529   EfiKeyNLck,
1530   EfiKeySlash,
1531   EfiKeyAsterisk,
1532   EfiKeyMinus,
1533   EfiKeyEsc,
1534   EfiKeyF1,
1535   EfiKeyF2,
1536   EfiKeyF3,
1537   EfiKeyF4,
1538   EfiKeyF5,
1539   EfiKeyF6,
1540   EfiKeyF7,
1541   EfiKeyF8,
1542   EfiKeyF9,
1543   EfiKeyF10,
1544   EfiKeyF11,
1545   EfiKeyF12,
1546   EfiKeyPrint,
1547   EfiKeySLck,
1548   EfiKeyPause
1549 } EFI_KEY;
1550 
1551 typedef struct {
1552   EFI_KEY                 Key;
1553   CHAR16                  Unicode;
1554   CHAR16                  ShiftedUnicode;
1555   CHAR16                  AltGrUnicode;
1556   CHAR16                  ShiftedAltGrUnicode;
1557   UINT16                  Modifier;
1558   UINT16                  AffectedAttribute;
1559 } EFI_KEY_DESCRIPTOR;
1560 
1561 //
1562 // A key which is affected by all the standard shift modifiers.
1563 // Most keys would be expected to have this bit active.
1564 //
1565 #define EFI_AFFECTED_BY_STANDARD_SHIFT       0x0001
1566 //
1567 // This key is affected by the caps lock so that if a keyboard driver
1568 // would need to disambiguate between a key which had a "1" defined
1569 // versus a "a" character.  Having this bit turned on would tell
1570 // the keyboard driver to use the appropriate shifted state or not.
1571 //
1572 #define EFI_AFFECTED_BY_CAPS_LOCK            0x0002
1573 //
1574 // Similar to the case of CAPS lock, if this bit is active, the key
1575 // is affected by the num lock being turned on.
1576 //
1577 #define EFI_AFFECTED_BY_NUM_LOCK             0x0004
1578 
1579 typedef struct {
1580   UINT16                  LayoutLength;
1581   EFI_GUID                Guid;
1582   UINT32                  LayoutDescriptorStringOffset;
1583   UINT8                   DescriptorCount;
1584   // EFI_KEY_DESCRIPTOR    Descriptors[];
1585 } EFI_HII_KEYBOARD_LAYOUT;
1586 
1587 typedef struct {
1588   EFI_HII_PACKAGE_HEADER  Header;
1589   UINT16                  LayoutCount;
1590   // EFI_HII_KEYBOARD_LAYOUT Layout[];
1591 } EFI_HII_KEYBOARD_PACKAGE_HDR;
1592 
1593 typedef struct {
1594   CHAR16                  Language[3];
1595   CHAR16                  Space;
1596   CHAR16                  DescriptionString[1];
1597 } EFI_DESCRIPTION_STRING;
1598 
1599 typedef struct {
1600   UINT16                  DescriptionCount;
1601   EFI_DESCRIPTION_STRING  DescriptionString[1];
1602 } EFI_DESCRIPTION_STRING_BUNDLE;
1603 
1604 //
1605 // Modifier values
1606 //
1607 #define EFI_NULL_MODIFIER                0x0000
1608 #define EFI_LEFT_CONTROL_MODIFIER        0x0001
1609 #define EFI_RIGHT_CONTROL_MODIFIER       0x0002
1610 #define EFI_LEFT_ALT_MODIFIER            0x0003
1611 #define EFI_RIGHT_ALT_MODIFIER           0x0004
1612 #define EFI_ALT_GR_MODIFIER              0x0005
1613 #define EFI_INSERT_MODIFIER              0x0006
1614 #define EFI_DELETE_MODIFIER              0x0007
1615 #define EFI_PAGE_DOWN_MODIFIER           0x0008
1616 #define EFI_PAGE_UP_MODIFIER             0x0009
1617 #define EFI_HOME_MODIFIER                0x000A
1618 #define EFI_END_MODIFIER                 0x000B
1619 #define EFI_LEFT_SHIFT_MODIFIER          0x000C
1620 #define EFI_RIGHT_SHIFT_MODIFIER         0x000D
1621 #define EFI_CAPS_LOCK_MODIFIER           0x000E
1622 #define EFI_NUM_LOCK _MODIFIER           0x000F
1623 #define EFI_LEFT_ARROW_MODIFIER          0x0010
1624 #define EFI_RIGHT_ARROW_MODIFIER         0x0011
1625 #define EFI_DOWN_ARROW_MODIFIER          0x0012
1626 #define EFI_UP_ARROW_MODIFIER            0x0013
1627 #define EFI_NS_KEY_MODIFIER              0x0014
1628 #define EFI_NS_KEY_DEPENDENCY_MODIFIER   0x0015
1629 #define EFI_FUNCTION_KEY_ONE_MODIFIER    0x0016
1630 #define EFI_FUNCTION_KEY_TWO_MODIFIER    0x0017
1631 #define EFI_FUNCTION_KEY_THREE_MODIFIER  0x0018
1632 #define EFI_FUNCTION_KEY_FOUR_MODIFIER   0x0019
1633 #define EFI_FUNCTION_KEY_FIVE_MODIFIER   0x001A
1634 #define EFI_FUNCTION_KEY_SIX_MODIFIER    0x001B
1635 #define EFI_FUNCTION_KEY_SEVEN_MODIFIER  0x001C
1636 #define EFI_FUNCTION_KEY_EIGHT_MODIFIER  0x001D
1637 #define EFI_FUNCTION_KEY_NINE_MODIFIER   0x001E
1638 #define EFI_FUNCTION_KEY_TEN_MODIFIER    0x001F
1639 #define EFI_FUNCTION_KEY_ELEVEN_MODIFIER 0x0020
1640 #define EFI_FUNCTION_KEY_TWELVE_MODIFIER 0x0021
1641 
1642 //
1643 // Keys that have multiple control functions based on modifier
1644 // settings are handled in the keyboard driver implementation.
1645 // For instance PRINT_KEY might have a modifier held down and
1646 // is still a nonprinting character, but might have an alternate
1647 // control function like SYSREQUEST
1648 //
1649 #define EFI_PRINT_MODIFIER               0x0022
1650 #define EFI_SYS_REQUEST_MODIFIER         0x0023
1651 #define EFI_SCROLL_LOCK_MODIFIER         0x0024
1652 #define EFI_PAUSE_MODIFIER               0x0025
1653 #define EFI_BREAK_MODIFIER               0x0026
1654 
1655 #pragma pack()
1656 
1657 
1658 
1659 //
1660 // References to string tokens must use this macro to enable scanning for
1661 // token usages.
1662 //
1663 //
1664 // STRING_TOKEN is not defined in UEFI specification. But it is placed
1665 // here for the easy access by C files and VFR source files.
1666 //
1667 #define STRING_TOKEN(t) t
1668 
1669 #endif
1670