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