]>
Commit | Line | Data |
---|---|---|
30fdf114 LG |
1 | ## @file\r |
2 | # classes represent data in FDF\r | |
3 | #\r | |
f7496d71 | 4 | # Copyright (c) 2007 - 2018, Intel Corporation. All rights reserved.<BR>\r |
30fdf114 | 5 | #\r |
40d841f6 | 6 | # This program and the accompanying materials\r |
30fdf114 LG |
7 | # are licensed and made available under the terms and conditions of the BSD License\r |
8 | # which accompanies this distribution. The full text of the license may be found at\r | |
9 | # http://opensource.org/licenses/bsd-license.php\r | |
10 | #\r | |
11 | # THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,\r | |
12 | # WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.\r | |
13 | #\r | |
14 | \r | |
15 | ## FD data in FDF\r | |
16 | #\r | |
17 | #\r | |
18 | class FDClassObject:\r | |
19 | ## The constructor\r | |
20 | #\r | |
21 | # @param self The object pointer\r | |
22 | #\r | |
23 | def __init__(self):\r | |
24 | self.FdUiName = ''\r | |
25 | self.CreateFileName = None\r | |
26 | self.BaseAddress = None\r | |
27 | self.BaseAddressPcd = None\r | |
28 | self.Size = None\r | |
29 | self.SizePcd = None\r | |
e8a47801 | 30 | self.ErasePolarity = None\r |
30fdf114 LG |
31 | # 3-tuple list (blockSize, numBlocks, pcd)\r |
32 | self.BlockSizeList = []\r | |
33 | # DefineVarDict[var] = value\r | |
34 | self.DefineVarDict = {}\r | |
35 | # SetVarDict[var] = value\r | |
36 | self.SetVarDict = {}\r | |
37 | self.RegionList = []\r | |
30fdf114 | 38 | \r |
30fdf114 LG |
39 | ## FFS data in FDF\r |
40 | #\r | |
f7496d71 | 41 | #\r |
30fdf114 LG |
42 | class FfsClassObject:\r |
43 | ## The constructor\r | |
44 | #\r | |
45 | # @param self The object pointer\r | |
46 | #\r | |
47 | def __init__(self):\r | |
48 | self.NameGuid = None\r | |
49 | self.Fixed = False\r | |
50 | self.CheckSum = False\r | |
51 | self.Alignment = None\r | |
52 | self.SectionList = []\r | |
53 | \r | |
54 | ## FILE statement data in FDF\r | |
55 | #\r | |
f7496d71 | 56 | #\r |
30fdf114 LG |
57 | class FileStatementClassObject (FfsClassObject) :\r |
58 | ## The constructor\r | |
59 | #\r | |
60 | # @param self The object pointer\r | |
61 | #\r | |
62 | def __init__(self):\r | |
63 | FfsClassObject.__init__(self)\r | |
64 | self.FvFileType = None\r | |
65 | self.FileName = None\r | |
66 | self.KeyStringList = []\r | |
67 | self.FvName = None\r | |
68 | self.FdName = None\r | |
69 | self.DefineVarDict = {}\r | |
30fdf114 LG |
70 | self.KeepReloc = None\r |
71 | \r | |
72 | ## INF statement data in FDF\r | |
73 | #\r | |
74 | #\r | |
75 | class FfsInfStatementClassObject(FfsClassObject):\r | |
76 | ## The constructor\r | |
77 | #\r | |
78 | # @param self The object pointer\r | |
79 | #\r | |
80 | def __init__(self):\r | |
81 | FfsClassObject.__init__(self)\r | |
82 | self.Rule = None\r | |
83 | self.Version = None\r | |
84 | self.Ui = None\r | |
85 | self.InfFileName = None\r | |
86 | self.BuildNum = ''\r | |
87 | self.KeyStringList = []\r | |
88 | self.KeepReloc = None\r | |
89 | self.UseArch = None\r | |
90 | \r | |
30fdf114 LG |
91 | ## section data in FDF\r |
92 | #\r | |
f7496d71 | 93 | #\r |
30fdf114 LG |
94 | class SectionClassObject:\r |
95 | ## The constructor\r | |
96 | #\r | |
97 | # @param self The object pointer\r | |
98 | #\r | |
99 | def __init__(self):\r | |
100 | self.Alignment = None\r | |
f7496d71 | 101 | \r |
30fdf114 LG |
102 | ## Depex expression section in FDF\r |
103 | #\r | |
f7496d71 | 104 | #\r |
30fdf114 LG |
105 | class DepexSectionClassObject (SectionClassObject):\r |
106 | ## The constructor\r | |
107 | #\r | |
108 | # @param self The object pointer\r | |
109 | #\r | |
110 | def __init__(self):\r | |
111 | self.DepexType = None\r | |
112 | self.Expression = None\r | |
52302d4d | 113 | self.ExpressionProcessed = False\r |
30fdf114 LG |
114 | \r |
115 | ## Compress section data in FDF\r | |
116 | #\r | |
117 | #\r | |
118 | class CompressSectionClassObject (SectionClassObject) :\r | |
119 | ## The constructor\r | |
120 | #\r | |
121 | # @param self The object pointer\r | |
122 | #\r | |
123 | def __init__(self):\r | |
124 | SectionClassObject.__init__(self)\r | |
125 | self.CompType = None\r | |
126 | self.SectionList = []\r | |
127 | \r | |
128 | ## Data section data in FDF\r | |
129 | #\r | |
f7496d71 | 130 | #\r |
30fdf114 LG |
131 | class DataSectionClassObject (SectionClassObject):\r |
132 | ## The constructor\r | |
133 | #\r | |
134 | # @param self The object pointer\r | |
135 | #\r | |
136 | def __init__(self):\r | |
137 | SectionClassObject.__init__(self)\r | |
138 | self.SecType = None\r | |
139 | self.SectFileName = None\r | |
140 | self.SectionList = []\r | |
141 | self.KeepReloc = True\r | |
142 | \r | |
143 | ## Rule section data in FDF\r | |
144 | #\r | |
145 | #\r | |
146 | class EfiSectionClassObject (SectionClassObject):\r | |
147 | ## The constructor\r | |
148 | #\r | |
149 | # @param self The object pointer\r | |
150 | #\r | |
151 | def __init__(self):\r | |
152 | SectionClassObject.__init__(self)\r | |
153 | self.SectionType = None\r | |
154 | self.Optional = False\r | |
155 | self.FileType = None\r | |
156 | self.StringData = None\r | |
157 | self.FileName = None\r | |
158 | self.FileExtension = None\r | |
159 | self.BuildNum = None\r | |
160 | self.KeepReloc = None\r | |
161 | \r | |
162 | ## FV image section data in FDF\r | |
163 | #\r | |
f7496d71 | 164 | #\r |
30fdf114 LG |
165 | class FvImageSectionClassObject (SectionClassObject):\r |
166 | ## The constructor\r | |
167 | #\r | |
168 | # @param self The object pointer\r | |
169 | #\r | |
170 | def __init__(self):\r | |
171 | SectionClassObject.__init__(self)\r | |
172 | self.Fv = None\r | |
173 | self.FvName = None\r | |
174 | self.FvFileType = None\r | |
175 | self.FvFileName = None\r | |
176 | self.FvFileExtension = None\r | |
52302d4d | 177 | self.FvAddr = None\r |
30fdf114 LG |
178 | \r |
179 | ## GUIDed section data in FDF\r | |
180 | #\r | |
f7496d71 | 181 | #\r |
30fdf114 LG |
182 | class GuidSectionClassObject (SectionClassObject) :\r |
183 | ## The constructor\r | |
184 | #\r | |
185 | # @param self The object pointer\r | |
186 | #\r | |
187 | def __init__(self):\r | |
188 | SectionClassObject.__init__(self)\r | |
189 | self.NameGuid = None\r | |
190 | self.SectionList = []\r | |
191 | self.SectionType = None\r | |
192 | self.ProcessRequired = False\r | |
193 | self.AuthStatusValid = False\r | |
25918452 | 194 | self.ExtraHeaderSize = -1\r |
52302d4d LG |
195 | self.FvAddr = []\r |
196 | self.FvParentAddr = None\r | |
197 | self.IncludeFvSection = False\r | |
30fdf114 LG |
198 | \r |
199 | ## UI section data in FDF\r | |
200 | #\r | |
201 | #\r | |
202 | class UiSectionClassObject (SectionClassObject):\r | |
203 | ## The constructor\r | |
204 | #\r | |
205 | # @param self The object pointer\r | |
206 | #\r | |
207 | def __init__(self):\r | |
208 | SectionClassObject.__init__(self)\r | |
209 | self.StringData = None\r | |
210 | self.FileName = None\r | |
211 | \r | |
212 | ## Version section data in FDF\r | |
213 | #\r | |
f7496d71 | 214 | #\r |
30fdf114 LG |
215 | class VerSectionClassObject (SectionClassObject):\r |
216 | ## The constructor\r | |
217 | #\r | |
218 | # @param self The object pointer\r | |
219 | #\r | |
220 | def __init__(self):\r | |
221 | SectionClassObject.__init__(self)\r | |
222 | self.BuildNum = None\r | |
223 | self.StringData = None\r | |
224 | self.FileName = None\r | |
225 | \r | |
226 | ## Rule data in FDF\r | |
227 | #\r | |
228 | #\r | |
229 | class RuleClassObject :\r | |
230 | ## The constructor\r | |
231 | #\r | |
232 | # @param self The object pointer\r | |
233 | #\r | |
234 | def __init__(self):\r | |
235 | self.Arch = None\r | |
236 | self.ModuleType = None # For Module Type\r | |
237 | self.TemplateName = None\r | |
238 | self.NameGuid = None\r | |
239 | self.Fixed = False\r | |
240 | self.Alignment = None\r | |
52302d4d | 241 | self.SectAlignment = None\r |
30fdf114 LG |
242 | self.CheckSum = False\r |
243 | self.FvFileType = None # for Ffs File Type\r | |
244 | self.KeyStringList = []\r | |
245 | self.KeepReloc = None\r | |
246 | \r | |
247 | ## Complex rule data in FDF\r | |
248 | #\r | |
f7496d71 | 249 | #\r |
30fdf114 LG |
250 | class RuleComplexFileClassObject(RuleClassObject) :\r |
251 | ## The constructor\r | |
252 | #\r | |
253 | # @param self The object pointer\r | |
254 | #\r | |
255 | def __init__(self):\r | |
256 | RuleClassObject.__init__(self)\r | |
257 | self.SectionList = []\r | |
258 | \r | |
259 | ## Simple rule data in FDF\r | |
260 | #\r | |
261 | #\r | |
262 | class RuleSimpleFileClassObject(RuleClassObject) :\r | |
263 | ## The constructor\r | |
264 | #\r | |
265 | # @param self The object pointer\r | |
266 | #\r | |
267 | def __init__(self):\r | |
268 | RuleClassObject.__init__(self)\r | |
269 | self.FileName = None\r | |
270 | self.SectionType = ''\r | |
271 | self.FileExtension = None\r | |
272 | \r | |
273 | ## File extension rule data in FDF\r | |
274 | #\r | |
275 | #\r | |
276 | class RuleFileExtensionClassObject(RuleClassObject):\r | |
277 | ## The constructor\r | |
278 | #\r | |
279 | # @param self The object pointer\r | |
280 | #\r | |
281 | def __init__(self):\r | |
282 | RuleClassObject.__init__(self)\r | |
283 | self.FileExtension = None\r | |
284 | \r | |
285 | ## Capsule data in FDF\r | |
286 | #\r | |
f7496d71 | 287 | #\r |
30fdf114 LG |
288 | class CapsuleClassObject :\r |
289 | ## The constructor\r | |
290 | #\r | |
291 | # @param self The object pointer\r | |
292 | #\r | |
293 | def __init__(self):\r | |
294 | self.SpecName = None\r | |
295 | self.UiCapsuleName = None\r | |
296 | self.CreateFile = None\r | |
297 | self.GroupIdNumber = None\r | |
298 | # DefineVarDict[var] = value\r | |
299 | self.DefineVarDict = {}\r | |
300 | # SetVarDict[var] = value\r | |
301 | self.SetVarDict = {}\r | |
302 | # TokensDict[var] = value\r | |
303 | self.TokensDict = {}\r | |
304 | self.CapsuleDataList = []\r | |
a3251d84 | 305 | self.FmpPayloadList = []\r |
30fdf114 | 306 | \r |
30fdf114 LG |
307 | ## OptionROM data in FDF\r |
308 | #\r | |
309 | #\r | |
310 | class OptionRomClassObject:\r | |
311 | ## The constructor\r | |
312 | #\r | |
313 | # @param self The object pointer\r | |
314 | #\r | |
315 | def __init__(self):\r | |
316 | self.DriverName = None\r | |
317 | self.FfsList = []\r | |
f7496d71 | 318 | \r |