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