iPXE
MdeModuleHii.h
Go to the documentation of this file.
00001 /** @file
00002   EDKII extented HII IFR guid opcodes.
00003 
00004 Copyright (c) 2006 - 2010, Intel Corporation. All rights reserved.<BR>
00005 This program and the accompanying materials are licensed and made available under
00006 the terms and conditions of the BSD License that accompanies this distribution.
00007 The full text of the license may be found at
00008 http://opensource.org/licenses/bsd-license.php.
00009 
00010 THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
00011 WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
00012 
00013 **/
00014 
00015 #ifndef __MDEMODULE_HII_H__
00016 #define __MDEMODULE_HII_H__
00017 
00018 FILE_LICENCE ( BSD3 );
00019 
00020 #define NARROW_CHAR         0xFFF0
00021 #define WIDE_CHAR           0xFFF1
00022 #define NON_BREAKING_CHAR   0xFFF2
00023 
00024 ///
00025 /// State defined for password statemachine .
00026 ///
00027 #define BROWSER_STATE_VALIDATE_PASSWORD  0
00028 #define BROWSER_STATE_SET_PASSWORD       1
00029 
00030 ///
00031 /// GUIDed opcodes defined for EDKII implementation.
00032 ///
00033 #define EFI_IFR_TIANO_GUID \
00034   { 0xf0b1735, 0x87a0, 0x4193, {0xb2, 0x66, 0x53, 0x8c, 0x38, 0xaf, 0x48, 0xce} }
00035 
00036 #pragma pack(1)
00037 
00038 ///
00039 /// EDKII implementation extension opcodes, new extension can be added here later.
00040 ///
00041 #define EFI_IFR_EXTEND_OP_LABEL       0x0
00042 #define EFI_IFR_EXTEND_OP_BANNER      0x1
00043 #define EFI_IFR_EXTEND_OP_TIMEOUT     0x2
00044 #define EFI_IFR_EXTEND_OP_CLASS       0x3
00045 #define EFI_IFR_EXTEND_OP_SUBCLASS    0x4
00046 
00047 ///
00048 /// Label opcode.
00049 ///
00050 typedef struct _EFI_IFR_GUID_LABEL {
00051   EFI_IFR_OP_HEADER   Header;
00052   ///
00053   /// EFI_IFR_TIANO_GUID.
00054   ///
00055   EFI_GUID            Guid;
00056   ///
00057   /// EFI_IFR_EXTEND_OP_LABEL.
00058   ///
00059   UINT8               ExtendOpCode;
00060   ///
00061   /// Label Number.
00062   ///
00063   UINT16              Number;
00064 } EFI_IFR_GUID_LABEL;
00065 
00066 #define EFI_IFR_BANNER_ALIGN_LEFT     0
00067 #define EFI_IFR_BANNER_ALIGN_CENTER   1
00068 #define EFI_IFR_BANNER_ALIGN_RIGHT    2
00069 
00070 ///
00071 /// Banner opcode.
00072 ///
00073 typedef struct _EFI_IFR_GUID_BANNER {
00074   EFI_IFR_OP_HEADER   Header;
00075   ///
00076   /// EFI_IFR_TIANO_GUID.
00077   ///
00078   EFI_GUID            Guid;
00079   ///
00080   /// EFI_IFR_EXTEND_OP_BANNER
00081   ///
00082   UINT8               ExtendOpCode;
00083   EFI_STRING_ID       Title;        ///< The string token for the banner title.
00084   UINT16              LineNumber;   ///< 1-based line number.
00085   UINT8               Alignment;    ///< left, center, or right-aligned.
00086 } EFI_IFR_GUID_BANNER;
00087 
00088 ///
00089 /// Timeout opcode.
00090 ///
00091 typedef struct _EFI_IFR_GUID_TIMEOUT {
00092   EFI_IFR_OP_HEADER   Header;
00093   ///
00094   /// EFI_IFR_TIANO_GUID.
00095   ///
00096   EFI_GUID            Guid;
00097   ///
00098   /// EFI_IFR_EXTEND_OP_TIMEOUT.
00099   ///
00100   UINT8               ExtendOpCode;
00101   UINT16              TimeOut;       ///< TimeOut Value.
00102 } EFI_IFR_GUID_TIMEOUT;
00103 
00104 #define EFI_NON_DEVICE_CLASS              0x00
00105 #define EFI_DISK_DEVICE_CLASS             0x01
00106 #define EFI_VIDEO_DEVICE_CLASS            0x02
00107 #define EFI_NETWORK_DEVICE_CLASS          0x04
00108 #define EFI_INPUT_DEVICE_CLASS            0x08
00109 #define EFI_ON_BOARD_DEVICE_CLASS         0x10
00110 #define EFI_OTHER_DEVICE_CLASS            0x20
00111 
00112 ///
00113 /// Device Class opcode.
00114 ///
00115 typedef struct _EFI_IFR_GUID_CLASS {
00116   EFI_IFR_OP_HEADER   Header;
00117   ///
00118   /// EFI_IFR_TIANO_GUID.
00119   ///
00120   EFI_GUID            Guid;
00121   ///
00122   /// EFI_IFR_EXTEND_OP_CLASS.
00123   ///
00124   UINT8               ExtendOpCode;
00125   UINT16              Class;           ///< Device Class from the above.
00126 } EFI_IFR_GUID_CLASS;
00127 
00128 #define EFI_SETUP_APPLICATION_SUBCLASS    0x00
00129 #define EFI_GENERAL_APPLICATION_SUBCLASS  0x01
00130 #define EFI_FRONT_PAGE_SUBCLASS           0x02
00131 #define EFI_SINGLE_USE_SUBCLASS           0x03
00132 
00133 ///
00134 /// SubClass opcode
00135 ///
00136 typedef struct _EFI_IFR_GUID_SUBCLASS {
00137   EFI_IFR_OP_HEADER   Header;
00138   ///
00139   /// EFI_IFR_TIANO_GUID.
00140   ///
00141   EFI_GUID            Guid;
00142   ///
00143   /// EFI_IFR_EXTEND_OP_SUBCLASS.
00144   ///
00145   UINT8               ExtendOpCode;
00146   UINT16              SubClass;      ///< Sub Class type from the above.
00147 } EFI_IFR_GUID_SUBCLASS;
00148 
00149 ///
00150 /// GUIDed opcodes support for framework vfr.
00151 ///
00152 #define EFI_IFR_FRAMEWORK_GUID \
00153   { 0x31ca5d1a, 0xd511, 0x4931, { 0xb7, 0x82, 0xae, 0x6b, 0x2b, 0x17, 0x8c, 0xd7 } }
00154 
00155 ///
00156 /// Two extended opcodes are added, and new extensions can be added here later.
00157 /// One is for framework OneOf question Option Key value;
00158 /// another is for framework vareqval.
00159 ///
00160 #define EFI_IFR_EXTEND_OP_OPTIONKEY   0x0
00161 #define EFI_IFR_EXTEND_OP_VAREQNAME   0x1
00162 
00163 ///
00164 /// Store the framework vfr option key value.
00165 ///
00166 typedef struct _EFI_IFR_GUID_OPTIONKEY {
00167   EFI_IFR_OP_HEADER   Header;
00168   ///
00169   /// EFI_IFR_FRAMEWORK_GUID.
00170   ///
00171   EFI_GUID            Guid;
00172   ///
00173   /// EFI_IFR_EXTEND_OP_OPTIONKEY.
00174   ///
00175   UINT8               ExtendOpCode;
00176   ///
00177   /// OneOf Questiond ID binded by OneOf Option.
00178   ///
00179   EFI_QUESTION_ID     QuestionId;
00180   ///
00181   /// The OneOf Option Value.
00182   ///
00183   EFI_IFR_TYPE_VALUE  OptionValue;
00184   ///
00185   /// The Framework OneOf Option Key Value.
00186   ///
00187   UINT16              KeyValue;
00188 } EFI_IFR_GUID_OPTIONKEY;
00189 
00190 ///
00191 /// Store the framework vfr vareqval name number.
00192 ///
00193 typedef struct _EFI_IFR_GUID_VAREQNAME {
00194   EFI_IFR_OP_HEADER   Header;
00195   ///
00196   /// EFI_IFR_FRAMEWORK_GUID.
00197   ///
00198   EFI_GUID            Guid;
00199   ///
00200   /// EFI_IFR_EXTEND_OP_VAREQNAME.
00201   ///
00202   UINT8               ExtendOpCode;
00203   ///
00204   /// Question ID of the Numeric Opcode created.
00205   ///
00206   EFI_QUESTION_ID     QuestionId;
00207   ///
00208   /// For vareqval (0x100), NameId is 0x100.
00209   /// This value will convert to a Unicode String following this rule;
00210   ///            sprintf(StringBuffer, "%d", NameId) .
00211   /// The the Unicode String will be used as a EFI Variable Name.
00212   ///
00213   UINT16              NameId;
00214 } EFI_IFR_GUID_VAREQNAME;
00215 
00216 #pragma pack()
00217 
00218 extern EFI_GUID gEfiIfrTianoGuid;
00219 extern EFI_GUID gEfiIfrFrameworkGuid;
00220 
00221 #endif
00222