2 EDK II specific HII relative definition.
4 Copyright (c) 2006 - 2017, Intel Corporation. All rights reserved.<BR>
6 This program and the accompanying materials are licensed and made available
7 under the terms and conditions of the BSD License which accompanies this
8 distribution. The full text of the license may be found at
9 http://opensource.org/licenses/bsd-license.php
11 THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
12 WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
16 #ifndef _MDEMODULE_HII_H
17 #define _MDEMODULE_HII_H
19 #define NARROW_CHAR 0xFFF0
20 #define WIDE_CHAR 0xFFF1
21 #define NON_BREAKING_CHAR 0xFFF2
24 /// State defined for password statemachine .
26 #define BROWSER_STATE_VALIDATE_PASSWORD 0
27 #define BROWSER_STATE_SET_PASSWORD 1
30 /// GUIDed opcodes defined for EDKII implementation.
32 #define EFI_IFR_TIANO_GUID \
33 { 0xf0b1735, 0x87a0, 0x4193, {0xb2, 0x66, 0x53, 0x8c, 0x38, 0xaf, 0x48, 0xce} }
38 /// EDKII implementation extension opcodes, new extension can be added here later.
40 #define EFI_IFR_EXTEND_OP_LABEL 0x0
41 #define EFI_IFR_EXTEND_OP_BANNER 0x1
42 #define EFI_IFR_EXTEND_OP_TIMEOUT 0x2
43 #define EFI_IFR_EXTEND_OP_CLASS 0x3
44 #define EFI_IFR_EXTEND_OP_SUBCLASS 0x4
49 typedef struct _EFI_IFR_GUID_LABEL
{
50 EFI_IFR_OP_HEADER Header
;
52 /// EFI_IFR_TIANO_GUID.
56 /// EFI_IFR_EXTEND_OP_LABEL.
65 #define EFI_IFR_BANNER_ALIGN_LEFT 0
66 #define EFI_IFR_BANNER_ALIGN_CENTER 1
67 #define EFI_IFR_BANNER_ALIGN_RIGHT 2
72 typedef struct _EFI_IFR_GUID_BANNER
{
73 EFI_IFR_OP_HEADER Header
;
75 /// EFI_IFR_TIANO_GUID.
79 /// EFI_IFR_EXTEND_OP_BANNER
82 EFI_STRING_ID Title
; ///< The string token for the banner title.
83 UINT16 LineNumber
; ///< 1-based line number.
84 UINT8 Alignment
; ///< left, center, or right-aligned.
85 } EFI_IFR_GUID_BANNER
;
90 typedef struct _EFI_IFR_GUID_TIMEOUT
{
91 EFI_IFR_OP_HEADER Header
;
93 /// EFI_IFR_TIANO_GUID.
97 /// EFI_IFR_EXTEND_OP_TIMEOUT.
100 UINT16 TimeOut
; ///< TimeOut Value.
101 } EFI_IFR_GUID_TIMEOUT
;
103 #define EFI_NON_DEVICE_CLASS 0x00
104 #define EFI_DISK_DEVICE_CLASS 0x01
105 #define EFI_VIDEO_DEVICE_CLASS 0x02
106 #define EFI_NETWORK_DEVICE_CLASS 0x04
107 #define EFI_INPUT_DEVICE_CLASS 0x08
108 #define EFI_ON_BOARD_DEVICE_CLASS 0x10
109 #define EFI_OTHER_DEVICE_CLASS 0x20
112 /// Device Class opcode.
114 typedef struct _EFI_IFR_GUID_CLASS
{
115 EFI_IFR_OP_HEADER Header
;
117 /// EFI_IFR_TIANO_GUID.
121 /// EFI_IFR_EXTEND_OP_CLASS.
124 UINT16 Class
; ///< Device Class from the above.
125 } EFI_IFR_GUID_CLASS
;
127 #define EFI_SETUP_APPLICATION_SUBCLASS 0x00
128 #define EFI_GENERAL_APPLICATION_SUBCLASS 0x01
129 #define EFI_FRONT_PAGE_SUBCLASS 0x02
130 #define EFI_SINGLE_USE_SUBCLASS 0x03
135 typedef struct _EFI_IFR_GUID_SUBCLASS
{
136 EFI_IFR_OP_HEADER Header
;
138 /// EFI_IFR_TIANO_GUID.
142 /// EFI_IFR_EXTEND_OP_SUBCLASS.
145 UINT16 SubClass
; ///< Sub Class type from the above.
146 } EFI_IFR_GUID_SUBCLASS
;
149 /// GUIDed opcodes support for framework vfr.
151 #define EFI_IFR_FRAMEWORK_GUID \
152 { 0x31ca5d1a, 0xd511, 0x4931, { 0xb7, 0x82, 0xae, 0x6b, 0x2b, 0x17, 0x8c, 0xd7 } }
155 /// Two extended opcodes are added, and new extensions can be added here later.
156 /// One is for framework OneOf question Option Key value;
157 /// another is for framework vareqval.
159 #define EFI_IFR_EXTEND_OP_OPTIONKEY 0x0
160 #define EFI_IFR_EXTEND_OP_VAREQNAME 0x1
163 /// Store the framework vfr option key value.
165 typedef struct _EFI_IFR_GUID_OPTIONKEY
{
166 EFI_IFR_OP_HEADER Header
;
168 /// EFI_IFR_FRAMEWORK_GUID.
172 /// EFI_IFR_EXTEND_OP_OPTIONKEY.
176 /// OneOf Questiond ID binded by OneOf Option.
178 EFI_QUESTION_ID QuestionId
;
180 /// The OneOf Option Value.
182 EFI_IFR_TYPE_VALUE OptionValue
;
184 /// The Framework OneOf Option Key Value.
187 } EFI_IFR_GUID_OPTIONKEY
;
190 /// Store the framework vfr vareqval name number.
192 typedef struct _EFI_IFR_GUID_VAREQNAME
{
193 EFI_IFR_OP_HEADER Header
;
195 /// EFI_IFR_FRAMEWORK_GUID.
199 /// EFI_IFR_EXTEND_OP_VAREQNAME.
203 /// Question ID of the Numeric Opcode created.
205 EFI_QUESTION_ID QuestionId
;
207 /// For vareqval (0x100), NameId is 0x100.
208 /// This value will convert to a Unicode String following this rule;
209 /// sprintf(StringBuffer, "%d", NameId) .
210 /// The the Unicode String will be used as a EFI Variable Name.
213 } EFI_IFR_GUID_VAREQNAME
;
216 /// EDKII implementation extension GUID, used to indaicate there are bit fields in the varstore.
218 #define EDKII_IFR_BIT_VARSTORE_GUID \
219 { 0x82DDD68B, 0x9163, 0x4187, {0x9B, 0x27, 0x20, 0xA8, 0xFD, 0x60 ,0xA7, 0x1D}}
222 /// EDKII implementation extension flags, used to indaicate the disply style and bit width for bit filed storage.
223 /// Two high bits for display style and the low six bits for bit width.
225 #define EDKII_IFR_DISPLAY_BIT 0xC0
226 #define EDKII_IFR_DISPLAY_INT_DEC_BIT 0x00
227 #define EDKII_IFR_DISPLAY_UINT_DEC_BIT 0x40
228 #define EDKII_IFR_DISPLAY_UINT_HEX_BIT 0x80
230 #define EDKII_IFR_NUMERIC_SIZE_BIT 0x3F
234 extern EFI_GUID gEfiIfrTianoGuid
;
235 extern EFI_GUID gEfiIfrFrameworkGuid
;
236 extern EFI_GUID gEdkiiIfrBitVarStoreGuid
;