2 EDKII extented HII IFR guid opcodes.
4 Copyright (c) 2006 - 2017, 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.
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.
15 #ifndef __MDEMODULE_HII_H__
16 #define __MDEMODULE_HII_H__
18 #define NARROW_CHAR 0xFFF0
19 #define WIDE_CHAR 0xFFF1
20 #define NON_BREAKING_CHAR 0xFFF2
23 /// State defined for password statemachine .
25 #define BROWSER_STATE_VALIDATE_PASSWORD 0
26 #define BROWSER_STATE_SET_PASSWORD 1
29 /// GUIDed opcodes defined for EDKII implementation.
31 #define EFI_IFR_TIANO_GUID \
32 { 0xf0b1735, 0x87a0, 0x4193, {0xb2, 0x66, 0x53, 0x8c, 0x38, 0xaf, 0x48, 0xce} }
37 /// EDKII implementation extension opcodes, new extension can be added here later.
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
48 typedef struct _EFI_IFR_GUID_LABEL
{
49 EFI_IFR_OP_HEADER Header
;
51 /// EFI_IFR_TIANO_GUID.
55 /// EFI_IFR_EXTEND_OP_LABEL.
64 #define EFI_IFR_BANNER_ALIGN_LEFT 0
65 #define EFI_IFR_BANNER_ALIGN_CENTER 1
66 #define EFI_IFR_BANNER_ALIGN_RIGHT 2
71 typedef struct _EFI_IFR_GUID_BANNER
{
72 EFI_IFR_OP_HEADER Header
;
74 /// EFI_IFR_TIANO_GUID.
78 /// EFI_IFR_EXTEND_OP_BANNER
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
;
89 typedef struct _EFI_IFR_GUID_TIMEOUT
{
90 EFI_IFR_OP_HEADER Header
;
92 /// EFI_IFR_TIANO_GUID.
96 /// EFI_IFR_EXTEND_OP_TIMEOUT.
99 UINT16 TimeOut
; ///< TimeOut Value.
100 } EFI_IFR_GUID_TIMEOUT
;
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
111 /// Device Class opcode.
113 typedef struct _EFI_IFR_GUID_CLASS
{
114 EFI_IFR_OP_HEADER Header
;
116 /// EFI_IFR_TIANO_GUID.
120 /// EFI_IFR_EXTEND_OP_CLASS.
123 UINT16 Class
; ///< Device Class from the above.
124 } EFI_IFR_GUID_CLASS
;
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
134 typedef struct _EFI_IFR_GUID_SUBCLASS
{
135 EFI_IFR_OP_HEADER Header
;
137 /// EFI_IFR_TIANO_GUID.
141 /// EFI_IFR_EXTEND_OP_SUBCLASS.
144 UINT16 SubClass
; ///< Sub Class type from the above.
145 } EFI_IFR_GUID_SUBCLASS
;
148 /// GUIDed opcodes support for framework vfr.
150 #define EFI_IFR_FRAMEWORK_GUID \
151 { 0x31ca5d1a, 0xd511, 0x4931, { 0xb7, 0x82, 0xae, 0x6b, 0x2b, 0x17, 0x8c, 0xd7 } }
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.
158 #define EFI_IFR_EXTEND_OP_OPTIONKEY 0x0
159 #define EFI_IFR_EXTEND_OP_VAREQNAME 0x1
162 /// Store the framework vfr option key value.
164 typedef struct _EFI_IFR_GUID_OPTIONKEY
{
165 EFI_IFR_OP_HEADER Header
;
167 /// EFI_IFR_FRAMEWORK_GUID.
171 /// EFI_IFR_EXTEND_OP_OPTIONKEY.
175 /// OneOf Questiond ID binded by OneOf Option.
177 EFI_QUESTION_ID QuestionId
;
179 /// The OneOf Option Value.
181 EFI_IFR_TYPE_VALUE OptionValue
;
183 /// The Framework OneOf Option Key Value.
186 } EFI_IFR_GUID_OPTIONKEY
;
189 /// Store the framework vfr vareqval name number.
191 typedef struct _EFI_IFR_GUID_VAREQNAME
{
192 EFI_IFR_OP_HEADER Header
;
194 /// EFI_IFR_FRAMEWORK_GUID.
198 /// EFI_IFR_EXTEND_OP_VAREQNAME.
202 /// Question ID of the Numeric Opcode created.
204 EFI_QUESTION_ID QuestionId
;
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.
212 } EFI_IFR_GUID_VAREQNAME
;
215 /// EDKII implementation extension GUID, used to indaicate there are bit fields in the varstore.
217 #define EDKII_IFR_BIT_VARSTORE_GUID \
218 {0x82DDD68B, 0x9163, 0x4187, {0x9B, 0x27, 0x20, 0xA8, 0xFD, 0x60,0xA7, 0x1D}}
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.
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
229 #define EDKII_IFR_NUMERIC_SIZE_BIT 0x3F
233 extern EFI_GUID gEfiIfrTianoGuid
;
234 extern EFI_GUID gEfiIfrFrameworkGuid
;
235 extern EFI_GUID gEdkiiIfrBitVarstoreGuid
;