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