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