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