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