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