]> git.proxmox.com Git - mirror_edk2.git/blob - BaseTools/Source/C/Include/Common/MdeModuleHii.h
BaseTools: Replace BSD License with BSD+Patent License
[mirror_edk2.git] / BaseTools / Source / C / Include / Common / MdeModuleHii.h
1 /** @file
2 EDK II specific HII relative definition.
3
4 Copyright (c) 2006 - 2017, Intel Corporation. All rights reserved.<BR>
5
6 SPDX-License-Identifier: BSD-2-Clause-Patent
7
8 **/
9
10 #ifndef _MDEMODULE_HII_H
11 #define _MDEMODULE_HII_H
12
13 #define NARROW_CHAR 0xFFF0
14 #define WIDE_CHAR 0xFFF1
15 #define NON_BREAKING_CHAR 0xFFF2
16
17 ///
18 /// State defined for password statemachine .
19 ///
20 #define BROWSER_STATE_VALIDATE_PASSWORD 0
21 #define BROWSER_STATE_SET_PASSWORD 1
22
23 ///
24 /// GUIDed opcodes defined for EDKII implementation.
25 ///
26 #define EFI_IFR_TIANO_GUID \
27 { 0xf0b1735, 0x87a0, 0x4193, {0xb2, 0x66, 0x53, 0x8c, 0x38, 0xaf, 0x48, 0xce} }
28
29 #pragma pack(1)
30
31 ///
32 /// EDKII implementation extension opcodes, new extension can be added here later.
33 ///
34 #define EFI_IFR_EXTEND_OP_LABEL 0x0
35 #define EFI_IFR_EXTEND_OP_BANNER 0x1
36 #define EFI_IFR_EXTEND_OP_TIMEOUT 0x2
37 #define EFI_IFR_EXTEND_OP_CLASS 0x3
38 #define EFI_IFR_EXTEND_OP_SUBCLASS 0x4
39
40 ///
41 /// Label opcode.
42 ///
43 typedef struct _EFI_IFR_GUID_LABEL {
44 EFI_IFR_OP_HEADER Header;
45 ///
46 /// EFI_IFR_TIANO_GUID.
47 ///
48 EFI_GUID Guid;
49 ///
50 /// EFI_IFR_EXTEND_OP_LABEL.
51 ///
52 UINT8 ExtendOpCode;
53 ///
54 /// Label Number.
55 ///
56 UINT16 Number;
57 } EFI_IFR_GUID_LABEL;
58
59 #define EFI_IFR_BANNER_ALIGN_LEFT 0
60 #define EFI_IFR_BANNER_ALIGN_CENTER 1
61 #define EFI_IFR_BANNER_ALIGN_RIGHT 2
62
63 ///
64 /// Banner opcode.
65 ///
66 typedef struct _EFI_IFR_GUID_BANNER {
67 EFI_IFR_OP_HEADER Header;
68 ///
69 /// EFI_IFR_TIANO_GUID.
70 ///
71 EFI_GUID Guid;
72 ///
73 /// EFI_IFR_EXTEND_OP_BANNER
74 ///
75 UINT8 ExtendOpCode;
76 EFI_STRING_ID Title; ///< The string token for the banner title.
77 UINT16 LineNumber; ///< 1-based line number.
78 UINT8 Alignment; ///< left, center, or right-aligned.
79 } EFI_IFR_GUID_BANNER;
80
81 ///
82 /// Timeout opcode.
83 ///
84 typedef struct _EFI_IFR_GUID_TIMEOUT {
85 EFI_IFR_OP_HEADER Header;
86 ///
87 /// EFI_IFR_TIANO_GUID.
88 ///
89 EFI_GUID Guid;
90 ///
91 /// EFI_IFR_EXTEND_OP_TIMEOUT.
92 ///
93 UINT8 ExtendOpCode;
94 UINT16 TimeOut; ///< TimeOut Value.
95 } EFI_IFR_GUID_TIMEOUT;
96
97 #define EFI_NON_DEVICE_CLASS 0x00
98 #define EFI_DISK_DEVICE_CLASS 0x01
99 #define EFI_VIDEO_DEVICE_CLASS 0x02
100 #define EFI_NETWORK_DEVICE_CLASS 0x04
101 #define EFI_INPUT_DEVICE_CLASS 0x08
102 #define EFI_ON_BOARD_DEVICE_CLASS 0x10
103 #define EFI_OTHER_DEVICE_CLASS 0x20
104
105 ///
106 /// Device Class opcode.
107 ///
108 typedef struct _EFI_IFR_GUID_CLASS {
109 EFI_IFR_OP_HEADER Header;
110 ///
111 /// EFI_IFR_TIANO_GUID.
112 ///
113 EFI_GUID Guid;
114 ///
115 /// EFI_IFR_EXTEND_OP_CLASS.
116 ///
117 UINT8 ExtendOpCode;
118 UINT16 Class; ///< Device Class from the above.
119 } EFI_IFR_GUID_CLASS;
120
121 #define EFI_SETUP_APPLICATION_SUBCLASS 0x00
122 #define EFI_GENERAL_APPLICATION_SUBCLASS 0x01
123 #define EFI_FRONT_PAGE_SUBCLASS 0x02
124 #define EFI_SINGLE_USE_SUBCLASS 0x03
125
126 ///
127 /// SubClass opcode
128 ///
129 typedef struct _EFI_IFR_GUID_SUBCLASS {
130 EFI_IFR_OP_HEADER Header;
131 ///
132 /// EFI_IFR_TIANO_GUID.
133 ///
134 EFI_GUID Guid;
135 ///
136 /// EFI_IFR_EXTEND_OP_SUBCLASS.
137 ///
138 UINT8 ExtendOpCode;
139 UINT16 SubClass; ///< Sub Class type from the above.
140 } EFI_IFR_GUID_SUBCLASS;
141
142 ///
143 /// GUIDed opcodes support for framework vfr.
144 ///
145 #define EFI_IFR_FRAMEWORK_GUID \
146 { 0x31ca5d1a, 0xd511, 0x4931, { 0xb7, 0x82, 0xae, 0x6b, 0x2b, 0x17, 0x8c, 0xd7 } }
147
148 ///
149 /// Two extended opcodes are added, and new extensions can be added here later.
150 /// One is for framework OneOf question Option Key value;
151 /// another is for framework vareqval.
152 ///
153 #define EFI_IFR_EXTEND_OP_OPTIONKEY 0x0
154 #define EFI_IFR_EXTEND_OP_VAREQNAME 0x1
155
156 ///
157 /// Store the framework vfr option key value.
158 ///
159 typedef struct _EFI_IFR_GUID_OPTIONKEY {
160 EFI_IFR_OP_HEADER Header;
161 ///
162 /// EFI_IFR_FRAMEWORK_GUID.
163 ///
164 EFI_GUID Guid;
165 ///
166 /// EFI_IFR_EXTEND_OP_OPTIONKEY.
167 ///
168 UINT8 ExtendOpCode;
169 ///
170 /// OneOf Questiond ID binded by OneOf Option.
171 ///
172 EFI_QUESTION_ID QuestionId;
173 ///
174 /// The OneOf Option Value.
175 ///
176 EFI_IFR_TYPE_VALUE OptionValue;
177 ///
178 /// The Framework OneOf Option Key Value.
179 ///
180 UINT16 KeyValue;
181 } EFI_IFR_GUID_OPTIONKEY;
182
183 ///
184 /// Store the framework vfr vareqval name number.
185 ///
186 typedef struct _EFI_IFR_GUID_VAREQNAME {
187 EFI_IFR_OP_HEADER Header;
188 ///
189 /// EFI_IFR_FRAMEWORK_GUID.
190 ///
191 EFI_GUID Guid;
192 ///
193 /// EFI_IFR_EXTEND_OP_VAREQNAME.
194 ///
195 UINT8 ExtendOpCode;
196 ///
197 /// Question ID of the Numeric Opcode created.
198 ///
199 EFI_QUESTION_ID QuestionId;
200 ///
201 /// For vareqval (0x100), NameId is 0x100.
202 /// This value will convert to a Unicode String following this rule;
203 /// sprintf(StringBuffer, "%d", NameId) .
204 /// The Unicode String will be used as a EFI Variable Name.
205 ///
206 UINT16 NameId;
207 } EFI_IFR_GUID_VAREQNAME;
208
209 ///
210 /// EDKII implementation extension GUID, used to indicate there are bit fields in the varstore.
211 ///
212 #define EDKII_IFR_BIT_VARSTORE_GUID \
213 { 0x82DDD68B, 0x9163, 0x4187, {0x9B, 0x27, 0x20, 0xA8, 0xFD, 0x60 ,0xA7, 0x1D}}
214
215 ///
216 /// EDKII implementation extension flags, used to indicate the display style and bit width for bit filed storage.
217 /// Two high bits for display style and the low six bits for bit width.
218 ///
219 #define EDKII_IFR_DISPLAY_BIT 0xC0
220 #define EDKII_IFR_DISPLAY_INT_DEC_BIT 0x00
221 #define EDKII_IFR_DISPLAY_UINT_DEC_BIT 0x40
222 #define EDKII_IFR_DISPLAY_UINT_HEX_BIT 0x80
223
224 #define EDKII_IFR_NUMERIC_SIZE_BIT 0x3F
225
226 #pragma pack()
227
228 extern EFI_GUID gEfiIfrTianoGuid;
229 extern EFI_GUID gEfiIfrFrameworkGuid;
230 extern EFI_GUID gEdkiiIfrBitVarStoreGuid;
231
232 #endif
233