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