~ubuntu-branches/ubuntu/trusty/virtualbox-ose/trusty

« back to all changes in this revision

Viewing changes to src/VBox/Devices/EFI/tools/include/Common/UefiInternalFormRepresentation.h

  • Committer: Bazaar Package Importer
  • Author(s): Felix Geyer
  • Date: 2009-12-18 16:44:29 UTC
  • mfrom: (0.3.3 upstream) (0.4.6 squeeze)
  • Revision ID: james.westby@ubuntu.com-20091218164429-jd34ccexpv5na11a
Tags: 3.1.2-dfsg-1ubuntu1
* Merge from Debian unstable (LP: #498219), remaining changes:
  - Disable update action
    - debian/patches/u01-disable-update-action.dpatch
  - VirtualBox should go in Accessories, not in System tools (LP: #288590)
    - debian/virtualbox-ose-qt.files/virtualbox-ose.desktop
  - Add Apport hook
    - debian/virtualbox-ose.files/source_virtualbox-ose.py
    - debian/virtualbox-ose.install
  - Add Launchpad integration
    - debian/control
    - debian/lpi-bug.xpm
    - debian/patches/u02-lp-integration.dpatch
* Fixes the following bugs:
  - Kernel module fails to build with Linux >= 2.6.32 (LP: #474625)
  - X.Org drivers need to be rebuilt against X-Server 1.7 (LP: #495935)
  - The *-source packages try to build the kernel modules even though the
    kernel headers aren't available (LP: #473334)
* Replace *-source packages with transitional packages for *-dkms.
* Adapt u01-disable-update-action.dpatch and u02-lp-integration.dpatch for
  new upstream version.

Show diffs side-by-side

added added

removed removed

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