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