]>
Commit | Line | Data |
---|---|---|
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 | |
54cf8780 | 6 | Copyright (c) 2006 - 2008, 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 | 26 | typedef VOID* EFI_HII_HANDLE;\r |
27 | typedef CHAR16* EFI_STRING;\r | |
d1f95000 | 28 | typedef UINT16 EFI_IMAGE_ID;\r |
29 | typedef UINT16 EFI_QUESTION_ID;\r | |
30 | typedef UINT16 EFI_STRING_ID;\r | |
31 | typedef UINT16 EFI_FORM_ID;\r | |
32 | typedef UINT16 EFI_VARSTORE_ID;\r | |
e0c047a0 | 33 | \r |
7d582d6b | 34 | typedef UINT16 EFI_DEFAULT_ID;\r |
e0c047a0 | 35 | \r |
7d582d6b | 36 | typedef 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 | 50 | typedef 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 | 58 | typedef 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 |
93 | typedef 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 |
99 | typedef 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 | 111 | typedef 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 | 136 | typedef 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 | 150 | typedef 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 | |
175 | typedef 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 | 183 | typedef 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 | |
188 | typedef 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 | |
193 | typedef struct _EFI_GLYPH_GIBT_END_BLOCK {\r | |
194 | EFI_HII_GLYPH_BLOCK Header;\r | |
195 | } EFI_GLYPH_GIBT_END_BLOCK;\r | |
196 | \r | |
197 | typedef 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 | |
203 | typedef 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 | |
209 | typedef 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 | |
215 | typedef 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 | |
221 | typedef 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 | |
228 | typedef 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 | |
233 | typedef 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 | |
239 | typedef 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 | |
244 | typedef 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 | 258 | typedef 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 | 271 | typedef 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 | 289 | typedef 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 |
298 | typedef 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 | 326 | typedef 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 | |
331 | typedef struct _EFI_HII_SIBT_END_BLOCK {\r | |
332 | EFI_HII_STRING_BLOCK Header;\r | |
333 | } EFI_HII_SIBT_END_BLOCK;\r | |
334 | \r | |
335 | typedef 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 | |
341 | typedef 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 | |
347 | typedef 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 | |
353 | typedef 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 | |
361 | typedef 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 | |
366 | typedef 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 | |
371 | typedef 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 | |
376 | typedef 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 | |
382 | typedef 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 | |
388 | typedef 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 | |
395 | typedef 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 | |
400 | typedef 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 | |
406 | typedef 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 | |
412 | typedef 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 | |
424 | typedef 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 | |
430 | typedef 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 | 458 | typedef struct _EFI_HII_IIBT_END_BLOCK {\r |
459 | EFI_HII_IMAGE_BLOCK Header;\r | |
460 | } EFI_HII_IIBT_END_BLOCK;\r | |
461 | \r | |
462 | typedef 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 | |
468 | typedef 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 | |
474 | typedef 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 | |
480 | typedef 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 | |
486 | typedef 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 | |
492 | typedef 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 | |
498 | typedef 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 | |
504 | typedef 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 | |
510 | typedef 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 | |
515 | typedef 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 | |
520 | typedef 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 | |
526 | typedef 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 | |
532 | typedef 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 | |
538 | typedef 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 | |
544 | typedef 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 | |
550 | typedef 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 | |
556 | typedef 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 | |
561 | typedef 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 | |
567 | typedef 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 | |
572 | typedef 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 | 581 | typedef struct _EFI_HII_IMAGE_PALETTE_INFO_HEADER {\r |
582 | UINT16 PaletteCount;\r | |
583 | } EFI_HII_IMAGE_PALETTE_INFO_HEADER;\r | |
584 | \r | |
585 | typedef 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 | 598 | typedef 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 | 604 | typedef struct {\r |
7d582d6b | 605 | UINT8 Hour;\r |
606 | UINT8 Minute;\r | |
607 | UINT8 Second;\r | |
608 | } EFI_HII_TIME;\r | |
959ccb23 | 609 | \r |
610 | typedef struct {\r | |
7d582d6b | 611 | UINT16 Year;\r |
612 | UINT8 Month;\r | |
613 | UINT8 Day;\r | |
614 | } EFI_HII_DATE;\r | |
615 | \r | |
616 | typedef 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 |
724 | typedef 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 | |
730 | typedef 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 | |
735 | typedef 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 | 758 | typedef 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 | |
777 | typedef 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 | |
785 | typedef 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 | |
792 | typedef 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 | |
798 | typedef 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 | |
803 | } EFI_IFR_FORM_SET;\r | |
804 | \r | |
805 | typedef struct _EFI_IFR_END {\r | |
806 | EFI_IFR_OP_HEADER Header;\r | |
807 | } EFI_IFR_END;\r | |
808 | \r | |
809 | typedef struct _EFI_IFR_FORM {\r | |
810 | EFI_IFR_OP_HEADER Header;\r | |
811 | UINT16 FormId;\r | |
812 | EFI_STRING_ID FormTitle;\r | |
813 | } EFI_IFR_FORM;\r | |
814 | \r | |
815 | typedef struct _EFI_IFR_IMAGE {\r | |
816 | EFI_IFR_OP_HEADER Header;\r | |
817 | EFI_IMAGE_ID Id;\r | |
818 | } EFI_IFR_IMAGE;\r | |
819 | \r | |
820 | typedef struct _EFI_IFR_LOCKED {\r | |
821 | EFI_IFR_OP_HEADER Header;\r | |
822 | } EFI_IFR_LOCKED;\r | |
823 | \r | |
824 | typedef struct _EFI_IFR_RULE {\r | |
825 | EFI_IFR_OP_HEADER Header;\r | |
826 | UINT8 RuleId;\r | |
827 | } EFI_IFR_RULE;\r | |
828 | \r | |
829 | typedef struct _EFI_IFR_DEFAULT {\r | |
830 | EFI_IFR_OP_HEADER Header;\r | |
831 | UINT16 DefaultId;\r | |
832 | UINT8 Type;\r | |
833 | EFI_IFR_TYPE_VALUE Value;\r | |
834 | } EFI_IFR_DEFAULT;\r | |
835 | \r | |
836 | typedef struct _EFI_IFR_VALUE {\r | |
837 | EFI_IFR_OP_HEADER Header;\r | |
838 | } EFI_IFR_VALUE;\r | |
839 | \r | |
840 | typedef struct _EFI_IFR_SUBTITLE {\r | |
841 | EFI_IFR_OP_HEADER Header;\r | |
842 | EFI_IFR_STATEMENT_HEADER Statement;\r | |
843 | UINT8 Flags;\r | |
844 | } EFI_IFR_SUBTITLE;\r | |
845 | \r | |
846 | #define EFI_IFR_FLAGS_HORIZONTAL 0x01\r | |
847 | \r | |
848 | typedef struct _EFI_IFR_CHECKBOX {\r | |
849 | EFI_IFR_OP_HEADER Header;\r | |
850 | EFI_IFR_QUESTION_HEADER Question;\r | |
851 | UINT8 Flags;\r | |
852 | } EFI_IFR_CHECKBOX;\r | |
853 | \r | |
854 | #define EFI_IFR_CHECKBOX_DEFAULT 0x01\r | |
855 | #define EFI_IFR_CHECKBOX_DEFAULT_MFG 0x02\r | |
856 | \r | |
857 | typedef struct _EFI_IFR_TEXT {\r | |
858 | EFI_IFR_OP_HEADER Header;\r | |
859 | EFI_IFR_STATEMENT_HEADER Statement;\r | |
860 | EFI_STRING_ID TextTwo;\r | |
861 | } EFI_IFR_TEXT;\r | |
862 | \r | |
863 | typedef struct _EFI_IFR_REF {\r | |
864 | EFI_IFR_OP_HEADER Header;\r | |
865 | EFI_IFR_QUESTION_HEADER Question;\r | |
866 | EFI_FORM_ID FormId;\r | |
867 | } EFI_IFR_REF;\r | |
868 | \r | |
869 | typedef struct _EFI_IFR_REF2 {\r | |
870 | EFI_IFR_OP_HEADER Header;\r | |
871 | EFI_IFR_QUESTION_HEADER Question;\r | |
872 | EFI_FORM_ID FormId;\r | |
873 | EFI_QUESTION_ID QuestionId;\r | |
874 | } EFI_IFR_REF2;\r | |
875 | \r | |
876 | typedef struct _EFI_IFR_REF3 {\r | |
877 | EFI_IFR_OP_HEADER Header;\r | |
878 | EFI_IFR_QUESTION_HEADER Question;\r | |
879 | EFI_FORM_ID FormId;\r | |
880 | EFI_QUESTION_ID QuestionId;\r | |
881 | EFI_GUID FormSetId;\r | |
882 | } EFI_IFR_REF3;\r | |
883 | \r | |
884 | typedef struct _EFI_IFR_REF4 {\r | |
885 | EFI_IFR_OP_HEADER Header;\r | |
886 | EFI_IFR_QUESTION_HEADER Question;\r | |
887 | EFI_FORM_ID FormId;\r | |
888 | EFI_QUESTION_ID QuestionId;\r | |
889 | EFI_GUID FormSetId;\r | |
890 | EFI_STRING_ID DevicePath;\r | |
891 | } EFI_IFR_REF4;\r | |
892 | \r | |
893 | typedef struct _EFI_IFR_RESET_BUTTON {\r | |
894 | EFI_IFR_OP_HEADER Header;\r | |
895 | EFI_IFR_QUESTION_HEADER Question;\r | |
896 | EFI_DEFAULT_ID DefaultId;\r | |
897 | } EFI_IFR_RESET_BUTTON;\r | |
898 | \r | |
899 | typedef struct _EFI_IFR_ACTION {\r | |
900 | EFI_IFR_OP_HEADER Header;\r | |
901 | EFI_IFR_QUESTION_HEADER Question;\r | |
902 | EFI_STRING_ID QuestionConfig;\r | |
903 | } EFI_IFR_ACTION;\r | |
904 | \r | |
905 | typedef struct _EFI_IFR_ACTION_1 {\r | |
906 | EFI_IFR_OP_HEADER Header;\r | |
907 | EFI_IFR_QUESTION_HEADER Question;\r | |
908 | } EFI_IFR_ACTION_1;\r | |
909 | \r | |
910 | typedef struct _EFI_IFR_DATE {\r | |
911 | EFI_IFR_OP_HEADER Header;\r | |
912 | EFI_IFR_QUESTION_HEADER Question;\r | |
913 | UINT8 Flags;\r | |
959ccb23 | 914 | } EFI_IFR_DATE;\r |
915 | \r | |
e0c047a0 | 916 | //\r |
917 | // Flags that describe the behavior of the question.\r | |
918 | //\r | |
7d582d6b | 919 | #define EFI_QF_DATE_YEAR_SUPPRESS 0x01\r |
920 | #define EFI_QF_DATE_MONTH_SUPPRESS 0x02\r | |
921 | #define EFI_QF_DATE_DAY_SUPPRESS 0x04\r | |
959ccb23 | 922 | \r |
7d582d6b | 923 | #define EFI_QF_DATE_STORAGE 0x30\r |
924 | #define QF_DATE_STORAGE_NORMAL 0x00\r | |
925 | #define QF_DATE_STORAGE_TIME 0x10\r | |
926 | #define QF_DATE_STORAGE_WAKEUP 0x20\r | |
927 | \r | |
928 | typedef union {\r | |
929 | struct {\r | |
930 | UINT8 MinValue;\r | |
931 | UINT8 MaxValue;\r | |
932 | UINT8 Step;\r | |
933 | } u8;\r | |
934 | struct {\r | |
935 | UINT16 MinValue;\r | |
936 | UINT16 MaxValue;\r | |
937 | UINT16 Step;\r | |
938 | } u16;\r | |
939 | struct {\r | |
940 | UINT32 MinValue;\r | |
941 | UINT32 MaxValue;\r | |
942 | UINT32 Step;\r | |
943 | } u32;\r | |
944 | struct {\r | |
945 | UINT64 MinValue;\r | |
946 | UINT64 MaxValue;\r | |
947 | UINT64 Step;\r | |
948 | } u64;\r | |
949 | } MINMAXSTEP_DATA;\r | |
950 | \r | |
951 | typedef struct _EFI_IFR_NUMERIC {\r | |
952 | EFI_IFR_OP_HEADER Header;\r | |
953 | EFI_IFR_QUESTION_HEADER Question;\r | |
954 | UINT8 Flags;\r | |
955 | MINMAXSTEP_DATA data;\r | |
956 | } EFI_IFR_NUMERIC;\r | |
957 | \r | |
e0c047a0 | 958 | //\r |
959 | // Flags related to the numeric question\r | |
960 | //\r | |
7d582d6b | 961 | #define EFI_IFR_NUMERIC_SIZE 0x03\r |
e0c047a0 | 962 | #define EFI_IFR_NUMERIC_SIZE_1 0x00\r |
963 | #define EFI_IFR_NUMERIC_SIZE_2 0x01\r | |
964 | #define EFI_IFR_NUMERIC_SIZE_4 0x02\r | |
965 | #define EFI_IFR_NUMERIC_SIZE_8 0x03\r | |
7d582d6b | 966 | \r |
967 | #define EFI_IFR_DISPLAY 0x30\r | |
e0c047a0 | 968 | #define EFI_IFR_DISPLAY_INT_DEC 0x00\r |
969 | #define EFI_IFR_DISPLAY_UINT_DEC 0x10\r | |
970 | #define EFI_IFR_DISPLAY_UINT_HEX 0x20\r | |
7d582d6b | 971 | \r |
972 | typedef struct _EFI_IFR_ONE_OF {\r | |
973 | EFI_IFR_OP_HEADER Header;\r | |
974 | EFI_IFR_QUESTION_HEADER Question;\r | |
975 | UINT8 Flags;\r | |
976 | MINMAXSTEP_DATA data;\r | |
977 | } EFI_IFR_ONE_OF;\r | |
978 | \r | |
979 | typedef struct _EFI_IFR_STRING {\r | |
980 | EFI_IFR_OP_HEADER Header;\r | |
981 | EFI_IFR_QUESTION_HEADER Question;\r | |
982 | UINT8 MinSize;\r | |
983 | UINT8 MaxSize;\r | |
984 | UINT8 Flags;\r | |
959ccb23 | 985 | } EFI_IFR_STRING;\r |
986 | \r | |
7d582d6b | 987 | #define EFI_IFR_STRING_MULTI_LINE 0x01\r |
959ccb23 | 988 | \r |
7d582d6b | 989 | typedef struct _EFI_IFR_PASSWORD {\r |
990 | EFI_IFR_OP_HEADER Header;\r | |
991 | EFI_IFR_QUESTION_HEADER Question;\r | |
992 | UINT16 MinSize;\r | |
993 | UINT16 MaxSize;\r | |
994 | } EFI_IFR_PASSWORD;\r | |
959ccb23 | 995 | \r |
7d582d6b | 996 | typedef struct _EFI_IFR_ORDERED_LIST {\r |
997 | EFI_IFR_OP_HEADER Header;\r | |
998 | EFI_IFR_QUESTION_HEADER Question;\r | |
999 | UINT8 MaxContainers;\r | |
1000 | UINT8 Flags;\r | |
1001 | } EFI_IFR_ORDERED_LIST;\r | |
959ccb23 | 1002 | \r |
7d582d6b | 1003 | #define EFI_IFR_UNIQUE_SET 0x01\r |
1004 | #define EFI_IFR_NO_EMPTY_SET 0x02\r | |
959ccb23 | 1005 | \r |
7d582d6b | 1006 | typedef struct _EFI_IFR_TIME {\r |
1007 | EFI_IFR_OP_HEADER Header;\r | |
1008 | EFI_IFR_QUESTION_HEADER Question;\r | |
1009 | UINT8 Flags;\r | |
1010 | } EFI_IFR_TIME;\r | |
959ccb23 | 1011 | \r |
e0c047a0 | 1012 | //\r |
1013 | // A bit-mask that determines which unique settings are active for this opcode.\r | |
1014 | //\r | |
7d582d6b | 1015 | #define QF_TIME_HOUR_SUPPRESS 0x01\r |
1016 | #define QF_TIME_MINUTE_SUPPRESS 0x02\r | |
1017 | #define QF_TIME_SECOND_SUPPRESS 0x04\r | |
1018 | \r | |
1019 | #define QF_TIME_STORAGE 0x30\r | |
e0c047a0 | 1020 | #define QF_TIME_STORAGE_NORMAL 0x00\r |
1021 | #define QF_TIME_STORAGE_TIME 0x10\r | |
1022 | #define QF_TIME_STORAGE_WAKEUP 0x20\r | |
7d582d6b | 1023 | \r |
1024 | typedef struct _EFI_IFR_DISABLE_IF {\r | |
1025 | EFI_IFR_OP_HEADER Header;\r | |
1026 | } EFI_IFR_DISABLE_IF;\r | |
1027 | \r | |
1028 | typedef struct _EFI_IFR_SUPPRESS_IF {\r | |
1029 | EFI_IFR_OP_HEADER Header;\r | |
1030 | } EFI_IFR_SUPPRESS_IF;\r | |
1031 | \r | |
1032 | typedef struct _EFI_IFR_GRAY_OUT_IF {\r | |
1033 | EFI_IFR_OP_HEADER Header;\r | |
1034 | } EFI_IFR_GRAY_OUT_IF;\r | |
1035 | \r | |
1036 | typedef struct _EFI_IFR_INCONSISTENT_IF {\r | |
1037 | EFI_IFR_OP_HEADER Header;\r | |
1038 | EFI_STRING_ID Error;\r | |
1039 | } EFI_IFR_INCONSISTENT_IF;\r | |
1040 | \r | |
1041 | typedef struct _EFI_IFR_NO_SUBMIT_IF {\r | |
1042 | EFI_IFR_OP_HEADER Header;\r | |
1043 | EFI_STRING_ID Error;\r | |
1044 | } EFI_IFR_NO_SUBMIT_IF;\r | |
1045 | \r | |
1046 | typedef struct _EFI_IFR_REFRESH {\r | |
1047 | EFI_IFR_OP_HEADER Header;\r | |
1048 | UINT8 RefreshInterval;\r | |
1049 | } EFI_IFR_REFRESH;\r | |
1050 | \r | |
1051 | typedef struct _EFI_IFR_VARSTORE_DEVICE {\r | |
1052 | EFI_IFR_OP_HEADER Header;\r | |
1053 | EFI_STRING_ID DevicePath;\r | |
1054 | } EFI_IFR_VARSTORE_DEVICE;\r | |
1055 | \r | |
1056 | typedef struct _EFI_IFR_ONE_OF_OPTION {\r | |
1057 | EFI_IFR_OP_HEADER Header;\r | |
1058 | EFI_STRING_ID Option;\r | |
1059 | UINT8 Flags;\r | |
1060 | UINT8 Type;\r | |
1061 | EFI_IFR_TYPE_VALUE Value;\r | |
1062 | } EFI_IFR_ONE_OF_OPTION;\r | |
1063 | \r | |
e0c047a0 | 1064 | //\r |
1065 | // Types of the option's value.\r | |
1066 | //\r | |
7d582d6b | 1067 | #define EFI_IFR_TYPE_NUM_SIZE_8 0x00\r |
1068 | #define EFI_IFR_TYPE_NUM_SIZE_16 0x01\r | |
1069 | #define EFI_IFR_TYPE_NUM_SIZE_32 0x02\r | |
1070 | #define EFI_IFR_TYPE_NUM_SIZE_64 0x03\r | |
1071 | #define EFI_IFR_TYPE_BOOLEAN 0x04\r | |
1072 | #define EFI_IFR_TYPE_TIME 0x05\r | |
1073 | #define EFI_IFR_TYPE_DATE 0x06\r | |
1074 | #define EFI_IFR_TYPE_STRING 0x07\r | |
1075 | #define EFI_IFR_TYPE_OTHER 0x08\r | |
1076 | \r | |
1077 | #define EFI_IFR_OPTION_DEFAULT 0x10\r | |
1078 | #define EFI_IFR_OPTION_DEFAULT_MFG 0x20\r | |
1079 | \r | |
1080 | typedef struct _EFI_IFR_GUID {\r | |
1081 | EFI_IFR_OP_HEADER Header;\r | |
1082 | EFI_GUID Guid;\r | |
1083 | //Optional Data Follows\r | |
1084 | } EFI_IFR_GUID;\r | |
1085 | \r | |
1086 | typedef struct _EFI_IFR_DUP {\r | |
1087 | EFI_IFR_OP_HEADER Header;\r | |
1088 | } EFI_IFR_DUP;\r | |
1089 | \r | |
1090 | typedef struct _EFI_IFR_EQ_ID_ID {\r | |
1091 | EFI_IFR_OP_HEADER Header;\r | |
1092 | EFI_QUESTION_ID QuestionId1;\r | |
1093 | EFI_QUESTION_ID QuestionId2;\r | |
1094 | } EFI_IFR_EQ_ID_ID;\r | |
1095 | \r | |
1096 | typedef struct _EFI_IFR_EQ_ID_VAL {\r | |
1097 | EFI_IFR_OP_HEADER Header;\r | |
1098 | EFI_QUESTION_ID QuestionId;\r | |
1099 | UINT16 Value;\r | |
959ccb23 | 1100 | } EFI_IFR_EQ_ID_VAL;\r |
1101 | \r | |
7d582d6b | 1102 | typedef struct _EFI_IFR_EQ_ID_LIST {\r |
1103 | EFI_IFR_OP_HEADER Header;\r | |
1104 | EFI_QUESTION_ID QuestionId;\r | |
1105 | UINT16 ListLength;\r | |
1106 | UINT16 ValueList[1];\r | |
959ccb23 | 1107 | } EFI_IFR_EQ_ID_LIST;\r |
1108 | \r | |
7d582d6b | 1109 | typedef struct _EFI_IFR_UINT8 {\r |
1110 | EFI_IFR_OP_HEADER Header;\r | |
1111 | UINT8 Value;\r | |
1112 | } EFI_IFR_UINT8;\r | |
959ccb23 | 1113 | \r |
7d582d6b | 1114 | typedef struct _EFI_IFR_UINT16 {\r |
1115 | EFI_IFR_OP_HEADER Header;\r | |
1116 | UINT16 Value;\r | |
1117 | } EFI_IFR_UINT16;\r | |
1118 | \r | |
7d582d6b | 1119 | typedef struct _EFI_IFR_UINT32 {\r |
1120 | EFI_IFR_OP_HEADER Header;\r | |
1121 | UINT32 Value;\r | |
1122 | } EFI_IFR_UINT32;\r | |
1123 | \r | |
1124 | typedef struct _EFI_IFR_UINT64 {\r | |
1125 | EFI_IFR_OP_HEADER Header;\r | |
1126 | UINT64 Value;\r | |
1127 | } EFI_IFR_UINT64;\r | |
1128 | \r | |
e0c047a0 | 1129 | typedef struct _EFI_IFR_QUESTION_REF1 {\r |
1130 | EFI_IFR_OP_HEADER Header;\r | |
1131 | EFI_QUESTION_ID QuestionId;\r | |
1132 | } EFI_IFR_QUESTION_REF1;\r | |
1133 | \r | |
1134 | typedef struct _EFI_IFR_QUESTION_REF2 {\r | |
1135 | EFI_IFR_OP_HEADER Header;\r | |
1136 | } EFI_IFR_QUESTION_REF2;\r | |
1137 | \r | |
7d582d6b | 1138 | typedef struct _EFI_IFR_QUESTION_REF3 {\r |
1139 | EFI_IFR_OP_HEADER Header;\r | |
1140 | } EFI_IFR_QUESTION_REF3;\r | |
1141 | \r | |
1142 | typedef struct _EFI_IFR_QUESTION_REF3_2 {\r | |
1143 | EFI_IFR_OP_HEADER Header;\r | |
1144 | EFI_STRING_ID DevicePath;\r | |
1145 | } EFI_IFR_QUESTION_REF3_2;\r | |
1146 | \r | |
1147 | typedef struct _EFI_IFR_QUESTION_REF3_3 {\r | |
1148 | EFI_IFR_OP_HEADER Header;\r | |
1149 | EFI_STRING_ID DevicePath;\r | |
1150 | EFI_GUID Guid;\r | |
1151 | } EFI_IFR_QUESTION_REF3_3;\r | |
1152 | \r | |
1153 | typedef struct _EFI_IFR_RULE_REF {\r | |
1154 | EFI_IFR_OP_HEADER Header;\r | |
1155 | UINT8 RuleId;\r | |
1156 | } EFI_IFR_RULE_REF;\r | |
1157 | \r | |
1158 | typedef struct _EFI_IFR_STRING_REF1 {\r | |
1159 | EFI_IFR_OP_HEADER Header;\r | |
1160 | EFI_STRING_ID StringId;\r | |
1161 | } EFI_IFR_STRING_REF1;\r | |
1162 | \r | |
1163 | typedef struct _EFI_IFR_STRING_REF2 {\r | |
1164 | EFI_IFR_OP_HEADER Header;\r | |
1165 | } EFI_IFR_STRING_REF2;\r | |
1166 | \r | |
1167 | typedef struct _EFI_IFR_THIS {\r | |
1168 | EFI_IFR_OP_HEADER Header;\r | |
1169 | } EFI_IFR_THIS;\r | |
1170 | \r | |
1171 | typedef struct _EFI_IFR_TRUE {\r | |
1172 | EFI_IFR_OP_HEADER Header;\r | |
1173 | } EFI_IFR_TRUE;\r | |
1174 | \r | |
1175 | typedef struct _EFI_IFR_FALSE {\r | |
1176 | EFI_IFR_OP_HEADER Header;\r | |
1177 | } EFI_IFR_FALSE;\r | |
1178 | \r | |
1179 | typedef struct _EFI_IFR_ONE {\r | |
1180 | EFI_IFR_OP_HEADER Header;\r | |
1181 | } EFI_IFR_ONE;\r | |
1182 | \r | |
1183 | typedef struct _EFI_IFR_ONES {\r | |
1184 | EFI_IFR_OP_HEADER Header;\r | |
1185 | } EFI_IFR_ONES;\r | |
1186 | \r | |
1187 | typedef struct _EFI_IFR_ZERO {\r | |
1188 | EFI_IFR_OP_HEADER Header;\r | |
1189 | } EFI_IFR_ZERO;\r | |
1190 | \r | |
1191 | typedef struct _EFI_IFR_UNDEFINED {\r | |
1192 | EFI_IFR_OP_HEADER Header;\r | |
1193 | } EFI_IFR_UNDEFINED;\r | |
1194 | \r | |
1195 | typedef struct _EFI_IFR_VERSION {\r | |
1196 | EFI_IFR_OP_HEADER Header;\r | |
1197 | } EFI_IFR_VERSION;\r | |
1198 | \r | |
1199 | typedef struct _EFI_IFR_LENGTH {\r | |
1200 | EFI_IFR_OP_HEADER Header;\r | |
1201 | } EFI_IFR_LENGTH;\r | |
1202 | \r | |
1203 | typedef struct _EFI_IFR_NOT {\r | |
1204 | EFI_IFR_OP_HEADER Header;\r | |
1205 | } EFI_IFR_NOT;\r | |
1206 | \r | |
1207 | typedef struct _EFI_IFR_BITWISE_NOT {\r | |
1208 | EFI_IFR_OP_HEADER Header;\r | |
1209 | } EFI_IFR_BITWISE_NOT;\r | |
1210 | \r | |
1211 | typedef struct _EFI_IFR_TO_BOOLEAN {\r | |
1212 | EFI_IFR_OP_HEADER Header;\r | |
1213 | } EFI_IFR_TO_BOOLEAN;\r | |
1214 | \r | |
e0c047a0 | 1215 | //\r |
1216 | // For EFI_IFR_TO_STRING, when converting from\r | |
1217 | // unsigned integers, these flags control the format:\r | |
1218 | // 0 = unsigned decimal\r | |
1219 | // 1 = signed decimal\r | |
1220 | // 2 = hexadecimal (lower-case alpha)\r | |
1221 | // 3 = hexadecimal (upper-case alpha)\r | |
1222 | //\r | |
7d582d6b | 1223 | #define EFI_IFR_STRING_UNSIGNED_DEC 0\r |
1224 | #define EFI_IFR_STRING_SIGNED_DEC 1\r | |
1225 | #define EFI_IFR_STRING_LOWERCASE_HEX 2\r | |
1226 | #define EFI_IFR_STRING_UPPERCASE_HEX 3\r | |
e0c047a0 | 1227 | //\r |
1228 | // When converting from a buffer, these flags control the format:\r | |
1229 | // 0 = ASCII\r | |
1230 | // 8 = Unicode\r | |
1231 | //\r | |
7d582d6b | 1232 | #define EFI_IFR_STRING_ASCII 0\r |
1233 | #define EFI_IFR_STRING_UNICODE 8\r | |
1234 | \r | |
1235 | typedef struct _EFI_IFR_TO_STRING {\r | |
1236 | EFI_IFR_OP_HEADER Header;\r | |
1237 | UINT8 Format;\r | |
1238 | } EFI_IFR_TO_STRING;\r | |
1239 | \r | |
1240 | typedef struct _EFI_IFR_TO_UINT {\r | |
1241 | EFI_IFR_OP_HEADER Header;\r | |
1242 | } EFI_IFR_TO_UINT;\r | |
1243 | \r | |
1244 | typedef struct _EFI_IFR_TO_UPPER {\r | |
1245 | EFI_IFR_OP_HEADER Header;\r | |
1246 | } EFI_IFR_TO_UPPER;\r | |
1247 | \r | |
1248 | typedef struct _EFI_IFR_TO_LOWER {\r | |
1249 | EFI_IFR_OP_HEADER Header;\r | |
1250 | } EFI_IFR_TO_LOWER;\r | |
1251 | \r | |
1252 | typedef struct _EFI_IFR_ADD {\r | |
1253 | EFI_IFR_OP_HEADER Header;\r | |
1254 | } EFI_IFR_ADD;\r | |
1255 | \r | |
1256 | typedef struct _EFI_IFR_AND {\r | |
1257 | EFI_IFR_OP_HEADER Header;\r | |
959ccb23 | 1258 | } EFI_IFR_AND;\r |
1259 | \r | |
7d582d6b | 1260 | typedef struct _EFI_IFR_BITWISE_AND {\r |
1261 | EFI_IFR_OP_HEADER Header;\r | |
1262 | } EFI_IFR_BITWISE_AND;\r | |
1263 | \r | |
1264 | typedef struct _EFI_IFR_BITWISE_OR {\r | |
1265 | EFI_IFR_OP_HEADER Header;\r | |
1266 | } EFI_IFR_BITWISE_OR;\r | |
1267 | \r | |
1268 | typedef struct _EFI_IFR_CATENATE {\r | |
1269 | EFI_IFR_OP_HEADER Header;\r | |
1270 | } EFI_IFR_CATENATE;\r | |
1271 | \r | |
1272 | typedef struct _EFI_IFR_DIVIDE {\r | |
1273 | EFI_IFR_OP_HEADER Header;\r | |
1274 | } EFI_IFR_DIVIDE;\r | |
1275 | \r | |
1276 | typedef struct _EFI_IFR_EQUAL {\r | |
1277 | EFI_IFR_OP_HEADER Header;\r | |
1278 | } EFI_IFR_EQUAL;\r | |
1279 | \r | |
1280 | typedef struct _EFI_IFR_GREATER_EQUAL {\r | |
1281 | EFI_IFR_OP_HEADER Header;\r | |
1282 | } EFI_IFR_GREATER_EQUAL;\r | |
1283 | \r | |
1284 | typedef struct _EFI_IFR_GREATER_THAN {\r | |
1285 | EFI_IFR_OP_HEADER Header;\r | |
1286 | } EFI_IFR_GREATER_THAN;\r | |
1287 | \r | |
1288 | typedef struct _EFI_IFR_LESS_EQUAL {\r | |
1289 | EFI_IFR_OP_HEADER Header;\r | |
1290 | } EFI_IFR_LESS_EQUAL;\r | |
1291 | \r | |
1292 | typedef struct _EFI_IFR_LESS_THAN {\r | |
1293 | EFI_IFR_OP_HEADER Header;\r | |
1294 | } EFI_IFR_LESS_THAN;\r | |
1295 | \r | |
1296 | typedef struct _EFI_IFR_MATCH {\r | |
1297 | EFI_IFR_OP_HEADER Header;\r | |
1298 | } EFI_IFR_MATCH;\r | |
1299 | \r | |
1300 | typedef struct _EFI_IFR_MULTIPLY {\r | |
1301 | EFI_IFR_OP_HEADER Header;\r | |
1302 | } EFI_IFR_MULTIPLY;\r | |
1303 | \r | |
1304 | typedef struct _EFI_IFR_MODULO {\r | |
1305 | EFI_IFR_OP_HEADER Header;\r | |
1306 | } EFI_IFR_MODULO;\r | |
1307 | \r | |
1308 | typedef struct _EFI_IFR_NOT_EQUAL {\r | |
1309 | EFI_IFR_OP_HEADER Header;\r | |
1310 | } EFI_IFR_NOT_EQUAL;\r | |
1311 | \r | |
1312 | typedef struct _EFI_IFR_OR {\r | |
1313 | EFI_IFR_OP_HEADER Header;\r | |
959ccb23 | 1314 | } EFI_IFR_OR;\r |
1315 | \r | |
7d582d6b | 1316 | typedef struct _EFI_IFR_SHIFT_LEFT {\r |
1317 | EFI_IFR_OP_HEADER Header;\r | |
1318 | } EFI_IFR_SHIFT_LEFT;\r | |
959ccb23 | 1319 | \r |
7d582d6b | 1320 | typedef struct _EFI_IFR_SHIFT_RIGHT {\r |
1321 | EFI_IFR_OP_HEADER Header;\r | |
1322 | } EFI_IFR_SHIFT_RIGHT;\r | |
959ccb23 | 1323 | \r |
7d582d6b | 1324 | typedef struct _EFI_IFR_SUBTRACT {\r |
1325 | EFI_IFR_OP_HEADER Header;\r | |
1326 | } EFI_IFR_SUBTRACT;\r | |
959ccb23 | 1327 | \r |
7d582d6b | 1328 | typedef struct _EFI_IFR_CONDITIONAL {\r |
1329 | EFI_IFR_OP_HEADER Header;\r | |
1330 | } EFI_IFR_CONDITIONAL;\r | |
959ccb23 | 1331 | \r |
e0c047a0 | 1332 | //\r |
1333 | // Flags governing the matching criteria of EFI_IFR_FIND\r | |
1334 | //\r | |
7d582d6b | 1335 | #define EFI_IFR_FF_CASE_SENSITIVE 0x00\r |
1336 | #define EFI_IFR_FF_CASE_INSENSITIVE 0x01\r | |
959ccb23 | 1337 | \r |
7d582d6b | 1338 | typedef struct _EFI_IFR_FIND {\r |
1339 | EFI_IFR_OP_HEADER Header;\r | |
1340 | UINT8 Format;\r | |
1341 | } EFI_IFR_FIND;\r | |
1342 | \r | |
1343 | typedef struct _EFI_IFR_MID {\r | |
1344 | EFI_IFR_OP_HEADER Header;\r | |
1345 | } EFI_IFR_MID;\r | |
1346 | \r | |
1347 | typedef struct _EFI_IFR_TOKEN {\r | |
1348 | EFI_IFR_OP_HEADER Header;\r | |
1349 | } EFI_IFR_TOKEN;\r | |
1350 | \r | |
e0c047a0 | 1351 | //\r |
1352 | // Flags specifying whether to find the first matching string\r | |
1353 | // or the first non-matching string.\r | |
1354 | //\r | |
7d582d6b | 1355 | #define EFI_IFR_FLAGS_FIRST_MATCHING 0x00\r |
1356 | #define EFI_IFR_FLAGS_FIRST_NON_MATCHING 0x01\r | |
1357 | \r | |
1358 | typedef struct _EFI_IFR_SPAN {\r | |
1359 | EFI_IFR_OP_HEADER Header;\r | |
1360 | UINT8 Flags;\r | |
1361 | } EFI_IFR_SPAN;\r | |
959ccb23 | 1362 | \r |
1363 | //\r | |
e0c047a0 | 1364 | // Definitions for Keyboard Package\r |
e0c047a0 | 1365 | // Releated definitions are in Section of EFI_HII_DATABASE_PROTOCOL\r |
959ccb23 | 1366 | //\r |
7d582d6b | 1367 | \r |
9319d2c2 LG |
1368 | ///\r |
1369 | /// Each enumeration values maps a physical key on a keyboard.\r | |
1370 | ///\r | |
7d582d6b | 1371 | typedef enum { \r |
1372 | EfiKeyLCtrl,\r | |
1373 | EfiKeyA0, \r | |
1374 | EfiKeyLAlt,\r | |
1375 | EfiKeySpaceBar,\r | |
1376 | EfiKeyA2,\r | |
1377 | EfiKeyA3,\r | |
1378 | EfiKeyA4,\r | |
1379 | EfiKeyRCtrl,\r | |
1380 | EfiKeyLeftArrow,\r | |
1381 | EfiKeyDownArrow,\r | |
1382 | EfiKeyRightArrow,\r | |
1383 | EfiKeyZero,\r | |
1384 | EfiKeyPeriod,\r | |
1385 | EfiKeyEnter,\r | |
1386 | EfiKeyLShift,\r | |
1387 | EfiKeyB0,\r | |
1388 | EfiKeyB1,\r | |
1389 | EfiKeyB2,\r | |
1390 | EfiKeyB3,\r | |
1391 | EfiKeyB4,\r | |
1392 | EfiKeyB5,\r | |
1393 | EfiKeyB6,\r | |
1394 | EfiKeyB7,\r | |
1395 | EfiKeyB8,\r | |
1396 | EfiKeyB9,\r | |
1397 | EfiKeyB10,\r | |
54cf8780 | 1398 | EfiKeyRShift,\r |
7d582d6b | 1399 | EfiKeyUpArrow,\r |
1400 | EfiKeyOne,\r | |
1401 | EfiKeyTwo,\r | |
1402 | EfiKeyThree,\r | |
1403 | EfiKeyCapsLock,\r | |
1404 | EfiKeyC1,\r | |
1405 | EfiKeyC2,\r | |
1406 | EfiKeyC3,\r | |
1407 | EfiKeyC4,\r | |
1408 | EfiKeyC5,\r | |
1409 | EfiKeyC6,\r | |
1410 | EfiKeyC7,\r | |
1411 | EfiKeyC8,\r | |
1412 | EfiKeyC9,\r | |
1413 | EfiKeyC10,\r | |
1414 | EfiKeyC11,\r | |
1415 | EfiKeyC12,\r | |
1416 | EfiKeyFour,\r | |
1417 | EfiKeyFive,\r | |
1418 | EfiKeySix,\r | |
1419 | EfiKeyPlus,\r | |
1420 | EfiKeyTab,\r | |
1421 | EfiKeyD1,\r | |
1422 | EfiKeyD2,\r | |
1423 | EfiKeyD3,\r | |
1424 | EfiKeyD4,\r | |
1425 | EfiKeyD5,\r | |
1426 | EfiKeyD6,\r | |
1427 | EfiKeyD7,\r | |
1428 | EfiKeyD8,\r | |
1429 | EfiKeyD9,\r | |
1430 | EfiKeyD10,\r | |
1431 | EfiKeyD11,\r | |
1432 | EfiKeyD12,\r | |
1433 | EfiKeyD13,\r | |
1434 | EfiKeyDel,\r | |
1435 | EfiKeyEnd,\r | |
1436 | EfiKeyPgDn,\r | |
1437 | EfiKeySeven,\r | |
1438 | EfiKeyEight,\r | |
1439 | EfiKeyNine,\r | |
1440 | EfiKeyE0,\r | |
1441 | EfiKeyE1,\r | |
1442 | EfiKeyE2,\r | |
1443 | EfiKeyE3,\r | |
1444 | EfiKeyE4,\r | |
1445 | EfiKeyE5,\r | |
1446 | EfiKeyE6,\r | |
1447 | EfiKeyE7,\r | |
1448 | EfiKeyE8,\r | |
1449 | EfiKeyE9,\r | |
1450 | EfiKeyE10,\r | |
1451 | EfiKeyE11,\r | |
1452 | EfiKeyE12,\r | |
1453 | EfiKeyBackSpace,\r | |
1454 | EfiKeyIns,\r | |
1455 | EfiKeyHome,\r | |
1456 | EfiKeyPgUp,\r | |
1457 | EfiKeyNLck,\r | |
1458 | EfiKeySlash,\r | |
1459 | EfiKeyAsterisk,\r | |
1460 | EfiKeyMinus,\r | |
1461 | EfiKeyEsc,\r | |
1462 | EfiKeyF1,\r | |
1463 | EfiKeyF2,\r | |
1464 | EfiKeyF3,\r | |
1465 | EfiKeyF4,\r | |
1466 | EfiKeyF5,\r | |
1467 | EfiKeyF6,\r | |
1468 | EfiKeyF7,\r | |
1469 | EfiKeyF8,\r | |
1470 | EfiKeyF9,\r | |
1471 | EfiKeyF10,\r | |
1472 | EfiKeyF11,\r | |
1473 | EfiKeyF12,\r | |
1474 | EfiKeyPrint,\r | |
1475 | EfiKeySLck,\r | |
1476 | EfiKeyPause\r | |
1477 | } EFI_KEY;\r | |
1478 | \r | |
959ccb23 | 1479 | typedef struct {\r |
7d582d6b | 1480 | EFI_KEY Key;\r |
1481 | CHAR16 Unicode;\r | |
1482 | CHAR16 ShiftedUnicode;\r | |
1483 | CHAR16 AltGrUnicode;\r | |
1484 | CHAR16 ShiftedAltGrUnicode;\r | |
1485 | UINT16 Modifier;\r | |
1486 | UINT16 AffectedAttribute;\r | |
1487 | } EFI_KEY_DESCRIPTOR;\r | |
1488 | \r | |
8b13229b | 1489 | ///\r |
1490 | /// A key which is affected by all the standard shift modifiers. \r | |
1491 | /// Most keys would be expected to have this bit active.\r | |
1492 | ///\r | |
7d582d6b | 1493 | #define EFI_AFFECTED_BY_STANDARD_SHIFT 0x0001\r |
8b13229b | 1494 | \r |
1495 | ///\r | |
1496 | /// This key is affected by the caps lock so that if a keyboard driver\r | |
1497 | /// would need to disambiguate between a key which had a "1" defined\r | |
1498 | /// versus a "a" character. Having this bit turned on would tell\r | |
1499 | /// the keyboard driver to use the appropriate shifted state or not.\r | |
1500 | ///\r | |
7d582d6b | 1501 | #define EFI_AFFECTED_BY_CAPS_LOCK 0x0002\r |
8b13229b | 1502 | \r |
1503 | ///\r | |
1504 | /// Similar to the case of CAPS lock, if this bit is active, the key\r | |
1505 | /// is affected by the num lock being turned on.\r | |
1506 | ///\r | |
7d582d6b | 1507 | #define EFI_AFFECTED_BY_NUM_LOCK 0x0004\r |
959ccb23 | 1508 | \r |
1509 | typedef struct {\r | |
7d582d6b | 1510 | UINT16 LayoutLength;\r |
1511 | EFI_GUID Guid;\r | |
1512 | UINT32 LayoutDescriptorStringOffset;\r | |
1513 | UINT8 DescriptorCount;\r | |
1514 | // EFI_KEY_DESCRIPTOR Descriptors[];\r | |
1515 | } EFI_HII_KEYBOARD_LAYOUT;\r | |
959ccb23 | 1516 | \r |
1517 | typedef struct {\r | |
7d582d6b | 1518 | EFI_HII_PACKAGE_HEADER Header;\r |
1519 | UINT16 LayoutCount;\r | |
1520 | // EFI_HII_KEYBOARD_LAYOUT Layout[];\r | |
1521 | } EFI_HII_KEYBOARD_PACKAGE_HDR;\r | |
959ccb23 | 1522 | \r |
959ccb23 | 1523 | //\r |
7d582d6b | 1524 | // Modifier values\r |
959ccb23 | 1525 | //\r |
7d582d6b | 1526 | #define EFI_NULL_MODIFIER 0x0000\r |
1527 | #define EFI_LEFT_CONTROL_MODIFIER 0x0001\r | |
1528 | #define EFI_RIGHT_CONTROL_MODIFIER 0x0002\r | |
1529 | #define EFI_LEFT_ALT_MODIFIER 0x0003\r | |
1530 | #define EFI_RIGHT_ALT_MODIFIER 0x0004\r | |
1531 | #define EFI_ALT_GR_MODIFIER 0x0005\r | |
1532 | #define EFI_INSERT_MODIFIER 0x0006\r | |
1533 | #define EFI_DELETE_MODIFIER 0x0007\r | |
1534 | #define EFI_PAGE_DOWN_MODIFIER 0x0008\r | |
1535 | #define EFI_PAGE_UP_MODIFIER 0x0009\r | |
1536 | #define EFI_HOME_MODIFIER 0x000A\r | |
1537 | #define EFI_END_MODIFIER 0x000B\r | |
1538 | #define EFI_LEFT_SHIFT_MODIFIER 0x000C\r | |
1539 | #define EFI_RIGHT_SHIFT_MODIFIER 0x000D\r | |
1540 | #define EFI_CAPS_LOCK_MODIFIER 0x000E\r | |
54cf8780 | 1541 | #define EFI_NUM_LOCK_MODIFIER 0x000F\r |
7d582d6b | 1542 | #define EFI_LEFT_ARROW_MODIFIER 0x0010\r |
1543 | #define EFI_RIGHT_ARROW_MODIFIER 0x0011\r | |
1544 | #define EFI_DOWN_ARROW_MODIFIER 0x0012\r | |
1545 | #define EFI_UP_ARROW_MODIFIER 0x0013\r | |
1546 | #define EFI_NS_KEY_MODIFIER 0x0014\r | |
1547 | #define EFI_NS_KEY_DEPENDENCY_MODIFIER 0x0015\r | |
1548 | #define EFI_FUNCTION_KEY_ONE_MODIFIER 0x0016\r | |
1549 | #define EFI_FUNCTION_KEY_TWO_MODIFIER 0x0017\r | |
1550 | #define EFI_FUNCTION_KEY_THREE_MODIFIER 0x0018\r | |
1551 | #define EFI_FUNCTION_KEY_FOUR_MODIFIER 0x0019\r | |
1552 | #define EFI_FUNCTION_KEY_FIVE_MODIFIER 0x001A\r | |
1553 | #define EFI_FUNCTION_KEY_SIX_MODIFIER 0x001B\r | |
1554 | #define EFI_FUNCTION_KEY_SEVEN_MODIFIER 0x001C\r | |
1555 | #define EFI_FUNCTION_KEY_EIGHT_MODIFIER 0x001D\r | |
1556 | #define EFI_FUNCTION_KEY_NINE_MODIFIER 0x001E\r | |
1557 | #define EFI_FUNCTION_KEY_TEN_MODIFIER 0x001F\r | |
1558 | #define EFI_FUNCTION_KEY_ELEVEN_MODIFIER 0x0020\r | |
1559 | #define EFI_FUNCTION_KEY_TWELVE_MODIFIER 0x0021\r | |
959ccb23 | 1560 | \r |
7d582d6b | 1561 | //\r |
1562 | // Keys that have multiple control functions based on modifier\r | |
1563 | // settings are handled in the keyboard driver implementation.\r | |
1564 | // For instance PRINT_KEY might have a modifier held down and\r | |
1565 | // is still a nonprinting character, but might have an alternate\r | |
1566 | // control function like SYSREQUEST\r | |
1567 | //\r | |
1568 | #define EFI_PRINT_MODIFIER 0x0022\r | |
1569 | #define EFI_SYS_REQUEST_MODIFIER 0x0023\r | |
1570 | #define EFI_SCROLL_LOCK_MODIFIER 0x0024\r | |
1571 | #define EFI_PAUSE_MODIFIER 0x0025\r | |
1572 | #define EFI_BREAK_MODIFIER 0x0026\r | |
959ccb23 | 1573 | \r |
54cf8780 | 1574 | #define EFI_LEFT_LOGO_MODIFIER 0x0027\r |
1575 | #define EFI_RIGHT_LOGO_MODIFIER 0x0028\r | |
1576 | #define EFI_MENU_MODIFIER 0x0029\r | |
1577 | \r | |
959ccb23 | 1578 | #pragma pack()\r |
1579 | \r | |
1580 | \r | |
1581 | \r | |
8b13229b | 1582 | ///\r |
1583 | /// References to string tokens must use this macro to enable scanning for\r | |
1584 | /// token usages.\r | |
1585 | ///\r | |
1586 | ///\r | |
1587 | /// STRING_TOKEN is not defined in UEFI specification. But it is placed \r | |
1588 | /// here for the easy access by C files and VFR source files.\r | |
1589 | ///\r | |
e52c5a9f | 1590 | #define STRING_TOKEN(t) t\r |
1591 | \r | |
959ccb23 | 1592 | #endif\r |