1 /** @file 2 EDK II specific HII relative definition. 3 4 Copyright (c) 2006 - 2014, Intel Corporation. All rights reserved.<BR> 5 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 10 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. 13 14 **/ 15 16 #ifndef _MDEMODULE_HII_H 17 #define _MDEMODULE_HII_H 18 19 #define NARROW_CHAR 0xFFF0 20 #define WIDE_CHAR 0xFFF1 21 #define NON_BREAKING_CHAR 0xFFF2 22 23 /// 24 /// State defined for password statemachine . 25 /// 26 #define BROWSER_STATE_VALIDATE_PASSWORD 0 27 #define BROWSER_STATE_SET_PASSWORD 1 28 29 /// 30 /// GUIDed opcodes defined for EDKII implementation. 31 /// 32 #define EFI_IFR_TIANO_GUID \ 33 { 0xf0b1735, 0x87a0, 0x4193, {0xb2, 0x66, 0x53, 0x8c, 0x38, 0xaf, 0x48, 0xce} } 34 35 #pragma pack(1) 36 37 /// 38 /// EDKII implementation extension opcodes, new extension can be added here later. 39 /// 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 45 46 /// 47 /// Label opcode. 48 /// 49 typedef struct _EFI_IFR_GUID_LABEL { 50 EFI_IFR_OP_HEADER Header; 51 /// 52 /// EFI_IFR_TIANO_GUID. 53 /// 54 EFI_GUID Guid; 55 /// 56 /// EFI_IFR_EXTEND_OP_LABEL. 57 /// 58 UINT8 ExtendOpCode; 59 /// 60 /// Label Number. 61 /// 62 UINT16 Number; 63 } EFI_IFR_GUID_LABEL; 64 65 #define EFI_IFR_BANNER_ALIGN_LEFT 0 66 #define EFI_IFR_BANNER_ALIGN_CENTER 1 67 #define EFI_IFR_BANNER_ALIGN_RIGHT 2 68 69 /// 70 /// Banner opcode. 71 /// 72 typedef struct _EFI_IFR_GUID_BANNER { 73 EFI_IFR_OP_HEADER Header; 74 /// 75 /// EFI_IFR_TIANO_GUID. 76 /// 77 EFI_GUID Guid; 78 /// 79 /// EFI_IFR_EXTEND_OP_BANNER 80 /// 81 UINT8 ExtendOpCode; 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; 86 87 /// 88 /// Timeout opcode. 89 /// 90 typedef struct _EFI_IFR_GUID_TIMEOUT { 91 EFI_IFR_OP_HEADER Header; 92 /// 93 /// EFI_IFR_TIANO_GUID. 94 /// 95 EFI_GUID Guid; 96 /// 97 /// EFI_IFR_EXTEND_OP_TIMEOUT. 98 /// 99 UINT8 ExtendOpCode; 100 UINT16 TimeOut; ///< TimeOut Value. 101 } EFI_IFR_GUID_TIMEOUT; 102 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 110 111 /// 112 /// Device Class opcode. 113 /// 114 typedef struct _EFI_IFR_GUID_CLASS { 115 EFI_IFR_OP_HEADER Header; 116 /// 117 /// EFI_IFR_TIANO_GUID. 118 /// 119 EFI_GUID Guid; 120 /// 121 /// EFI_IFR_EXTEND_OP_CLASS. 122 /// 123 UINT8 ExtendOpCode; 124 UINT16 Class; ///< Device Class from the above. 125 } EFI_IFR_GUID_CLASS; 126 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 131 132 /// 133 /// SubClass opcode 134 /// 135 typedef struct _EFI_IFR_GUID_SUBCLASS { 136 EFI_IFR_OP_HEADER Header; 137 /// 138 /// EFI_IFR_TIANO_GUID. 139 /// 140 EFI_GUID Guid; 141 /// 142 /// EFI_IFR_EXTEND_OP_SUBCLASS. 143 /// 144 UINT8 ExtendOpCode; 145 UINT16 SubClass; ///< Sub Class type from the above. 146 } EFI_IFR_GUID_SUBCLASS; 147 148 /// 149 /// GUIDed opcodes support for framework vfr. 150 /// 151 #define EFI_IFR_FRAMEWORK_GUID \ 152 { 0x31ca5d1a, 0xd511, 0x4931, { 0xb7, 0x82, 0xae, 0x6b, 0x2b, 0x17, 0x8c, 0xd7 } } 153 154 /// 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. 158 /// 159 #define EFI_IFR_EXTEND_OP_OPTIONKEY 0x0 160 #define EFI_IFR_EXTEND_OP_VAREQNAME 0x1 161 162 /// 163 /// Store the framework vfr option key value. 164 /// 165 typedef struct _EFI_IFR_GUID_OPTIONKEY { 166 EFI_IFR_OP_HEADER Header; 167 /// 168 /// EFI_IFR_FRAMEWORK_GUID. 169 /// 170 EFI_GUID Guid; 171 /// 172 /// EFI_IFR_EXTEND_OP_OPTIONKEY. 173 /// 174 UINT8 ExtendOpCode; 175 /// 176 /// OneOf Questiond ID binded by OneOf Option. 177 /// 178 EFI_QUESTION_ID QuestionId; 179 /// 180 /// The OneOf Option Value. 181 /// 182 EFI_IFR_TYPE_VALUE OptionValue; 183 /// 184 /// The Framework OneOf Option Key Value. 185 /// 186 UINT16 KeyValue; 187 } EFI_IFR_GUID_OPTIONKEY; 188 189 /// 190 /// Store the framework vfr vareqval name number. 191 /// 192 typedef struct _EFI_IFR_GUID_VAREQNAME { 193 EFI_IFR_OP_HEADER Header; 194 /// 195 /// EFI_IFR_FRAMEWORK_GUID. 196 /// 197 EFI_GUID Guid; 198 /// 199 /// EFI_IFR_EXTEND_OP_VAREQNAME. 200 /// 201 UINT8 ExtendOpCode; 202 /// 203 /// Question ID of the Numeric Opcode created. 204 /// 205 EFI_QUESTION_ID QuestionId; 206 /// 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. 211 /// 212 UINT16 NameId; 213 } EFI_IFR_GUID_VAREQNAME; 214 215 #pragma pack() 216 217 extern EFI_GUID gEfiIfrTianoGuid; 218 extern EFI_GUID gEfiIfrFrameworkGuid; 219 220 #endif 221 222