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