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