Add qemu 2.4.0
[kvmfornfv.git] / qemu / roms / ipxe / src / include / ipxe / efi / Guid / MdeModuleHii.h
1 /** @file
2   EDKII extented HII IFR guid opcodes.
3
4 Copyright (c) 2006 - 2010, 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 FILE_LICENCE ( BSD3 );
19
20 #define NARROW_CHAR         0xFFF0
21 #define WIDE_CHAR           0xFFF1
22 #define NON_BREAKING_CHAR   0xFFF2
23
24 ///
25 /// State defined for password statemachine .
26 ///
27 #define BROWSER_STATE_VALIDATE_PASSWORD  0
28 #define BROWSER_STATE_SET_PASSWORD       1
29
30 ///
31 /// GUIDed opcodes defined for EDKII implementation.
32 ///
33 #define EFI_IFR_TIANO_GUID \
34   { 0xf0b1735, 0x87a0, 0x4193, {0xb2, 0x66, 0x53, 0x8c, 0x38, 0xaf, 0x48, 0xce} }
35
36 #pragma pack(1)
37
38 ///
39 /// EDKII implementation extension opcodes, new extension can be added here later.
40 ///
41 #define EFI_IFR_EXTEND_OP_LABEL       0x0
42 #define EFI_IFR_EXTEND_OP_BANNER      0x1
43 #define EFI_IFR_EXTEND_OP_TIMEOUT     0x2
44 #define EFI_IFR_EXTEND_OP_CLASS       0x3
45 #define EFI_IFR_EXTEND_OP_SUBCLASS    0x4
46
47 ///
48 /// Label opcode.
49 ///
50 typedef struct _EFI_IFR_GUID_LABEL {
51   EFI_IFR_OP_HEADER   Header;
52   ///
53   /// EFI_IFR_TIANO_GUID.
54   ///
55   EFI_GUID            Guid;
56   ///
57   /// EFI_IFR_EXTEND_OP_LABEL.
58   ///
59   UINT8               ExtendOpCode;
60   ///
61   /// Label Number.
62   ///
63   UINT16              Number;
64 } EFI_IFR_GUID_LABEL;
65
66 #define EFI_IFR_BANNER_ALIGN_LEFT     0
67 #define EFI_IFR_BANNER_ALIGN_CENTER   1
68 #define EFI_IFR_BANNER_ALIGN_RIGHT    2
69
70 ///
71 /// Banner opcode.
72 ///
73 typedef struct _EFI_IFR_GUID_BANNER {
74   EFI_IFR_OP_HEADER   Header;
75   ///
76   /// EFI_IFR_TIANO_GUID.
77   ///
78   EFI_GUID            Guid;
79   ///
80   /// EFI_IFR_EXTEND_OP_BANNER
81   ///
82   UINT8               ExtendOpCode;
83   EFI_STRING_ID       Title;        ///< The string token for the banner title.
84   UINT16              LineNumber;   ///< 1-based line number.
85   UINT8               Alignment;    ///< left, center, or right-aligned.
86 } EFI_IFR_GUID_BANNER;
87
88 ///
89 /// Timeout opcode.
90 ///
91 typedef struct _EFI_IFR_GUID_TIMEOUT {
92   EFI_IFR_OP_HEADER   Header;
93   ///
94   /// EFI_IFR_TIANO_GUID.
95   ///
96   EFI_GUID            Guid;
97   ///
98   /// EFI_IFR_EXTEND_OP_TIMEOUT.
99   ///
100   UINT8               ExtendOpCode;
101   UINT16              TimeOut;       ///< TimeOut Value.
102 } EFI_IFR_GUID_TIMEOUT;
103
104 #define EFI_NON_DEVICE_CLASS              0x00
105 #define EFI_DISK_DEVICE_CLASS             0x01
106 #define EFI_VIDEO_DEVICE_CLASS            0x02
107 #define EFI_NETWORK_DEVICE_CLASS          0x04
108 #define EFI_INPUT_DEVICE_CLASS            0x08
109 #define EFI_ON_BOARD_DEVICE_CLASS         0x10
110 #define EFI_OTHER_DEVICE_CLASS            0x20
111
112 ///
113 /// Device Class opcode.
114 ///
115 typedef struct _EFI_IFR_GUID_CLASS {
116   EFI_IFR_OP_HEADER   Header;
117   ///
118   /// EFI_IFR_TIANO_GUID.
119   ///
120   EFI_GUID            Guid;
121   ///
122   /// EFI_IFR_EXTEND_OP_CLASS.
123   ///
124   UINT8               ExtendOpCode;
125   UINT16              Class;           ///< Device Class from the above.
126 } EFI_IFR_GUID_CLASS;
127
128 #define EFI_SETUP_APPLICATION_SUBCLASS    0x00
129 #define EFI_GENERAL_APPLICATION_SUBCLASS  0x01
130 #define EFI_FRONT_PAGE_SUBCLASS           0x02
131 #define EFI_SINGLE_USE_SUBCLASS           0x03
132
133 ///
134 /// SubClass opcode
135 ///
136 typedef struct _EFI_IFR_GUID_SUBCLASS {
137   EFI_IFR_OP_HEADER   Header;
138   ///
139   /// EFI_IFR_TIANO_GUID.
140   ///
141   EFI_GUID            Guid;
142   ///
143   /// EFI_IFR_EXTEND_OP_SUBCLASS.
144   ///
145   UINT8               ExtendOpCode;
146   UINT16              SubClass;      ///< Sub Class type from the above.
147 } EFI_IFR_GUID_SUBCLASS;
148
149 ///
150 /// GUIDed opcodes support for framework vfr.
151 ///
152 #define EFI_IFR_FRAMEWORK_GUID \
153   { 0x31ca5d1a, 0xd511, 0x4931, { 0xb7, 0x82, 0xae, 0x6b, 0x2b, 0x17, 0x8c, 0xd7 } }
154
155 ///
156 /// Two extended opcodes are added, and new extensions can be added here later.
157 /// One is for framework OneOf question Option Key value;
158 /// another is for framework vareqval.
159 ///
160 #define EFI_IFR_EXTEND_OP_OPTIONKEY   0x0
161 #define EFI_IFR_EXTEND_OP_VAREQNAME   0x1
162
163 ///
164 /// Store the framework vfr option key value.
165 ///
166 typedef struct _EFI_IFR_GUID_OPTIONKEY {
167   EFI_IFR_OP_HEADER   Header;
168   ///
169   /// EFI_IFR_FRAMEWORK_GUID.
170   ///
171   EFI_GUID            Guid;
172   ///
173   /// EFI_IFR_EXTEND_OP_OPTIONKEY.
174   ///
175   UINT8               ExtendOpCode;
176   ///
177   /// OneOf Questiond ID binded by OneOf Option.
178   ///
179   EFI_QUESTION_ID     QuestionId;
180   ///
181   /// The OneOf Option Value.
182   ///
183   EFI_IFR_TYPE_VALUE  OptionValue;
184   ///
185   /// The Framework OneOf Option Key Value.
186   ///
187   UINT16              KeyValue;
188 } EFI_IFR_GUID_OPTIONKEY;
189
190 ///
191 /// Store the framework vfr vareqval name number.
192 ///
193 typedef struct _EFI_IFR_GUID_VAREQNAME {
194   EFI_IFR_OP_HEADER   Header;
195   ///
196   /// EFI_IFR_FRAMEWORK_GUID.
197   ///
198   EFI_GUID            Guid;
199   ///
200   /// EFI_IFR_EXTEND_OP_VAREQNAME.
201   ///
202   UINT8               ExtendOpCode;
203   ///
204   /// Question ID of the Numeric Opcode created.
205   ///
206   EFI_QUESTION_ID     QuestionId;
207   ///
208   /// For vareqval (0x100), NameId is 0x100.
209   /// This value will convert to a Unicode String following this rule;
210   ///            sprintf(StringBuffer, "%d", NameId) .
211   /// The the Unicode String will be used as a EFI Variable Name.
212   ///
213   UINT16              NameId;
214 } EFI_IFR_GUID_VAREQNAME;
215
216 #pragma pack()
217
218 extern EFI_GUID gEfiIfrTianoGuid;
219 extern EFI_GUID gEfiIfrFrameworkGuid;
220
221 #endif
222