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