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